[pve-devel] [PATCH ha-manager v2 07/12] config, manager: do not check ignored resources with affinity when migrating
Daniel Kral
d.kral at proxmox.com
Fri Aug 1 18:22:22 CEST 2025
These should not be accounted for as these are treated as if the HA
Manager doesn't manage them at all.
Reported-by: Michael Köppl <m.koeppl at proxmox.com>
Signed-off-by: Daniel Kral <d.kral at proxmox.com>
---
src/PVE/HA/Config.pm | 2 ++
src/PVE/HA/Manager.pm | 4 ++++
2 files changed, 6 insertions(+)
diff --git a/src/PVE/HA/Config.pm b/src/PVE/HA/Config.pm
index 6de08650..53b55d0e 100644
--- a/src/PVE/HA/Config.pm
+++ b/src/PVE/HA/Config.pm
@@ -400,6 +400,8 @@ sub get_resource_motion_info {
next if $ns->{$node} ne 'online';
for my $csid (sort keys %$separate) {
+ next if !defined($ss->{$csid});
+ next if $ss->{$csid}->{state} eq 'ignored';
next if $ss->{$csid}->{node} && $ss->{$csid}->{node} ne $node;
next if $ss->{$csid}->{target} && $ss->{$csid}->{target} ne $node;
diff --git a/src/PVE/HA/Manager.pm b/src/PVE/HA/Manager.pm
index 0be12061..ba59f642 100644
--- a/src/PVE/HA/Manager.pm
+++ b/src/PVE/HA/Manager.pm
@@ -420,6 +420,8 @@ sub execute_migration {
my ($together, $separate) = get_affinitive_resources($self->{rules}, $sid);
for my $csid (sort keys %$separate) {
+ next if !defined($ss->{$csid});
+ next if $ss->{$csid}->{state} eq 'ignored';
next if $ss->{$csid}->{node} && $ss->{$csid}->{node} ne $target;
next if $ss->{$csid}->{target} && $ss->{$csid}->{target} ne $target;
@@ -437,6 +439,8 @@ sub execute_migration {
my $resources_to_migrate = [];
for my $csid (sort keys %$together) {
+ next if !defined($ss->{$csid});
+ next if $ss->{$csid}->{state} eq 'ignored';
next if $ss->{$csid}->{node} && $ss->{$csid}->{node} eq $target;
next if $ss->{$csid}->{target} && $ss->{$csid}->{target} eq $target;
--
2.47.2
More information about the pve-devel
mailing list