On Wed, Dec 30, 2020 at 18:39:35 +0800, liyalei wrote:
From: liyalei <liyl43(a)chinatelecom.cn>
Please provide some more description in the commit message, such as
describe the bug that this patch is fixing.
Additionally the libvirt project requires [1] you to certify that you
are in compliance of the 'Developer certificate of origin' [2] by
providing the appropriate tag in the commit message (read the docs to
figure out which).
[1]:
https://libvirt.org/hacking.html#developer-certificate-of-origin
[2]:
https://developercertificate.org/
---
src/util/virnetdevopenvswitch.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/util/virnetdevopenvswitch.c b/src/util/virnetdevopenvswitch.c
index d380b0cf22..7eabaa763d 100644
--- a/src/util/virnetdevopenvswitch.c
+++ b/src/util/virnetdevopenvswitch.c
@@ -494,7 +494,7 @@ virNetDevOpenvswitchGetVhostuserIfname(const char *path,
if (server) {
virCommandAddArgList(cmd, "--no-headings", "--columns=name",
"find",
"Interface", NULL);
- virCommandAddArgPair(cmd, "options:vhost-server-path",
"path");
+ virCommandAddArgPair(cmd, "options:vhost-server-path", path);
Looks like this is already fixed:
commit 0dd029b7f2e7d9619ca6a22f43857aafb449c3a7
Author: Michal Prívozník <mprivozn(a)redhat.com>
Date: Wed Dec 16 18:52:48 2020 +0100
virNetDevOpenvswitchGetVhostuserIfname: Actually use @path to lookup interface
In v6.10.0-rc1~221 I wanted to make virNetDevOpenvswitchGetVhostuserIfname()
lookup interface name even for vhostuser interfaces with mode='server'. For
these, we are given a socket path which is then created by QEMU and to which
OpenVSwitch connects to and creates an interface. Because of this, we don't
know the name of the interface upfront (when starting QEMU) and have to use
the path to query OpenVSwitch later (using ovs-vsctl). What I intended to use
was:
ovs-vsctl --no-headings --columns=name find Interface
options:vhost-server-path=$path
But what my code does is:
ovs-vsctl --no-headings --columns=name find Interface
options:vhost-server-path=path
and it's all because the argument to the function is named "path"
which I then enclosed in double quotes while it should have been
used as a variable.
Fixes: e4c29e2904197472919d050c67acfd59f0144bbc
Resolves:
https://bugzilla.redhat.com/show_bug.cgi?id=1767013
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
Reviewed-by: Laine Stump <laine(a)redhat.com>
diff --git a/src/util/virnetdevopenvswitch.c b/src/util/virnetdevopenvswitch.c
index d380b0cf22..7eabaa763d 100644
--- a/src/util/virnetdevopenvswitch.c
+++ b/src/util/virnetdevopenvswitch.c
@@ -494,7 +494,7 @@ virNetDevOpenvswitchGetVhostuserIfname(const char *path,
if (server) {
virCommandAddArgList(cmd, "--no-headings", "--columns=name",
"find",
"Interface", NULL);
- virCommandAddArgPair(cmd, "options:vhost-server-path",
"path");
+ virCommandAddArgPair(cmd, "options:vhost-server-path", path);
} else {
const char *tmpIfname = NULL;
} else {
const char *tmpIfname = NULL;
--
2.27.0