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

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: Stéphane Graber <stgra...@ubuntu.com>
From 5a3553377d5c066d94852b9ce1b1d9969fd00a7a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgra...@ubuntu.com>
Date: Tue, 18 Aug 2020 17:42:52 -0400
Subject: [PATCH] lxd/network/ovn: Use snap path
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Stéphane Graber <stgra...@ubuntu.com>
---
 lxd/network/openvswitch/ovn.go | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/lxd/network/openvswitch/ovn.go b/lxd/network/openvswitch/ovn.go
index 3b63fb773a..656ada439d 100644
--- a/lxd/network/openvswitch/ovn.go
+++ b/lxd/network/openvswitch/ovn.go
@@ -112,7 +112,12 @@ func (o *OVN) getNorthboundDB() string {
 
 // nbctl executes ovn-nbctl with arguments to connect to wrapper's northbound 
database.
 func (o *OVN) nbctl(args ...string) (string, error) {
-       return shared.RunCommand("ovn-nbctl", append([]string{"--db", 
o.getNorthboundDB()}, args...)...)
+       dbAddr := o.getNorthboundDB()
+       if strings.HasPrefix(dbAddr, "unix:") {
+               dbAddr = fmt.Sprintf("unix:%s", 
shared.HostPathFollow(strings.TrimPrefix(dbAddr, "unix:")))
+       }
+
+       return shared.RunCommand("ovn-nbctl", append([]string{"--db", dbAddr}, 
args...)...)
 }
 
 // LogicalRouterAdd adds a named logical router.
_______________________________________________
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to