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

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) ===
Signed-off-by: Free Ekanayaka <free.ekanay...@canonical.com>
From 4eae445fbf871301c5187ce0062aeeb90ea8c98a Mon Sep 17 00:00:00 2001
From: Free Ekanayaka <free.ekanay...@canonical.com>
Date: Thu, 21 Nov 2019 14:04:55 +0000
Subject: [PATCH] Use the node ID from the nodes ID table, not the raft one

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

diff --git a/lxd/cluster/membership.go b/lxd/cluster/membership.go
index b8b4456c1f..301a169dbb 100644
--- a/lxd/cluster/membership.go
+++ b/lxd/cluster/membership.go
@@ -650,7 +650,7 @@ func Promote(state *state.State, gateway *Gateway, nodes 
[]db.RaftNode) error {
 
        // Unlock regular access to our cluster database and add the database 
role.
        err = state.Cluster.ExitExclusive(func(tx *db.ClusterTx) error {
-               err = tx.NodeAddRole(id, db.ClusterRoleDatabase)
+               err = tx.NodeAddRole(state.Cluster.GetNodeID(), 
db.ClusterRoleDatabase)
                if err != nil {
                        return errors.Wrapf(err, "Failed to add database role 
for the node")
                }
_______________________________________________
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to