[pve-devel] [PATCH manager 3/6] api: osd: force mon_command to scalar context

Aaron Lauterer a.lauterer at proxmox.com
Fri Feb 18 12:38:24 CET 2022


With the changes in librados2-perl, we need to make sure to call it in
scalar context.

Signed-off-by: Aaron Lauterer <a.lauterer at proxmox.com>
---
This needs to be released in combination with the previous changes (2/6)
in librados2-perl to not break OSD removal!

 PVE/API2/Ceph/OSD.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PVE/API2/Ceph/OSD.pm b/PVE/API2/Ceph/OSD.pm
index 93433b3a..26d61e3b 100644
--- a/PVE/API2/Ceph/OSD.pm
+++ b/PVE/API2/Ceph/OSD.pm
@@ -574,7 +574,7 @@ __PACKAGE__->register_method ({
 	my $rados = PVE::RADOS->new();
 
 	my $osd_belongs_to_node = osd_belongs_to_node(
-	    $rados->mon_command({ prefix => 'osd tree' }),
+	    scalar($rados->mon_command({ prefix => 'osd tree' })),
 	    $param->{node},
 	    $osdid,
 	);
-- 
2.30.2






More information about the pve-devel mailing list