[PATCH 1/2] virNetDevOpenvswitchGetVhostuserIfname: Actually use @path to lookup interface

2020-12-16 Thread Michal Privoznik
In v6.10.0-rc1~221 I wanted to make virNetDevOpenvswitchGetVhostuserIfname() lookup interface name even for vhostuser interfaces with mode='server'. For these, were are given a socket path which is then created by QEMU and to which OpenVSwitch connects to and creates an interface. Because of this,

[PATCH 2/2] virnetdevopenvswitch: Try to unescape ovs-vsctl reply in one specific case

2020-12-16 Thread Michal Privoznik
During testing of my patch v6.10.0-rc1~221 it was found that 'ovs-vsctl get Interface $name name' or 'ovs-vsctl find Interface options:vhost-server-path=$path' may return a string in double quotes, e.g. "vhost-user1". Later investigation of openvswitch code showed, that early versions (like

[PATCH 0/2] virnetdevopenvswitch: Fir virNetDevOpenvswitchGetVhostuserIfname()

2020-12-16 Thread Michal Privoznik
The first patch is a true fix of a mess I made earlier. The second is an improvement that was found by QE when testing patches with openvswitch older than I wrote patches with. Michal Prívozník (2): virNetDevOpenvswitchGetVhostuserIfname: Actually use @path to lookup interface

Re: [PATCH 1/2] virNetDevOpenvswitchGetVhostuserIfname: Actually use @path to lookup interface

2020-12-16 Thread Laine Stump
On 12/16/20 1:45 PM, Michal Privoznik wrote: In v6.10.0-rc1~221 I wanted to make virNetDevOpenvswitchGetVhostuserIfname() lookup interface name even for vhostuser interfaces with mode='server'. For these, were are given a socket path s/were/we/ which is then created by QEMU and to which

Re: [PATCH 2/2] virnetdevopenvswitch: Try to unescape ovs-vsctl reply in one specific case

2020-12-16 Thread Laine Stump
On 12/16/20 1:45 PM, Michal Privoznik wrote: During testing of my patch v6.10.0-rc1~221 it was found that 'ovs-vsctl get Interface $name name' or 'ovs-vsctl find Interface options:vhost-server-path=$path' may return a string in double quotes, e.g. "vhost-user1". Later investigation of

Re: [PATCH libvirt v1] tests: add capabilities for QEMU 5.1.0 on s390x

2020-12-16 Thread Shalini Chellathurai Saroja
On 12/14/20 10:10 AM, Andrea Bolognani wrote: On Wed, 2020-11-18 at 17:18 +0100, Shalini Chellathurai Saroja wrote: Signed-off-by: Shalini Chellathurai Saroja --- The replies file is removed from this patch and is available in

[PATCH 1/4] schema: Allow lxc:namepsace children to appear individually

2020-12-16 Thread Michal Privoznik
Since its introduction in v1.2.19-rc1~8 our schema mandates that LXC domain namespace child elements appear either all three at once or not at all: This is not mandated by our parser though. Neither by code that later uses it (virLXCProcessSetupNamespaces()).

[PATCH 0/4] lxc: Couple of improvements

2020-12-16 Thread Michal Privoznik
I've noticed these thanks to question on the list: https://www.redhat.com/archives/libvir-list/2020-December/msg00699.html where I suggested to use namespace inheritance. Michal Prívozník (4): schema: Allow lxc:namepsace children to appear individually lxc: Allow NULL argument to

[PATCH 3/4] lxc: Rework lxcDomainDefNamespaceParse()

2020-12-16 Thread Michal Privoznik
While fixing our schema for I've looked into the parser and realized it could use some treating. Signed-off-by: Michal Privoznik --- src/lxc/lxc_domain.c | 40 ++-- 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/src/lxc/lxc_domain.c

[PATCH 4/4] lxd_domain: Require that VIR_LXC_DOMAIN_NAMESPACE_SOURCE_NONE is zero

2020-12-16 Thread Michal Privoznik
Our parser code relies on the fact that VIR_LXC_DOMAIN_NAMESPACE_SOURCE_NONE has value of zero and thus uses g_new0(). But strictly speaking, this is not mandated by the enum typedef. Fix that. Signed-off-by: Michal Privoznik --- src/lxc/lxc_domain.h | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH 2/4] lxc: Allow NULL argument to lxcDomainDefNamespaceFree()

2020-12-16 Thread Michal Privoznik
As all other free functions, NULL should be accepted. Even though there currently is no caller that would pass NULL, there will be in future patches. Signed-off-by: Michal Privoznik --- src/lxc/lxc_domain.c | 4 1 file changed, 4 insertions(+) diff --git a/src/lxc/lxc_domain.c

Re: [PATCH 1/5] util: fix tap device name auto-generation for FreeBSD

