Re: [libvirt] [PATCH 0/2] tests: Add QEMU 3.0.0 capability tests for s390x

2018-09-21 Thread Bjoern Walk
John Ferlan [2018-09-21, 07:46AM -0400]: > > > On 09/21/2018 01:13 AM, Bjoern Walk wrote: > > John Ferlan [2018-09-20, 04:30PM -0400]: > >> > >> > >> On 09/20/2018 06:20 AM, Boris Fiuczynski wrote: > >>> Add capability and domcaps tests for QEMU 3.0.0 on s390x. > >>> > >>> Boris Fiuczynski

Re: [libvirt] [PATCH 0/4] Couple of metadata locking fixes

2018-09-21 Thread Bjoern Walk
Michal Privoznik [2018-09-21, 11:29AM +0200]: > @Bjoern: I'm still unable to reproduce the issue you reported. However, > whilst trying to do so I've came across this bug. However, my gut > feeling is that this might help you. Quick check, same issue. I will start debugging next week to get at

Re: [libvirt] [PATCH 02/13] virsh: Implement vshTable API to net-list and net-dhcp-leases

2018-09-21 Thread Michal Privoznik
On 09/21/2018 03:35 PM, Erik Skultety wrote: > On Wed, Sep 19, 2018 at 11:26:27AM +0200, Michal Privoznik wrote: >> On 09/18/2018 04:21 PM, Simon Kobyda wrote: >>> Signed-off-by: Simon Kobyda >>> --- >>> tools/virsh-network.c | 55 +-- >>> 1 file changed,

[libvirt] [PATCH v2 09/13] virsh: Implement vshTable API to domiflist

2018-09-21 Thread Simon Kobyda
Signed-off-by: Simon Kobyda --- tools/virsh-domain-monitor.c | 41 ++-- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/tools/virsh-domain-monitor.c b/tools/virsh-domain-monitor.c index b887bb48d9..4bba8438af 100644 ---

[libvirt] [PATCH v2 11/13] virsh: Implement vshTable API to pool-list

2018-09-21 Thread Simon Kobyda
Local lengthy unicode-unreliable table formatting was replaced by new API. Great example of how new API saves space and time. Removed a lot of string lenght canculation used by the local table. Signed-off-by: Simon Kobyda --- tools/virsh-pool.c | 162

[libvirt] [PATCH v2 08/13] virsh: Implement vshTable API to domblklist

2018-09-21 Thread Simon Kobyda
Signed-off-by: Simon Kobyda --- tools/virsh-domain-monitor.c | 21 ++--- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/tools/virsh-domain-monitor.c b/tools/virsh-domain-monitor.c index 80c7e8a99e..b887bb48d9 100644 --- a/tools/virsh-domain-monitor.c +++

[libvirt] [PATCH v2 12/13] virsh: Implement vshTable API to vol-list

2018-09-21 Thread Simon Kobyda
Local lengthy unicode-unreliable table formatting was replaced by new API. Great example of how new API saves space and time. Removed a lot of string lenght calculation used by the local table. Signed-off-by: Simon Kobyda --- tools/virsh-volume.c | 129

[libvirt] [PATCH v2 02/13] virsh: Implement vshTable API to net-list and net-dhcp-leases

2018-09-21 Thread Simon Kobyda
Signed-off-by: Simon Kobyda --- tools/virsh-network.c | 59 --- 1 file changed, 38 insertions(+), 21 deletions(-) diff --git a/tools/virsh-network.c b/tools/virsh-network.c index ca07fb568f..440b23d8a8 100644 --- a/tools/virsh-network.c +++

[libvirt] [PATCH v2 01/13] virsh: Implement vsh-table to iface-list

2018-09-21 Thread Simon Kobyda
Signed-off-by: Simon Kobyda --- tools/virsh-interface.c | 27 +++ 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/tools/virsh-interface.c b/tools/virsh-interface.c index 50518c667b..1eb1a27ac7 100644 --- a/tools/virsh-interface.c +++

