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:
Thomas Lamprecht 2021-04-21 17:34:22 +02:00
parent 27cc48c212
commit a91bd3c370

View File

@ -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 $@;
}
};