2020-12-16 Thread Michal Privoznik
On 12/16/20 2:27 AM, Laine Stump wrote: The Linux implementation of virNetDevCreate() no longer requires a template ifname (e.g. "vnet%d") when it is called, but just generates a new name if ifname is empty. The FreeBSD implementation requires that the caller actually fill in a template ifname,

Re: [PATCH 0/5] Followup to virNetDevGenerateName() patches

2020-12-16 Thread Michal Privoznik
On 12/16/20 2:27 AM, Laine Stump wrote: A few issues came up during review of this series that were better fixed in cleanups rather than requiring yet another round of review. (A couple of things I noticed after the other patches were already pushed). Laine Stump (5): util: fix tap device

live migration is not using secondary interface

2020-12-16 Thread Olaf Hering
A naive 'virsh migrate --live domU xen+tcp://cross-over-ip' uses the ordinary uplink instead of the requested IP address. According to the documentation an additional option has to be specified to really use the other network interface. However, neither 'tcp://cross-over-ip' nor

Re: [PATCHv3 0/3] Use netlink to create veth device pair when netlink is supported

2020-12-16 Thread Laine Stump
On 12/16/20 1:01 AM, Shi Lei wrote: V2 here: https://www.redhat.com/archives/libvir-list/2020-November/msg01239.html Since V2: * Remove the argument 'status' of virNetDevVethCreateInternal * fix a memory leak in virLXCProcessSetupInterfaceTap V1 here:

Re: [PATCHv3 1/3] util:netlink: Enable virNetlinkNewLink to support veth

2020-12-16 Thread Laine Stump
On 12/16/20 1:01 AM, Shi Lei wrote: Signed-off-by: Shi Lei --- src/util/virnetlink.c | 14 ++ src/util/virnetlink.h | 1 + 2 files changed, 15 insertions(+) diff --git a/src/util/virnetlink.c b/src/util/virnetlink.c index fdd3a6a4..8625b896 100644 --- a/src/util/virnetlink.c

[PATCH 6/5] lxc: skip the netdev autogenerated name counter past existing devices

2020-12-16 Thread Laine Stump
the lxc driver uses virNetDevGenerateName() for its veth device names since patch 2dd0fb492, so it should be using virNetDevReserveName() during daemon restart/reconnect to skip over the device names that are in use. Signed-off-by: Laine Stump --- I meant to mention this during review of the

Re: [PATCH 6/5] lxc: skip the netdev autogenerated name counter past existing devices

2020-12-16 Thread Michal Privoznik
On 12/16/20 9:13 PM, Laine Stump wrote: the lxc driver uses virNetDevGenerateName() for its veth device names since patch 2dd0fb492, so it should be using virNetDevReserveName() during daemon restart/reconnect to skip over the device names that are in use. Signed-off-by: Laine Stump --- I

Re: [PATCH 6/5] lxc: skip the netdev autogenerated name counter past existing devices

2020-12-16 Thread Laine Stump
On 12/16/20 4:27 PM, Michal Privoznik wrote: On 12/16/20 9:13 PM, Laine Stump wrote: the lxc driver uses virNetDevGenerateName() for its veth device names since patch 2dd0fb492, so it should be using virNetDevReserveName() during daemon restart/reconnect to skip over the device names that are

[RFC PATCH 6/6] util: Added a backing store NFS parser

2020-12-16 Thread Ryan Gahagan
Signed-off-by: Ryan Gahagan --- src/util/virstoragefile.c | 37 + 1 file changed, 37 insertions(+) diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c index cff6dabd9e..341eac2eb7 100644 --- a/src/util/virstoragefile.c +++

[RFC PATCH 1/6] conf: Add NFS disk protocol

2020-12-16 Thread Ryan Gahagan
Signed-off-by: Ryan Gahagan --- src/libxl/libxl_conf.c| 1 + src/libxl/xen_xl.c| 1 + src/qemu/qemu_block.c | 3 +++ src/qemu/qemu_command.c | 1 + src/qemu/qemu_domain.c| 10 ++ src/qemu/qemu_snapshot.c | 3 +++ src/util/virstoragefile.c | 6 ++

[RFC PATCH 5/6] qemu: Added NFS JSON props methods

2020-12-16 Thread Ryan Gahagan
Signed-off-by: Ryan Gahagan --- src/qemu/qemu_block.c | 48 +- src/qemu/qemu_domain.c | 39 ++ 2 files changed, 86 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c index

[RFC PATCH 3/6] docs: added rng schema and formatdomain for NFS

2020-12-16 Thread Ryan Gahagan
Signed-off-by: Ryan Gahagan --- docs/formatdomain.rst | 11 +- docs/schemas/domaincommon.rng | 38 +++ 2 files changed, 48 insertions(+), 1 deletion(-) diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst index 512939679b..23a7bca643 100644

[RFC PATCH 2/6] util: Added nfs params to virStorageSource