[libvirt] [PATCH v2 04/13] virsh: Implement vshTable API to nwfilter-list and nwfilterbinding-list

2018-09-21 Thread Simon Kobyda
Signed-off-by: Simon Kobyda --- tools/virsh-nwfilter.c | 47 +- 1 file changed, 33 insertions(+), 14 deletions(-) diff --git a/tools/virsh-nwfilter.c b/tools/virsh-nwfilter.c index 1cdbe5053a..b680ea082c 100644 --- a/tools/virsh-nwfilter.c +++

[libvirt] [PATCH v2 13/13] virt-admin: Implement vshTable API to server-list and client-list

2018-09-21 Thread Simon Kobyda
Signed-off-by: Simon Kobyda --- tools/virt-admin.c | 47 ++ 1 file changed, 35 insertions(+), 12 deletions(-) diff --git a/tools/virt-admin.c b/tools/virt-admin.c index 63822bc13e..d119e4d960 100644 --- a/tools/virt-admin.c +++ b/tools/virt-admin.c @@

[libvirt] [PATCH v2 03/13] virsh: Implement vshTable API to secret-list

2018-09-21 Thread Simon Kobyda
Signed-off-by: Simon Kobyda --- tools/virsh-secret.c | 28 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/tools/virsh-secret.c b/tools/virsh-secret.c index 670beea706..87239ff60b 100644 --- a/tools/virsh-secret.c +++ b/tools/virsh-secret.c @@ -35,6

[libvirt] [PATCH v2 06/13] virsh: Set up cmdDomblkinfo() and cmdDomblkinfoPrint() for vshTable API implementation

2018-09-21 Thread Simon Kobyda
I've moved all the printing from cmdDomblkinfoPrint() to cmdDomblkinfo(), and renamed the cmdDomblkinfoPrint() to cmdDomblkinfoGet(), since nature of that function changed from gathering and printing informations only to gathering information. This I believe simplifies the functions and makes the

[libvirt] [PATCH v2 07/13] virsh: Implement vshTable API to domblkinfo

2018-09-21 Thread Simon Kobyda
Signed-off-by: Simon Kobyda --- tools/virsh-domain-monitor.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/tools/virsh-domain-monitor.c b/tools/virsh-domain-monitor.c index cb48f9a7be..80c7e8a99e 100644 --- a/tools/virsh-domain-monitor.c +++

[libvirt] [PATCH v2 05/13] virsh: Implement vshTable API to snapshot-list.

2018-09-21 Thread Simon Kobyda
Signed-off-by: Simon Kobyda --- tools/virsh-snapshot.c | 33 - 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/tools/virsh-snapshot.c b/tools/virsh-snapshot.c index a4ea959230..73861957ba 100644 --- a/tools/virsh-snapshot.c +++

[libvirt] [PATCH v2 10/13] virsh: Implement vshTable API to vcpupin, iothreadinfo, domfsinfo

2018-09-21 Thread Simon Kobyda
Signed-off-by: Simon Kobyda --- tools/virsh-domain.c | 98 +++- 1 file changed, 70 insertions(+), 28 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index c1cff9fe2d..2a416b919a 100644 --- a/tools/virsh-domain.c +++

[libvirt] [PATCH v2 00/13] Implement vsh-table API to virsh and virt-admin

2018-09-21 Thread Simon Kobyda
API is implemented in virsh and virt-admin. It fixes problems with table-alignment, makes tables more readable and deals with unicode. Table however could not be implemented in places, which do use simple lists, or table implementation would change content of output, which users might rely on. If

Re: [libvirt] [PATCH 2/4] virNetSocket: Be more safe with fork() around virNetSocketDupFD()

2018-09-21 Thread Marc Hartmayer
On Fri, Sep 21, 2018 at 11:29 AM +0200, Michal Privoznik wrote: > If there was a caller which would dup the client FD without > CLOEXEC flag and later decided to change the flag it wouldn't be > safe to do because fork() might have had occurred meantime. > Switch to the other pattern - always

