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 60B171FF187 for ; Mon, 3 Nov 2025 11:23:09 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 44947180CA; Mon, 3 Nov 2025 11:22:05 +0100 (CET) From: Daniel Kral To: pve-devel@lists.proxmox.com Date: Mon, 3 Nov 2025 11:20:05 +0100 Message-ID: <20251103102118.153666-22-d.kral@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20251103102118.153666-1-d.kral@proxmox.com> References: <20251103102118.153666-1-d.kral@proxmox.com> MIME-Version: 1.0 X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1762165267905 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.015 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 v3 21/21] rules: add documentation about current feasibility check implementations 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" These notes should clarify the goals and reasons for the feasibility checks while giving direction how these can be improved in the future. Signed-off-by: Daniel Kral --- changes since v2: - NEW! src/PVE/HA/Rules.pm | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/src/PVE/HA/Rules.pm b/src/PVE/HA/Rules.pm index 9d7f12a1..c4a2ccea 100644 --- a/src/PVE/HA/Rules.pm +++ b/src/PVE/HA/Rules.pm @@ -32,6 +32,13 @@ the feasibility between rules of the same type and and between rules of different types, and prune the rule set in such a way, that it becomes feasible again, while minimizing the amount of rules that need to be pruned. +The feasibility checks must verify that all rules can be applied error-free in +any runtime state of the HA resources, cluster nodes, and the HA Manager in a +reasonable amount of time. This might require more rules to be rejected than +necessary as some checks can become computationally expensive for little benefit +to the core feature, but this can certainly be reevaluated if there are user +requests for these cases. + More so, the rules given by the config file might not be in the best format to be used internally or does not contain the implicitly stated rules, which are induced by the relationship between different rules. Therefore, this package @@ -598,9 +605,11 @@ a list of lists, each consisting of the rule type and rule id, where at least one resource in a resource affinity rule is in a node affinity rule, which has multiple priority groups defined. -That is, the resource affinity rule cannot be statically checked to be feasible -as the selection of the priority group is dependent on the currently online -nodes. +These cases are currently rejected, because the selection of the highest +priority class is dependent on the currently online nodes and on the current +HA resource states and node placements in the case of negative resource affinity +rules. This makes the verification of these rules' feasibility in all possible +states computationally hard. If there are none, the returned list is empty. @@ -670,6 +679,10 @@ lists, each item consisting of the rule type and rule id, where at least one of the resources is used in a positive resource affinity rule and more than one node affinity rule. +These cases are currently rejected, because there is no definitive method to +merge multiple node affinity rules, e.g. with different strictness values and +different priority classes, yet. + If there are none, the returned list is empty. =cut -- 2.47.3 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel