From 5b949979f7179b1135dead8b4a8af5b5057accff Mon Sep 17 00:00:00 2001 From: Maximiliano Sandoval Date: Fri, 24 Oct 2025 14:13:09 +0200 Subject: [PATCH] disks: add a guard possible nonexistent field When running pveceph osd create one would get one or two warnings: Use of uninitialized value in pattern match (m//) at /usr/share/perl5/PVE/Diskmanage.pm line 317. Signed-off-by: Maximiliano Sandoval Link: https://lore.proxmox.com/20251024121309.1253604-1-m.sandoval@proxmox.com Signed-off-by: Thomas Lamprecht --- src/PVE/Diskmanage.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/src/PVE/Diskmanage.pm b/src/PVE/Diskmanage.pm index 1062bfd..d1cf24d 100644 --- a/src/PVE/Diskmanage.pm +++ b/src/PVE/Diskmanage.pm @@ -316,6 +316,7 @@ sub get_ceph_volume_infos { # $result autovivification is wanted, to not creating empty hashes if ( ($type eq 'block' || $type eq 'data') + && $fields->[2] && $fields->[2] =~ m/ceph.osd_id=([^,]+)/ ) { $result->{$dev}->{osdid} = $1;