Re: [libvirt] [PATCH 1/4] security: Grab a reference to virSecurityManager for transactions

2018-09-21 Thread Marc Hartmayer
On Fri, Sep 21, 2018 at 11:29 AM +0200, Michal Privoznik wrote: > This shouldn't be needed per-se. Security manager shouldn't > disappear during transactions - it's immutable. However, it > doesn't hurt to grab a reference either - transaction code uses > it after all. > > Signed-off-by: Michal

Re: [libvirt] [PATCH 0/2] qemu: Drop QEMU_CAPS_DEVICE_SCSI_GENERIC

2018-09-21 Thread Michal Privoznik
On 09/18/2018 12:46 PM, Andrea Bolognani wrote: > Andrea Bolognani (2): > tests: Fix duplicated capabilities > qemu: Drop QEMU_CAPS_DEVICE_SCSI_GENERIC > > src/qemu/qemu_capabilities.c | 7 +-- > src/qemu/qemu_capabilities.h | 2 +- >

[libvirt] [PATCH libvirt-python v2 07/22] event-test.py: Simplify event ID lists

2018-09-21 Thread Philipp Hahn
by directly building the list with the IDs instead of appending them explicitly. Signed-off-by: Philipp Hahn --- examples/event-test.py | 87 ++ 1 file changed, 46 insertions(+), 41 deletions(-) diff --git a/examples/event-test.py

[libvirt] [PATCH libvirt-python v2 21/22] event-test.py: Convert CONNECTION events

2018-09-21 Thread Philipp Hahn
to use new Description class Signed-off-by: Philipp Hahn --- examples/event-test.py | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/examples/event-test.py b/examples/event-test.py index 5e3b884..1e94838 100755 --- a/examples/event-test.py +++

[libvirt] [PATCH libvirt-python v2 22/22] event-test.py: Fix blanks

2018-09-21 Thread Philipp Hahn
Closer to pep8 Signed-off-by: Philipp Hahn --- examples/event-test.py | 97 -- 1 file changed, 71 insertions(+), 26 deletions(-) diff --git a/examples/event-test.py b/examples/event-test.py index 1e94838..540bf9b 100755 ---

[libvirt] [PATCH libvirt-python v2 13/22] event-test.py: Convert AGENT events

2018-09-21 Thread Philipp Hahn
to use new Description class Signed-off-by: Philipp Hahn --- examples/event-test.py | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/examples/event-test.py b/examples/event-test.py index 4a801b7..b559ede 100755 --- a/examples/event-test.py +++

[libvirt] [PATCH libvirt-python v2 08/22] event-test.py: Add class for event descriptions

2018-09-21 Thread Philipp Hahn
Signed-off-by: Philipp Hahn --- examples/event-test.py | 25 + 1 file changed, 25 insertions(+) diff --git a/examples/event-test.py b/examples/event-test.py index 91a7cb7..d2d2c60 100755 --- a/examples/event-test.py +++ b/examples/event-test.py @@ -456,6 +456,31 @@ def

[libvirt] [PATCH libvirt-python v2 16/22] event-test.py: Convert TRAY events

2018-09-21 Thread Philipp Hahn
to use new Description class Signed-off-by: Philipp Hahn --- examples/event-test.py | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/examples/event-test.py b/examples/event-test.py index 218103d..5426ecd 100755 --- a/examples/event-test.py +++ b/examples/event-test.py @@

[libvirt] [PATCH libvirt-python v2 12/22] event-test.py: Convert ERROR events

2018-09-21 Thread Philipp Hahn
to use new Description class Signed-off-by: Philipp Hahn --- examples/event-test.py | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/examples/event-test.py b/examples/event-test.py index 004a263..4a801b7 100755 --- a/examples/event-test.py +++ b/examples/event-test.py

[libvirt] [PATCH libvirt-python v2 14/22] event-test.py: Convert GRAPHICS events

2018-09-21 Thread Philipp Hahn
to use new Description class Signed-off-by: Philipp Hahn --- examples/event-test.py | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/examples/event-test.py b/examples/event-test.py index b559ede..d8ba8c9 100755 --- a/examples/event-test.py +++ b/examples/event-test.py @@

