From: Thomas Lamprecht Date: Mon, 20 Mar 2023 10:01:50 +0000 (+0100) Subject: manager: recompute online usage: iterate over keys sorted X-Git-Url: https://git.proxmox.com/?p=pve-ha-manager.git;a=commitdiff_plain;h=7fd7af67e56a803767b948a35992c3316be4fe8f manager: recompute online usage: iterate over keys sorted mostly to be safe for reproduce ability with the test system. Signed-off-by: Thomas Lamprecht --- diff --git a/src/PVE/HA/Manager.pm b/src/PVE/HA/Manager.pm index 70c66ff..cf9bdbd 100644 --- a/src/PVE/HA/Manager.pm +++ b/src/PVE/HA/Manager.pm @@ -251,7 +251,7 @@ sub recompute_online_node_usage { $online_node_usage->add_node($_) for $online_nodes->@*; } - foreach my $sid (keys %{$self->{ss}}) { + foreach my $sid (sort keys %{$self->{ss}}) { my $sd = $self->{ss}->{$sid}; my $state = $sd->{state}; my $target = $sd->{target}; # optional