From: Max Carrara <m.carrara@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH v2 pve-manager 2/2] ceph: mon: adapt code style in mon removal assertion
Date: Thu, 14 Mar 2024 11:19:30 +0100 [thread overview]
Message-ID: <20240314101930.198214-2-m.carrara@proxmox.com> (raw)
In-Reply-To: <20240314101930.198214-1-m.carrara@proxmox.com>
Signed-off-by: Max Carrara <m.carrara@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
next prev parent reply other threads:[~2024-03-14 10:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-14 10:19 [pve-devel] [PATCH v2 pve-manager 1/2] fix #5198: ceph: mon: fix mon existence check " Max Carrara
2024-03-14 10:19 ` Max Carrara [this message]
2024-03-21 17:14 ` [pve-devel] applied: " Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240314101930.198214-2-m.carrara@proxmox.com \
--to=m.carrara@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.