[libvirt] [PATCH libvirt-python v2 02/22] event-test.py: Remove extra parenthesis

2018-09-21 Thread Philipp Hahn
Signed-off-by: Philipp Hahn --- examples/event-test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/event-test.py b/examples/event-test.py index c17d2bb..a7c7054 100755 --- a/examples/event-test.py +++ b/examples/event-test.py @@ -224,7 +224,7 @@ class

[libvirt] [PATCH libvirt-python v2 15/22] event-test.py: Convert DISK events

2018-09-21 Thread Philipp Hahn
to use new Description class Signed-off-by: Philipp Hahn --- examples/event-test.py | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/examples/event-test.py b/examples/event-test.py index d8ba8c9..218103d 100755 --- a/examples/event-test.py +++ b/examples/event-test.py @@

[libvirt] [PATCH libvirt-python v2 00/22] event-test.py fixes

2018-09-21 Thread Philipp Hahn
Am 21.09.18 um 13:14 schrieb Michal Privoznik: > On 09/20/2018 08:10 AM, Philipp Hahn wrote: >> event-test.py is bad at handling newer livecycle events. >> Attached are two patches to improve that. >> >> Philipp Hahn (2): >> event-test.py: Sync list of domain lifecycle events >> event-test.py:

[libvirt] [PATCH libvirt-python v2 17/22] event-test.py: Convert NETWORK events

2018-09-21 Thread Philipp Hahn
to use new Description class Signed-off-by: Philipp Hahn --- examples/event-test.py | 29 ++--- 1 file changed, 10 insertions(+), 19 deletions(-) diff --git a/examples/event-test.py b/examples/event-test.py index 5426ecd..2436827 100755 --- a/examples/event-test.py +++

[libvirt] [PATCH libvirt-python v2 18/22] event-test.py: Convert STORAGE events

2018-09-21 Thread Philipp Hahn
to use new Description class Signed-off-by: Philipp Hahn --- examples/event-test.py | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/examples/event-test.py b/examples/event-test.py index 2436827..499f434 100755 --- a/examples/event-test.py +++

[libvirt] [PATCH libvirt-python v2 06/22] event-test.py: Merge livecycle callbacks

2018-09-21 Thread Philipp Hahn
Registering the same function twice using the old domainEventRegister() interface would not work, as the function reference is used for un-registering. But it is not a problem with the new interface domainEventRegisterAn(), as that returns a unique ID. While at it also demonstrate the 'opaque'

[libvirt] [PATCH libvirt-python v2 05/22] event-test.py: Use __file__

2018-09-21 Thread Philipp Hahn
instead of sys.argv[0] Signed-off-by: Philipp Hahn --- examples/event-test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/event-test.py b/examples/event-test.py index 646ce50..ab1da4a 100755 --- a/examples/event-test.py +++ b/examples/event-test.py @@ -667,7

[libvirt] [PATCH libvirt-python v2 09/22] event-test.py: Convert LIVECYCLE events

2018-09-21 Thread Philipp Hahn
to use new Description class Signed-off-by: Philipp Hahn --- examples/event-test.py | 42 ++ 1 file changed, 14 insertions(+), 28 deletions(-) diff --git a/examples/event-test.py b/examples/event-test.py index d2d2c60..493828f 100755 ---

[libvirt] [PATCH libvirt-python v2 19/22] event-test.py: Convert DEVICE events

2018-09-21 Thread Philipp Hahn
to use new Description class Signed-off-by: Philipp Hahn --- examples/event-test.py | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/examples/event-test.py b/examples/event-test.py index 499f434..0a1d06d 100755 --- a/examples/event-test.py +++

[libvirt] [PATCH libvirt-python v2 20/22] event-test.py: Convert SECRET events

2018-09-21 Thread Philipp Hahn
to use new Description class Signed-off-by: Philipp Hahn --- examples/event-test.py | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/examples/event-test.py b/examples/event-test.py index 0a1d06d..5e3b884 100755 --- a/examples/event-test.py +++

