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 170701FF186 for ; Fri, 1 Aug 2025 18:23:02 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 5F0051E965; Fri, 1 Aug 2025 18:23:12 +0200 (CEST) From: Daniel Kral To: pve-devel@lists.proxmox.com Date: Fri, 1 Aug 2025 18:22:21 +0200 Message-ID: <20250801162230.296214-7-d.kral@proxmox.com> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250801162230.296214-1-d.kral@proxmox.com> References: <20250801162230.296214-1-d.kral@proxmox.com> MIME-Version: 1.0 X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1754065339953 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.014 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 Subject: [pve-devel] [PATCH ha-manager v2 06/12] rules: resource affinity: make message in inter-consistency check clearer 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" Most users will likely interact with the HA rules through the web interface, where the HA rule ids are not shown in the rules view. Error messages with direct references to these rule ids will seem confusing to users, so replace them with a more generic name. Reported-by: Fiona Ebner Signed-off-by: Daniel Kral --- src/PVE/HA/Rules/ResourceAffinity.pm | 4 ++-- .../inconsistent-resource-affinity-rules.cfg.expect | 8 ++++---- ...r-implicit-negative-resource-affinity-rules.cfg.expect | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/PVE/HA/Rules/ResourceAffinity.pm b/src/PVE/HA/Rules/ResourceAffinity.pm index 1d2ed1ed..7327ee08 100644 --- a/src/PVE/HA/Rules/ResourceAffinity.pm +++ b/src/PVE/HA/Rules/ResourceAffinity.pm @@ -236,9 +236,9 @@ __PACKAGE__->register_check( my ($positiveid, $negativeid) = @$conflict; push $errors->{$positiveid}->{resources}->@*, - "rule shares two or more resources with '$negativeid'"; + "rule shares two or more resources with a negative resource affinity rule"; push $errors->{$negativeid}->{resources}->@*, - "rule shares two or more resources with '$positiveid'"; + "rule shares two or more resources with a positive resource affinity rule"; } }, ); diff --git a/src/test/rules_cfgs/inconsistent-resource-affinity-rules.cfg.expect b/src/test/rules_cfgs/inconsistent-resource-affinity-rules.cfg.expect index b0cde0f8..d4a2d7b2 100644 --- a/src/test/rules_cfgs/inconsistent-resource-affinity-rules.cfg.expect +++ b/src/test/rules_cfgs/inconsistent-resource-affinity-rules.cfg.expect @@ -1,8 +1,8 @@ --- Log --- -Drop rule 'keep-apart1', because rule shares two or more resources with 'stick-together1'. -Drop rule 'keep-apart2', because rule shares two or more resources with 'stick-together1'. -Drop rule 'stick-together1', because rule shares two or more resources with 'keep-apart1'. -Drop rule 'stick-together1', because rule shares two or more resources with 'keep-apart2'. +Drop rule 'keep-apart1', because rule shares two or more resources with a positive resource affinity rule. +Drop rule 'keep-apart2', because rule shares two or more resources with a positive resource affinity rule. +Drop rule 'stick-together1', because rule shares two or more resources with a negative resource affinity rule. +Drop rule 'stick-together1', because rule shares two or more resources with a negative resource affinity rule. --- Config --- $VAR1 = { 'digest' => '50875b320034d8ac7dded185e590f5f87c4e2bb6', diff --git a/src/test/rules_cfgs/infer-implicit-negative-resource-affinity-rules.cfg.expect b/src/test/rules_cfgs/infer-implicit-negative-resource-affinity-rules.cfg.expect index bcd368ab..09364d41 100644 --- a/src/test/rules_cfgs/infer-implicit-negative-resource-affinity-rules.cfg.expect +++ b/src/test/rules_cfgs/infer-implicit-negative-resource-affinity-rules.cfg.expect @@ -1,6 +1,6 @@ --- Log --- -Drop rule 'do-not-infer-inconsistent-negative2', because rule shares two or more resources with 'do-not-infer-inconsistent-positive1'. -Drop rule 'do-not-infer-inconsistent-positive1', because rule shares two or more resources with 'do-not-infer-inconsistent-negative2'. +Drop rule 'do-not-infer-inconsistent-negative2', because rule shares two or more resources with a positive resource affinity rule. +Drop rule 'do-not-infer-inconsistent-positive1', because rule shares two or more resources with a negative resource affinity rule. --- Config --- $VAR1 = { 'digest' => 'd8724dfe2130bb642b98e021da973aa0ec0695f0', -- 2.47.2 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel