From c75f019a552333a05831ad6082c9cfc21203dd6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= Date: Tue, 5 Sep 2017 14:59:39 +0200 Subject: [PATCH] ceph/destroypool: refactor to use get_storages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fabian Grünbichler --- PVE/API2/Ceph.pm | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/PVE/API2/Ceph.pm b/PVE/API2/Ceph.pm index 53483dde..171a6131 100644 --- a/PVE/API2/Ceph.pm +++ b/PVE/API2/Ceph.pm @@ -1846,10 +1846,8 @@ __PACKAGE__->register_method ({ # vm disks are on it anymore if (!$param->{force}) { my $storagecfg = PVE::Storage::config(); - foreach my $storageid (keys %{$storagecfg->{ids}}) { - my $storage = $storagecfg->{ids}->{$storageid}; - next if $storage->{type} ne 'rbd'; - next if $storage->{pool} ne $pool; + foreach my $storageid (keys %$storages) { + my $storage = $storages->{$storageid}; # check if any vm disks are on the pool my $res = PVE::Storage::vdisk_list($storagecfg, $storageid);