From: Dominik Csapak Date: Mon, 27 May 2019 07:21:39 +0000 (+0200) Subject: get_node_kv: unpack result from pmxcfs X-Git-Url: https://git.proxmox.com/?p=pve-cluster.git;a=commitdiff_plain;h=14000cd7140b2bb9ea0faa8ce9d686d9c72ff26f get_node_kv: unpack result from pmxcfs in 'broadcast_node_kv' we send the status and make sure its always a scalar so it gets send as a null terminated string via pack(Z*) when we get it back from pmxcfs we have to unpack(Z*) again, or we get a string with a trailing '\0' Signed-off-by: Dominik Csapak --- diff --git a/data/PVE/Cluster.pm b/data/PVE/Cluster.pm index 6702187..7f9b88e 100644 --- a/data/PVE/Cluster.pm +++ b/data/PVE/Cluster.pm @@ -579,7 +579,7 @@ sub get_node_kv { my $get_node_data = sub { my ($node) = @_; my $raw = $ipcc_get_status->("kv/$key", $node); - $res->{$node} = $raw if $raw; + $res->{$node} = unpack("Z*", $raw) if $raw; }; if ($nodename) {