The following pull request was submitted through Github.
It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/7578

This e-mail was sent by the LXC bot, direct replies will not reach the author
unless they happen to be subscribed to this list.

=== Description (from pull-request) ===
When running lxd cluster recover-from-quorum-loss, if your raft node 1 is still
around it wasn't added back to the raft configuration after recovery.

Signed-off-by: Free Ekanayaka <free.ekanay...@canonical.com>
From 7e2b027ae4c88309b05cfc3551363adf71501e87 Mon Sep 17 00:00:00 2001
From: Free Ekanayaka <free.ekanay...@canonical.com>
Date: Tue, 23 Jun 2020 12:16:09 +0200
Subject: [PATCH] lxd/cluster: If raft node 1 gets remove during recovery, add
 it back

When running lxd cluster recover-from-quorum-loss, if your raft node 1 is still
around it wasn't added back to the raft configuration after recovery.

Signed-off-by: Free Ekanayaka <free.ekanay...@canonical.com>
---
 lxd/cluster/upgrade.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lxd/cluster/upgrade.go b/lxd/cluster/upgrade.go
index b6704b65b3..4625da0174 100644
--- a/lxd/cluster/upgrade.go
+++ b/lxd/cluster/upgrade.go
@@ -142,7 +142,7 @@ func upgradeMembersWithoutRole(gateway *Gateway, members 
[]db.NodeInfo, nodes []
        for _, member := range members {
                found := false
                for _, node := range nodes {
-                       if member.ID == 1 || member.Address == node.Address {
+                       if member.ID == 1 && node.ID == 1 || member.Address == 
node.Address {
                                found = true
                                break
                        }
_______________________________________________
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to