From: "Dominik Rusovac" <d.rusovac@proxmox.com>
To: "Thomas Lamprecht" <t.lamprecht@proxmox.com>,
<pve-devel@lists.proxmox.com>
Subject: Re: [PATCH ha-manager 3/3] api: status: add disarm-ha and arm-ha endpoints and CLI wiring
Date: Tue, 17 Mar 2026 13:47:48 +0100 [thread overview]
Message-ID: <DH52HND25KX4.2GDLMZKKON2O0@proxmox.com> (raw)
In-Reply-To: <20260309220128.973793-4-t.lamprecht@proxmox.com>
Please see my comments inline.
On Mon Mar 9, 2026 at 10:57 PM CET, Thomas Lamprecht wrote:
[snip]
Extend the fencing status entry with disarming/disarmed states and
the active resource mode. Each LRM entry shows 'watchdog released'
once in disarm mode. The master and service status lines include the
disarm state when applicable.
These status extensions provide useful information in the web UI, which
is very nice!
[snip]
+__PACKAGE__->register_method({
+ name => 'disarm-ha',
+ path => 'disarm-ha',
+ method => 'POST',
protected => 1,
cfs-lock requires root privileges to create lock directory, thus
endpoint needs to be protected.
+ description => "Request disarming the HA stack, releasing all watchdogs cluster-wide.",
+ permissions => {
+ check => ['perm', '/', ['Sys.Console']],
+ },
+ parameters => {
+ additionalProperties => 0,
+ properties => {
+ 'resource-mode' => {
+ description => "Controls how HA managed resources are handled while disarmed."
+ . " The current state of resources is not affected."
+ . " 'freeze': new commands and state changes are not applied."
+ . " 'ignore': resources are removed from HA tracking and can be"
+ . " managed as if they were not HA managed.",
+ type => 'string',
+ enum => ['freeze', 'ignore'],
+ },
+ },
+ },
+ returns => { type => 'null' },
+ code => sub {
+ my ($param) = @_;
+
nit: Adding a guard that checks on prohibited use, e.g., some node is in
maintenance state in combination with resource mode is 'ignore'; and
returning some information as to why the disarming command was ignored,
increases usability. This would of course entail the need for a
different return type.
+ PVE::HA::Config::queue_crm_commands("disarm-ha $param->{'resource-mode'}");
+
+ return undef;
+ },
+});
+
+__PACKAGE__->register_method({
+ name => 'arm-ha',
+ path => 'arm-ha',
+ method => 'POST',
protected => 1,
cfs-lock requires root privileges to create lock directory, thus
endpoint needs to be protected.
+ description => "Request re-arming the HA stack after it was disarmed.",
[snip]
next prev parent reply other threads:[~2026-03-17 12:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-09 21:57 [PATCH ha-manager 0/3] fix #2751: implement disarm/arm HA for safer cluster maintenance Thomas Lamprecht
2026-03-09 21:57 ` [PATCH ha-manager 1/3] api: status: add fencing status entry with armed/standby state Thomas Lamprecht
2026-03-09 21:57 ` [PATCH ha-manager 2/3] fix #2751: implement disarm-ha and arm-ha for safe cluster maintenance Thomas Lamprecht
2026-03-17 12:36 ` Dominik Rusovac
2026-03-09 21:57 ` [PATCH ha-manager 3/3] api: status: add disarm-ha and arm-ha endpoints and CLI wiring Thomas Lamprecht
2026-03-17 12:47 ` Dominik Rusovac [this message]
2026-03-17 12:35 ` [PATCH ha-manager 0/3] fix #2751: implement disarm/arm HA for safer cluster maintenance Dominik Rusovac
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=DH52HND25KX4.2GDLMZKKON2O0@proxmox.com \
--to=d.rusovac@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
--cc=t.lamprecht@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox