all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Rusovac <d.rusovac@proxmox.com>
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	[thread overview]
Message-ID: <20261119095931.1748970-1-d.rusovac@proxmox.com> (raw)

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




             reply	other threads:[~2026-11-19 10:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-19  9:59 Dominik Rusovac [this message]
2026-11-19  9:59 ` [PATCH pve-manager v5 01/10] fix #6144: api: nodes: add endpoint to set maintenance mode Dominik Rusovac
2026-11-19  9:59 ` [PATCH pve-manager v5 02/10] fix #6144: ui: ha: status: allow toggling " Dominik Rusovac
2026-11-19  9:59 ` [PATCH pve-manager v5 03/10] ui: ha: status: show spinner while maintenance mode request is queued Dominik Rusovac
2026-11-19  9:59 ` [PATCH pve-ha-manager v5 04/10] test: add test for ignoring maintenance mode request Dominik Rusovac
2026-11-19  9:59 ` [PATCH pve-ha-manager v5 05/10] manager: standardize log messages for " Dominik Rusovac
2026-11-19  9:59 ` [PATCH pve-ha-manager v5 06/10] manager: factor out check " Dominik Rusovac
2026-11-19  9:59 ` [PATCH pve-ha-manager v5 07/10] cli: reject maintenance mode requests rejected by crm Dominik Rusovac
2026-11-19  9:59 ` [PATCH pve-ha-manager v5 08/10] api: status: report maintenance mode request for lrm entries Dominik Rusovac
2026-11-19  9:59 ` [PATCH pve-ha-manager v5 09/10] api: status: report queued " Dominik Rusovac
2026-11-19  9:59 ` [PATCH pve-docs v5 10/10] ha-manager: maintenance mode: mention web ui menu Dominik Rusovac
2026-11-19 22:28 ` applied: [PATCH-SERIES docs/ha-manager/manager v5 00/10] fix #6144: add api and ui for node maintenance mode 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=20261119095931.1748970-1-d.rusovac@proxmox.com \
    --to=d.rusovac@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.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal