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

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) ===
This is now safe since dqlite itself will return empty responses
when probing non-voting nodes.

Signed-off-by: Free Ekanayaka <free.ekanay...@canonical.com>
From f143304116fa7a07968650255b77cb43ffbd6586 Mon Sep 17 00:00:00 2001
From: Free Ekanayaka <free.ekanay...@canonical.com>
Date: Mon, 4 May 2020 11:56:11 +0100
Subject: [PATCH] Consider all nodes when looking for the leader, not only
 voters

This is now safe since dqlite itself will return empty responses
when probing non-voting nodes.

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

diff --git a/lxd/cluster/gateway.go b/lxd/cluster/gateway.go
index 656f1e5061..cfbb63580e 100644
--- a/lxd/cluster/gateway.go
+++ b/lxd/cluster/gateway.go
@@ -684,8 +684,7 @@ func (g *Gateway) init() error {
 
        g.lock.Lock()
        g.store.onDisk = client.NewNodeStore(
-               g.db.DB(), "main", "raft_nodes", "address",
-               client.WithNodeStoreWhereClause(fmt.Sprintf("role=%d", 
db.RaftVoter)))
+               g.db.DB(), "main", "raft_nodes", "address")
        g.lock.Unlock()
 
        return nil
_______________________________________________
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to