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

Thomas Lamprecht t.lamprecht at proxmox.com
Tue Nov 7 15:27:09 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.

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





More information about the pve-devel mailing list