The failback flag for HA resources is set by default, so it is wasteful
to write the default value in the resources config.

Signed-off-by: Daniel Kral <[email protected]>
---
 src/PVE/HA/Manager.pm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/PVE/HA/Manager.pm b/src/PVE/HA/Manager.pm
index 80b29966..c9d1dde5 100644
--- a/src/PVE/HA/Manager.pm
+++ b/src/PVE/HA/Manager.pm
@@ -583,7 +583,8 @@ my $migrate_group_persistently = sub {
             # prevent unnecessary updates for HA resources that do not change
             next if !defined($resources->{$sid}->{group});
 
-            my $param = { failback => $resources->{$sid}->{failback} };
+            my $param = {};
+            $param->{failback} = 0 if !$resources->{$sid}->{failback};
 
             $haenv->update_service_config($sid, $param, 'group');
         }
-- 
2.47.3



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

Reply via email to