From a91bd3c3707c0352670497e17a4edd7667055cd7 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Wed, 21 Apr 2021 17:34:22 +0200 Subject: [PATCH] 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 --- PVE/API2/Ceph/Pools.pm | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/PVE/API2/Ceph/Pools.pm b/PVE/API2/Ceph/Pools.pm index b7b1460e..002f7893 100644 --- a/PVE/API2/Ceph/Pools.pm +++ b/PVE/API2/Ceph/Pools.pm @@ -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 $@; } };