[lxc-devel] [lxd/master] lxd/networks: Allow querying state on non-managed

stgraber on Github lxc-bot at linuxcontainers.org
Thu Jun 27 05:09:57 UTC 2019


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/20190626/99be65d7/attachment.bin>
-------------- next part --------------
From a424173df72fd49e3b4ba27863485e26121c35cc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Thu, 27 Jun 2019 01:09:39 -0400
Subject: [PATCH] lxd/networks: Allow querying state on non-managed
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/networks.go | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/lxd/networks.go b/lxd/networks.go
index 23fdc69b92..b7506dbaf1 100644
--- a/lxd/networks.go
+++ b/lxd/networks.go
@@ -924,10 +924,9 @@ func networkStateGet(d *Daemon, r *http.Request) Response {
 
 	// Get some information
 	osInfo, _ := net.InterfaceByName(name)
-	_, dbInfo, _ := d.cluster.NetworkGet(name)
 
 	// Sanity check
-	if osInfo == nil || dbInfo == nil {
+	if osInfo == nil {
 		return NotFound(fmt.Errorf("Interface '%s' not found", name))
 	}
 


More information about the lxc-devel mailing list