mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-07-09 09:26:01 +00:00
api: ceph pool create: replace left-over complex error handling
this was from the time where we had a loop here to add two storages, one for KRDB-only and one for KRBD-never. Nowadays we can handle the mixed case just fine, but the patch dropping that forget to cleanup the error handling.. Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
27cc48c212
commit
a91bd3c370
@ -370,14 +370,8 @@ __PACKAGE__->register_method ({
|
||||
PVE::Ceph::Tools::create_pool($pool, $param);
|
||||
|
||||
if ($add_storages) {
|
||||
my $err;
|
||||
eval { $add_storage->($pool, "${pool}"); };
|
||||
if ($@) {
|
||||
warn "failed to add storage: $@";
|
||||
$err = 1;
|
||||
}
|
||||
die "adding storage for pool '$pool' failed, check log and add manually!\n"
|
||||
if $err;
|
||||
eval { $add_storage->($pool, "${pool}") };
|
||||
die "adding PVE storage for ceph pool '$pool' failed: $@\n" if $@;
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user