[pve-devel] [PATCH ha-manager 2/6] node status: abort update if not quorate

Dietmar Maurer dietmar at proxmox.com
Wed Nov 8 06:18:58 CET 2017


> If not quorate we must not use the node info as it is undefined
> 
> Solves an issue where the current master marked all other nodes as
> offline when the cluster file system was temporarily unavailable
> (e.g., because of a restart triggered by an update).
> 
> The quorum information was always passed to this sub, just not used
> here.

I just found one call to that function:

src/PVE/HA/Manager.pm:    $ns->update($haenv->get_node_info());

It is a bit hard to see the '$quorate' parameter here. I suugest
to use something like:

my ($node_info, $quorate) = $haenv->get_node_info();
$ns->update(node_info, $quorate)


> 
> Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
> ---
>  src/PVE/HA/NodeStatus.pm | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/src/PVE/HA/NodeStatus.pm b/src/PVE/HA/NodeStatus.pm
> index 7e6e317..4ae28dd 100644
> --- a/src/PVE/HA/NodeStatus.pm
> +++ b/src/PVE/HA/NodeStatus.pm
> @@ -117,7 +117,9 @@ my $set_node_state = sub {
>  };
>  
>  sub update {
> -    my ($self, $node_info) = @_;
> +    my ($self, $node_info, $quorate) = @_;
> +
> +    return if !$quorate;
>  
>      my $haenv = $self->{haenv};
>  
> -- 
> 2.11.0
> 
> 
> _______________________________________________
> pve-devel mailing list
> pve-devel at pve.proxmox.com
> https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel




More information about the pve-devel mailing list