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 1207D1FF0E0 for ; Thu, 09 Jul 2026 10:43:25 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 4A70421482; Thu, 09 Jul 2026 10:43:24 +0200 (CEST) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Thu, 09 Jul 2026 10:43:18 +0200 Message-Id: From: "Daniel Kral" To: =?utf-8?q?Michael_K=C3=B6ppl?= , Subject: Re: [PATCH ha-manager 2/2] fix #6084: lrm: allow dropping maintenance with active HA resources X-Mailer: aerc 0.21.0-147-g43ac7b685014-dirty References: <20260708084205.69947-1-d.kral@proxmox.com> <20260708084205.69947-3-d.kral@proxmox.com> In-Reply-To: X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1783586589243 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.013 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) 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: CNTTVX26JMEOHK7HOV35JEH5ZEFEIRVS X-Message-ID-Hash: CNTTVX26JMEOHK7HOV35JEH5ZEFEIRVS X-MailFrom: d.kral@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: On Wed Jul 8, 2026 at 4:40 PM CEST, Michael K=C3=B6ppl wrote: > 1 nit inline Thanks for taking the time to review! > > 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 cl= eared the node > > nit: this comment could perhaps also mention something like "while > there is a maintenance request" ACK, will add that here in the v2! > >> 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 swi= tch active again >> + # no node maintenance request && not exited -> need to swit= ch active again > > [snip]