[libvirt] [PATCH libvirt-python v2 10/22] event-test.py: Convert BLOCKJOB events

2018-09-21 Thread Philipp Hahn
to use new Description class Signed-off-by: Philipp Hahn --- examples/event-test.py | 25 ++--- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/examples/event-test.py b/examples/event-test.py index 493828f..46a8db8 100755 --- a/examples/event-test.py +++

[libvirt] [PATCH libvirt-python v2 03/22] event-test.py: Remove dead assignment

2018-09-21 Thread Philipp Hahn
variable is unused Signed-off-by: Philipp Hahn --- examples/event-test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/event-test.py b/examples/event-test.py index a7c7054..1f34930 100755 --- a/examples/event-test.py +++ b/examples/event-test.py @@ -207,7 +207,7

[libvirt] [PATCH libvirt-python v2 04/22] event-test.py: Add missing globale statement

2018-09-21 Thread Philipp Hahn
to fix loop termination on exit. Signed-off-by: Philipp Hahn --- examples/event-test.py | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/event-test.py b/examples/event-test.py index 1f34930..646ce50 100755 --- a/examples/event-test.py +++ b/examples/event-test.py @@ -663,6 +663,7 @@

[libvirt] [PATCH libvirt-python v2 11/22] event-test.py: Convert WATCHDOG events

2018-09-21 Thread Philipp Hahn
to use new Description class Signed-off-by: Philipp Hahn --- examples/event-test.py | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/examples/event-test.py b/examples/event-test.py index 46a8db8..004a263 100755 --- a/examples/event-test.py +++ b/examples/event-test.py @@

Re: [libvirt] [PATCH 02/13] virsh: Implement vshTable API to net-list and net-dhcp-leases

2018-09-21 Thread Erik Skultety
On Wed, Sep 19, 2018 at 11:26:27AM +0200, Michal Privoznik wrote: > On 09/18/2018 04:21 PM, Simon Kobyda wrote: > > Signed-off-by: Simon Kobyda > > --- > > tools/virsh-network.c | 55 +-- > > 1 file changed, 37 insertions(+), 18 deletions(-) > > > > diff

[libvirt] [PATCH libvirt-python v2 01/22] event-test.py: Handle closed connection

2018-09-21 Thread Philipp Hahn
If libvirtd terminates while event-test.py has an open connection to it, it will crash with the following traceback: > myConnectionCloseCallback: qemu:///session: Error > Exception in thread libvirtEventLoop: > Traceback (most recent call last): > File "/usr/lib/python2.7/threading.py", line

Re: [libvirt] [PATCH 5/5] qemu: Avoid duplicate resume events and state changes

2018-09-21 Thread Jiri Denemark
On Wed, Sep 19, 2018 at 16:04:13 -0400, John Ferlan wrote: > > diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c > > index 825a9d399b..4771f26938 100644 > > --- a/src/qemu/qemu_migration.c > > +++ b/src/qemu/qemu_migration.c > > [...] > > > > > @@ -5074,13 +5060,8 @@

[libvirt] [PATCH 2/4] virdbus: Unref the D-Bus connection when closing

2018-09-21 Thread Marc Hartmayer
From: Marc Hartmayer As documented at https://dbus.freedesktop.org/doc/api/html/group__DBusConnection.html#ga2522ac5075dfe0a1535471f6e045e1ee the creator of a non-shared D-Bus connection has to release the last reference after closing for freeing. Signed-off-by: Marc Hartmayer Reviewed-by:

[libvirt] [PATCH 3/4] virdbus: Report a debug message that dbus_watch_handle() has failed

2018-09-21 Thread Marc Hartmayer
From: Marc Hartmayer Report a debug message if dbus_watch_handle() returns FALSE. dbus_watch_handle() returns FALSE if there wasn't enough memory for reading or writing. Signed-off-by: Marc Hartmayer Reviewed-by: Bjoern Walk Reviewed-by: Boris Fiuczynski Reviewed-by: Stefan Zimmermann ---

