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 09A8D1FF138 for ; Mon, 20 Jul 2026 14:39:23 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 60F7C21661; Mon, 20 Jul 2026 14:38:16 +0200 (CEST) From: Daniel Kral To: pve-devel@lists.proxmox.com Subject: [PATCH ha-manager 12/16] lrm: rename update_service_status to update_lrm_status Date: Mon, 20 Jul 2026 14:37:01 +0200 Message-ID: <20260720123705.216089-13-d.kral@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260720123705.216089-1-d.kral@proxmox.com> References: <20260720123705.216089-1-d.kral@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1784551006441 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.242 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) RCVD_IN_DNSWL_LOW -0.7 Sender listed at https://www.dnswl.org/, low 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: CZKAITDNBBPQFJVOHA3FUTWMZQMFVUNW X-Message-ID-Hash: CZKAITDNBBPQFJVOHA3FUTWMZQMFVUNW 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: update_lrm_status() is more fitting than update_service_status() here as the internal LRM state that is updated by the information provided by manager status does affect the whole LRM's behavior (node_status and shutdown_request) and not only the LRM's behavior for its HA resources (service_status). Signed-off-by: Daniel Kral --- src/PVE/HA/LRM.pm | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/src/PVE/HA/LRM.pm b/src/PVE/HA/LRM.pm index bdf55d6e..920fda52 100644 --- a/src/PVE/HA/LRM.pm +++ b/src/PVE/HA/LRM.pm @@ -210,7 +210,19 @@ sub flush_lrm_status { return 1; } -sub update_service_status { +=head3 $self->update_lrm_status() + +Updates the internal LRM status properties to reflect the state given by the +C>. + +The internal LRM status properties that are updated are C, +C, and C. + +Returns 1 if the update was successful, otherwise returns undef. + +=cut + +sub update_lrm_status { my ($self) = @_; my $haenv = $self->{haenv}; @@ -224,7 +236,6 @@ sub update_service_status { my $nodename = $haenv->nodename(); $self->{node_status} = $ms->{node_status}->{$nodename} || 'unknown'; - # FIXME: method name is a bit confusing for doing this, either rename or move if (!$self->{shutdown_request}) { my $request = $ms->{node_request}->{$nodename} // {}; if ($request->{maintenance}) { @@ -378,7 +389,7 @@ sub work { my $status = $self->get_local_status(); my $state = $status->{state}; - $self->update_service_status(); + $self->update_lrm_status(); my $fence_request = $self->is_fence_requested(); @@ -509,7 +520,7 @@ sub work { # if we could not get the current service status there's no point # in doing anything, try again next round. - return if !$self->update_service_status(); + return if !$self->update_lrm_status(); if ($self->{shutdown_request}) { @@ -608,7 +619,7 @@ sub work { } elsif ($state eq 'maintenance') { my $startime = $haenv->get_time(); - return if !$self->update_service_status(); + return if !$self->update_lrm_status(); # wait until all active services moved away my $service_count = $self->active_service_count(); -- 2.47.3