Re: [libvirt] [PATCH] news: document drive addresses fix

2017-01-12 Thread Marc Hartmayer
On Thu, Jan 12, 2017 at 11:42 AM +0100, Andrea Bolognani wrote: > On Thu, 2017-01-12 at 10:58 +0100, Marc Hartmayer wrote: >> Signed-off-by: Marc Hartmayer >> --- >> docs/news.xml | 9 + >> 1 file changed, 9 insertions(+) > > ACK and safe for

Re: [libvirt] Availability of libvirt-3.0.0 release candidate 2

2017-01-17 Thread Marc Hartmayer
Hey, I have tried to live hot plug a disk backed on a qcow2 disk (see XML snippet below) on a s390 system and I've got the following error message: internal error: unable to execute QEMU command 'device_add': Property 'scsi-hd.drive' can't find value 'drive-scsi0-0-0-0'

Re: [libvirt] Availability of libvirt-3.0.0 release candidate 2

2017-01-17 Thread Marc Hartmayer
Update: It's a SELinux labeling problem and seems to be introduced by the QEMU namespace patches. On Tue, Jan 17, 2017 at 11:18 AM +0100, Marc Hartmayer wrote: > Hey, > > I have tried to live hot plug a disk backed on a qcow2 disk (see XML > snippet below) on a s390 system

Re: [libvirt] Availability of libvirt-3.0.0 release candidate 2

2017-01-17 Thread Marc Hartmayer
0 | 0 | 1 | | 0 | 1 | 1 | | 1 | 0 | 1 | | 1 | 1 | 0 | -- Beste Grüße / Kind regards Marc Hartmayer IBM Deutschland Research & Development GmbH Vorsitzende de

Re: [libvirt] Availability of libvirt-3.0.0 release candidate 2

2017-01-17 Thread Marc Hartmayer
On Tue, Jan 17, 2017 at 04:41 PM +0100, Michal Privoznik wrote: > On 01/17/2017 04:28 PM, Marc Hartmayer wrote: >> On Tue, Jan 17, 2017 at 03:28 PM +0100, Michal Privoznik >> wrote: >>> [Dropping libvirt-announce] >>> >>> On 01/17/2017 02:51 PM, Boris

Re: [libvirt] [PATCH] qemu: catch failure of drive_add

2017-01-17 Thread Marc Hartmayer
uot;, > + reply); > +goto cleanup; > +} > + > ret = 0; > > cleanup: > -- > 2.9.3 > > -- > libvir-list mailing list > libvir-list@redhat.com > https://www.redhat.com/mailman/listinfo/libvir-list > Tested-by

[libvirt] [PATCH] remote generator: handle remoteDomainCreateWithFlags()

2017-01-19 Thread Marc Hartmayer
() 'remote_domain_create_with_flags_args ret;' but in fact it has to be 'remote_domain_create_with_flags_ret ret;'. Signed-off-by: Marc Hartmayer Reviewed-by: Bjoern Walk Reviewed-by: Boris Fiuczynski --- src/remote/remote_driver.c | 29 - src/remote/remote_protoco

Re: [libvirt] [PATCH 00/10] Another set of qemu namespace fixes

2017-01-30 Thread Marc Hartmayer
Michal > > -- > libvir-list mailing list > libvir-list@redhat.com > https://www.redhat.com/mailman/listinfo/libvir-list > Tested the patch series and the problems with v3.0.0 - starting domains with hostdev devices - hot plugging seem to be fixed. -- Beste Grüße / Kind regards

Re: [libvirt] [PATCH] remote generator: handle remoteDomainCreateWithFlags()

2017-01-30 Thread Marc Hartmayer
On Thu, Jan 19, 2017 at 09:17 PM +0100, Marc Hartmayer wrote: > This commit removes the handcrafted code for > remoteDomainCreateWithFlags() and lets it auto generate. > > A little bit of history repeating... > Commit 03d813bbcd7b4a183601055006 removed the aut

Re: [libvirt] [PATCH 2/2] tests: qemuhotplug: Don't free the monitor object as part of @vm

2017-02-02 Thread Marc Hartmayer
rTestGetMonitor(data->mon);' (testQemuHotplugCpuPrepare in tests/qemuhotplugtest.c). Shouldn't we use 'priv->mon = virObjectRef(qemuMonitorTestGetMonitor(data->mon));' for getting the reference (and later on 'virObjectUnref(priv->mon); priv->mon = NULL;'

[libvirt] [PATCH 3/4] util: reset the counters to zero

2017-02-09 Thread Marc Hartmayer
of 'virNetDevIPInfoClear(&def->guestIP)') and the resulting call of virDomainNetDefFree(def) in the error path of virDomainNetDefParseXML() (this leads to the second call of virNetDevIPInfoClear(&def->guestIP), and finally to the segmentation fault). Signed-off-by: Marc Hartmayer Re

[libvirt] [PATCH 0/4] Fixes for segmentation faults

2017-02-09 Thread Marc Hartmayer
This patch series fixes some segmentation faults. Marc Hartmayer (4): qemu: Check if virQEMUCapsNewCopy(...) has failed conf: Fix libvirtd free() segfault if virDomainChrSourceDefNew(...) fails util: reset the counters to zero rpc: Fix potentially segfaults src/conf/domain_conf.c

[libvirt] [PATCH 4/4] rpc: Fix potentially segfaults

2017-02-09 Thread Marc Hartmayer
it was possible that virNetServerServiceDispose was called => segmentation fault. For safeness NULL pointer check were added in virNetServerServiceDispose(). Signed-off-by: Marc Hartmayer Reviewed-by: Boris Fiuczynski Reviewed-by: Bjoern Walk --- src/rpc/virnetserverservice.c | 20 +++---