2020-12-16 Thread Ryan Gahagan
Signed-off-by: Ryan Gahagan --- src/util/virstoragefile.c | 8 src/util/virstoragefile.h | 5 + 2 files changed, 13 insertions(+) diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c index 5a57e5d12d..cff6dabd9e 100644 --- a/src/util/virstoragefile.c +++

RFC PATCH: Issue 90 (Test Clarification)

2020-12-16 Thread Ryan Gahagan
We addressed the feedback from our previous RFC patch for the most part. Under src/util/virstoragefile.c, we left a cast to an integer pointer that Peter mentioned because we were unable to provide a better solution. We've written some tests for our code but our testing environment is not working

[RFC PATCH 4/6] conf: Added NFS XML format/parse methods

2020-12-16 Thread Ryan Gahagan
Signed-off-by: Ryan Gahagan --- src/conf/domain_conf.c | 33 + 1 file changed, 33 insertions(+) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index b301ac0a08..565ca680c9 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -6888,6

Re: [PATCH 1/4] schema: Allow lxc:namepsace children to appear individually

2020-12-16 Thread Laine Stump
On 12/16/20 4:12 PM, Michal Privoznik wrote: Since its introduction in v1.2.19-rc1~8 our schema mandates that LXC domain namespace child elements appear either all three at once or not at all: This is not mandated by our parser though. Neither by code

Re: [PATCH 3/4] lxc: Rework lxcDomainDefNamespaceParse()

2020-12-16 Thread Laine Stump
On 12/16/20 4:13 PM, Michal Privoznik wrote: While fixing our schema for I've looked into the parser and realized it could use some treating. Signed-off-by: Michal Privoznik Huh. Some er... "interesting" code you're replacing there :-) Reviewed-by: Laine Stump

Re: [PATCH 4/4] lxd_domain: Require that VIR_LXC_DOMAIN_NAMESPACE_SOURCE_NONE is zero

2020-12-16 Thread Laine Stump
On 12/16/20 4:13 PM, Michal Privoznik wrote: Our parser code relies on the fact that VIR_LXC_DOMAIN_NAMESPACE_SOURCE_NONE has value of zero and thus uses g_new0(). But strictly speaking, this is not mandated by the enum typedef. Fix that. Is there really any C compiler that doesn't make the

Re: [PATCH] util: Add phys_port_name support on virPCIGetNetName

2020-12-16 Thread Laine Stump
On 12/10/20 11:51 AM, Adrian Chiris wrote: Hi, Would be great to get a pair of eyes on this Patch, Thanks! I've looked at it several times and every time would just end up shaking my head wondering why there isn't one definitive symlink in the VF's sysfs for the netdev of the physical

Re: [PATCH 2/4] lxc: Allow NULL argument to lxcDomainDefNamespaceFree()

2020-12-16 Thread Laine Stump
On 12/16/20 4:12 PM, Michal Privoznik wrote: As all other free functions, NULL should be accepted. Even though there currently is no caller that would pass NULL, there will be in future patches. Signed-off-by: Michal Privoznik Reviewed-by: Laine Stump

[libvirt PATCH 1/3] qemu: Fix possible segfault when migrating disks

2020-12-16 Thread Martin Kletzander
Users can provide URI without a schema. https://bugzilla.redhat.com/show_bug.cgi?id=1638889 Signed-off-by: Martin Kletzander --- src/qemu/qemu_migration.c | 5 + 1 file changed, 5 insertions(+) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index

[libvirt PATCH 0/3] Few fixes for migration over UNIX socket

2020-12-16 Thread Martin Kletzander
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1638889 Martin Kletzander (3): qemu: Fix possible segfault when migrating disks docs: Slightly alter disks-uri description in virsh man qemu: Extra check for NBD URI being specified docs/manpages/virsh.rst | 22 +++---

[libvirt PATCH 3/3] qemu: Extra check for NBD URI being specified

2020-12-16 Thread Martin Kletzander
It must be used when migration URI uses `unix:` transport because otherwise we cannot just guess where to connect for disk migration. https://bugzilla.redhat.com/show_bug.cgi?id=1638889 Signed-off-by: Martin Kletzander --- src/qemu/qemu_driver.c | 21 + 1 file changed, 21

[libvirt PATCH 2/3] docs: Slightly alter disks-uri description in virsh man

2020-12-16 Thread Martin Kletzander
It's more accurate this way. https://bugzilla.redhat.com/show_bug.cgi?id=1638889 Signed-off-by: Martin Kletzander --- docs/manpages/virsh.rst | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/manpages/virsh.rst b/docs/manpages/virsh.rst index

Re: [libvirt PATCH 0/3] Few fixes for migration over UNIX socket

2020-12-16 Thread Michal Privoznik
On 12/16/20 12:19 PM, Martin Kletzander wrote: Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1638889 Martin Kletzander (3): qemu: Fix possible segfault when migrating disks docs: Slightly alter disks-uri description in virsh man qemu: Extra check for NBD URI being specified