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 8A2C51FF13A for ; Wed, 08 Jul 2026 16:41:23 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id ACFE02143C; Wed, 08 Jul 2026 16:41:22 +0200 (CEST) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Wed, 08 Jul 2026 16:40:39 +0200 Message-Id: From: =?utf-8?q?Michael_K=C3=B6ppl?= To: "Daniel Kral" , Subject: Re: [PATCH ha-manager 2/2] fix #6084: lrm: allow dropping maintenance with active HA resources X-Mailer: aerc 0.21.0 References: <20260708084205.69947-1-d.kral@proxmox.com> <20260708084205.69947-3-d.kral@proxmox.com> In-Reply-To: <20260708084205.69947-3-d.kral@proxmox.com> X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1783521630906 X-SPAM-LEVEL: Spam detection results: 0 DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) 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: VYJZZD5SXPLFEDFVBINZBT7FA3MJWPAP X-Message-ID-Hash: VYJZZD5SXPLFEDFVBINZBT7FA3MJWPAP X-MailFrom: m.koeppl@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: 1 nit inline On Wed Jul 8, 2026 at 10:42 AM CEST, Daniel Kral wrote: [snip] > +++ b/src/PVE/HA/LRM.pm > @@ -456,13 +456,16 @@ sub work { > $haenv->release_ha_agent_lock(); > give_up_watchdog_protection($self); > $self->set_local_status({ state =3D> 'wait_for_agent_lock' }= ); > - } elsif ($self->active_service_count() || $self->run_workers()) = { > + } elsif ( > + ($self->active_service_count() || $self->run_workers()) > + && $self->is_maintenance_requested() > + ) { > # keep the lock and watchdog as long as not all services cle= ared the node nit: this comment could perhaps also mention something like "while there is a maintenance request" > if (!$self->get_protected_ha_agent_lock()) { > $self->set_local_status({ state =3D> 'lost_agent_lock' }= ); > } > } elsif (!$self->is_maintenance_requested()) { > - # empty && no maintenance mode && not exited -> need to swit= ch active again > + # no node maintenance request && not exited -> need to switc= h active again [snip]