Re: [libvirt] [PATCH 1/4] qemu: Check if virQEMUCapsNewCopy(...) has failed

2017-02-09 Thread Marc Hartmayer
On Thu, Feb 09, 2017 at 03:13 PM +0100, Marc Hartmayer wrote: > Check if virQEMUCapsNewCopy(...) has failed, thus a segmentation fault > in virQEMUCapsFilterByMachineType(...) will be avoided. > > Signed-off-by: Marc Hartmayer > Reviewed-by: Bjoern Walk > --- > src/qem

Re: [libvirt] [PATCH 4/4] rpc: Fix potentially segfaults

2017-02-09 Thread Marc Hartmayer
On Thu, Feb 09, 2017 at 03:13 PM +0100, Marc Hartmayer wrote: > We have to allocate first and if, and only if, it was successful we > can set the count. A segfault has occurred in > virNetServerServiceNewPostExecRestart() when VIR_ALLOC_N(svc->socks, > n) has failed, but svc-

[libvirt] [PATCH 2/4] conf: Fix libvirtd free() segfault if virDomainChrSourceDefNew(...) fails

2017-02-09 Thread Marc Hartmayer
If virDomainChrSourceDefNew(xmlopt) fails, it will lead to free()ing the uninitialized pointer bus. The fix for this is to initialize bus with NULL. Signed-off-by: Marc Hartmayer Reviewed-by: Boris Fiuczynski Reviewed-by: Bjoern Walk --- src/conf/domain_conf.c | 2 +- 1 file changed, 1

[libvirt] [PATCH 1/4] qemu: Check if virQEMUCapsNewCopy(...) has failed

2017-02-09 Thread Marc Hartmayer
Check if virQEMUCapsNewCopy(...) has failed, thus a segmentation fault in virQEMUCapsFilterByMachineType(...) will be avoided. Signed-off-by: Marc Hartmayer Reviewed-by: Bjoern Walk --- src/qemu/qemu_capabilities.c | 4 1 file changed, 4 insertions(+) diff --git a/src/qemu

Re: [libvirt] [PATCH] remote generator: handle remoteDomainCreateWithFlags()

2017-02-10 Thread Marc Hartmayer
On Thu, Feb 09, 2017 at 11:39 PM +0100, John Ferlan wrote: > On 01/19/2017 03:17 PM, Marc Hartmayer wrote: >> This commit removes the handcrafted code for >> remoteDomainCreateWithFlags() and lets it auto generate. >> >> A little bit of history repeating... >>

Re: [libvirt] [PATCH 4/4] rpc: Fix potentially segfaults

2017-02-10 Thread Marc Hartmayer
On Thu, Feb 09, 2017 at 08:17 PM +0100, Laine Stump wrote: > On 02/09/2017 09:21 AM, Marc Hartmayer wrote: >> On Thu, Feb 09, 2017 at 03:13 PM +0100, Marc Hartmayer >> wrote: >>> We have to allocate first and if, and only if, it was successful we >>> can set t

[libvirt] [PATCH v2] node_device: Check return value for udev_new()

2017-02-10 Thread Marc Hartmayer
The comment was actually wrong as https://www.freedesktop.org/software/systemd/man/udev_new.html# mentions that on failure NULL is returned. Signed-off-by: Marc Hartmayer --- src/node_device/node_device_udev.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src

Re: [libvirt] [PATCH v2] node_device: Check return value for udev_new()

2017-02-20 Thread Marc Hartmayer
On Mon, Feb 20, 2017 at 02:48 PM +0100, Martin Kletzander wrote: > On Fri, Feb 10, 2017 at 10:44:44AM +0100, Marc Hartmayer wrote: >>The comment was actually wrong as >>https://www.freedesktop.org/software/systemd/man/udev_new.html# >>mentions that on failure NULL is returne

[libvirt] [PATCH] qemu: Fix deadlock across fork() in QEMU driver

2017-02-21 Thread Marc Hartmayer
is commit fixes the deadlock in the same way as it is described in commit 61b52d2e3813cc8c9ff3ab67f232bd0c65f7318d. Signed-off-by: Marc Hartmayer Reviewed-by: Boris Fiuczynski --- src/qemu/qemu_domain.c | 73 +++-- src/qemu/qemu_domain.h | 3 +-

[libvirt] [PATCH 2/2] qemu: Validate the domain after marking the current domain as transient

2017-02-23 Thread Marc Hartmayer
Validate the domain that actually will be started. It's semantically more clear and also it can detect failures that may have happened in virDomainObjSetDefTransient(). Signed-off-by: Marc Hartmayer Reviewed-by: Bjoern Walk Reviewed-by: Boris Fiuczynski --- src/qemu/qemu_process.

[libvirt] [PATCH 1/2] qemu: Fix incorrect jump labels in error paths

2017-02-23 Thread Marc Hartmayer
Fix incorrect jump labels in error paths as the stop jump is only needed if the driver has already changed the state. For example 'virAtomicIntInc(&driver->nactive)' will be 'reverted' in the qemuProcessStop call. Signed-off-by: Marc Hartmayer Reviewed-by: Bori

[libvirt] [PATCH 0/2] qemu: Small fix and validate the domain that actually will be started

2017-02-23 Thread Marc Hartmayer
Marc Hartmayer (2): qemu: Fix incorrect jump labels in error paths qemu: Validate the domain after marking the current domain as transient src/qemu/qemu_process.c | 19 +++ 1 file changed, 11 insertions(+), 8 deletions(-) -- 2.5.5 -- libvir-list mailing list libvir

Re: [libvirt] [PATCH 1/2] qemu: Fix incorrect jump labels in error paths

