From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 1C9051FF170 for ; Thu, 21 Aug 2025 16:37:43 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id B234B2D3CF; Thu, 21 Aug 2025 16:37:43 +0200 (CEST) From: Daniel Kral To: pve-devel@lists.proxmox.com Date: Thu, 21 Aug 2025 16:35:34 +0200 Message-ID: <20250821143705.256562-2-d.kral@proxmox.com> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250821143705.256562-1-d.kral@proxmox.com> References: <20250821143705.256562-1-d.kral@proxmox.com> MIME-Version: 1.0 X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1755787028930 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.013 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 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pve-devel] [PATCH ha-manager 01/18] config: do not add ignored resources to dependent resources X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox VE development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" Otherwise HA resources that are in positive resource affinity rules with ignored HA resources will be shown as dependent resources for callers of get_resource_motion_info(...), even though the ignored HA resource(s) won't be affected. These are already ignored in the HA Manager for the migrate command since 1c9c35d4 ("config, manager: do not check ignored resources with affinity when migrating"). Fixes: 47340b13 ("api: resources: add check for resource affinity in resource migrations") Signed-off-by: Daniel Kral --- src/PVE/HA/Config.pm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/PVE/HA/Config.pm b/src/PVE/HA/Config.pm index 301c62fe..b2ef26aa 100644 --- a/src/PVE/HA/Config.pm +++ b/src/PVE/HA/Config.pm @@ -394,7 +394,12 @@ sub get_resource_motion_info { my $rules = read_and_check_effective_rules_config(); my ($together, $separate) = get_affinitive_resources($rules, $sid); - push @$dependent_resources, $_ for sort keys %$together; + for my $csid (sort keys %$together) { + next if !defined($ss->{$csid}); + next if $ss->{$csid}->{state} eq 'ignored'; + + push @$dependent_resources, $csid; + } for my $node (keys %$ns) { next if $ns->{$node} ne 'online'; -- 2.47.2 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel