[pve-devel] [PATCH ha-manager v2 6/7] Manager: record tried node on relocation policy

Dietmar Maurer dietmar at proxmox.com
Thu Jun 16 07:13:05 CEST 2016


comments inline:


>      # remove stale relocation try entries
> -    foreach my $sid (keys %{$ms->{relocate_trial}}) {
> -	delete $ms->{relocate_trial}->{$sid} if !$ss->{$sid};

Maybe its worth to keep above code?

> +    foreach my $sid (keys %{$ms->{relocate_tried_nodes}}) {
> +	delete $ms->{relocate_tried_nodes}->{$sid} if !$ss->{$sid};
>      }
>  
>      $self->update_crm_commands();
> @@ -589,31 +589,38 @@ sub next_state_started {
>  	} else {
>  
>  	    my $try_next = 0;
> +	    my $tried_nodes = $master_status->{relocate_tried_nodes}->{$sid} || [];
>  	    if ($lrm_res) {
> +		# add current service  node to failed list
> +		push @$tried_nodes, $sd->{node};

You modify $tried_nodes, but do not always store the 
result to $master_status->{relocate_tried_nodes}->{$sid}?

And should $tried_nodes include the successful node?



More information about the pve-devel mailing list