[pve-devel] [PATCH v2 storage 3/7] rbd: adapt to changed rados mon_command return values

Aaron Lauterer a.lauterer at proxmox.com
Fri Mar 25 11:55:06 CET 2022


mon_command now returns a hash ref. Only the data is of interest.

Signed-off-by: Aaron Lauterer <a.lauterer at proxmox.com>
---
Needs to be coordinated with librados2-perl changes from patch 1

 PVE/Storage/RBDPlugin.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PVE/Storage/RBDPlugin.pm b/PVE/Storage/RBDPlugin.pm
index e287e28..f8fcab7 100644
--- a/PVE/Storage/RBDPlugin.pm
+++ b/PVE/Storage/RBDPlugin.pm
@@ -594,7 +594,7 @@ sub status {
     my ($class, $storeid, $scfg, $cache) = @_;
 
     my $rados = $librados_connect->($scfg, $storeid);
-    my $df = $rados->mon_command({ prefix => 'df', format => 'json' });
+    my $df = $rados->mon_command({ prefix => 'df', format => 'json' })->{data};
 
     my ($d) = grep { $_->{name} eq $scfg->{pool} } @{$df->{pools}};
 
-- 
2.30.2






More information about the pve-devel mailing list