From: Daniel Kral <d.kral@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH-SERIES docs/ha-manager/manager v2 00/12] Negative Node Affinity Rules
Date: Tue, 2 Jun 2026 12:01:04 +0200 [thread overview]
Message-ID: <20260602100226.180071-1-d.kral@proxmox.com> (raw)
RFC v1: https://lore.proxmox.com/pve-devel/20251219133643.295514-1-d.kral@proxmox.com/
changes since v1:
- rebase on master
- add documentation
- add web interface integration
- disallow node priorities by satisfiability check (Thanks @Fiona!)
- disallow all cluster nodes in negative node affinity rules
- make the code clearer (Thanks @Fiona!)
Patches have been tested in a real cluster and patches have been tested
with `git rebase master --exec 'make clean && make deb'`.
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
ha-manager:
Daniel Kral (3):
rules: node affinity: add affinity property to node affinity rules
rules: rename ambiguous argument nodes to cluster nodes
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 | 39 ++--
src/PVE/HA/Rules/NodeAffinity.pm | 171 +++++++++++++++++-
src/PVE/HA/Rules/ResourceAffinity.pm | 17 +-
.../defaults-for-node-affinity-rules.cfg | 23 ++-
...efaults-for-node-affinity-rules.cfg.expect | 62 ++++++-
...nt-node-resource-affinity-rules.cfg.expect | 3 +
...effective-negative-node-affinity-rules.cfg | 12 ++
...ve-negative-node-affinity-rules.cfg.expect | 17 ++
...ositive-resource-affinity-rules.cfg.expect | 4 +
...ty-with-resource-affinity-rules.cfg.expect | 2 +
...rce-refs-in-node-affinity-rules.cfg.expect | 3 +
...iority-in-negative-node-affinity-rules.cfg | 11 ++
...in-negative-node-affinity-rules.cfg.expect | 45 +++++
15 files changed, 397 insertions(+), 33 deletions(-)
create mode 100644 src/test/rules_cfgs/ineffective-negative-node-affinity-rules.cfg
create mode 100644 src/test/rules_cfgs/ineffective-negative-node-affinity-rules.cfg.expect
create mode 100644 src/test/rules_cfgs/node-priority-in-negative-node-affinity-rules.cfg
create mode 100644 src/test/rules_cfgs/node-priority-in-negative-node-affinity-rules.cfg.expect
base-commit: ecaa0330ee6ab576856082c7f944feef4a14a3e0
manager:
Daniel Kral (5):
ui: ha: node affinity: handle non-existent nodes
ui: ha: node affinity: do update node selection all at once
ui: ha: node affinity: move node priority selector into separate
component
ui: ha: node affinity: allow setting affinity for node affinity rules
ui: ha: node affinity: do not send default node affinity rule values
www/manager6/Makefile | 1 +
www/manager6/ha/NodePrioritySelector.js | 228 ++++++++++++++++++
www/manager6/ha/rules/NodeAffinityRuleEdit.js | 157 +++---------
www/manager6/ha/rules/NodeAffinityRules.js | 5 +
4 files changed, 273 insertions(+), 118 deletions(-)
create mode 100644 www/manager6/ha/NodePrioritySelector.js
base-commit: 0eca62095a62a740401db796056892cf3d65e70e
prerequisite-patch-id: 4d56fc30265d266904dbe5bbbe2ddca6f27504e6
prerequisite-patch-id: ebc40a1e1c303b92895a03fdda36a934ad76f1f8
docs:
Daniel Kral (4):
ha-manager: rules: use the correct article for terms starting with HA
ha-manager: rules: improve resource affinity rule short description
ha-manager: rules: adapt rule configuration examples
ha-manager: rules: add negative node affinity rule descriptions
ha-manager.adoc | 77 ++++++++++++++++++++++++++++++++++---------------
1 file changed, 53 insertions(+), 24 deletions(-)
Summary over all repositories:
20 files changed, 723 insertions(+), 175 deletions(-)
--
Generated by murpp 0.12.0
next reply other threads:[~2026-06-02 10:03 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-02 10:01 Daniel Kral [this message]
2026-06-02 10:01 ` [PATCH ha-manager v2 01/12] rules: node affinity: add affinity property to node affinity rules Daniel Kral
2026-06-02 10:01 ` [PATCH ha-manager v2 02/12] rules: rename ambiguous argument nodes to cluster nodes Daniel Kral
2026-06-02 10:01 ` [PATCH ha-manager v2 03/12] rules: node affinity: implement negative node affinity rules Daniel Kral
2026-06-02 10:01 ` [PATCH manager v2 04/12] ui: ha: node affinity: handle non-existent nodes Daniel Kral
2026-06-02 10:01 ` [PATCH manager v2 05/12] ui: ha: node affinity: do update node selection all at once Daniel Kral
2026-06-02 10:01 ` [PATCH manager v2 06/12] ui: ha: node affinity: move node priority selector into separate component Daniel Kral
2026-06-02 10:01 ` [PATCH manager v2 07/12] ui: ha: node affinity: allow setting affinity for node affinity rules Daniel Kral
2026-06-02 10:01 ` [PATCH manager v2 08/12] ui: ha: node affinity: do not send default node affinity rule values Daniel Kral
2026-06-02 10:01 ` [PATCH docs v2 09/12] ha-manager: rules: use the correct article for terms starting with HA Daniel Kral
2026-06-02 10:01 ` [PATCH docs v2 10/12] ha-manager: rules: improve resource affinity rule short description Daniel Kral
2026-06-02 10:01 ` [PATCH docs v2 11/12] ha-manager: rules: adapt rule configuration examples Daniel Kral
2026-06-02 10:01 ` [PATCH docs v2 12/12] ha-manager: rules: add negative node affinity rule descriptions Daniel Kral
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260602100226.180071-1-d.kral@proxmox.com \
--to=d.kral@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.