[libvirt] [PATCH 4/4] virdbus: Use the mnemonic macros for dbus_bool_t values

2018-09-21 Thread Marc Hartmayer
From: Marc Hartmayer Use the mnemonic macros of libdbus for 1 (TRUE) and 0 (FALSE). Signed-off-by: Marc Hartmayer Reviewed-by: Bjoern Walk Reviewed-by: Boris Fiuczynski Reviewed-by: Stefan Zimmermann --- src/util/virdbus.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff

[libvirt] [PATCH 0/4] Small changes to virdbus

2018-09-21 Thread Marc Hartmayer
Marc Hartmayer (4): virdbus: Grab a ref as long as the while loop is executed virdbus: Unref the D-Bus connection when closing virdbus: Report a debug message that dbus_watch_handle() has failed virdbus: Use the mnemonic macros for dbus_bool_t values src/util/virdbus.c | 12

[libvirt] [PATCH 1/4] virdbus: Grab a ref as long as the while loop is executed

2018-09-21 Thread Marc Hartmayer
From: Marc Hartmayer Grab a ref for info->bus (a DBus connection) as long as the while loop is running. With the grabbed reference it is ensured that info->bus isn't freed as long as the while loop is executed. This is necessary as it's allowed to drop the last ref for the bus connection in a

Re: [libvirt] [PATCH v2] virsh: Don't break loop of domblkinfo for disks

2018-09-21 Thread John Ferlan
On 09/21/2018 08:32 AM, Michal Privoznik wrote: > On 08/22/2018 11:46 AM, Han Han wrote: >> https://bugzilla.redhat.com/show_bug.cgi?id=1619625 >> >> --all option is added to cmdDomblkinfo since commit 62c39193 allowing to >> show all block devices info. Reset error when empty source in case

Re: [libvirt] [PATCH 2/2] virsh: Display vhostuser socket path in domiflist

2018-09-21 Thread Andrea Bolognani
On Fri, 2018-09-21 at 13:03 +0200, Michal Privoznik wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1630164 > > The domiflist command is designed to show a brief information on > domain interfaces. One piece of information that is shows is > "Source" - source network, device, name, bridge.

Re: [libvirt] [PATCH v2] virsh: Don't break loop of domblkinfo for disks

2018-09-21 Thread Michal Privoznik
On 08/22/2018 11:46 AM, Han Han wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1619625 > > --all option is added to cmdDomblkinfo since commit 62c39193 allowing to > show all block devices info. Reset error when empty source in case error > breaks the loop of domblkinfo for disks. > >

Re: [libvirt] [PATCH 1/2] qemu_hotplug: Fetch vhostuser ifname on hotplug

2018-09-21 Thread Andrea Bolognani
On Fri, 2018-09-21 at 13:03 +0200, Michal Privoznik wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1630164 > > Since 2a13a0a1033 we are querying the vhostuser's interface name > when building qemu command line. However, we forgot to do so on > hotplug. > > Signed-off-by: Michal Privoznik

Re: [libvirt] [PATCH 00/11] qemu: Improve / cleanup QEMU binary handling

2018-09-21 Thread Michal Privoznik
On 09/20/2018 05:25 PM, Andrea Bolognani wrote: > This is the output of 'virsh capabilities' on my laptop: > > > hvm > > 64 > /usr/bin/qemu-system-x86_64 > pc-i440fx-3.0 > pc > pc-q35-3.0 > q35 > > > > /usr/bin/qemu-kvm

Re: [libvirt] [PATCH 3/5] qemu: Pass running reason to RESUME event handler

2018-09-21 Thread Jiri Denemark
On Wed, Sep 19, 2018 at 11:12:26 -0400, John Ferlan wrote: > > > On 09/12/2018 08:55 AM, Jiri Denemark wrote: > > Whenever we get the RESUME event from QEMU, we change the state of the > > affected domain to VIR_DOMAIN_RUNNING with VIR_DOMAIN_RUNNING_UNPAUSED > > reason. This is fine if the

