<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>53005</bug_id>
          
          <creation_ts>2025-02-09 16:04:34 +0300</creation_ts>
          <short_desc>Ошибка при выполнении команды pvecm add: malformed UTF-8 character in JSON string</short_desc>
          <delta_ts>2025-03-01 19:13:24 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>pve-cluster</component>
          <version>unstable</version>
          <rep_platform>x86_64</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P5</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="zvn_mail">zvn_mail</reporter>
          <assigned_to name="Alexey Shabalin">shaba</assigned_to>
          <cc>alimektor</cc>
    
    <cc>j74</cc>
    
    <cc>shaba</cc>
    
    <cc>shrek</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>258923</commentid>
    <comment_count>0</comment_count>
    <who name="zvn_mail">zvn_mail</who>
    <bug_when>2025-02-09 16:04:34 +0300</bug_when>
    <thetext>создаю тестовый кластер

pve1 (10.1.2.101):
systemctl start pve-cluster
pvecm create mycluster

pve2 (10.1.2.102):
systemctl start pve-cluster
pvecm add pve1

Please enter superuser (root) password for &apos;pve1&apos;: ********
Establishing API connection with host &apos;pve1&apos;
The authenticity of host &apos;pve1&apos; can&apos;t be established.
X509 SHA256 key fingerprint is A4:D2:8B:8B:C1:88:BE:F6:CF:15:A8:7C:7D:0F:AC:EF:4B:8E:C1:95:14:58:D2:28:31:6A:E0:D2:18:BC:B6:44.
Are you sure you want to continue connecting (yes/no)? Login succeeded.
check cluster join API version
No cluster network links passed explicitly, fallback to local node IP &apos;10.1.2.102&apos;
Request addition of this node

TASK ERROR: malformed UTF-8 character in JSON string, at character offset 30 (before &quot;\x{fffd}t,\x{fffd}]J...&quot;) at /usr/share/perl5/JSON.pm line 193, &lt;STDIN&gt; line 1.


pve1:

/usr/share/perl5/PVE/Cluster/Setup.pm
sub join {
...
    my $res = eval { $conn-&gt;post(&quot;/cluster/config/nodes/$nodename&quot;, $args); };
...

/usr/share/perl5/PVE/APIClient/LWP.pm
sub call {
...
	} elsif ($method eq &apos;POST&apos;) {
	$response = $ua-&gt;request(HTTP::Request::Common::POST($uri, Content =&gt; $param));
...
	my $msg = $response-&gt;message;
	my $errors = eval {
	    return if $ct !~ m|application/json|;
print &quot;decoded_content : &quot; .  $response-&gt;decoded_content . &quot;\n&quot;;
	    my $res = from_json($response-&gt;decoded_content, {utf8 =&gt; 1, allow_nonref =&gt; 1});
	    return $res-&gt;{errors};
	};

decoded_content выводит json с содержимым authfile (со стороны pve1), но часть симоволов закодирована как (\u....)


pve2:

/usr/share/perl5/PVE/API2/ClusterConfig.pm
__PACKAGE__-&gt;register_method ({
    name =&gt; &apos;addnode&apos;,
    path =&gt; &apos;nodes/{node}&apos;,
    method =&gt; &apos;POST&apos;,
...
	my $res = {
	    corosync_authkey =&gt; PVE::Tools::file_get_contents($authfile),
	    corosync_conf =&gt; PVE::Tools::file_get_contents($clusterconf),
	    warnings =&gt; $vc_warnings,
	};

	return $res;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>259033</commentid>
    <comment_count>1</comment_count>
    <who name="Evgeny Shesteperov">alimektor</who>
    <bug_when>2025-02-11 13:23:12 +0300</bug_when>
    <thetext>Версия: pve-cluster-8.0.10-alt1

Воспроизводится в P11.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>259885</commentid>
    <comment_count>2</comment_count>
    <who name="zvn_mail">zvn_mail</who>
    <bug_when>2025-02-24 18:44:43 +0300</bug_when>
    <thetext>(Ответ для Evgeny Shesteperov на комментарий #1)
&gt; Версия: pve-cluster-8.0.10-alt1
&gt; 
&gt; Воспроизводится в P11.

уже не воспроизводится (м.б. причина была в pve-http-server)</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>