From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id 2032B1FF0DF for ; Thu, 19 Nov 2026 11:00:15 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 9ACB121753; Thu, 19 Nov 2026 10:59:42 +0100 (CET) From: Dominik Rusovac To: pve-devel@lists.proxmox.com Subject: [PATCH-SERIES docs/ha-manager/manager v5 00/10] fix #6144: add api and ui for node maintenance mode Date: Thu, 19 Nov 2026 10:59:21 +0100 Message-ID: <20261119095931.1748970-1-d.rusovac@proxmox.com> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1795082374858 X-SPAM-LEVEL: Spam detection results: 0 AWL -0.122 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) POISEN_SPAM_PILL 0.1 Meta: its spam POISEN_SPAM_PILL_1 0.1 random spam to be learned in bayes POISEN_SPAM_PILL_3 0.1 random spam to be learned in bayes RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: QZ4KK6PYMFPXBFXJNDZ37EUB4AGFC6YV X-Message-ID-Hash: QZ4KK6PYMFPXBFXJNDZ37EUB4AGFC6YV X-MailFrom: d.rusovac@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: this picks up Thomas' v3 [0], rebased onto current master and reworked in a few places; thx for the nice work Thomas! I added `Originally-by` trailers node maintenance mode can currently only be enabled/disabled with the HA manager's CRM command in the CLI. this series adds an API endpoint and a 'Node Maintenance' menu in the HA status panel for it the endpoint lives at PUT /nodes/{node}/maintenance in pve-manager, as agreed on in the v1/v2 reviews, so that the maintenance concept can be extended beyond HA managed resources later on. for now, it runs the HA manager's CLI command and forwards its errors. the CLI now rejects nodes unknown to the HA stack as well as enabling maintenance mode while HA is disarmed or if the node is not online from the CRM's point of view, since the CRM would ignore such requests. the validation of a request is factored out of the CRM, so that the CRM and the CLI share the same logic to decide which action to offer, the UI uses the maintenance request recorded by the CRM, which the HA status API now reports, instead of the mode the LRM reports. the LRM also enters maintenance mode on shutdown with the 'migrate' shutdown policy, which a disable request cannot undo on top of that, the HA status API also reports whether a maintenance request is still queued for the CRM, so that the UI can show a spinner until the CRM processed the request, even if it ignored it. as discussed offline, these two patches are optional and can be left out together, the rest of the series works without them basic functionality was tested in a virtualized 3-node cluster: * enabling/disabling worked as expected using the UI * possible actions were offered as expected * errors are forwarded in both the CLI and UI changes since v4 [1]: * ha-manager: add a test for ignored node maintenance requests * ha-manager: standardize the log messages for ignored maintenance mode requests * ha-manager: factor out the reasons why the CRM ignores a request to enable maintenance mode * ha-manager: cli: reject node maintenance requests that the CRM would ignore * ha-manager: api: status: also report whether a node maintenance request is still queued for the CRM * manager: api: run the HA manager's CLI command instead of reading the HA manager status and queuing the CRM command directly * manager: ui: rename the selected node in the view model, throw on unknown maintenance modes * manager: ui: split out the spinner into a separate, optional patch, and show it while the request is queued, so that it also ends if the CRM ignores the request changes since v3: * rebase onto current master, including the arm/disarm changes, which also added a toolbar to the HA status panel * ha-manager: report the CRM maintenance request instead of the LRM mode * manager: api: check Sys.Modify on /nodes/{node} instead of /, reject nodes unknown to HA, and reject enabling maintenance while HA is disarmed or if the node is not online * manager: ui: move the menu next to Arm/Disarm, use the view model and controller of the HA status panel, fix selection handling, use complete sentences for translatable strings, show a spinner while a maintenance request is processed * docs: condense the UI instructions and adapt them to the menu [0] https://lore.proxmox.com/all/20251025183814.698627-1-thomas@atskinner.net/ [1] https://lore.proxmox.com/all/20261113152620.2662417-1-d.rusovac@proxmox.com/ pve-manager: Dominik Rusovac (3): fix #6144: api: nodes: add endpoint to set maintenance mode fix #6144: ui: ha: status: allow toggling maintenance mode ui: ha: status: show spinner while maintenance mode request is queued PVE/API2/Nodes.pm | 45 ++++++++++++++ www/manager6/ha/Status.js | 107 ++++++++++++++++++++++++++++++++++ www/manager6/ha/StatusView.js | 45 +++++++++++++- 3 files changed, 196 insertions(+), 1 deletion(-) pve-ha-manager: Dominik Rusovac (6): test: add test for ignoring maintenance mode request manager: standardize log messages for maintenance mode request manager: factor out check for maintenance mode request cli: reject maintenance mode requests rejected by crm api: status: report maintenance mode request for lrm entries api: status: report queued maintenance mode request for lrm entries src/PVE/API2/HA/Status.pm | 26 ++++++ src/PVE/CLI/ha_manager.pm | 22 ++++- src/PVE/HA/Config.pm | 13 +++ src/PVE/HA/Helpers.pm | 21 +++++ src/PVE/HA/Manager.pm | 19 ++--- .../test-crm-maintenance-request2/log.expect | 2 +- src/test/test-crm-maintenance-request6/README | 3 + .../test-crm-maintenance-request6/cmdlist | 9 ++ .../hardware_status | 5 ++ .../test-crm-maintenance-request6/log.expect | 82 +++++++++++++++++++ .../manager_status | 1 + .../service_config | 5 ++ 12 files changed, 191 insertions(+), 17 deletions(-) create mode 100644 src/test/test-crm-maintenance-request6/README create mode 100644 src/test/test-crm-maintenance-request6/cmdlist create mode 100644 src/test/test-crm-maintenance-request6/hardware_status create mode 100644 src/test/test-crm-maintenance-request6/log.expect create mode 100644 src/test/test-crm-maintenance-request6/manager_status create mode 100644 src/test/test-crm-maintenance-request6/service_config pve-docs: Dominik Rusovac (1): ha-manager: maintenance mode: mention web ui menu ha-manager.adoc | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) Summary over all repositories: 16 files changed, 396 insertions(+), 24 deletions(-) -- Generated by murpp 0.11.0