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 678041FF187 for ; Fri, 19 Dec 2025 14:36:03 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 7B529C9A1; Fri, 19 Dec 2025 14:36:50 +0100 (CET) From: Daniel Kral To: pve-devel@lists.proxmox.com Date: Fri, 19 Dec 2025 14:35:45 +0100 Message-ID: <20251219133643.295514-1-d.kral@proxmox.com> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1766151393437 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 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 URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [groups.pm, nodeaffinity.pm, hashtools.pm, rules.pm] Subject: [pve-devel] [RFC PATCH-SERIES ha-manager 0/2] Negative Node Affinity Rules 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" For larger HA clusters, specifying the nodes in simple* node affinity rules as opt-out (negative) instead of opt-in (positive) can make the rule set easier to follow and implement by users. * simple = without priority groups There's no web interface integration yet, because I'm not entirely sure yet how to integrate it with the concept of priority groups for positive node affinity rules, which do not make sense in this context as the specified nodes will be removed from the effective node set. As the conversion is pretty straightforward, we could even allow users to convert between positive and negative node affinity rules (e.g. when switching the affinity type in the web interface?). Negative node affinity rules can be declared manually in the rules.cfg now with these two small patches: node-affinity: ha-rule-name affinity negative nodes node1,node2 resources vm:100,vm:101 In a cluster with node1,...,node5 this will result in the identical positive node affinity rule: node-affinity: ha-rule-name-dual affinity positive nodes node3,node4,node5 resources vm:100,vm:101 Daniel Kral (2): rules: node affinity: add affinity property to node affinity rules rules: node affinity: implement negative node affinity rules src/PVE/HA/Groups.pm | 1 + src/PVE/HA/HashTools.pm | 20 ++++++ src/PVE/HA/Rules.pm | 2 + src/PVE/HA/Rules/NodeAffinity.pm | 64 +++++++++++++++++++ .../defaults-for-node-affinity-rules.cfg | 23 +++++-- ...efaults-for-node-affinity-rules.cfg.expect | 62 +++++++++++++++++- ...nt-node-resource-affinity-rules.cfg.expect | 3 + ...ositive-resource-affinity-rules.cfg.expect | 4 ++ ...ty-with-resource-affinity-rules.cfg.expect | 2 + ...rce-refs-in-node-affinity-rules.cfg.expect | 3 + 10 files changed, 179 insertions(+), 5 deletions(-) -- 2.47.3 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel