]> git.proxmox.com Git - pve-manager.git/commitdiff
pve5to6: avoid Use of uninitialized value $osd_flags in pattern match
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 25 Jun 2019 08:04:59 +0000 (10:04 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 25 Jun 2019 08:04:59 +0000 (10:04 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
PVE/CLI/pve5to6.pm

index 98981299d8bf593ecfebc55ec92bed1a1b895077..e573268164676144b4f0cb5fff788aa8611b1d9b 100644 (file)
@@ -235,7 +235,8 @@ sub check_ceph {
     log_info("getting Ceph status/health information..");
     my $ceph_status = eval { PVE::API2::Ceph->status({ node => $nodename }); };
     my $osd_flags = eval { PVE::API2::Ceph->get_flags({ node => $nodename }); };
-    my $noout = $osd_flags =~ m/noout/;
+    my $noout;
+    $noout = $osd_flags =~ m/noout/ if $osd_flags;
 
     if (!$ceph_status || !$ceph_status->{health}) {
        log_fail("unable to determine Ceph status!");