]> git.proxmox.com Git - pve-storage.git/blobdiff - PVE/Storage/RBDPlugin.pm
rbd: warn if no stats for a pool could be gathered
[pve-storage.git] / PVE / Storage / RBDPlugin.pm
index 9ee6a3759357bf1eab43deb668a5c69b4f328b5b..fb48c3f3f5b44804a6681a327849efda31dbccfb 100644 (file)
@@ -634,6 +634,11 @@ sub status {
 
     my ($d) = grep { $_->{name} eq $pool } @{$df->{pools}};
 
+    if (!defined($d)) {
+       warn "could not get usage stats for pool '$pool'\n";
+       return;
+    }
+
     # max_avail -> max available space for data w/o replication in the pool
     # bytes_used -> data w/o replication in the pool
     my $free = $d->{stats}->{max_avail};