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 <[email protected]>
---
 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



_______________________________________________
pve-devel mailing list
[email protected]
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to