[lxc-devel] [lxd/master] lxd/cluster: Properly skip pending networks/pools

stgraber on Github lxc-bot at linuxcontainers.org
Thu Aug 9 20:42:31 UTC 2018


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 354 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20180809/fb50c1ef/attachment.bin>
-------------- next part --------------
From b7851d333c16d67c8eb2020b5ec96604cce5d919 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Thu, 9 Aug 2018 16:41:25 -0400
Subject: [PATCH] lxd/cluster: Properly skip pending networks/pools
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
---
 lxd/api_cluster.go | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lxd/api_cluster.go b/lxd/api_cluster.go
index 756ac4bba5..2750ade9da 100644
--- a/lxd/api_cluster.go
+++ b/lxd/api_cluster.go
@@ -503,7 +503,7 @@ func clusterInitMember(d, client lxd.ContainerServer, memberConfig []api.Cluster
 	// configs provided by the user.
 	for _, pool := range pools {
 		// Skip pending pools.
-		if pool.Status == "PENDING" {
+		if pool.Status == "Pending" {
 			continue
 		}
 
@@ -556,7 +556,7 @@ func clusterInitMember(d, client lxd.ContainerServer, memberConfig []api.Cluster
 	// configs provided by the user.
 	for _, network := range networks {
 		// Skip not-managed or pending networks
-		if !network.Managed || network.Status == "PENDING" {
+		if !network.Managed || network.Status == "Pending" {
 			continue
 		}
 


More information about the lxc-devel mailing list