[pve-devel] [PATCH ha-manager 5/9] manager: report all reasons when resources are blocked from migration
Daniel Kral
d.kral at proxmox.com
Mon Dec 15 16:52:15 CET 2025
PVE::HA::Config::get_resource_motion_info(...) already reports all
reasons to callers, so log that information in the HA Manager as well.
Signed-off-by: Daniel Kral <d.kral at proxmox.com>
---
src/PVE/HA/Manager.pm | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/PVE/HA/Manager.pm b/src/PVE/HA/Manager.pm
index 95bddabc..74e898f9 100644
--- a/src/PVE/HA/Manager.pm
+++ b/src/PVE/HA/Manager.pm
@@ -393,6 +393,7 @@ sub execute_migration {
my $resource_affinity = $self->{compiled_rules}->{'resource-affinity'};
my ($together, $separate) = get_affinitive_resources($resource_affinity, $sid);
+ my $blocked_from_migration;
for my $csid (sort keys %$separate) {
next if !defined($ss->{$csid});
next if $ss->{$csid}->{state} eq 'ignored';
@@ -405,9 +406,11 @@ sub execute_migration {
. " negative affinity with service '$sid'",
);
- return; # one negative resource affinity is enough to not execute migration
+ $blocked_from_migration = 1;
}
+ return if $blocked_from_migration;
+
$haenv->log('info', "got crm command: $cmd");
$ss->{$sid}->{cmd} = [$task, $target];
--
2.47.3
More information about the pve-devel
mailing list