[pve-devel] applied: [PATCH cluster] get_node_kv: unpack result from pmxcfs

Thomas Lamprecht t.lamprecht at proxmox.com
Mon May 27 12:57:32 CEST 2019


On 5/27/19 9:21 AM, Dominik Csapak wrote:
> 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) {
> 

applied, thanks!




More information about the pve-devel mailing list