Re: [libvirt] [PATCH 2/3] lxc: Resolve memory leak

2018-09-21 Thread John Ferlan
On 09/21/2018 04:43 AM, Erik Skultety wrote: > On Thu, Sep 20, 2018 at 05:34:37PM -0400, John Ferlan wrote: >> Commit 40b5c99a modified the virConfGetValue callers to use >> virConfGetValueString. However, using the virConfGetValueString >> resulted in leaking the returned @value string in each

Re: [libvirt] [PATCH 0/2] tests: Add QEMU 3.0.0 capability tests for s390x

2018-09-21 Thread John Ferlan
On 09/21/2018 01:13 AM, Bjoern Walk wrote: > John Ferlan [2018-09-20, 04:30PM -0400]: >> >> >> On 09/20/2018 06:20 AM, Boris Fiuczynski wrote: >>> Add capability and domcaps tests for QEMU 3.0.0 on s390x. >>> >>> Boris Fiuczynski (2): >>> tests: Add capabilities data for QEMU 3.0.0 on s390x

Re: [libvirt] [PATCH libvirt-python 0/2] event-test.py fixes

2018-09-21 Thread Michal Privoznik
On 09/20/2018 08:10 AM, Philipp Hahn wrote: > Hello, > > event-test.py is bad at handling newer livecycle events. > Attached are two patches to improve that. > > Philipp Hahn (2): > event-test.py: Sync list of domain lifecycle events > event-test.py: Future proof lifecycle event handling >

[libvirt] [PATCH 0/2] Couple of vhostuser fixes

2018-09-21 Thread Michal Privoznik
Almost trivial ones. Michal Prívozník (2): qemu_hotplug: Fetch vhostuser ifname on hotplug virsh: Display vhostuser socket path in domiflist src/qemu/qemu_hotplug.c | 5 + tools/virsh-domain-monitor.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) -- 2.16.4 --

[libvirt] [PATCH 1/2] qemu_hotplug: Fetch vhostuser ifname on hotplug

2018-09-21 Thread Michal Privoznik
https://bugzilla.redhat.com/show_bug.cgi?id=1630164 Since 2a13a0a1033 we are querying the vhostuser's interface name when building qemu command line. However, we forgot to do so on hotplug. Signed-off-by: Michal Privoznik --- src/qemu/qemu_hotplug.c | 5 + 1 file changed, 5 insertions(+)

[libvirt] [PATCH 2/2] virsh: Display vhostuser socket path in domiflist

2018-09-21 Thread Michal Privoznik
https://bugzilla.redhat.com/show_bug.cgi?id=1630164 The domiflist command is designed to show a brief information on domain interfaces. One piece of information that is shows is "Source" - source network, device, name, bridge. However, it's ignoring vhostuser for which we can show the unix socket

[libvirt] [PATCH 0/4] Couple of metadata locking fixes

2018-09-21 Thread Michal Privoznik
Strictly speaking, only the last patch actually fixes a real problem. The first three are more of a cleanup than anything. However, I am still sending them because they make the code better. Anyway, if my explanation in 4/4 is not clear enough, here it is in simpler terms: It's important to bear

[libvirt] [PATCH 1/4] security: Grab a reference to virSecurityManager for transactions

2018-09-21 Thread Michal Privoznik
This shouldn't be needed per-se. Security manager shouldn't disappear during transactions - it's immutable. However, it doesn't hurt to grab a reference either - transaction code uses it after all. Signed-off-by: Michal Privoznik --- src/security/security_dac.c | 5 +++--

[libvirt] [PATCH 4/4] security: Always spawn process for transactions

2018-09-21 Thread Michal Privoznik
There is this latent bug which can result in virtlockd killing libvirtd. The problem is when the following steps occur: Parent | Child --+ 1) virSecurityManagerMetadataLock(path);

[libvirt] [PATCH 3/4] virLockManagerLockDaemonAcquire: Duplicate client FD with CLOEXEC flag