2017-02-23 Thread Marc Hartmayer
On Thu, Feb 23, 2017 at 03:33 PM +0100, Michal Privoznik wrote: > On 02/23/2017 10:44 AM, Marc Hartmayer wrote: >> Fix incorrect jump labels in error paths as the stop jump is only >> needed if the driver has already changed the state. For example >> 'virAtomicIntInc(

Re: [libvirt] [PATCH 2/2] qemu: Validate the domain after marking the current domain as transient

2017-02-23 Thread Marc Hartmayer
On Thu, Feb 23, 2017 at 03:33 PM +0100, Michal Privoznik wrote: > On 02/23/2017 10:44 AM, Marc Hartmayer wrote: >> Validate the domain that actually will be started. It's semantically >> more clear and also it can detect failures that may have happened in >> v

Re: [libvirt] [PATCH] qemuProcessInit: Jump onto correct label in case of error

2017-02-23 Thread Marc Hartmayer
t; } else { > vm->def->id = qemuDriverAllocateID(driver); > qemuDomainSetFakeReboot(driver, vm, false); > -- > 2.11.0 > Beste Grüße / Kind regards Marc Hartmayer IBM Deutschland Research & Development GmbH Vorsitzende des Aufsichtsrats: Martina Koederitz Ges

Re: [libvirt] [PATCH] qemuProcessInit: Jump onto correct label in case of error

2017-02-24 Thread Marc Hartmayer
On Thu, Feb 23, 2017 at 05:46 PM +0100, Michal Privoznik wrote: > On 02/23/2017 05:40 PM, Marc Hartmayer wrote: >> On Thu, Feb 23, 2017 at 05:15 PM +0100, Michal Privoznik >> wrote: >>> After eca76884ea in case of error in qemuDomainSetPrivatePaths() >>> i

Re: [libvirt] [PATCH 2/2] qemu: Validate the domain after marking the current domain as transient

2017-02-27 Thread Marc Hartmayer
On Thu, Feb 23, 2017 at 05:36 PM +0100, "Daniel P. Berrange" wrote: > On Thu, Feb 23, 2017 at 05:22:44PM +0100, Marc Hartmayer wrote: >> On Thu, Feb 23, 2017 at 03:33 PM +0100, Michal Privoznik >> wrote: >> > On 02/23/2017 10:44 AM, Marc Hartmayer wrote: >&

Re: [libvirt] [PATCH 1/4] Unify checking for machine1 systemd service

2017-02-28 Thread Marc Hartmayer
op.machine1"); > -if (ret < 0) > -goto cleanup; > - > -if ((ret = virDBusIsServiceRegistered("org.freedesktop.systemd1")) < 0) > +if ((ret = virSystemdHasCreateMachine()) < 0) > goto cleanup; > > ret = -1; &g

Re: [libvirt] [PATCH 1/2] qemu: hotplug: Add debug log when dispatching device removal to existing thread

2017-03-06 Thread Marc Hartmayer
(vm); > -- > 2.12.0 > > -- > libvir-list mailing list > libvir-list@redhat.com > https://www.redhat.com/mailman/listinfo/libvir-list > -- Beste Grüße / Kind regards Marc Hartmayer IBM Deutschland Research & Development GmbH Vorsitzende des Aufsichtsrats: Martina Koed

Re: [libvirt] [PATCH 2/2] qemu: Validate the domain after marking the current domain as transient

2017-03-20 Thread Marc Hartmayer
On Wed, Mar 08, 2017 at 10:41 AM +0100, "Daniel P. Berrange" wrote: > On Wed, Mar 08, 2017 at 10:32:32AM +0100, Marc Hartmayer wrote: >> On Mon, Feb 27, 2017 at 11:20 AM +0100, "Daniel P. Berrange" >> wrote: >> > On Mon, Feb 27, 2017 at 10:59:39AM +0

[libvirt] [PATCH 0/5] Use-after-free fix and cleanups

2017-04-03 Thread Marc Hartmayer
While looking at a use-after-free situation going through how the QEMU monitor is set up I noticed some things. These cleanups and the fix for the use-after-free are the result of that. Marc Hartmayer (5): qemu: Fix two use-after-free situations qemu: Turn qemuDomainLogContext into virObject

[libvirt] [PATCH 3/5] qemu: Implement qemuMonitorRegister()

2017-04-03 Thread Marc Hartmayer
Implement qemuMonitorRegister() as there is already a qemuMonitorUnregister() function. This way it may be easier to understand the code paths. Signed-off-by: Marc Hartmayer Reviewed-by: Bjoern Walk --- src/qemu/qemu_monitor.c | 38 +- src/qemu

[libvirt] [PATCH 1/5] qemu: Fix two use-after-free situations

2017-04-03 Thread Marc Hartmayer
where the same problem was possible to occur are fixed as well (qemuMigrationFinish, qemuProcessStart, and qemuDomainSaveImageStartVM). Signed-off-by: Marc Hartmayer Reported-by: Sascha Silbe --- src/qemu/qemu_monitor.c | 44 ++-- src/qemu/qemu_monitor.h | 4 2 file

[libvirt] [PATCH 4/5] qemu: remove ATTRIBUTE_UNUSED in qemuProcessHandleMonitorEOF

2017-04-03 Thread Marc Hartmayer
This attribute is not needed here, since @mon is in use. Signed-off-by: Marc Hartmayer Reviewed-by: Bjoern Walk --- src/qemu/qemu_process.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 028f0c5..c060847 100644 --- a

[libvirt] [PATCH 5/5] refactoring: Use the return value of virObjectRef directly

2017-04-03 Thread Marc Hartmayer
Use the return value of virObjectRef directly. This way, it's easier for another reader to identify the reason why the additional reference is required. Signed-off-by: Marc Hartmayer Reviewed-by: Bjoern Walk --- src/datatypes.c | 6 ++ src/rpc/virnetclientstream.

[libvirt] [PATCH 2/5] qemu: Turn qemuDomainLogContext into virObject

2017-04-03 Thread Marc Hartmayer
This way qemuDomainLogContextRef() and qemuDomainLogContextFree() is no longer needed. The naming qemuDomainLogContextFree() was also somewhat misleading. Additionally, it's easier to turn qemuDomainLogContext in a self-locking object. Signed-off-by: Marc Hartmayer Reviewed-by: Bjoern

Re: [libvirt] [PATCH 0/5] Use-after-free fix and cleanups

2017-04-18 Thread Marc Hartmayer
On Mon, Apr 10, 2017 at 02:52 PM +0200, Michal Privoznik wrote: > On 04/03/2017 10:24 AM, Marc Hartmayer wrote: >> While looking at a use-after-free situation going through how the QEMU >> monitor is set up I noticed some things. These cleanups and the fix >> for the u

[libvirt] Question about the host-model CPU mode

2017-10-05 Thread Marc Hartmayer
t start time of the domain). Is this behavior expected? There are some ways to avoid this problem: - CPU model expansion is performed at domain definition time - host-model is related to the machine type of a domain Thank you in advance. Beste Grüße / Kind regards Marc Hartmayer IBM Deuts

