[pve-devel] [PATCH cluster] get_node_kv: unpack result from pmxcfs
Dominik Csapak
d.csapak at proxmox.com
Mon May 27 09:21:39 CEST 2019
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 <d.csapak at proxmox.com>
---
data/PVE/Cluster.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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) {
--
2.11.0
More information about the pve-devel
mailing list