From: "Daniel Kral" <d.kral@proxmox.com>
To: "Daniel Kral" <d.kral@proxmox.com>, <pve-devel@lists.proxmox.com>
Subject: Re: [PATCH ha-manager 6/7] make get_node_affinity return all priority classes sorted in descending order
Date: Thu, 29 Oct 2026 09:43:13 +0100 [thread overview]
Message-ID: <DMH6TI8LF3OT.V95OIN4J1HK7@proxmox.com> (raw)
In-Reply-To: <20260422100035.232716-7-d.kral@proxmox.com>
On Wed Apr 22, 2026 at 12:00 PM CEST, Daniel Kral wrote:
> This is in preparation of the next patch, which needs to iterate through
> the priority classes from the highest to the lowest priority class.
>
> Signed-off-by: Daniel Kral <d.kral@proxmox.com>
This patch misses to adapt the get_node_affinity() caller in
PVE::HA::Helpers::get_resource_motion_info().
I'll adapt it in a v2.
diff --git a/src/PVE/HA/Helpers.pm b/src/PVE/HA/Helpers.pm
index a58b1e12..96682722 100644
--- a/src/PVE/HA/Helpers.pm
+++ b/src/PVE/HA/Helpers.pm
@@ -24,7 +24,8 @@ sub get_resource_motion_info($ss, $sid, $cd, $online_nodes, $compiled_rules) {
my ($node_affinity, $resource_affinity) =
$compiled_rules->@{qw(node-affinity resource-affinity)};
- my ($allowed_nodes, $pri_nodes) = get_node_affinity($node_affinity, $sid, $online_nodes);
+ my ($allowed_nodes, $priority_classes) = get_node_affinity($node_affinity, $sid, $online_nodes);
+ my $pri_nodes = shift @$priority_classes // {};
my ($together, $separate) = get_affinitive_resources($resource_affinity, $sid);
for my $csid (sort keys %$together) {
next prev parent reply other threads:[~2026-10-29 8:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-22 10:00 [PATCH-SERIES ha-manager 0/7] improve handling of maintenance nodes Daniel Kral
2026-04-22 10:00 ` [PATCH ha-manager 1/7] manager: warn if HA resources cannot be moved away from maintenance node Daniel Kral
2026-04-22 10:00 ` [PATCH ha-manager 2/7] test: add test casses for node affinity rules with maintenance mode Daniel Kral
2026-04-22 10:00 ` [PATCH ha-manager 3/7] test: add test cases for resource " Daniel Kral
2026-04-22 10:00 ` [PATCH ha-manager 4/7] manager: make HA resources without failback move back to maintenance node Daniel Kral
2026-04-22 10:00 ` [PATCH ha-manager 5/7] manager: make HA resource bundles " Daniel Kral
2026-04-22 10:00 ` [PATCH ha-manager 6/7] make get_node_affinity return all priority classes sorted in descending order Daniel Kral
2026-10-29 8:43 ` Daniel Kral [this message]
2026-04-22 10:00 ` [PATCH ha-manager 7/7] manager: try multiple priority classes when applying negative resource affinity Daniel Kral
2026-04-29 16:58 ` Michael Köppl
2026-10-29 9:32 ` 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=DMH6TI8LF3OT.V95OIN4J1HK7@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.