Re: [libvirt] Question about the host-model CPU mode

2017-10-09 Thread Marc Hartmayer
On Thu, Oct 05, 2017 at 02:11 PM +0200, Jiri Denemark wrote: > On Thu, Oct 05, 2017 at 10:46:24 +0200, Marc Hartmayer wrote: >> Let's assume we've a z13 system with a QEMU 2.9 and we define a domain >> using the default s390-virtio-ccw machine together with the ho

[libvirt] [RFC PATCH 4/4] lxc: Fixed indentation

2017-10-09 Thread Marc Hartmayer
Signed-off-by: Marc Hartmayer Reviewed-by: Bjoern Walk Reviewed-by: Boris Fiuczynski --- src/lxc/lxc_container.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lxc/lxc_container.c b/src/lxc/lxc_container.c index 5791a9b1f958..b7216d6ee863 100644 --- a/src/lxc

[libvirt] [RFC PATCH 0/4] Deadlock fix and some minor fixes

2017-10-09 Thread Marc Hartmayer
The first patch is a preparatory patch for the deadlock fix (patch 2). The cleanup path for 'virExecCommon' may now be superflous. Patches 3-4 are only minor fixes. Important: there may still be a deadlock for LXC (see the TODO in patch 2) Marc Hartmayer (4): util: Add virCommand

[libvirt] [RFC PATCH 1/4] util: Add virCommandGetGID and virCommandGetUID

2017-10-09 Thread Marc Hartmayer
These functions are used by an upcoming commit. Signed-off-by: Marc Hartmayer Reviewed-by: Boris Fiuczynski --- src/libvirt_private.syms | 2 ++ src/util/vircommand.c| 14 ++ src/util/vircommand.h| 4 3 files changed, 20 insertions(+) diff --git a/src

[libvirt] [RFC PATCH 3/4] lxc: Fixed a typo

2017-10-09 Thread Marc Hartmayer
Signed-off-by: Marc Hartmayer Reviewed-by: Bjoern Walk Reviewed-by: Boris Fiuczynski --- src/lxc/lxc_container.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lxc/lxc_container.c b/src/lxc/lxc_container.c index 1f220c602b0a..5791a9b1f958 100644 --- a/src/lxc

[libvirt] [RFC PATCH 2/4] util: Fix deadlock across fork()

2017-10-09 Thread Marc Hartmayer
This commit fixes the deadlock introduced by commit 0980764dee687e8da86dc410c351759867163389. The call getgrouplist() of the glibc library isn't safe to be called in between fork and exec (see commit 75c125641ac73473ba4b0542524d67a184769c8e). Signed-off-by: Marc Hartmayer Fixes: 0980764

Re: [libvirt] [RFC PATCH 1/4] util: Add virCommandGetGID and virCommandGetUID

2017-10-10 Thread Marc Hartmayer
On Mon, Oct 09, 2017 at 10:04 PM +0200, Cedric Bosdonnat wrote: > On Mon, 2017-10-09 at 21:14 +0200, Marc Hartmayer wrote: >> These functions are used by an upcoming commit. >> >> Signed-off-by: Marc Hartmayer >> Reviewed-by: Boris Fiuczynski >> ---

Re: [libvirt] [PATCH 1/4] qemu: Separate CPU updating code from qemuProcessReconnect

2017-10-11 Thread Marc Hartmayer
UUpdate(obj->def->os.arch, obj->def->cpu, host) < 0) { > -virCPUDefFree(host); > -goto error; > -} > -virCPUDefFree(host); > - > -if (qemuProcessUpdateCPU(driver, obj, QEMU_ASYNC_JOB_NONE) < 0) > -

Re: [libvirt] [PATCH 3/4] qemu: Filter CPU features when using host CPU

2017-10-12 Thread Marc Hartmayer
ee(cpu); > virCPUDefFree(host); > virObjectUnref(caps); > return ret; > -- > 2.14.2 > > -- > libvir-list mailing list > libvir-list@redhat.com > https://www.redhat.com/mailman/listinfo/libvir-list > -- Beste Grüße / Kind regards Marc Hartmayer IBM De

Re: [libvirt] [PATCH 2/4] conf: Introduce virCPUDefFindFeature

