* [PATCH-SERIES docs/ha-manager/manager v4 0/4] fix #6144: add api and ui for node maintenance mode
@ 2026-11-13 15:26 Dominik Rusovac
2026-11-13 15:26 ` [PATCH pve-manager v4 1/4] api: nodes: add endpoint to set " Dominik Rusovac
` (4 more replies)
0 siblings, 5 replies; 13+ messages in thread
From: Dominik Rusovac @ 2026-11-13 15:26 UTC (permalink / raw)
To: pve-devel
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 just queues the same CRM command as
the CLI. it 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
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
the UI patch (2/4) depends on the pve-ha-manager patch (3/4), as it uses the
maintenance request reported by the HA status API, so pve-manager needs a
bumped dependency on pve-ha-manager
basic functionality was tested in a virtualized 3-node cluster:
* enabling/disabling worked as expected
* possible actions were offered as expected
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/
pve-manager:
Dominik Rusovac (2):
api: nodes: add endpoint to set maintenance mode
fix #6144: ui: ha: status: allow toggling maintenance mode
PVE/API2/Nodes.pm | 54 ++++++++++++++++++
www/manager6/ha/Status.js | 102 ++++++++++++++++++++++++++++++++++
www/manager6/ha/StatusView.js | 36 +++++++++++-
3 files changed, 191 insertions(+), 1 deletion(-)
pve-ha-manager:
Dominik Rusovac (1):
api: status: report node maintenance request for lrm entries
src/PVE/API2/HA/Status.pm | 10 ++++++++++
1 file changed, 10 insertions(+)
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:
5 files changed, 210 insertions(+), 7 deletions(-)
--
Generated by murpp 0.11.0
^ permalink raw reply [flat|nested] 13+ messages in thread* [PATCH pve-manager v4 1/4] api: nodes: add endpoint to set maintenance mode 2026-11-13 15:26 [PATCH-SERIES docs/ha-manager/manager v4 0/4] fix #6144: add api and ui for node maintenance mode Dominik Rusovac @ 2026-11-13 15:26 ` Dominik Rusovac 2026-11-16 11:57 ` Daniel Kral 2026-11-13 15:26 ` [PATCH pve-manager v4 2/4] fix #6144: ui: ha: status: allow toggling " Dominik Rusovac ` (3 subsequent siblings) 4 siblings, 1 reply; 13+ messages in thread From: Dominik Rusovac @ 2026-11-13 15:26 UTC (permalink / raw) To: pve-devel; +Cc: Thomas Skinner node maintenance mode can currently only be requested with the HA manager's CLI, which can't be used from the web UI add an endpoint to enable/disable maintenance mode for a node, which lives below the node path rather than the HA API, so that the maintenance concept can be extended to more than HA managed resources later on. for now, it queues the same CRM command as the HA manager's CLI command requests for nodes unknown to the HA manager are rejected. since maintenance is restricted to HA, maintenance mode has no effect on such nodes yet and the queued command would make an idle CRM become active requests to enable maintenance mode are rejected while HA is disarmed or if the respective node is not online from the CRM's point of view. the CRM ignores such requests and logs a message. disabling is still possible in any case as the CRM always processes such requests Originally-by: Thomas Skinner <thomas@atskinner.net> Signed-off-by: Dominik Rusovac <d.rusovac@proxmox.com> --- Notes: changes since v3: * reword commit subject and body * check Sys.Modify on /nodes/{node} instead of /, as suggested in the v2 review * reject requests for nodes unknown to the HA stack * reject enabling maintenance mode while HA is disarmed or if the node is not online from the CRM's point of view, as the CRM ignores such requests PVE/API2/Nodes.pm | 54 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/PVE/API2/Nodes.pm b/PVE/API2/Nodes.pm index 1e2a96f1..af4c92f6 100644 --- a/PVE/API2/Nodes.pm +++ b/PVE/API2/Nodes.pm @@ -242,6 +242,7 @@ __PACKAGE__->register_method({ { name => 'hosts' }, { name => 'journal' }, { name => 'lxc' }, + { name => 'maintenance' }, { name => 'migrateall' }, { name => 'netstat' }, { name => 'network' }, @@ -2901,6 +2902,59 @@ __PACKAGE__->register_method({ }, }); +__PACKAGE__->register_method({ + name => 'maintenance_set', + protected => 1, + path => 'maintenance', + method => 'PUT', + description => "Enable or disable maintenance mode for the node. Currently, this only" + . " requests the HA node maintenance mode.", + permissions => { + check => ['perm', '/nodes/{node}', ['Sys.Modify']], + }, + parameters => { + additionalProperties => 0, + properties => { + node => get_standard_option('pve-node'), + 'maintenance-mode' => { + description => "Requests enabling or disabling maintenance mode. Currently," + . " this only moves HA managed resources away from the node.", + type => 'string', + enum => ['enable', 'disable'], + }, + }, + }, + returns => { type => 'null' }, + code => sub { + my ($param) = @_; + + my $node = $param->{node}; + PVE::Cluster::check_node_exists($node); + + my $manager_status = PVE::HA::Config::read_manager_status(); + + # maintenance mode currently only affects HA managed resources, and queuing the CRM + # command for a node unknown to HA would make an idle CRM become active for nothing + my $node_state = $manager_status->{node_status}->{$node}; + die "node '$node' is not part of HA - nothing to put into maintenance\n" + if !defined($node_state); + + my $enable = $param->{'maintenance-mode'} eq 'enable'; + + # the CRM ignores requests to enable maintenance mode while HA is disarmed or for nodes + # that are not online + die "cannot enable maintenance mode for node '$node' while HA is disarmed\n" + if $enable && $manager_status->{disarm}; + die "cannot enable maintenance mode for node '$node' in HA node state '$node_state'\n" + if $enable && $node_state ne 'online'; + + my $cmd = $enable ? 'enable-node-maintenance' : 'disable-node-maintenance'; + PVE::HA::Config::queue_crm_commands("$cmd $node"); + + return undef; + }, +}); + # bash completion helper sub complete_templet_repo { -- 2.47.3 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH pve-manager v4 1/4] api: nodes: add endpoint to set maintenance mode 2026-11-13 15:26 ` [PATCH pve-manager v4 1/4] api: nodes: add endpoint to set " Dominik Rusovac @ 2026-11-16 11:57 ` Daniel Kral 2026-11-17 8:58 ` Dominik Rusovac 0 siblings, 1 reply; 13+ messages in thread From: Daniel Kral @ 2026-11-16 11:57 UTC (permalink / raw) To: Dominik Rusovac, pve-devel; +Cc: Thomas Skinner This patch can probably be prefixed with 'fix #6144', because this also allows API users in general to put nodes in maintenance mode rather than requiring users to use the CLI as before. No hard feelings though. On Fri Nov 13, 2026 at 4:26 PM CET, Dominik Rusovac wrote: > node maintenance mode can currently only be requested with the HA > manager's CLI, which can't be used from the web UI > > add an endpoint to enable/disable maintenance mode for a node, which > lives below the node path rather than the HA API, so that the > maintenance concept can be extended to more than HA managed resources > later on. for now, it queues the same CRM command as the HA manager's > CLI command > > requests for nodes unknown to the HA manager are rejected. since > maintenance is restricted to HA, maintenance mode has no effect on such > nodes yet and the queued command would make an idle CRM become active > > requests to enable maintenance mode are rejected while HA is disarmed or > if the respective node is not online from the CRM's point of view. the > CRM ignores such requests and logs a message. disabling is still > possible in any case as the CRM always processes such requests > > Originally-by: Thomas Skinner <thomas@atskinner.net> > Signed-off-by: Dominik Rusovac <d.rusovac@proxmox.com> > --- > > Notes: > changes since v3: > * reword commit subject and body > * check Sys.Modify on /nodes/{node} instead of /, as suggested in > the v2 review > * reject requests for nodes unknown to the HA stack > * reject enabling maintenance mode while HA is disarmed or if the > node is not online from the CRM's point of view, as the CRM > ignores such requests > > PVE/API2/Nodes.pm | 54 +++++++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 54 insertions(+) > > diff --git a/PVE/API2/Nodes.pm b/PVE/API2/Nodes.pm > index 1e2a96f1..af4c92f6 100644 > --- a/PVE/API2/Nodes.pm > +++ b/PVE/API2/Nodes.pm > @@ -242,6 +242,7 @@ __PACKAGE__->register_method({ > { name => 'hosts' }, > { name => 'journal' }, > { name => 'lxc' }, > + { name => 'maintenance' }, > { name => 'migrateall' }, > { name => 'netstat' }, > { name => 'network' }, > @@ -2901,6 +2902,59 @@ __PACKAGE__->register_method({ > }, > }); > > +__PACKAGE__->register_method({ > + name => 'maintenance_set', > + protected => 1, > + path => 'maintenance', > + method => 'PUT', > + description => "Enable or disable maintenance mode for the node. Currently, this only" > + . " requests the HA node maintenance mode.", > + permissions => { > + check => ['perm', '/nodes/{node}', ['Sys.Modify']], > + }, nit: This is not very strict, but usual order for this is: - name - path - method Then usually - description - protected - permissions as it seems > + parameters => { > + additionalProperties => 0, > + properties => { > + node => get_standard_option('pve-node'), > + 'maintenance-mode' => { > + description => "Requests enabling or disabling maintenance mode. Currently," > + . " this only moves HA managed resources away from the node.", The description here should rather describe what this property does change about how the API method operates, e.g. "Specifies whether the maintenancen mode for the specified node should be enabled or disabled." > + type => 'string', > + enum => ['enable', 'disable'], > + }, > + }, > + }, > + returns => { type => 'null' }, > + code => sub { > + my ($param) = @_; > + > + my $node = $param->{node}; > + PVE::Cluster::check_node_exists($node); > + > + my $manager_status = PVE::HA::Config::read_manager_status(); > + > + # maintenance mode currently only affects HA managed resources, and queuing the CRM > + # command for a node unknown to HA would make an idle CRM become active for nothing > + my $node_state = $manager_status->{node_status}->{$node}; > + die "node '$node' is not part of HA - nothing to put into maintenance\n" > + if !defined($node_state); > + > + my $enable = $param->{'maintenance-mode'} eq 'enable'; > + > + # the CRM ignores requests to enable maintenance mode while HA is disarmed or for nodes > + # that are not online > + die "cannot enable maintenance mode for node '$node' while HA is disarmed\n" > + if $enable && $manager_status->{disarm}; > + die "cannot enable maintenance mode for node '$node' in HA node state '$node_state'\n" > + if $enable && $node_state ne 'online'; > + > + my $cmd = $enable ? 'enable-node-maintenance' : 'disable-node-maintenance'; > + PVE::HA::Config::queue_crm_commands("$cmd $node"); Since we queue the CRM command here, I think it would be a tad nicer to have the validation logic in the 'node-maintenance-set' CLI handler in PVE::CLI::ha_manager. Then, users who still prefer the CLI variant also get feedback there if the maintenance node can be set or not in advance and not just the HA Manager's syslog. Furthermore, there's less dependency on the manager_status structure from external packages (i.e., not pve-ha-manager Perl modules). At last, we could probably factor out the reasons when node maintenance cannot be set from PVE::HA::Manager::update_crm_commands()'s enable-node-maintenance and disable-node-maintenance branches, which would share this logic nicer if any changes are done in the future to this. A PVE::Tools::run_command() would be enough here AFAICT, because if it fails then we just fail here as well and forward the error message. > + > + return undef; > + }, > +}); > + > # bash completion helper > > sub complete_templet_repo { ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH pve-manager v4 1/4] api: nodes: add endpoint to set maintenance mode 2026-11-16 11:57 ` Daniel Kral @ 2026-11-17 8:58 ` Dominik Rusovac 2026-11-17 9:21 ` Daniel Kral 0 siblings, 1 reply; 13+ messages in thread From: Dominik Rusovac @ 2026-11-17 8:58 UTC (permalink / raw) To: Daniel Kral, pve-devel; +Cc: Thomas Skinner thx for the review, will send a v5 On Mon Nov 16, 2026 at 12:57 PM CET, Daniel Kral wrote: > This patch can probably be prefixed with 'fix #6144', because this also > allows API users in general to put nodes in maintenance mode rather than > requiring users to use the CLI as before. > > No hard feelings though. > you're right, will prefix it > On Fri Nov 13, 2026 at 4:26 PM CET, Dominik Rusovac wrote: >> node maintenance mode can currently only be requested with the HA >> manager's CLI, which can't be used from the web UI [snip] >> +__PACKAGE__->register_method({ >> + name => 'maintenance_set', >> + protected => 1, >> + path => 'maintenance', >> + method => 'PUT', >> + description => "Enable or disable maintenance mode for the node. Currently, this only" >> + . " requests the HA node maintenance mode.", >> + permissions => { >> + check => ['perm', '/nodes/{node}', ['Sys.Modify']], >> + }, > > nit: This is not very strict, but usual order for this is: > > - name > - path > - method > > Then usually > > - description > - protected > - permissions > > as it seems > thx for the heads up, will reorder >> + parameters => { >> + additionalProperties => 0, >> + properties => { >> + node => get_standard_option('pve-node'), >> + 'maintenance-mode' => { >> + description => "Requests enabling or disabling maintenance mode. Currently," >> + . " this only moves HA managed resources away from the node.", > > The description here should rather describe what this property does > change about how the API method operates, e.g. > > "Specifies whether the maintenancen mode for the specified node > should be enabled or disabled." > ack >> + type => 'string', >> + enum => ['enable', 'disable'], >> + }, >> + }, >> + }, >> + returns => { type => 'null' }, >> + code => sub { >> + my ($param) = @_; >> + >> + my $node = $param->{node}; >> + PVE::Cluster::check_node_exists($node); >> + >> + my $manager_status = PVE::HA::Config::read_manager_status(); >> + >> + # maintenance mode currently only affects HA managed resources, and queuing the CRM >> + # command for a node unknown to HA would make an idle CRM become active for nothing >> + my $node_state = $manager_status->{node_status}->{$node}; >> + die "node '$node' is not part of HA - nothing to put into maintenance\n" >> + if !defined($node_state); >> + >> + my $enable = $param->{'maintenance-mode'} eq 'enable'; >> + >> + # the CRM ignores requests to enable maintenance mode while HA is disarmed or for nodes >> + # that are not online >> + die "cannot enable maintenance mode for node '$node' while HA is disarmed\n" >> + if $enable && $manager_status->{disarm}; >> + die "cannot enable maintenance mode for node '$node' in HA node state '$node_state'\n" >> + if $enable && $node_state ne 'online'; >> + >> + my $cmd = $enable ? 'enable-node-maintenance' : 'disable-node-maintenance'; >> + PVE::HA::Config::queue_crm_commands("$cmd $node"); > > Since we queue the CRM command here, I think it would be a tad nicer to > have the validation logic in the 'node-maintenance-set' CLI handler in > PVE::CLI::ha_manager. > > Then, users who still prefer the CLI variant also get feedback there if > the maintenance node can be set or not in advance and not just the HA > Manager's syslog. > > Furthermore, there's less dependency on the manager_status structure > from external packages (i.e., not pve-ha-manager Perl modules). > > At last, we could probably factor out the reasons when node maintenance > cannot be set from PVE::HA::Manager::update_crm_commands()'s > enable-node-maintenance and disable-node-maintenance branches, which > would share this logic nicer if any changes are done in the future to > this. good points, you're right, thx! I will factor out the reasons > > > A PVE::Tools::run_command() would be enough here AFAICT, because if it > fails then we just fail here as well and forward the error message. > I will write a dedicated wrapper that queues a request to enable/disable maintenance >> + >> + return undef; >> + }, >> +}); >> + >> # bash completion helper >> >> sub complete_templet_repo { ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH pve-manager v4 1/4] api: nodes: add endpoint to set maintenance mode 2026-11-17 8:58 ` Dominik Rusovac @ 2026-11-17 9:21 ` Daniel Kral 2026-11-17 9:40 ` Dominik Rusovac 0 siblings, 1 reply; 13+ messages in thread From: Daniel Kral @ 2026-11-17 9:21 UTC (permalink / raw) To: Dominik Rusovac, pve-devel; +Cc: Thomas Skinner On Tue Nov 17, 2026 at 9:58 AM CET, Dominik Rusovac wrote: > thx for the review, will send a v5 > > On Mon Nov 16, 2026 at 12:57 PM CET, Daniel Kral wrote: >> On Fri Nov 13, 2026 at 4:26 PM CET, Dominik Rusovac wrote: >> >> A PVE::Tools::run_command() would be enough here AFAICT, because if it >> fails then we just fail here as well and forward the error message. >> > > I will write a dedicated wrapper that queues a request to enable/disable > maintenance Hm, run_command() might be a better separation here. If a wrapper would be called here directly, then essentially pvedaemon would write to HA state, but if the ha-manager CLI is run here then just HA-specific code writes to the HA state. No hard feelings though, would just like to minimize the HA stack's API surface to read-only helpers for external packages while letting any writes go through API/CLI paths from the HA stack directly. ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH pve-manager v4 1/4] api: nodes: add endpoint to set maintenance mode 2026-11-17 9:21 ` Daniel Kral @ 2026-11-17 9:40 ` Dominik Rusovac 0 siblings, 0 replies; 13+ messages in thread From: Dominik Rusovac @ 2026-11-17 9:40 UTC (permalink / raw) To: Daniel Kral, pve-devel; +Cc: Thomas Skinner On Tue Nov 17, 2026 at 10:21 AM CET, Daniel Kral wrote: > On Tue Nov 17, 2026 at 9:58 AM CET, Dominik Rusovac wrote: >> thx for the review, will send a v5 >> >> On Mon Nov 16, 2026 at 12:57 PM CET, Daniel Kral wrote: >>> On Fri Nov 13, 2026 at 4:26 PM CET, Dominik Rusovac wrote: >>> >>> A PVE::Tools::run_command() would be enough here AFAICT, because if it >>> fails then we just fail here as well and forward the error message. >>> >> >> I will write a dedicated wrapper that queues a request to enable/disable >> maintenance > > Hm, run_command() might be a better separation here. ack, will use run_command() [snip] ^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH pve-manager v4 2/4] fix #6144: ui: ha: status: allow toggling maintenance mode 2026-11-13 15:26 [PATCH-SERIES docs/ha-manager/manager v4 0/4] fix #6144: add api and ui for node maintenance mode Dominik Rusovac 2026-11-13 15:26 ` [PATCH pve-manager v4 1/4] api: nodes: add endpoint to set " Dominik Rusovac @ 2026-11-13 15:26 ` Dominik Rusovac 2026-11-17 9:07 ` Daniel Kral 2026-11-13 15:26 ` [PATCH pve-ha-manager v4 3/4] api: status: report node maintenance request for lrm entries Dominik Rusovac ` (2 subsequent siblings) 4 siblings, 1 reply; 13+ messages in thread From: Dominik Rusovac @ 2026-11-13 15:26 UTC (permalink / raw) To: pve-devel; +Cc: Thomas Skinner maintenance mode could only be enabled or disabled through the HA manager's CLI add a 'Node Maintenance' menu to the HA status panel, which requests enabling/disabling maintenance mode for the node of the selected lrm entry as the CRM only processes the request on its next round, show a spinner on the lrm entry of the node and keep the menu disabled for it until the status reports the requested state, like it is done when disarming HA enabling is not offered while HA is disarmed, as the CRM ignores such requests in that state. menu is disabled for users lacking the Sys.Modify privilege on nodes the LRM also enters maintenance mode on shutdown with the 'migrate' shutdown policy, which a disable request would not undo 'fa fa-check' icon was chosen for 'Disable' option to be consistent with which icon a node gets when coming back from maintenance mode Originally-by: Thomas Skinner <thomas@atskinner.net> Signed-off-by: Dominik Rusovac <d.rusovac@proxmox.com> --- Notes: changes since v3: * reword commit subject and body * move the menu into the HA status panel toolbar next to Arm/Disarm, using its view model and controller instead of a second toolbar * decide the offered action based on the maintenance-requested flag * update the state on selection changes and store loads, which also handles deselection * use complete sentences for translatable strings * show a spinner on the lrm entry while a maintenance request is processed, like for disarming HA * disable 'Enable' while HA is disarmed * check Sys.Modify on nodes, matching the endpoint www/manager6/ha/Status.js | 102 ++++++++++++++++++++++++++++++++++ www/manager6/ha/StatusView.js | 36 +++++++++++- 2 files changed, 137 insertions(+), 1 deletion(-) diff --git a/www/manager6/ha/Status.js b/www/manager6/ha/Status.js index c01bd737..c040c1b2 100644 --- a/www/manager6/ha/Status.js +++ b/www/manager6/ha/Status.js @@ -11,6 +11,17 @@ Ext.define('PVE.ha.Status', { viewModel: { data: { haDisarmed: false, + maintenanceNode: null, + maintenanceRequested: false, + maintenancePending: false, + }, + formulas: { + noMaintenanceAction: (get) => + !get('maintenanceNode') || + get('maintenancePending') || + !Ext.state.Manager.get('GuiCap').nodes['Sys.Modify'], + // the CRM ignores requests to enable maintenance mode while HA is disarmed + noMaintenanceEnable: (get) => get('maintenanceRequested') || get('haDisarmed'), }, }, @@ -52,6 +63,67 @@ Ext.define('PVE.ha.Status', { ); }, + updateMaintenanceState: function () { + let me = this; + let vm = me.getViewModel(); + let sv = me.getView().down('pveHAStatusView'); + let rec = sv.getSelection()[0]; + let isLrm = rec?.get('type') === 'lrm'; + + vm.set('maintenanceNode', isLrm ? rec.get('node') : null); + vm.set('maintenanceRequested', isLrm && rec.get('maintenance-requested')); + vm.set('maintenancePending', isLrm && sv.isMaintenancePending(rec.get('node'))); + }, + + handleMaintenanceButton: function (menuItem) { + let me = this; + let node = me.getViewModel().get('maintenanceNode'); + if (!node) { + return; + } + + let msg; + if (menuItem.maintenanceMode === 'disable') { + msg = Ext.String.format( + gettext("Are you sure you want to disable maintenance mode for node '{0}'?"), + node, + ); + if (me.getViewModel().get('haDisarmed')) { + msg += + '<br><br>' + + Ext.String.format( + gettext("HA resources will be migrated back to node '{0}' once HA is re-armed."), + node, + ); + } + } else { + msg = Ext.String.format( + gettext("Are you sure you want to enable maintenance mode for node '{0}'?"), + node, + ); + msg += + '<br><br>' + + gettext('HA resources on the node will be migrated to other nodes.'); + } + + Ext.Msg.confirm(gettext('Confirm'), msg, function (btn) { + if (btn !== 'yes') { + return; + } + Proxmox.Utils.API2Request({ + url: `/nodes/${node}/maintenance`, + params: { 'maintenance-mode': menuItem.maintenanceMode }, + method: 'PUT', + success: function () { + let sv = me.getView().down('pveHAStatusView'); + sv.setMaintenancePending(node, menuItem.maintenanceMode === 'enable'); + me.updateMaintenanceState(); + }, + failure: (response) => Ext.Msg.alert(gettext('Error'), response.htmlStatus), + }); + }); + }, + openCRSOptions: function () { Ext.create('PVE.form.CRSOptions', { autoShow: true, @@ -121,6 +193,34 @@ Ext.define('PVE.ha.Status', { }, ], }, + '-', + { + text: gettext('Node Maintenance'), + iconCls: 'fa fa-wrench', + bind: { + disabled: '{noMaintenanceAction}', + }, + menu: [ + { + text: gettext('Enable'), + iconCls: 'fa fa-wrench', + maintenanceMode: 'enable', + bind: { + disabled: '{noMaintenanceEnable}', + }, + handler: 'handleMaintenanceButton', + }, + { + text: gettext('Disable'), + iconCls: 'fa fa-check', + maintenanceMode: 'disable', + bind: { + disabled: '{!maintenanceRequested}', + }, + handler: 'handleMaintenanceButton', + }, + ], + }, '->', { text: gettext('CRS Settings'), @@ -153,11 +253,13 @@ Ext.define('PVE.ha.Status', { collapsible: true, padding: '0 0 20 0', listeners: { + selectionchange: () => me.getController().updateMaintenanceState(), hastatuschange: function (isDisarmed) { let vm = me.getViewModel(); let sv = me.query('pveHAStatusView')[0]; vm.set('haDisarmed', isDisarmed); + me.getController().updateMaintenanceState(); if (sv.isDisarmedPendingState === null) { return; diff --git a/www/manager6/ha/StatusView.js b/www/manager6/ha/StatusView.js index f260bc0d..5e8f001e 100644 --- a/www/manager6/ha/StatusView.js +++ b/www/manager6/ha/StatusView.js @@ -23,6 +23,19 @@ Ext.define( me.getView().refresh(); }, + // maps node names to the expected value of their maintenance-requested field + maintenancePending: null, + + setMaintenancePending: function (node, requested) { + let me = this; + me.maintenancePending[node] = requested; + me.getView().refresh(); + }, + + isMaintenancePending: function (node) { + return this.maintenancePending[node] !== undefined; + }, + initComponent: function () { var me = this; @@ -30,6 +43,8 @@ Ext.define( throw 'no rstore given'; } + me.maintenancePending = {}; + Proxmox.Utils.monStoreErrors(me, me.rstore); var store = Ext.create('Proxmox.data.DiffStore', { @@ -52,6 +67,18 @@ Ext.define( }); me.rstore.on('load', function () { + let maintenanceDone = false; + for (const [node, requested] of Object.entries(me.maintenancePending)) { + let rec = store.getById(`lrm:${node}`); + if (!rec || rec.get('maintenance-requested') === requested) { + delete me.maintenancePending[node]; + maintenanceDone = true; + } + } + if (maintenanceDone) { + me.getView().refresh(); + } + let fencing = store.findRecord('type', 'fencing'); let disarmed = fencing && fencing.get('armed-state') === 'disarmed'; @@ -76,7 +103,10 @@ Ext.define( flex: 1, dataIndex: 'status', renderer: function (value, _metaData, rec) { - if (rec.data.type === 'fencing' && me.pending) { + if ( + (rec.data.type === 'fencing' && me.pending) || + (rec.data.type === 'lrm' && me.isMaintenancePending(rec.data.node)) + ) { return value + ' <i class="fa fa-spinner fa-spin"></i>'; } return value; @@ -132,6 +162,10 @@ Ext.define( }, }, 'armed-state', + { + name: 'maintenance-requested', + type: 'boolean', + }, ], idProperty: 'id', }); -- 2.47.3 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH pve-manager v4 2/4] fix #6144: ui: ha: status: allow toggling maintenance mode 2026-11-13 15:26 ` [PATCH pve-manager v4 2/4] fix #6144: ui: ha: status: allow toggling " Dominik Rusovac @ 2026-11-17 9:07 ` Daniel Kral 2026-11-17 11:02 ` Dominik Rusovac 0 siblings, 1 reply; 13+ messages in thread From: Daniel Kral @ 2026-11-17 9:07 UTC (permalink / raw) To: Dominik Rusovac, pve-devel; +Cc: Thomas Skinner On Fri Nov 13, 2026 at 4:26 PM CET, Dominik Rusovac wrote: > maintenance mode could only be enabled or disabled through the HA > manager's CLI > > add a 'Node Maintenance' menu to the HA status panel, which requests > enabling/disabling maintenance mode for the node of the selected lrm > entry > > as the CRM only processes the request on its next round, show a > spinner on the lrm entry of the node and keep the menu disabled for > it until the status reports the requested state, like it is done when > disarming HA > > enabling is not offered while HA is disarmed, as the CRM ignores such > requests in that state. menu is disabled for users lacking the > Sys.Modify privilege on nodes > > the LRM also enters maintenance mode on shutdown with the 'migrate' > shutdown policy, which a disable request would not undo > > 'fa fa-check' icon was chosen for 'Disable' option to be consistent > with which icon a node gets when coming back from maintenance mode > > Originally-by: Thomas Skinner <thomas@atskinner.net> > Signed-off-by: Dominik Rusovac <d.rusovac@proxmox.com> > --- > > Notes: > changes since v3: > * reword commit subject and body > * move the menu into the HA status panel toolbar next to > Arm/Disarm, using its view model and controller instead of a > second toolbar > * decide the offered action based on the maintenance-requested > flag > * update the state on selection changes and store loads, which > also handles deselection > * use complete sentences for translatable strings > * show a spinner on the lrm entry while a maintenance request is > processed, like for disarming HA > * disable 'Enable' while HA is disarmed > * check Sys.Modify on nodes, matching the endpoint > > www/manager6/ha/Status.js | 102 ++++++++++++++++++++++++++++++++++ > www/manager6/ha/StatusView.js | 36 +++++++++++- > 2 files changed, 137 insertions(+), 1 deletion(-) > > diff --git a/www/manager6/ha/Status.js b/www/manager6/ha/Status.js > index c01bd737..c040c1b2 100644 > --- a/www/manager6/ha/Status.js > +++ b/www/manager6/ha/Status.js > @@ -11,6 +11,17 @@ Ext.define('PVE.ha.Status', { > viewModel: { > data: { > haDisarmed: false, > + maintenanceNode: null, nit: 'selectedNode' describes the content a bit better; maybe even 'selectedLrmNode' > + maintenanceRequested: false, > + maintenancePending: false, These are also only true for the selectedLrmNode... But prefixing this would get rather long, so maybe just a comment, so it's clear? > + }, > + formulas: { > + noMaintenanceAction: (get) => > + !get('maintenanceNode') || > + get('maintenancePending') || > + !Ext.state.Manager.get('GuiCap').nodes['Sys.Modify'], AFAIK the formula will never update if the GuiCap changes, because formulas are only updated by get()'ing view model data... Though this is probably very minor, because the GuiCaps are only set roughly whenever the user logins. And if a user logs out and logs back in again in the same session, this component seems to be reloaded anyway and therefore the formula is reevaluated as well. > + // the CRM ignores requests to enable maintenance mode while HA is disarmed > + noMaintenanceEnable: (get) => get('maintenanceRequested') || get('haDisarmed'), > }, > }, > > @@ -52,6 +63,67 @@ Ext.define('PVE.ha.Status', { > ); > }, > > + updateMaintenanceState: function () { > + let me = this; > + let vm = me.getViewModel(); > + let sv = me.getView().down('pveHAStatusView'); > + let rec = sv.getSelection()[0]; > + let isLrm = rec?.get('type') === 'lrm'; > + > + vm.set('maintenanceNode', isLrm ? rec.get('node') : null); > + vm.set('maintenanceRequested', isLrm && rec.get('maintenance-requested')); > + vm.set('maintenancePending', isLrm && sv.isMaintenancePending(rec.get('node'))); > + }, > + > + handleMaintenanceButton: function (menuItem) { AFAIK the handlers for tbar items have the signature function (menuItem, event, record) {} i.e., record would already contain the currently selected status grid item, which would then just need to be checked against whether it is an LRM. However, since these are already used to check whether the button should be disabled/enabled at all, it seems better to stick with the current solution. Unfortunately, I didn't find the documentation (the tbar property is just documented as Object|Object[] in the ExtJS documentation ;-)), but we use it in some parts of our codebase. > + let me = this; > + let node = me.getViewModel().get('maintenanceNode'); > + if (!node) { > + return; > + } > + > + let msg; > + if (menuItem.maintenanceMode === 'disable') { > + msg = Ext.String.format( > + gettext("Are you sure you want to disable maintenance mode for node '{0}'?"), > + node, > + ); nit: could probably be factored out with another gettext parameter for maintenanceMode being either 'disable' or 'enable'. > + if (me.getViewModel().get('haDisarmed')) { > + msg += > + '<br><br>' + > + Ext.String.format( > + gettext("HA resources will be migrated back to node '{0}' once HA is re-armed."), > + node, > + ); > + } > + } else { } else if (menuItem.maintenanceMode === 'enable') { > + msg = Ext.String.format( > + gettext("Are you sure you want to enable maintenance mode for node '{0}'?"), > + node, > + ); > + msg += > + '<br><br>' + > + gettext('HA resources on the node will be migrated to other nodes.'); > + } } else { throw "Invalid maintenance mode '...'"; } or something similar, so when another maintenance mode is added in the GUI this will be apparent on clicking it the first time. > + > + Ext.Msg.confirm(gettext('Confirm'), msg, function (btn) { > + if (btn !== 'yes') { > + return; > + } > + Proxmox.Utils.API2Request({ > + url: `/nodes/${node}/maintenance`, > + params: { 'maintenance-mode': menuItem.maintenanceMode }, > + method: 'PUT', > + success: function () { > + let sv = me.getView().down('pveHAStatusView'); > + sv.setMaintenancePending(node, menuItem.maintenanceMode === 'enable'); > + me.updateMaintenanceState(); > + }, > + failure: (response) => Ext.Msg.alert(gettext('Error'), response.htmlStatus), This should also set the maintenancePending for that node to false? Might be related to the note about when the maintenance request doesn't go to the manager_status below. > + }); > + }); > + }, > + > openCRSOptions: function () { > Ext.create('PVE.form.CRSOptions', { > autoShow: true, > @@ -121,6 +193,34 @@ Ext.define('PVE.ha.Status', { > }, > ], > }, > + '-', > + { > + text: gettext('Node Maintenance'), > + iconCls: 'fa fa-wrench', > + bind: { > + disabled: '{noMaintenanceAction}', > + }, > + menu: [ > + { > + text: gettext('Enable'), > + iconCls: 'fa fa-wrench', > + maintenanceMode: 'enable', > + bind: { > + disabled: '{noMaintenanceEnable}', > + }, > + handler: 'handleMaintenanceButton', > + }, > + { > + text: gettext('Disable'), > + iconCls: 'fa fa-check', > + maintenanceMode: 'disable', > + bind: { > + disabled: '{!maintenanceRequested}', > + }, > + handler: 'handleMaintenanceButton', > + }, > + ], > + }, > '->', > { > text: gettext('CRS Settings'), > @@ -153,11 +253,13 @@ Ext.define('PVE.ha.Status', { > collapsible: true, > padding: '0 0 20 0', > listeners: { > + selectionchange: () => me.getController().updateMaintenanceState(), > hastatuschange: function (isDisarmed) { > let vm = me.getViewModel(); > let sv = me.query('pveHAStatusView')[0]; > > vm.set('haDisarmed', isDisarmed); > + me.getController().updateMaintenanceState(); > > if (sv.isDisarmedPendingState === null) { > return; > diff --git a/www/manager6/ha/StatusView.js b/www/manager6/ha/StatusView.js > index f260bc0d..5e8f001e 100644 > --- a/www/manager6/ha/StatusView.js > +++ b/www/manager6/ha/StatusView.js > @@ -23,6 +23,19 @@ Ext.define( > me.getView().refresh(); > }, > > + // maps node names to the expected value of their maintenance-requested field > + maintenancePending: null, This should already be initialized with {} > + > + setMaintenancePending: function (node, requested) { > + let me = this; > + me.maintenancePending[node] = requested; > + me.getView().refresh(); > + }, > + > + isMaintenancePending: function (node) { > + return this.maintenancePending[node] !== undefined; > + }, > + > initComponent: function () { > var me = this; > > @@ -30,6 +43,8 @@ Ext.define( > throw 'no rstore given'; > } > > + me.maintenancePending = {}; > + > Proxmox.Utils.monStoreErrors(me, me.rstore); > > var store = Ext.create('Proxmox.data.DiffStore', { > @@ -52,6 +67,18 @@ Ext.define( > }); > > me.rstore.on('load', function () { > + let maintenanceDone = false; nit: `maintenanceRequestAccepted` would be more accurate > + for (const [node, requested] of Object.entries(me.maintenancePending)) { > + let rec = store.getById(`lrm:${node}`); > + if (!rec || rec.get('maintenance-requested') === requested) { > + delete me.maintenancePending[node]; > + maintenanceDone = true; > + } > + } Found by automated review: the maintenancePending should also be removed if something hinders the maintenance request landing in the manager_status, e.g., LRM is already disarmed or offline. Even though the API handler can error and then take the error path, that's still racy because the disarm or offline node could just happen in the same exact HA Manager round... So this should be either handled additionally or check some other way whether the maintenance request is still pending. > + if (maintenanceDone) { > + me.getView().refresh(); > + } > + > let fencing = store.findRecord('type', 'fencing'); > let disarmed = fencing && fencing.get('armed-state') === 'disarmed'; > > @@ -76,7 +103,10 @@ Ext.define( > flex: 1, > dataIndex: 'status', > renderer: function (value, _metaData, rec) { > - if (rec.data.type === 'fencing' && me.pending) { > + if ( > + (rec.data.type === 'fencing' && me.pending) || > + (rec.data.type === 'lrm' && me.isMaintenancePending(rec.data.node)) > + ) { > return value + ' <i class="fa fa-spinner fa-spin"></i>'; > } > return value; > @@ -132,6 +162,10 @@ Ext.define( > }, > }, > 'armed-state', > + { > + name: 'maintenance-requested', > + type: 'boolean', > + }, > ], > idProperty: 'id', > }); ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH pve-manager v4 2/4] fix #6144: ui: ha: status: allow toggling maintenance mode 2026-11-17 9:07 ` Daniel Kral @ 2026-11-17 11:02 ` Dominik Rusovac 0 siblings, 0 replies; 13+ messages in thread From: Dominik Rusovac @ 2026-11-17 11:02 UTC (permalink / raw) To: Daniel Kral, pve-devel; +Cc: Thomas Skinner thx for your review! will make the changes in v5 On Tue Nov 17, 2026 at 10:07 AM CET, Daniel Kral wrote: > On Fri Nov 13, 2026 at 4:26 PM CET, Dominik Rusovac wrote: >> maintenance mode could only be enabled or disabled through the HA >> manager's CLI >> [snip] >> diff --git a/www/manager6/ha/Status.js b/www/manager6/ha/Status.js >> index c01bd737..c040c1b2 100644 >> --- a/www/manager6/ha/Status.js >> +++ b/www/manager6/ha/Status.js >> @@ -11,6 +11,17 @@ Ext.define('PVE.ha.Status', { >> viewModel: { >> data: { >> haDisarmed: false, >> + maintenanceNode: null, > > nit: 'selectedNode' describes the content a bit better; maybe even > 'selectedLrmNode' > ack, will go with 'selectedLrmNode' >> + maintenanceRequested: false, >> + maintenancePending: false, > > These are also only true for the selectedLrmNode... But prefixing this > would get rather long, so maybe just a comment, so it's clear? true, will add a comment above the fields > >> + }, >> + formulas: { >> + noMaintenanceAction: (get) => >> + !get('maintenanceNode') || >> + get('maintenancePending') || >> + !Ext.state.Manager.get('GuiCap').nodes['Sys.Modify'], > > AFAIK the formula will never update if the GuiCap changes, because > formulas are only updated by get()'ing view model data... > > Though this is probably very minor, because the GuiCaps are only set > roughly whenever the user logins. And if a user logs out and logs back > in again in the same session, this component seems to be reloaded anyway > and therefore the formula is reevaluated as well. > thx for the heads up afaict this is consistent with the rest of the codebase, so I'd keep it as is >> + // the CRM ignores requests to enable maintenance mode while HA is disarmed >> + noMaintenanceEnable: (get) => get('maintenanceRequested') || get('haDisarmed'), >> }, >> }, >> >> @@ -52,6 +63,67 @@ Ext.define('PVE.ha.Status', { >> ); >> }, >> >> + updateMaintenanceState: function () { >> + let me = this; >> + let vm = me.getViewModel(); >> + let sv = me.getView().down('pveHAStatusView'); >> + let rec = sv.getSelection()[0]; >> + let isLrm = rec?.get('type') === 'lrm'; >> + >> + vm.set('maintenanceNode', isLrm ? rec.get('node') : null); >> + vm.set('maintenanceRequested', isLrm && rec.get('maintenance-requested')); >> + vm.set('maintenancePending', isLrm && sv.isMaintenancePending(rec.get('node'))); >> + }, >> + >> + handleMaintenanceButton: function (menuItem) { > > AFAIK the handlers for tbar items have the signature > > function (menuItem, event, record) {} > > i.e., record would already contain the currently selected status grid > item, which would then just need to be checked against whether it is an > LRM. > > However, since these are already used to check whether the button should > be disabled/enabled at all, it seems better to stick with the current > solution. ack, thx for the context, keeping it then > > Unfortunately, I didn't find the documentation (the tbar property is > just documented as Object|Object[] in the ExtJS documentation ;-)), but > we use it in some parts of our codebase. > >> + let me = this; >> + let node = me.getViewModel().get('maintenanceNode'); >> + if (!node) { >> + return; >> + } >> + >> + let msg; >> + if (menuItem.maintenanceMode === 'disable') { >> + msg = Ext.String.format( >> + gettext("Are you sure you want to disable maintenance mode for node '{0}'?"), >> + node, >> + ); > > nit: could probably be factored out with another gettext parameter for > maintenanceMode being either 'disable' or 'enable'. > the use of complete sentences for translatable strings is deliberate here >> + if (me.getViewModel().get('haDisarmed')) { >> + msg += >> + '<br><br>' + >> + Ext.String.format( >> + gettext("HA resources will be migrated back to node '{0}' once HA is re-armed."), >> + node, >> + ); >> + } >> + } else { > > } else if (menuItem.maintenanceMode === 'enable') { > ack, thx >> + msg = Ext.String.format( >> + gettext("Are you sure you want to enable maintenance mode for node '{0}'?"), >> + node, >> + ); >> + msg += >> + '<br><br>' + >> + gettext('HA resources on the node will be migrated to other nodes.'); >> + } > > } else { > throw "Invalid maintenance mode '...'"; > } > > or something similar, so when another maintenance mode is added in the > GUI this will be apparent on clicking it the first time. > ack, good point, thx [snip] >> diff --git a/www/manager6/ha/StatusView.js b/www/manager6/ha/StatusView.js >> index f260bc0d..5e8f001e 100644 >> --- a/www/manager6/ha/StatusView.js >> +++ b/www/manager6/ha/StatusView.js >> @@ -23,6 +23,19 @@ Ext.define( >> me.getView().refresh(); >> }, >> >> + // maps node names to the expected value of their maintenance-requested field >> + maintenancePending: null, > > This should already be initialized with {} > ack [snip] >> >> me.rstore.on('load', function () { >> + let maintenanceDone = false; > > nit: `maintenanceRequestAccepted` would be more accurate > not sure, but I agree that renaming makes sense would go with `pendingCleared` >> + for (const [node, requested] of Object.entries(me.maintenancePending)) { >> + let rec = store.getById(`lrm:${node}`); >> + if (!rec || rec.get('maintenance-requested') === requested) { >> + delete me.maintenancePending[node]; >> + maintenanceDone = true; >> + } >> + } > > Found by automated review: the maintenancePending should also be removed > if something hinders the maintenance request landing in the > manager_status, e.g., LRM is already disarmed or offline. > > Even though the API handler can error and then take the error path, > that's still racy because the disarm or offline node could just happen > in the same exact HA Manager round... So this should be either handled > additionally or check some other way whether the maintenance request is > still pending. > I'm planning on making the HA status report for lrm entries whether a maintenance request is still queued will add a local pending state to the UI to cover the gap between status polls, so it shows the spinner while the request is queued; also across page reloads [snip] ^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH pve-ha-manager v4 3/4] api: status: report node maintenance request for lrm entries 2026-11-13 15:26 [PATCH-SERIES docs/ha-manager/manager v4 0/4] fix #6144: add api and ui for node maintenance mode Dominik Rusovac 2026-11-13 15:26 ` [PATCH pve-manager v4 1/4] api: nodes: add endpoint to set " Dominik Rusovac 2026-11-13 15:26 ` [PATCH pve-manager v4 2/4] fix #6144: ui: ha: status: allow toggling " Dominik Rusovac @ 2026-11-13 15:26 ` Dominik Rusovac 2026-11-16 12:02 ` Daniel Kral 2026-11-13 15:26 ` [PATCH pve-docs v4 4/4] ha-manager: maintenance mode: mention web ui menu Dominik Rusovac 2026-11-19 10:05 ` [PATCH-SERIES docs/ha-manager/manager v4 0/4] fix #6144: add api and ui for node maintenance mode Dominik Rusovac 4 siblings, 1 reply; 13+ messages in thread From: Dominik Rusovac @ 2026-11-13 15:26 UTC (permalink / raw) To: pve-devel; +Cc: Thomas Skinner expose whether maintenance mode was manually requested for a node, as recorded by the CRM Originally-by: Thomas Skinner <thomas@atskinner.net> Signed-off-by: Dominik Rusovac <d.rusovac@proxmox.com> --- Notes: changes since v3: * reword commit subject and body * replace the lrm_mode field with maintenance-requested, which reflects the manual maintenance request recorded by the CRM instead of the mode the LRM reports, as the LRM might also go to maintenance with the 'migrate' shutdown policy without a manual request * drop 'unknown' values src/PVE/API2/HA/Status.pm | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/PVE/API2/HA/Status.pm b/src/PVE/API2/HA/Status.pm index aecef0f..2622ec1 100644 --- a/src/PVE/API2/HA/Status.pm +++ b/src/PVE/API2/HA/Status.pm @@ -107,6 +107,12 @@ __PACKAGE__->register_method({ type => "integer", optional => 1, }, + 'maintenance-requested' => { + description => "For type 'lrm'. Whether maintenance mode was manually" + . " requested for the node.", + type => "boolean", + optional => 1, + }, crm_state => { description => "For type 'service'. Service state as seen by the CRM.", type => "string", @@ -265,6 +271,8 @@ __PACKAGE__->register_method({ PVE::HA::Tools::count_active_services($status->{service_status}, $node); my $lrm_status = PVE::HA::Config::read_lrm_status($node); my $id = "lrm:$node"; + my $node_request = $status->{node_request} // {}; + my $maintenance_requested = $node_request->{$node}->{maintenance} ? 1 : 0; if (!$lrm_status->{timestamp}) { push @$res, { @@ -272,6 +280,7 @@ __PACKAGE__->register_method({ type => 'lrm', node => $node, status => "$node (unable to read lrm status)", + 'maintenance-requested' => $maintenance_requested, }; } else { my $status_str = &$timestamp_to_status($ctime, $lrm_status->{timestamp}); @@ -315,6 +324,7 @@ __PACKAGE__->register_method({ node => $node, status => $status_text, timestamp => $lrm_status->{timestamp}, + 'maintenance-requested' => $maintenance_requested, }; } } -- 2.47.3 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH pve-ha-manager v4 3/4] api: status: report node maintenance request for lrm entries 2026-11-13 15:26 ` [PATCH pve-ha-manager v4 3/4] api: status: report node maintenance request for lrm entries Dominik Rusovac @ 2026-11-16 12:02 ` Daniel Kral 0 siblings, 0 replies; 13+ messages in thread From: Daniel Kral @ 2026-11-16 12:02 UTC (permalink / raw) To: Dominik Rusovac, pve-devel; +Cc: Thomas Skinner On Fri Nov 13, 2026 at 4:26 PM CET, Dominik Rusovac wrote: > expose whether maintenance mode was manually requested for a node, as > recorded by the CRM > > Originally-by: Thomas Skinner <thomas@atskinner.net> > Signed-off-by: Dominik Rusovac <d.rusovac@proxmox.com> Nice! Reviewed-by: Daniel Kral <d.kral@proxmox.com> ^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH pve-docs v4 4/4] ha-manager: maintenance mode: mention web ui menu 2026-11-13 15:26 [PATCH-SERIES docs/ha-manager/manager v4 0/4] fix #6144: add api and ui for node maintenance mode Dominik Rusovac ` (2 preceding siblings ...) 2026-11-13 15:26 ` [PATCH pve-ha-manager v4 3/4] api: status: report node maintenance request for lrm entries Dominik Rusovac @ 2026-11-13 15:26 ` Dominik Rusovac 2026-11-19 10:05 ` [PATCH-SERIES docs/ha-manager/manager v4 0/4] fix #6144: add api and ui for node maintenance mode Dominik Rusovac 4 siblings, 0 replies; 13+ messages in thread From: Dominik Rusovac @ 2026-11-13 15:26 UTC (permalink / raw) To: pve-devel; +Cc: Thomas Skinner maintenance mode can now also be enabled/disabled from the HA status panel describe where to find it and that it cannot be enabled while HA is disarmed fix the "enabled or disable" typo in the rewritten sentence Originally-by: Thomas Skinner <thomas@atskinner.net> Signed-off-by: Dominik Rusovac <d.rusovac@proxmox.com> --- Notes: changes since v3: * reword commit subject and body * condense the ui instructions into one paragraph * use the final menu name and mention the disarm restriction ha-manager.adoc | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/ha-manager.adoc b/ha-manager.adoc index 95ab799..4962bb9 100644 --- a/ha-manager.adoc +++ b/ha-manager.adoc @@ -1199,8 +1199,10 @@ During each migration, the original node will be recorded in the HA managers' state, so that the service can be moved back again automatically once the maintenance mode is disabled and the node is back online. -Currently you can enabled or disable the maintenance mode using the ha-manager -CLI tool. +You can enable or disable the maintenance mode using the web interface or the +`ha-manager` CLI tool. In the web interface, select the `lrm` entry of the node +in the status panel under __Datacenter -> HA__ and use the *Node Maintenance* +menu. Maintenance mode cannot be enabled while HA is disarmed. .Enabling maintenance mode for a node ---- @@ -1225,8 +1227,8 @@ out for a log line like: `pve-ha-lrm[PID]: watchdog closed (disabled)` to know when the node finished its transition into the maintenance mode. NOTE: The manual maintenance mode is not automatically deleted on node reboot, -but only if it is either manually deactivated using the `ha-manager` CLI or if -the manager-status is manually cleared. +but only if it is either manually deactivated or if the manager-status is +manually cleared. .Disabling maintenance mode for a node ---- @@ -1234,8 +1236,9 @@ the manager-status is manually cleared. ---- The process of disabling the manual maintenance mode is similar to enabling it. -Using the `ha-manager` CLI command shown above will queue a CRM command that, -once processed, marks the respective LRM node as available again. +Using the web interface or the `ha-manager` CLI command shown above will queue a +CRM command that, once processed, marks the respective LRM node as available +again. If you deactivate the maintenance mode, all services that were on the node when the maintenance mode was activated will be moved back. -- 2.47.3 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH-SERIES docs/ha-manager/manager v4 0/4] fix #6144: add api and ui for node maintenance mode 2026-11-13 15:26 [PATCH-SERIES docs/ha-manager/manager v4 0/4] fix #6144: add api and ui for node maintenance mode Dominik Rusovac ` (3 preceding siblings ...) 2026-11-13 15:26 ` [PATCH pve-docs v4 4/4] ha-manager: maintenance mode: mention web ui menu Dominik Rusovac @ 2026-11-19 10:05 ` Dominik Rusovac 4 siblings, 0 replies; 13+ messages in thread From: Dominik Rusovac @ 2026-11-19 10:05 UTC (permalink / raw) To: Dominik Rusovac, pve-devel Superseded-by: https://lore.proxmox.com/all/20261119095931.1748970-1-d.rusovac@proxmox.com/ [snip] ^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2026-11-19 10:05 UTC | newest] Thread overview: 13+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2026-11-13 15:26 [PATCH-SERIES docs/ha-manager/manager v4 0/4] fix #6144: add api and ui for node maintenance mode Dominik Rusovac 2026-11-13 15:26 ` [PATCH pve-manager v4 1/4] api: nodes: add endpoint to set " Dominik Rusovac 2026-11-16 11:57 ` Daniel Kral 2026-11-17 8:58 ` Dominik Rusovac 2026-11-17 9:21 ` Daniel Kral 2026-11-17 9:40 ` Dominik Rusovac 2026-11-13 15:26 ` [PATCH pve-manager v4 2/4] fix #6144: ui: ha: status: allow toggling " Dominik Rusovac 2026-11-17 9:07 ` Daniel Kral 2026-11-17 11:02 ` Dominik Rusovac 2026-11-13 15:26 ` [PATCH pve-ha-manager v4 3/4] api: status: report node maintenance request for lrm entries Dominik Rusovac 2026-11-16 12:02 ` Daniel Kral 2026-11-13 15:26 ` [PATCH pve-docs v4 4/4] ha-manager: maintenance mode: mention web ui menu Dominik Rusovac 2026-11-19 10:05 ` [PATCH-SERIES docs/ha-manager/manager v4 0/4] fix #6144: add api and ui for node maintenance mode Dominik Rusovac
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.