api: ceph: $get_storages check if data-pool too
When removing a pool, we check against any storage that might have that pool configured. We need to check if that pool is used as data-pool too. Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
This commit is contained in:
parent
fa0fc52008
commit
1eb6072f49
@ -302,8 +302,13 @@ my $get_storages = sub {
|
||||
my $res = {};
|
||||
foreach my $storeid (keys %$storages) {
|
||||
my $curr = $storages->{$storeid};
|
||||
$res->{$storeid} = $storages->{$storeid}
|
||||
if $curr->{type} eq 'rbd' && $pool eq $curr->{pool};
|
||||
next if $curr->{type} ne 'rbd';
|
||||
if (
|
||||
$pool eq $curr->{pool} ||
|
||||
(defined $curr->{'data-pool'} && $pool eq $curr->{'data-pool'})
|
||||
) {
|
||||
$res->{$storeid} = $storages->{$storeid};
|
||||
}
|
||||
}
|
||||
|
||||
return $res;
|
||||
|
Loading…
x
Reference in New Issue
Block a user