[pve-devel] [PATCH ha-manager 2/9] manager: remove redundant recompute_online_node_usage from next_state_recovery
Fiona Ebner
f.ebner at proxmox.com
Thu Oct 16 13:25:04 CEST 2025
Am 30.09.25 um 4:20 PM schrieb Daniel Kral:
> recompute_online_node_usage(...) is currently only dependent on the
> configured CRS scheduler mode, the list of online nodes and the HA
> resource's state, current node and optional migration target.
>
> The proper recovery of HA resources was introduced in 9da84a0d ("fix
> 'change_service_location' misuse and recovery from fencing") as a
> private helper to recover fenced HA resources and the
> recompute_online_node_usage(...) was needed here.
>
> As the recovery of fenced HA resources is its own state for HA resources
> since c259b1a8 ("manager: make recovery actual state in FSM"), the
> change_service_state(...) to 'recovery' will already call
> recompute_online_node_usage(...) before, making this call redundant.
>
> Signed-off-by: Daniel Kral <d.kral at proxmox.com>
Reviewed-by: Fiona Ebner <f.ebner at proxmox.com>
> ---
> src/PVE/HA/Manager.pm | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/src/PVE/HA/Manager.pm b/src/PVE/HA/Manager.pm
> index 3f81f233..f69a7fe9 100644
> --- a/src/PVE/HA/Manager.pm
> +++ b/src/PVE/HA/Manager.pm
> @@ -1301,8 +1301,6 @@ sub next_state_recovery {
>
> my $fenced_node = $sd->{node}; # for logging purpose
>
> - $self->recompute_online_node_usage(); # we want the most current node state
> -
> my $recovery_node = select_service_node(
> $self->{rules},
> $self->{online_node_usage},
More information about the pve-devel
mailing list