[lxc-devel] [lxd/master] Network: Only call Validate in FillConfig if state is set

tomponline on Github lxc-bot at linuxcontainers.org
Mon Oct 19 15:55:38 UTC 2020


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 361 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20201019/64b9f039/attachment.bin>
-------------- next part --------------
From 71caae866af04c142dbb48cc19a4d7a126e3657a Mon Sep 17 00:00:00 2001
From: Thomas Parrott <thomas.parrott at canonical.com>
Date: Mon, 19 Oct 2020 15:56:33 +0100
Subject: [PATCH] lxd/network/driver/ovn: Only call Validate in FillConfig if
 state is set

Signed-off-by: Thomas Parrott <thomas.parrott at canonical.com>
---
 lxd/network/driver_ovn.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lxd/network/driver_ovn.go b/lxd/network/driver_ovn.go
index ea1616d269..cfc5e7fff2 100644
--- a/lxd/network/driver_ovn.go
+++ b/lxd/network/driver_ovn.go
@@ -1168,7 +1168,7 @@ func (n *ovn) FillConfig(config map[string]string) error {
 		changedConfig = true
 	}
 
-	if changedConfig {
+	if changedConfig && n.state != nil {
 		return n.Validate(config)
 	}
 


More information about the lxc-devel mailing list