[pve-devel] [PATCH v2 pve-manager 2/2] ceph: mon: adapt code style in mon removal assertion
Max Carrara
m.carrara at proxmox.com
Thu Mar 14 11:19:30 CET 2024
Signed-off-by: Max Carrara <m.carrara at proxmox.com>
---
PVE/API2/Ceph/MON.pm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/PVE/API2/Ceph/MON.pm b/PVE/API2/Ceph/MON.pm
index 057ca70d..d5b219bf 100644
--- a/PVE/API2/Ceph/MON.pm
+++ b/PVE/API2/Ceph/MON.pm
@@ -148,13 +148,13 @@ my $assert_mon_can_remove = sub {
my ($monhash, $monlist, $monid, $mondir) = @_;
if (!(defined($monhash->{$monid}) ||
- grep { defined($_->{name}) && $_->{name} eq $monid } @$monlist))
+ grep { defined($_->{name}) && $_->{name} eq $monid } $monlist->@*))
{
die "no such monitor id '$monid'\n"
}
die "monitor filesystem '$mondir' does not exist on this node\n" if ! -d $mondir;
- die "can't remove last monitor\n" if scalar(@$monlist) <= 1;
+ die "can't remove last monitor\n" if scalar($monlist->@*) <= 1;
};
my $remove_addr_from_mon_host = sub {
--
2.39.2
More information about the pve-devel
mailing list