From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id B4D731FF133 for ; Mon, 11 May 2026 11:47:49 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 4CD02108C6; Mon, 11 May 2026 11:47:34 +0200 (CEST) From: Daniel Kral To: pve-devel@lists.proxmox.com Subject: [PATCH ha-manager v3 12/17] manager: remove duplicate service config read in update_crm_commands Date: Mon, 11 May 2026 11:46:33 +0200 Message-ID: <20260511094707.142930-13-d.kral@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260511094707.142930-1-d.kral@proxmox.com> References: <20260511094707.142930-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: 1778492723640 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.077 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment 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: JQINAGUVYXLQ3FX3YR4S5NWDSLPVVUSF X-Message-ID-Hash: JQINAGUVYXLQ3FX3YR4S5NWDSLPVVUSF 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: As there exists a global service config hash in the Manager class now, remove the redundant read from the handling of the 'arm-ha' CRM command in PVE::HA::Manager::update_crm_commands(). The HA Manager should work from the same service config in each HA Manager round to keep consistency. Signed-off-by: Daniel Kral --- changes v2 -> v3: - new src/PVE/HA/Manager.pm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/PVE/HA/Manager.pm b/src/PVE/HA/Manager.pm index c4088dac..9e8095e1 100644 --- a/src/PVE/HA/Manager.pm +++ b/src/PVE/HA/Manager.pm @@ -643,7 +643,7 @@ sub any_resource_motion_queued_or_running { sub update_crm_commands { my ($self) = @_; - my ($haenv, $ms, $ns, $ss) = ($self->{haenv}, $self->{ms}, $self->{ns}, $self->{ss}); + my ($haenv, $ms, $ns, $sc, $ss) = $self->@{qw(haenv ms ns sc ss)}; my $cmdlist = $haenv->read_crm_commands(); @@ -733,7 +733,6 @@ sub update_crm_commands { # recheck node info after ignore mode, as services may have been manually # migrated while HA tracking was suspended if ($ms->{disarm}->{mode} eq 'ignore') { - my $sc = $haenv->read_service_config(); for my $sid (sort keys %$ss) { my $cd = $sc->{$sid}; next if !$cd; -- 2.47.3