2017-10-12 Thread Marc Hartmayer
@@ -75,6 +75,7 @@ virCPUDefCopy; > virCPUDefCopyModel; > virCPUDefCopyModelFilter; > virCPUDefCopyWithoutModel; > +virCPUDefFindFeature; > virCPUDefFormat; > virCPUDefFormatBuf; > virCPUDefFormatBufFull; > -- > 2.14.2 > > -- > libvir-list mailing list &g

[libvirt] [PATCH 0/2] Memory leak fix and some refactoring

2018-02-02 Thread Marc Hartmayer
The second patch fixes the memory leak. Marc Hartmayer (2): qemu: Use the return value of virObjectRef directly qemu: Add and use qemuProcessEventFree for freeing qemuProcessEvents src/qemu/qemu_domain.c | 23 +++ src/qemu/qemu_domain.h | 2 ++ src/qemu/qemu_driver.c

[libvirt] [PATCH 1/2] qemu: Use the return value of virObjectRef directly

2018-02-02 Thread Marc Hartmayer
Use the return value of virObjectRef directly. This way, it's easier for another reader to identify the reason why the additional reference is required. Signed-off-by: Marc Hartmayer Reviewed-by: Boris Fiuczynski Reviewed-by: Bjoern Walk --- src/qemu/qemu_process.c | 19 +++--

[libvirt] [PATCH 2/2] qemu: Add and use qemuProcessEventFree for freeing qemuProcessEvents

2018-02-02 Thread Marc Hartmayer
the panic info data in qemuProcessHandleGuestPanic. Reported-by: Wang Dong Signed-off-by: Bjoern Walk Signed-off-by: Marc Hartmayer Reviewed-by: Boris Fiuczynski --- src/qemu/qemu_domain.c | 23 +++ src/qemu/qemu_domain.h | 2 ++ src/qemu/qemu_driver.c |

Re: [libvirt] [PATCH 2/2] qemu: Add and use qemuProcessEventFree for freeing qemuProcessEvents

2018-02-05 Thread Marc Hartmayer
On Mon, Feb 05, 2018 at 10:35 AM +0100, Michal Privoznik wrote: > On 02/02/2018 01:13 PM, Marc Hartmayer wrote: >> Add and use qemuProcessEventFree for freeing qemuProcessEvents. This >> is less error-prone as the compiler can help us make sure that for >> every new

Re: [libvirt] [PATCH 0/2] Memory leak fix and some refactoring

2018-02-05 Thread Marc Hartmayer
On Mon, Feb 05, 2018 at 10:35 AM +0100, Michal Privoznik wrote: > On 02/02/2018 01:13 PM, Marc Hartmayer wrote: >> The second patch fixes the memory leak. >> >> Marc Hartmayer (2): >> qemu: Use the return value of virObjectRef directly >> qemu: Add and use

Re: [libvirt] [PATCH 2/2] qemu: Add and use qemuProcessEventFree for freeing qemuProcessEvents

2018-02-05 Thread Marc Hartmayer
On Mon, Feb 05, 2018 at 11:31 AM +0100, Michal Privoznik wrote: > On 02/05/2018 11:17 AM, Marc Hartmayer wrote: >> On Mon, Feb 05, 2018 at 10:35 AM +0100, Michal Privoznik >> wrote: >>> On 02/02/2018 01:13 PM, Marc Hartmayer wrote: >>>> Add and

Re: [libvirt] [PATCH 2/2] qemu: Add and use qemuProcessEventFree for freeing qemuProcessEvents

2018-02-06 Thread Marc Hartmayer
On Mon, Feb 05, 2018 at 01:12 PM +0100, Michal Privoznik wrote: > On 02/05/2018 12:32 PM, Marc Hartmayer wrote: >> On Mon, Feb 05, 2018 at 11:31 AM +0100, Michal Privoznik >> wrote: >>> On 02/05/2018 11:17 AM, Marc Hartmayer wrote: >>>> On Mon, Feb 05, 2018

Re: [libvirt] [PATCH v2 02/10] conf: reimplement virDomainNetResolveActualType in terms of public API