2018-09-21 Thread Michal Privoznik
There is one caller (virSecurityManagerMetadataLock) which duplicates the connection FD and wants to have the flag set. However, trying to set the flag after dup() is not safe as another thread might fork() meanwhile. Therefore, switch to duplicating with the flag set and only let callers refine

[libvirt] [PATCH 2/4] virNetSocket: Be more safe with fork() around virNetSocketDupFD()

2018-09-21 Thread Michal Privoznik
If there was a caller which would dup the client FD without CLOEXEC flag and later decided to change the flag it wouldn't be safe to do because fork() might have had occurred meantime. Switch to the other pattern - always dup FD with the flag set and let callers clear the flag if they need to do

Re: [libvirt] [PATCH 3/3] tests: Resolve possible overrun

2018-09-21 Thread Erik Skultety
On Thu, Sep 20, 2018 at 05:34:38PM -0400, John Ferlan wrote: > Coverity noted that each of the fmemopen called used the strlen value > in order to allocate space, but that neglected space for terminating > null string. So just add 1 to the strlen. > > Signed-off-by: John Ferlan > --- Reviewed-by:

Re: [libvirt] [PATCH 2/3] lxc: Resolve memory leak

2018-09-21 Thread Erik Skultety
On Thu, Sep 20, 2018 at 05:34:37PM -0400, John Ferlan wrote: > Commit 40b5c99a modified the virConfGetValue callers to use > virConfGetValueString. However, using the virConfGetValueString > resulted in leaking the returned @value string in each case. > So, let's modify each instance to use the

Re: [libvirt] [Qemu-devel] [PATCH v2 4/4] hw/core/machine: Officially deprecate the enforce-config-section parameter

2018-09-21 Thread Thomas Huth
On 2018-09-20 20:13, Markus Armbruster wrote: > Thomas Huth writes: > >> Commit 16f7244842b5135543ef068a1adafd94c6965953 added this parameter >> to the documentation, including a note that it is deprecated. But it >> has never been added to the "Deprecated features" appendix, which is >> our

Re: [libvirt] [Qemu-devel] [QEMU PATCH] net: Deprecate the old way of using a legacy net via "name" instead of "id"

2018-09-21 Thread Markus Armbruster
Thomas Huth writes: > On 2018-09-20 08:07, Markus Armbruster wrote: >> Thomas Huth writes: >> >>> In early times, network backends were specified by a "vlan" and "name" >>> tuple. With the introduction of netdevs, the "name" was replaced by an >>> "id" (which is supposed to be unique), but the

Re: [libvirt] [PATCH 1/3] conf: Alter when ctxt->node is set

2018-09-21 Thread Erik Skultety
On Thu, Sep 20, 2018 at 05:34:36PM -0400, John Ferlan wrote: > In virDomainMemoryDefParseXML and virDomainVideoDefParseXML if > the VIR_ALLOC fails and NULL is returned, then the alteration > to ctxt->node isn't reversed. > > Found by Coverity > > Signed-off-by: John Ferlan > --- Reviewed-by:

Re: [libvirt] missing libvirt events related to snapshots and media-change for inactive VMs?

2018-09-21 Thread Philipp Hahn
Hello, Am 20.09.18 um 08:10 schrieb Philipp Hahn: > event-test.py is bad at handling newer livecycle events. > Attached are two patches to improve that. > > Philipp Hahn (2): > event-test.py: Sync list of domain lifecycle events > event-test.py: Future proof lifecycle event handling > >

Re: [libvirt] [PATCH 0/2] tests: Add QEMU 3.0.0 capability tests for s390x

2018-09-21 Thread Boris Fiuczynski
Thanks for the review and push. On 9/20/18 10:30 PM, John Ferlan wrote: On 09/20/2018 06:20 AM, Boris Fiuczynski wrote: Add capability and domcaps tests for QEMU 3.0.0 on s390x. Boris Fiuczynski (2): tests: Add capabilities data for QEMU 3.0.0 on s390x tests: domaincaps: Add QEMU 3.0