2018-02-16 Thread Marc Hartmayer
(def->forward.type == VIR_NETWORK_FORWARD_PRIVATE) || > + (def->forward.type == VIR_NETWORK_FORWARD_VEPA) || > + (def->forward.type == VIR_NETWORK_FORWARD_PASSTHROUGH)) { > + > +/* are all > + * VIR_DOMAIN_NET_TYPE_DIRECT. &g

[libvirt] [PATCH 05/20] test: Implement virConnect(Un)RegisterCloseCallback

2018-03-08 Thread Marc Hartmayer
testConnectUnregisterCloseCallback (which are almost identical to the implementations of the remote and vz driver) will be called by the virsh tests. Signed-off-by: Marc Hartmayer Reviewed-by: Boris Fiuczynski --- src/test/test_driver.c | 63 +- 1 file changed, 62 insertions

[libvirt] [PATCH 04/20] test: Implement virConnectSupportsFeature

2018-03-08 Thread Marc Hartmayer
Implement virConnectSupportsFeature for the test driver as this API is used by various API functions (the functions usually use the macro VIR_DRV_SUPPORTS_FEATURE for calling virConnectSupportsFeature). Signed-off-by: Marc Hartmayer Reviewed-by: Bjoern Walk Reviewed-by: Boris Fiuczynski

[libvirt] [PATCH 16/20] remote: Set eventID explicitly to an invalid value

2018-03-08 Thread Marc Hartmayer
Set the eventID for remoteRelayDomainQemuMonitorEvent explicitly to an invalid value. Although the value is not used by remoteRelayDomainQemuMonitorEvent, but it might be less prone to errors for further refactorings. Signed-off-by: Marc Hartmayer Reviewed-by: Bjoern Walk Reviewed-by: Boris

[libvirt] [PATCH 14/20] remote: remove unneeded global variables

2018-03-08 Thread Marc Hartmayer
Remove unneeded global variables and convert them into local variables where they're needed. Signed-off-by: Marc Hartmayer Reviewed-by: Bjoern Walk Reviewed-by: Boris Fiuczynski --- src/remote/remote_daemon.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/r

[libvirt] [PATCH 08/20] test: testConnectAuthenticate: Take the lock when accessing mutable values

2018-03-08 Thread Marc Hartmayer
Signed-off-by: Marc Hartmayer Reviewed-by: Boris Fiuczynski --- src/test/test_driver.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 388407d4371f..b0ce7d0eea0a 100644 --- a/src/test/test_driver.c +++ b/src/test

[libvirt] [PATCH 06/20] test: testOpenDefault: introduce cleanup path

2018-03-08 Thread Marc Hartmayer
The two code paths have some cleanup in common so lets refactor it. Signed-off-by: Marc Hartmayer Reviewed-by: Boris Fiuczynski --- src/test/test_driver.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index

[libvirt] [PATCH 07/20] test: testOpenFromFile: return VIR_DRV_OPEN_SUCCESS in case of success

2018-03-08 Thread Marc Hartmayer
Signed-off-by: Marc Hartmayer Reviewed-by: Boris Fiuczynski --- src/test/test_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index e7307fddad4a..388407d4371f 100644 --- a/src/test/test_driver.c +++ b/src/test

[libvirt] [PATCH 01/20] driver: Add typedef for the anonymous enum used for driver features

2018-03-08 Thread Marc Hartmayer
Add typedef for the anonymous enum used for the driver features. This allows the usage of the type in a switch statement and taking advantage of the compilers feature to detect uncovered cases. Signed-off-by: Marc Hartmayer Reviewed-by: Boris Fiuczynski --- src/esx/esx_driver.c

[libvirt] [PATCH 00/20] Fix virConnect(Un)RegisterCloseCallback and get rid of global variables

2018-03-08 Thread Marc Hartmayer
variables 'qemuProgram', 'adminProgram', 'lxcProgram, and 'remoteProgram' in remote_daemon.[ch]. They only work in combination with the fixed behavior of virConnectSupportsFeatures and virConnect(Un)RegisterCloseCallback. Marc Hartmayer (20): driver: Add typedef for

[libvirt] [PATCH 12/20] test: fix error path in testConnectOpen

2018-03-08 Thread Marc Hartmayer
In case of an error do the cleanup of the private data of the connection. Signed-off-by: Marc Hartmayer Reviewed-by: Boris Fiuczynski --- src/test/test_driver.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index

[libvirt] [PATCH 03/20] virConnect(Un)RegisterCloseCallback: Throw an error in case the API is not supported

2018-03-08 Thread Marc Hartmayer
e the user would see the error message that virsh was unable to register a disconnect callback. Signed-off-by: Marc Hartmayer Reviewed-by: Boris Fiuczynski --- src/libvirt-host.c | 24 ++-- tools/virsh.c | 11 +-- 2 files changed, 23 insertions(+), 12 deletions(

[libvirt] [PATCH 02/20] remote: Don't hard code the feature VIR_DRV_FEATURE_REMOTE_CLOSE_CALLBACK as available

2018-03-08 Thread Marc Hartmayer
Don't assume that the feature VIR_DRV_FEATURE_REMOTE_CLOSE_CALLBACK is available for every driver used for the connection. Signed-off-by: Marc Hartmayer Reviewed-by: Bjoern Walk Reviewed-by: Boris Fiuczynski --- src/remote/remote_daemon_dispatch.c | 2 +- 1 file changed, 1 insertion(

[libvirt] [PATCH 13/20] test: Convert testDriver to virObjectLockable

2018-03-08 Thread Marc Hartmayer
The test driver state (@testDriver) uses it's own reference counting and locking implementation. Instead of doing that, convert @testDriver into a virObjectLockable and use the provided functionalities. Signed-off-by: Marc Hartmayer Reviewed-by: Boris Fiuczynski --- src/test/test_dri

[libvirt] [PATCH 19/20] rpc: Introduce virNetServerGetProgramLocked helper function

2018-03-08 Thread Marc Hartmayer
This patch introduces virNetServerGetProgramLocked. It's a function to determine which program has to be used for a given @msg. This function will be reused in the next patch. Signed-off-by: Marc Hartmayer Reviewed-by: Boris Fiuczynski --- src/rpc/virnetserver.c

[libvirt] [PATCH 09/20] test: testConnectClose: Set privateData to NULL in all cases

2018-03-08 Thread Marc Hartmayer
Set privateData to NULL also for a connection that uses @defaultConn as privateData regardless of whether @defaultConn was freed or not. @defaultConn is shared between multiple connections and it's ensured that there will be no memory leak by counting references. Signed-off-by: Marc Hart

[libvirt] [PATCH 15/20] stream: Access stream->prog instead of a hard-coded global variable

2018-03-08 Thread Marc Hartmayer
Use stream->prog instead of a hard-coded virNetServerProgram. Especially since these functions are intended as generic helpers for streams. Signed-off-by: Marc Hartmayer Reviewed-by: Bjoern Walk Reviewed-by: Boris Fiuczynski --- src/remote/remote_daemon_stream.c | 14 +++--- 1 f

[libvirt] [PATCH 10/20] test: rename defaultConn to defaultPrivconn

2018-03-08 Thread Marc Hartmayer
Rename the variable @defaultConn to @defaultPrivconn as it doesn't point to a default connection but to the private data used for the shared default connection of the test driver. Signed-off-by: Marc Hartmayer Reviewed-by: Boris Fiuczynski --- src/test/test_driver.c | 10 +- 1

[libvirt] [PATCH 17/20] remote: Add the information which program has to be used to daemonClientEventCallback

2018-03-08 Thread Marc Hartmayer
As a result, you can later determine at the callback which program has to be used. This makes it easier to refactor the code in the future and is less prone to error. Signed-off-by: Marc Hartmayer Reviewed-by: Boris Fiuczynski --- src/remote/remote_daemon_dispatch.c | 108

[libvirt] [PATCH 18/20] remote: Use domainClientEventCallbacks for remoteReplayConnectionClosedEvent

2018-03-08 Thread Marc Hartmayer
This allows us to get rid of another usage of the global variable remoteProgram. Signed-off-by: Marc Hartmayer Reviewed-by: Boris Fiuczynski --- src/remote/remote_daemon_dispatch.c | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/remote

[libvirt] [PATCH 11/20] test: introduce testDriverCloseInternal

2018-03-08 Thread Marc Hartmayer
Refactor testConnectClose as it's then obvious that conn->privateData is set to NULL in all cases. In addition, 'testConnectCloseInternal' can be better reused. Signed-off-by: Marc Hartmayer Reviewed-by: Boris Fiuczynski --- src/test/

[libvirt] [PATCH 20/20] remote/rpc: Use virNetServerGetProgram() to determine the program

2018-03-08 Thread Marc Hartmayer
Use virNetServerGetProgram() to determine the virNetServerProgram instead of using hard coded global variables. This allows us to remove the global variables @remoteProgram and @qemuProgram as they're now no longer necessary. Signed-off-by: Marc Hartmayer Reviewed-by: Boris Fiuczynski ---

Re: [libvirt] [PATCH 01/20] bhyve: Use virDomainObjListFindBy{UUID|ID}Ref

2018-03-13 Thread Marc Hartmayer
hyveDomainLookupByUUID(virConnectPtr conn, > dom = virGetDomain(conn, vm->def->name, vm->def->uuid, vm->def->id); > > cleanup: > -if (vm) > -virObjectUnlock(vm); > +virDomainObjEndAPI(&vm); > return dom; > } Is there now no m

Re: [libvirt] [PATCH 05/20] openvz: Cleanup indention

2018-03-13 Thread Marc Hartmayer
->name); > +if (virRun(prog, NULL) < 0) > + goto cleanup; > +virDomainObjSetState(vm, VIR_DOMAIN_RUNNING, > VIR_DOMAIN_RUNNING_UNPAUSED); > +} > > - ret = 0; > +ret = 0; > > cleanup: > - if (vm) > - virObjectUnlock(vm); > -

Re: [libvirt] [PATCH 01/20] bhyve: Use virDomainObjListFindBy{UUID|ID}Ref

2018-03-13 Thread Marc Hartmayer
On Tue, Mar 13, 2018 at 01:39 PM +0100, John Ferlan wrote: > On 03/13/2018 03:44 AM, Marc Hartmayer wrote: >> On Fri, Mar 09, 2018 at 05:47 PM +0100, John Ferlan >> wrote: >>> For bhyveDomObjFromDomain, bhyveDomainLookupByUUID, and >>> bhyveDomainLookupByID let

Re: [libvirt] [PATCH 10/20] test: rename defaultConn to defaultPrivconn

2018-03-15 Thread Marc Hartmayer
On Thu, Mar 15, 2018 at 03:38 PM +0100, John Ferlan wrote: > On 03/08/2018 07:20 AM, Marc Hartmayer wrote: >> Rename the variable @defaultConn to @defaultPrivconn as it doesn't >> point to a default connection but to the private data used for the >> shared default con

Re: [libvirt] [PATCH 13/20] test: Convert testDriver to virObjectLockable

2018-03-15 Thread Marc Hartmayer
On Thu, Mar 15, 2018 at 04:05 PM +0100, John Ferlan wrote: > On 03/08/2018 07:20 AM, Marc Hartmayer wrote: >> The test driver state (@testDriver) uses it's own reference counting >> and locking implementation. Instead of doing that, convert @testDriver >> into a vir

Re: [libvirt] [PATCH 15/20] stream: Access stream->prog instead of a hard-coded global variable

2018-03-15 Thread Marc Hartmayer
On Thu, Mar 15, 2018 at 04:22 PM +0100, John Ferlan wrote: > On 03/08/2018 07:20 AM, Marc Hartmayer wrote: >> Use stream->prog instead of a hard-coded >> virNetServerProgram. Especially since these functions are intended as >> generic helpers for streams. > > Lo

Re: [libvirt] [PATCH 16/20] remote: Set eventID explicitly to an invalid value

2018-03-15 Thread Marc Hartmayer
On Thu, Mar 15, 2018 at 04:39 PM +0100, John Ferlan wrote: > On 03/08/2018 07:20 AM, Marc Hartmayer wrote: >> Set the eventID for remoteRelayDomainQemuMonitorEvent explicitly to an >> invalid value. Although the value is not used by >> remoteRelayDomainQemuMonitorEvent, but i

Re: [libvirt] [PATCH 02/20] remote: Don't hard code the feature VIR_DRV_FEATURE_REMOTE_CLOSE_CALLBACK as available

2018-03-15 Thread Marc Hartmayer
On Thu, Mar 15, 2018 at 12:02 AM +0100, John Ferlan wrote: > On 03/14/2018 05:30 PM, John Ferlan wrote: >> >> >> On 03/08/2018 07:20 AM, Marc Hartmayer wrote: >>> Don't assume that the feature VIR_DRV_FEATURE_REMOTE_CLOSE_CALLBACK is >>> availa

Re: [libvirt] [PATCH 18/20] remote: Use domainClientEventCallbacks for remoteReplayConnectionClosedEvent

2018-03-15 Thread Marc Hartmayer
On Thu, Mar 15, 2018 at 07:56 PM +0100, John Ferlan wrote: > On 03/08/2018 07:20 AM, Marc Hartmayer wrote: >> This allows us to get rid of another usage of the global variable >> remoteProgram. >> >> Signed-off-by: Marc Hartmayer >> Reviewed-by: Boris

Re: [libvirt] [PATCH 18/20] remote: Use domainClientEventCallbacks for remoteReplayConnectionClosedEvent

2018-03-15 Thread Marc Hartmayer
On Thu, Mar 15, 2018 at 07:56 PM +0100, John Ferlan wrote: > On 03/08/2018 07:20 AM, Marc Hartmayer wrote: >> This allows us to get rid of another usage of the global variable >> remoteProgram. >> >> Signed-off-by: Marc Hartmayer >> Reviewed-by: Boris

Re: [libvirt] [PATCH 20/20] remote/rpc: Use virNetServerGetProgram() to determine the program

2018-03-15 Thread Marc Hartmayer
On Thu, Mar 08, 2018 at 01:20 PM +0100, Marc Hartmayer wrote: > Use virNetServerGetProgram() to determine the virNetServerProgram > instead of using hard coded global variables. This allows us to remove > the global variables @remoteProgram and @qemuProgram as they're now no >

Re: [libvirt] [PATCH 07/22] esx_vi_generator: Simplify get_occurrence_comment

2018-03-19 Thread Marc Hartmayer
rence_map[self.occurrence] What do you think about this? (instead of an explicit check) try: return occurrence_map[self.occurrence] except KeyError: raise ValueError("unknown occurrence value '%s'" % self.occurrence) In my opinion it’s more “pythonic”. Beste Grüße / K

[libvirt] Race condition between qemuDomainCreate and qemuDomainDestroy

2018-03-20 Thread Marc Hartmayer
hread 4) (gdb) thread apply 4 continue Now continue the thread where the first breakpoint was hit. => Segmentation fault because of a NULL pointer dereference at config->value Since I'm not very familiar with that part of the code, I wanted to ask for your advice. Thanks in adva

Re: [libvirt] [PATCH 02/20] remote: Don't hard code the feature VIR_DRV_FEATURE_REMOTE_CLOSE_CALLBACK as available

2018-03-20 Thread Marc Hartmayer
On Mon, Mar 19, 2018 at 04:06 PM +0100, "Daniel P. Berrangé" wrote: > On Thu, Mar 08, 2018 at 01:20:25PM +0100, Marc Hartmayer wrote: >> Don't assume that the feature VIR_DRV_FEATURE_REMOTE_CLOSE_CALLBACK is >> available for every driver used for the connection.

Re: [libvirt] [[RFC] 0/8] Implement async QEMU event handling in libvirtd.

2018-03-21 Thread Marc Hartmayer
ils.c |2 +- > 17 files changed, 3411 insertions(+), 1976 deletions(-) > create mode 100644 src/qemu/qemu_event.c > create mode 100644 src/qemu/qemu_event.h > > -- > 2.9.5 > > -- > libvir-list mailing list > libvir-list@redhat.com > https://www.redhat.com/mailma

[libvirt] [PATCH 2/3] util: Add virHostdevIsSCSIDevice()

2016-11-15 Thread Marc Hartmayer
Add the function virHostdevIsSCSIDevice() which detects whether a hostdev is a SCSI device or not. Signed-off-by: Marc Hartmayer Reviewed-by: Bjoern Walk Reviewed-by: Boris Fiuczynski --- src/libvirt_private.syms | 1 + src/util/virhostdev.c| 14 ++ src/util/virhostdev.h

[libvirt] [PATCH 0/3] Fix improper union member access on hostdevs and refactoring

2016-11-15 Thread Marc Hartmayer
This patch series fixes improper union member accesses on hostdevs. Additionally, it adds a util function which checks whether a hostdev is a SCSI device or not. This function is used to simplify and clarify the code. Marc Hartmayer (3): qemu: Fix improper union member access on hostdevs util

[libvirt] [PATCH 1/3] qemu: Fix improper union member access on hostdevs

2016-11-15 Thread Marc Hartmayer
Add missing checks if a hostdev is a subsystem/SCSI device before access the union member 'subsys'/'scsi'. Also fix indentation and simplify qemuDomainObjCheckHostdevTaint(). Signed-off-by: Marc Hartmayer Reviewed-by: Bjoern Walk Reviewed-by: Boris Fiuczynski --- src/qemu

[libvirt] [PATCH 3/3] Refactoring: Use virHostdevIsSCSIDevice()

2016-11-15 Thread Marc Hartmayer
Use the util function virHostdevIsSCSIDevice() to simplify if statements. Signed-off-by: Marc Hartmayer Reviewed-by: Bjoern Walk Reviewed-by: Boris Fiuczynski --- src/Makefile.am | 3 ++- src/conf/domain_conf.c | 8 +++- src/qemu/qemu_command.c | 3 +-- src/qemu/qemu_conf.c

[libvirt] [PATCH 2/2] tests: Add tests for disk configuration validation

2016-11-15 Thread Marc Hartmayer
Add tests for controller based disks to check disk address compatibility with disk bus types. Signed-off-by: Marc Hartmayer Reviewed-by: Boris Fiuczynski Reviewed-by: Bjoern Walk --- .../qemuxml2argv-disk-fdc-incompatible-address.xml | 22 .../qemuxml2argv-disk-ide

<    1   2   3   4   5   >