Re: [libvirt] [PATCH 06/11] conf: Get rid of virDomainDeviceDefPostParseOne

2018-10-01 Thread Marc Hartmayer
On Sat, Sep 29, 2018 at 04:09 AM +0200, John Ferlan wrote: > On 9/20/18 1:44 PM, Marc Hartmayer wrote: >> Move the domainPostParseDataAlloc/Free calls to >> virDomainDeviceDefParse. As an consequence >> virDomainDeviceDefPostParseOne is superfluous and can therefore be >

Re: [libvirt] [PATCH 05/11] conf: Add function description for virDomainDefPostParse

2018-10-01 Thread Marc Hartmayer
On Sat, Sep 29, 2018 at 04:08 AM +0200, John Ferlan wrote: > On 9/20/18 1:44 PM, Marc Hartmayer wrote: >> Signed-off-by: Marc Hartmayer >> Reviewed-by: Boris Fiuczynski >> --- >> src/conf/domain_conf.c | 13 + >> 1 file changed, 13 insertio

Re: [libvirt] [PATCH 04/11] conf: Use getParseOpaque() in virDomainObjSetDefTransient

2018-10-01 Thread Marc Hartmayer
On Sat, Sep 29, 2018 at 04:06 AM +0200, John Ferlan wrote: > On 9/20/18 1:44 PM, Marc Hartmayer wrote: >> This allows the QEMU driver to use the originally used QEMU >> capabilities for copying the domain. It avoids the usage of a possible >> changed QEMU capability as v

Re: [libvirt] [PATCH 03/11] qemu: Pass QEMUCaps to virDomainDefPostParse

2018-10-01 Thread Marc Hartmayer
On Mon, Oct 01, 2018 at 09:33 AM +0200, Peter Krempa wrote: > On Fri, Sep 28, 2018 at 22:02:59 -0400, John Ferlan wrote: >> >> >> On 9/20/18 1:44 PM, Marc Hartmayer wrote: >> > ...although priv->qemuCaps will be NULL in almost every case when the >> >

Re: [libvirt] [PATCH] Revert "vircgroup: cleanup controllers not managed by systemd on error"

2018-09-28 Thread Marc Hartmayer
irSaveLastError(); > -virCgroupRemove(*group); > -virCgroupFree(group); > -if (saved) { > -virSetError(saved); > -virFreeError(saved); > - } > - > -return -1; > } > > > -- > 2.17.1 > > -- > libvir-list mailing list > libvir-

Re: [libvirt] [PATCH] vircgroup: fix NULL pointer dereferencing

2018-09-28 Thread Marc Hartmayer
On Thu, Sep 27, 2018 at 02:38 PM +0200, John Ferlan wrote: > $subj: > > util: Fix cgroup processing NULL pointer dereferencing I’m fine with this change :) > > > On 9/26/18 11:53 AM, Marc Hartmayer wrote: >> When virCgroupEnableMissingControllers fails it's possible tha

Re: [libvirt] [PATCH v4 00/23] Introduce metadata locking

2018-09-27 Thread Marc Hartmayer
ity of > POSIX file locks. Imagine one thread doing: open() + fcntl(fd, F_SETLKW, > ...) and entering critical section. If another thread does open() + > close() on the same file the file is unlocked. Because we can't > guarantee this will not happen in multithreaded libvirt we had to > i

Re: [libvirt] [PATCH v4 00/23] Introduce metadata locking

2018-09-27 Thread Marc Hartmayer
On Thu, Sep 27, 2018 at 10:14 AM +0200, Michal Privoznik wrote: > On 09/27/2018 09:57 AM, Marc Hartmayer wrote: >> On Thu, Sep 27, 2018 at 09:01 AM +0200, Bjoern Walk >> wrote: >>> Michal Privoznik [2018-09-19, 11:45AM +0200]: >>>> On 09/19/2018 11:17 AM,

Re: [libvirt] [PATCH v4 00/23] Introduce metadata locking

2018-09-27 Thread Marc Hartmayer
031 16 1819 > -- > Vorsitzende des Aufsichtsrats: Martina Koederitz > Geschäftsführung: Dirk Wittkopp > Sitz der Gesellschaft: Böblingen > Registergericht: Amtsgericht Stuttgart, HRB 243294 -- Kind regards / Beste Grüße Marc Ha

[libvirt] [PATCH] vircgroup: fix NULL pointer dereferencing

2018-09-26 Thread Marc Hartmayer
] qemuProcessLaunch [#6] qemuProcessStart [#7] qemuDomainObjStart [#8] qemuDomainCreateWithFlags [#9] qemuDomainCreate ... Fixes: 1602aa28f820ada66f707cef3e536e8572fbda1e Reviewed-by: Boris Fiuczynski Reviewed-by: Bjoern Walk Signed-off-by: Marc Hartmayer --- src/util/vircgroup.c | 3 ++- src/util

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

2018-09-26 Thread Marc Hartmayer
On Wed, Sep 26, 2018 at 01:44 AM +0200, John Ferlan wrote: > On 9/21/18 9:02 AM, Marc Hartmayer wrote: >> Marc Hartmayer (4): >> virdbus: Grab a ref as long as the while loop is executed >> virdbus: Unref the D-Bus connection when closing >> vird

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

2018-09-21 Thread Marc Hartmayer
int virNetSocketDupFD(virNetSocketPtr sock); > > bool virNetSocketIsLocal(virNetSocketPtr sock); > > -- > 2.16.4 > > -- > libvir-list mailing list > libvir-list@redhat.com > https://www.redhat.com/mailman/listinfo/libvir-list > Anyway, Reviewed-by: Marc Hartmayer

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

2018-09-21 Thread Marc Hartmayer
return -1; > } > > -- > 2.16.4 > > -- > libvir-list mailing list > libvir-list@redhat.com > https://www.redhat.com/mailman/listinfo/libvir-list > Reviewed-by: Marc Hartmayer -- Kind regards / Beste Grüße Marc Hartmayer IBM Deutschland Research & D

[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

[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 conn

[libvirt] [PATCH 03/11] qemu: Pass QEMUCaps to virDomainDefPostParse

2018-09-20 Thread Marc Hartmayer
...although priv->qemuCaps will be NULL in almost every case when the post parse callback has failed. That may change in the future. Signed-off-by: Marc Hartmayer Reviewed-by: Boris Fiuczynski --- src/qemu/qemu_process.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/

[libvirt] [PATCH 09/11] qemu: Use @parseOpaque in qemuDomainDefValidate

2018-09-20 Thread Marc Hartmayer
the used QEMU binary has been replaced and thus the QEMU capability is invalidated by the file cache) Signed-off-by: Marc Hartmayer Reviewed-by: Boris Fiuczynski --- src/qemu/qemu_domain.c | 44 -- 1 file changed, 17 insertions(+), 27 deletions(-) diff --git

[libvirt] [PATCH 07/11] conf: Extend virDomainDefValidate(Callback) for parseOpaque

2018-09-20 Thread Marc Hartmayer
Add @parseOpaque argument to virDomainDefValidate and virDomainDefValidateCallback, but don't use it for now since it's not ensured that it's always a non-NULL value. Signed-off-by: Marc Hartmayer Reviewed-by: Boris Fiuczynski --- src/conf/domain_conf.c | 11 +++ src/conf

[libvirt] [PATCH 05/11] conf: Add function description for virDomainDefPostParse

2018-09-20 Thread Marc Hartmayer
Signed-off-by: Marc Hartmayer Reviewed-by: Boris Fiuczynski --- src/conf/domain_conf.c | 13 + 1 file changed, 13 insertions(+) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index a3f2fcb0a001..3c307d325a89 100644 --- a/src/conf/domain_conf.c +++ b/src/conf

[libvirt] [PATCH 10/11] conf: Extend virDomainDeviceDefValidate(Callback) for parseOpaque

2018-09-20 Thread Marc Hartmayer
Add parseOpaque parameter to virDomainDeviceDefValidate(Callback). But don't use it for now. Signed-off-by: Marc Hartmayer Reviewed-by: Boris Fiuczynski --- src/conf/domain_conf.c | 10 ++ src/conf/domain_conf.h | 3 ++- src/qemu/qemu_domain.c | 3 ++- src/vz/vz_driver.c | 3

[libvirt] [PATCH 04/11] conf: Use getParseOpaque() in virDomainObjSetDefTransient

2018-09-20 Thread Marc Hartmayer
replaced virQEMUCapsCacheLookupCopy will invalidate the originally used QEMU capability). For other drivers @parseOpqaue will still be NULL, because xmlopt->privateData.getParseOpaque is currently only implemented for the QEMU driver. Signed-off-by: Marc Hartmayer Reviewed-by: Stefan Zimmerm

[libvirt] [PATCH 06/11] conf: Get rid of virDomainDeviceDefPostParseOne

2018-09-20 Thread Marc Hartmayer
Move the domainPostParseDataAlloc/Free calls to virDomainDeviceDefParse. As an consequence virDomainDeviceDefPostParseOne is superfluous and can therefore be removed. Signed-off-by: Marc Hartmayer Reviewed-by: Boris Fiuczynski --- src/conf/domain_conf.c | 37

[libvirt] [PATCH 00/11] Avoid numerous calls of virQEMUCapsCacheLookup

2018-09-20 Thread Marc Hartmayer
has been significantly improved. In a quick test this gave a speed up of factor 4 for a simple define/undefine loop. In general, the more devices a domain has, the more drastic the overhead becomes (because a cache validation is performed for each device). Marc Hartmayer (11): qemu: Use

[libvirt] [PATCH 11/11] qemu: Use @parseOpaque in qemuDomainDeviceDefValidate

2018-09-20 Thread Marc Hartmayer
Since each code path ensures that @parseOpaque cannot be NULL, we can use the argument instead of using virQEMUCapsCacheLookup where the QEMU capabilities may have been changed during the libvirt job. Signed-off-by: Marc Hartmayer Reviewed-by: Boris Fiuczynski --- src/qemu/qemu_domain.c | 12

[libvirt] [PATCH 01/11] qemu: Use VIR_STEAL_PTR macro

2018-09-20 Thread Marc Hartmayer
Signed-off-by: Marc Hartmayer Reviewed-by: Bjoern Walk Reviewed-by: Boris Fiuczynski Reviewed-by: Stefan Zimmermann --- src/qemu/qemu_domain.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 2fd8a2a268cd..06aa1fac5d0b

[libvirt] [PATCH 02/11] qemu: Introduce qemuDomainUpdateQEMUCaps()

2018-09-20 Thread Marc Hartmayer
This function updates the used QEMU capabilities of @vm by querying the QEMU capabilities cache. Signed-off-by: Marc Hartmayer Reviewed-by: Boris Fiuczynski --- src/qemu/qemu_domain.c | 25 + src/qemu/qemu_domain.h | 4 src/qemu/qemu_process.c | 14

[libvirt] [PATCH 08/11] conf: Use domainPostParseData(Alloc|Free) in virDomainDefValidate

2018-09-20 Thread Marc Hartmayer
. Signed-off-by: Marc Hartmayer Reviewed-by: Boris Fiuczynski --- src/conf/domain_conf.c | 21 + 1 file changed, 21 insertions(+) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index ae7f3ed95faf..4f1c569b5733 100644 --- a/src/conf/domain_conf.c +++ b/src/conf

Re: [libvirt] [PATCH] virDomainObjListAddLocked: fix double free

2018-08-27 Thread Marc Hartmayer
On Mon, Aug 27, 2018 at 04:03 PM +0200, Michal Prívozník wrote: > On 08/27/2018 03:20 PM, Marc Hartmayer wrote: >> If @vm has flagged as "to be removed" virDomainObjListFindByNameLocked >> returns NULL (although the definition actually exists). Therefore,

[libvirt] [PATCH] virDomainObjListAddLocked: fix double free

2018-08-27 Thread Marc Hartmayer
003ff9123f7f4 in qemuDomainDefineXML #5 0x03ffb5cd2c84 in virDomainDefineXML #6 0x00011745aa82 in remoteDispatchDomainDefineXML ... Reviewed-by: Bjoern Walk Signed-off-by: Marc Hartmayer --- src/conf/virdomainobjlist.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --gi

Re: [libvirt] [PATCH] util: Don't delete the original file for truncation

2018-08-21 Thread Marc Hartmayer
On Tue, Aug 21, 2018 at 11:03 AM +0200, "Daniel P. Berrangé" wrote: > On Tue, Aug 21, 2018 at 10:49:28AM +0200, Marc Hartmayer wrote: >> Truncate means that if a file exists it's length will be truncated to >> 0, but the mode and the owner shall be unchan

[libvirt] [PATCH] util: Don't delete the original file for truncation

2018-08-21 Thread Marc Hartmayer
but may be used in the future and is therefore still defined. Signed-off-by: Marc Hartmayer Reviewed-by: Boris Fiuczynski --- Note: This change has the (potentially unwanted) security effect that the owner/group of the log file does not change. Before this patch the old log file was deleted

Re: [libvirt] [PATCH] rpc: Initialize a worker pool for max_workers=0 as well

2018-08-15 Thread Marc Hartmayer
On Tue, Aug 14, 2018 at 06:19 PM +0200, John Ferlan wrote: > On 08/07/2018 07:38 AM, Marc Hartmayer wrote: >> Semantically, there is no difference between an uninitialized worker >> pool and an initialized worker pool with zero workers. Let's allow the >> worker p

Re: [libvirt] [PATCH libvirt v2 1/9] virConnectRegisterCloseCallback: Cleanup 'opaque' if there is no connectRegisterCloseCallback

2018-08-07 Thread Marc Hartmayer
On Wed, Jun 13, 2018 at 10:22 AM +0200, Marc Hartmayer wrote: > On Mon, Jun 04, 2018 at 06:25 PM +0200, "Daniel P. Berrangé" > wrote: >> On Thu, Apr 26, 2018 at 08:16:54PM -0400, John Ferlan wrote: […snip…] >> >> If the application wants to a

[libvirt] [PATCH] rpc: Initialize a worker pool for max_workers=0 as well

2018-08-07 Thread Marc Hartmayer
to virThreadPoolGetMaxWorkers instead. This patch fixes segmentation faults in virNetServerGetThreadPoolParameters and virNetServerSetThreadPoolParameters for the case when no worker pool is actually initialized (max_workers=0). Signed-off-by: Marc Hartmayer --- src/rpc/virnetserver.c | 8

Re: [libvirt] [PATCH v2 3/6] virThreadPool: Prevent switching between zero and non-zero maxWorkers

2018-07-20 Thread Marc Hartmayer
On Thu, Jul 19, 2018 at 04:53 PM +0200, John Ferlan wrote: > On 07/03/2018 07:37 AM, Marc Hartmayer wrote: >> ...since maxWorkers=0 is only intended for virtlockd or virlogd which >> must not be multithreaded. >> >> Signed-off-by: Marc Hartmayer >> Reviewed-

Re: [libvirt] [PATCH v2 2/6] rpc: Initialize a worker pool for max_workers=0 as well

2018-07-20 Thread Marc Hartmayer
On Thu, Jul 19, 2018 at 04:52 PM +0200, John Ferlan wrote: > On 07/03/2018 07:37 AM, Marc Hartmayer wrote: >> Semantically, there is no difference between an uninitialized worker >> pool and an initialized worker pool with zero workers. Let's allow the >> worker p

Re: [libvirt] [PATCH v2 1/6] rpc: Fix deadlock if there is no worker pool available

2018-07-20 Thread Marc Hartmayer
On Thu, Jul 19, 2018 at 04:51 PM +0200, John Ferlan wrote: > On 07/03/2018 07:37 AM, Marc Hartmayer wrote: >> @srv must be unlocked for the call virNetServerProcessMsg otherwise a >> deadlock can occur. >> >> Since the pointer 'srv->workers' will never be c

[libvirt] [PATCH v2 0/2] Minor fixes for virTypedParams(De)Serialize

2018-07-17 Thread Marc Hartmayer
Changelog: + v1->v2: - Removed the the allocation change in virTypedParams(De)Serialize (John's comment) Marc Hartmayer (2): virTypedParamsSerialize: set remote_params_len at the end virTypedParamsDeserialize: set nparams to 0 in case of an error src/util/virtypedparam.c

[libvirt] [PATCH v2 1/2] virTypedParamsSerialize: set remote_params_len at the end

2018-07-17 Thread Marc Hartmayer
From: Marc Hartmayer Update the length @remote_params_len only if the related @remote_params_val has also been set. Signed-off-by: Marc Hartmayer --- src/util/virtypedparam.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/util/virtypedparam.c b/src/util

[libvirt] [PATCH v2 2/2] virTypedParamsDeserialize: set nparams to 0 in case of an error

2018-07-17 Thread Marc Hartmayer
From: Marc Hartmayer Signed-off-by: Marc Hartmayer --- src/util/virtypedparam.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/util/virtypedparam.c b/src/util/virtypedparam.c index c5fc68418c35..ef84642ee989 100644 --- a/src/util/virtypedparam.c +++ b/src/util/virtypedparam.c

Re: [libvirt] [PATCH v2 0/6] Fixes for segfault and deadlock

2018-07-11 Thread Marc Hartmayer
On Tue, Jul 03, 2018 at 01:37 PM +0200, Marc Hartmayer wrote: > One way to reproduce the bugs is to set admin_max_workers=0 in > libvirtd.conf, restart libvirtd, and then call: > > $ virt-admin server-threadpool-info admin > > Changelog: > v1->v2: > - Worked in

Re: [libvirt] [PATCH 0/9] Resolve libvirtd hang on termination with connected long running client

2018-07-06 Thread Marc Hartmayer
have a {reliable|simple} reproducer > (at least I don't recall). I do a simple start/destroy loop and send a SIGTERM to libvirtd. This leads in almost every case to a segmentation fault. > > I do still have various branches in various states of disarray that are > way behind curren

Re: [libvirt] [PATCH 1/2] virTypedParamsSerialize: minor fixes

2018-07-06 Thread Marc Hartmayer
On Wed, Jul 04, 2018 at 11:24 AM +0200, Marc Hartmayer wrote: > On Tue, Jul 03, 2018 at 09:14 PM +0200, John Ferlan > wrote: >> On 07/03/2018 06:32 AM, Marc Hartmayer wrote: >>> On Thu, Jun 21, 2018 at 03:47 PM +0200, Marc Hartmayer >>> wrote: >>>&

Re: [libvirt] [PATCH 1/2] virTypedParamsSerialize: minor fixes

2018-07-04 Thread Marc Hartmayer
On Tue, Jul 03, 2018 at 09:14 PM +0200, John Ferlan wrote: > On 07/03/2018 06:32 AM, Marc Hartmayer wrote: >> On Thu, Jun 21, 2018 at 03:47 PM +0200, Marc Hartmayer >> wrote: >>> On Wed, Jun 13, 2018 at 03:11 PM +0200, John Ferlan >>> wrote: >>>>

Re: [libvirt] [PATCH 7/9] rpc: Alter virNetDaemonQuit processing

2018-07-03 Thread Marc Hartmayer
erWorkersDone' we could use a pipe for signaling. This would also ensure that we do not remain in the poll() call indefinitely and it avoids the timer hack. […snip] -- Beste Grüße / Kind regards Marc Hartmayer IBM Deutschland Research & Development GmbH Vorsitzende des Aufsichtsrats: Ma

Re: [libvirt] [PATCH 0/9] Resolve libvirtd hang on termination with connected long running client

2018-07-03 Thread Marc Hartmayer
0x1000cc640) at ../../src/rpc/virnetserver.c:803 #4 0x03fffda97286 in virObjectUnref (anyobj=) at ../../src/util/virobject.c:350 #5 0x03fffda97a5a in virObjectFreeHashData (opaque=, name=) at ../../src/util/virobject.c:591 #6 0x03fffda66576 in virHashFree (table=) at ../../src/util/virh

Re: [libvirt] [PATCH] qemu: hotplug: Don't access srcPriv when it's not allocated

2018-07-03 Thread Marc Hartmayer
gt; > Specifically the former commit was not good enough to cover this case > despite touching this code. Would it make sense to always allocate the qemuDomainStorageSourcePrivate struct? We’d be wasting some memory, but at the same time the code would be easier to read and less prone to error. e.g

[libvirt] [PATCH v2 2/6] rpc: Initialize a worker pool for max_workers=0 as well

2018-07-03 Thread Marc Hartmayer
to virThreadPoolGetMaxWorkersLocked instead. This patch fixes segmentation faults in virNetServerGetThreadPoolParameters and virNetServerSetThreadPoolParameters for the case when no worker pool is actually initialized (max_workers=0). Signed-off-by: Marc Hartmayer Reviewed-by: Boris Fiuczynski

[libvirt] [PATCH v2 6/6] rpc: Fix name of include guard

2018-07-03 Thread Marc Hartmayer
The include guard should match the file name and comment. Signed-off-by: Marc Hartmayer Reviewed-by: Boris Fiuczynski --- src/rpc/virnetserverprogram.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rpc/virnetserverprogram.h b/src/rpc/virnetserverprogram.h index

[libvirt] [PATCH v2 4/6] daemon: Raise an error if 'max_workers' < 1 in libvirtd.conf

2018-07-03 Thread Marc Hartmayer
Hypervisor drivers (e.g. QEMU) assume that they run in a separate thread from the main event loop thread otherwise deadlocks can occur. Therefore let's report an error if max_workers < 1 is set in the libvirtd configuration file. Signed-off-by: Marc Hartmayer Reviewed-by: Boris Fiuczyn

[libvirt] [PATCH v2 5/6] virt-admin: Fix two error messages

2018-07-03 Thread Marc Hartmayer
Signed-off-by: Marc Hartmayer Reviewed-by: Boris Fiuczynski --- tools/virt-admin.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/virt-admin.c b/tools/virt-admin.c index c86b5763a73c..107a1d870df5 100644 --- a/tools/virt-admin.c +++ b/tools/virt-admin.c @@ -552,7

[libvirt] [PATCH v2 1/6] rpc: Fix deadlock if there is no worker pool available

2018-07-03 Thread Marc Hartmayer
off-by: Marc Hartmayer Reviewed-by: Boris Fiuczynski Reviewed-by: Bjoern Walk --- src/rpc/virnetserver.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/rpc/virnetserver.c b/src/rpc/virnetserver.c index 5c7f7dd08fe1..091e3ef23406 100644 --- a/src/rpc/virnetserve

[libvirt] [PATCH v2 0/6] Fixes for segfault and deadlock

2018-07-03 Thread Marc Hartmayer
2. it shouldn't be allowed to switch between zero and non-zero max_workers (patch 4) - Changed the deadlock fix (patch 1) - Added two small fixes (patch 5 and 6) Marc Hartmayer (6): rpc: Fix deadlock if there is no worker pool available rpc: Initialize a worker pool for max_work

[libvirt] [PATCH v2 3/6] virThreadPool: Prevent switching between zero and non-zero maxWorkers

2018-07-03 Thread Marc Hartmayer
...since maxWorkers=0 is only intended for virtlockd or virlogd which must not be multithreaded. Signed-off-by: Marc Hartmayer Reviewed-by: Boris Fiuczynski Reviewed-by: Bjoern Walk --- src/util/virthreadpool.c | 8 1 file changed, 8 insertions(+) diff --git a/src/util

Re: [libvirt] [PATCH 1/2] virTypedParamsSerialize: minor fixes

2018-07-03 Thread Marc Hartmayer
On Thu, Jun 21, 2018 at 03:47 PM +0200, Marc Hartmayer wrote: > On Wed, Jun 13, 2018 at 03:11 PM +0200, John Ferlan > wrote: >> On 06/07/2018 08:17 AM, Marc Hartmayer wrote: >>> On Wed, May 09, 2018 at 09:51 PM +0200, John Ferlan >>> wrote: >>>> On

Re: [libvirt] [PATCH 1/2] virTypedParamsSerialize: minor fixes

2018-06-21 Thread Marc Hartmayer
On Thu, Jun 21, 2018 at 03:47 PM +0200, Marc Hartmayer wrote: > On Wed, Jun 13, 2018 at 03:11 PM +0200, John Ferlan > wrote: >> On 06/07/2018 08:17 AM, Marc Hartmayer wrote: >>> On Wed, May 09, 2018 at 09:51 PM +0200, John Ferlan >>> wrote: >>>> On

Re: [libvirt] [PATCH 1/2] virTypedParamsSerialize: minor fixes

2018-06-21 Thread Marc Hartmayer
On Wed, Jun 13, 2018 at 03:11 PM +0200, John Ferlan wrote: > On 06/07/2018 08:17 AM, Marc Hartmayer wrote: >> On Wed, May 09, 2018 at 09:51 PM +0200, John Ferlan >> wrote: >>> On 05/07/2018 11:24 AM, Marc Hartmayer wrote: >>>> On Mon, Apr 30, 2018 at 03:2

Re: [libvirt] [PATCH 2/2] rpc: Fix segmentation fault when no worker pool is available

2018-06-19 Thread Marc Hartmayer
On Tue, Jun 19, 2018 at 05:30 PM +0200, "Daniel P. Berrangé" wrote: > On Tue, Jun 19, 2018 at 05:18:17PM +0200, Marc Hartmayer wrote: >> On Tue, Jun 19, 2018 at 04:55 PM +0200, "Daniel P. Berrangé" >> wrote: >> > On Tue, Jun 19, 2018 at 04:51:13PM +

Re: [libvirt] [PATCH 2/2] rpc: Fix segmentation fault when no worker pool is available

2018-06-19 Thread Marc Hartmayer
On Tue, Jun 19, 2018 at 05:03 PM +0200, "Daniel P. Berrangé" wrote: > On Tue, Jun 19, 2018 at 03:55:09PM +0100, Daniel P. Berrangé wrote: >> On Tue, Jun 19, 2018 at 04:51:13PM +0200, Erik Skultety wrote: >> > On Mon, Jun 18, 2018 at 12:38:06PM +0200, Marc Hartmayer

Re: [libvirt] [PATCH 2/2] rpc: Fix segmentation fault when no worker pool is available

2018-06-19 Thread Marc Hartmayer
On Tue, Jun 19, 2018 at 04:55 PM +0200, "Daniel P. Berrangé" wrote: > On Tue, Jun 19, 2018 at 04:51:13PM +0200, Erik Skultety wrote: >> On Mon, Jun 18, 2018 at 12:38:06PM +0200, Marc Hartmayer wrote: >> > On Mon, Jun 18, 2018 at 09:47 AM +0200, Erik Skultety >&g

Re: [libvirt] [PATCH 2/2] qemu: sev: Don't jump to endjob if SEV measurement retrieval fails

2018-06-19 Thread Marc Hartmayer
the “if-tmp-block” behind the “if-…ExitMonitor()-block”. But I have no strong opinion about that :) Anyway Reviewed-by: Marc Hartmayer -- Beste Grüße / Kind regards Marc Hartmayer IBM Deutschland Research & Development GmbH Vorsitzende des Aufsichtsrats: Martina Koederitz Geschäftsführung: Di

Re: [libvirt] [PATCH 1/2] qemu: sev: Use EnterMonitor instead of EnterMonitorAsync

2018-06-19 Thread Marc Hartmayer
bjEnterMonitor(driver, vm); > tmp = qemuMonitorGetSEVMeasurement(QEMU_DOMAIN_PRIVATE(vm)->mon); > if (tmp == NULL) > goto endjob; > -- > 2.14.4 > > -- > libvir-list mailing list > libvir-list@redhat.com > https://www.redhat.com/mailman/listinfo/libvir-list >

Re: [libvirt] [PATCH 2/2] rpc: Fix segmentation fault when no worker pool is available

2018-06-18 Thread Marc Hartmayer
On Mon, Jun 18, 2018 at 09:47 AM +0200, Erik Skultety wrote: > On Fri, Jun 15, 2018 at 03:31:34PM +0200, Marc Hartmayer wrote: >> On Fri, Jun 15, 2018 at 01:39 PM +0200, Marc Hartmayer >> wrote: >> > If srv->workers is a NULL pointer, as it is the case if there are

Re: [libvirt] [PATCH 2/2] rpc: Fix segmentation fault when no worker pool is available

2018-06-18 Thread Marc Hartmayer
On Mon, Jun 18, 2018 at 09:47 AM +0200, Erik Skultety wrote: > On Fri, Jun 15, 2018 at 03:31:34PM +0200, Marc Hartmayer wrote: >> On Fri, Jun 15, 2018 at 01:39 PM +0200, Marc Hartmayer >> wrote: >> > If srv->workers is a NULL pointer, as it is the case if there are

Re: [libvirt] [PATCH 2/2] rpc: Fix segmentation fault when no worker pool is available

2018-06-15 Thread Marc Hartmayer
On Fri, Jun 15, 2018 at 01:39 PM +0200, Marc Hartmayer wrote: > If srv->workers is a NULL pointer, as it is the case if there are no > workers, then don't try to dereference it. > > Signed-off-by: Marc Hartmayer > Reviewed-by: Boris Fiuczynski > --- > src

[libvirt] [PATCH 0/2] Fixes for segfault and deadlock

2018-06-15 Thread Marc Hartmayer
One way to reproduce the bugs is to set admin_max_workers=0 in libvirtd.conf, restart libvirtd, and then call: $ virt-admin server-threadpool-info admin Marc Hartmayer (2): rpc: Fix deadlock if there is no worker pool available rpc: Fix segmentation fault when no worker pool is available

[libvirt] [PATCH 1/2] rpc: Fix deadlock if there is no worker pool available

2018-06-15 Thread Marc Hartmayer
@srv must be unlocked for the call virNetServerProcessMsg otherwise a deadlock can occur. Signed-off-by: Marc Hartmayer Reviewed-by: Boris Fiuczynski --- src/rpc/virnetserver.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/rpc/virnetserver.c b/src/rpc

[libvirt] [PATCH 2/2] rpc: Fix segmentation fault when no worker pool is available

2018-06-15 Thread Marc Hartmayer
If srv->workers is a NULL pointer, as it is the case if there are no workers, then don't try to dereference it. Signed-off-by: Marc Hartmayer Reviewed-by: Boris Fiuczynski --- src/rpc/virnetserver.c | 22 +++--- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/

Re: [libvirt] [PATCH libvirt v2 1/9] virConnectRegisterCloseCallback: Cleanup 'opaque' if there is no connectRegisterCloseCallback

2018-06-13 Thread Marc Hartmayer
On Mon, Jun 04, 2018 at 06:25 PM +0200, "Daniel P. Berrangé" wrote: > On Thu, Apr 26, 2018 at 08:16:54PM -0400, John Ferlan wrote: >> >> >> On 04/26/2018 12:09 PM, Marc Hartmayer wrote: >> > On Thu, Apr 26, 2018 at 05:06 PM +0200, John Ferlan >&g

Re: [libvirt] [PATCH 01/12] virsh: Force boot emulation is only required for virDomainCreateWithFlags

2018-06-13 Thread Marc Hartmayer
On Wed, Jun 13, 2018 at 12:53 AM +0200, John Ferlan wrote: > On 05/09/2018 10:56 AM, Marc Hartmayer wrote: >> The force boot emulation is only required for virDomainCreateWithFlags >> as the flag VIR_DOMAIN_START_FORCE_BOOT was introduced

Re: [libvirt] [PATCH] qemu: Fix segmentation fault on reconnect

2018-06-08 Thread Marc Hartmayer
On Fri, Jun 08, 2018 at 01:26 PM +0200, Erik Skultety wrote: > On Fri, Jun 08, 2018 at 12:49:07PM +0200, Marc Hartmayer wrote: >> On start up of libvirtd the worker pool of the QEMU driver must be >> initialized before trying to reconnect to all the running QEMU >>

[libvirt] [PATCH] qemu: Fix segmentation fault on reconnect

2018-06-08 Thread Marc Hartmayer
ventpoll.c:657 #13 0x03fffdb3e782 in virEventRunDefaultImpl () at ../../src/util/virevent.c:327 #14 0x03fffdc89400 in virNetDaemonRun (dmn=0x1000b2510) at ../../src/rpc/virnetdaemon.c:850 #15 0x00010002a816 in main (argc=, argv=) at ../../src/remote/remote_daemon.c:1460 Signed-off-

Re: [libvirt] [PATCH 01/12] virsh: Force boot emulation is only required for virDomainCreateWithFlags

2018-06-08 Thread Marc Hartmayer
On Wed, May 09, 2018 at 04:56 PM +0200, Marc Hartmayer wrote: > The force boot emulation is only required for virDomainCreateWithFlags > as the flag VIR_DOMAIN_START_FORCE_BOOT was introduced with the commit > 27c85260532f879be5674a4eed0811c21fd34f94 (2011). But > virDomainCreate

Re: [libvirt] [PATCH 1/2] virTypedParamsSerialize: minor fixes

2018-06-07 Thread Marc Hartmayer
On Wed, May 09, 2018 at 09:51 PM +0200, John Ferlan wrote: > On 05/07/2018 11:24 AM, Marc Hartmayer wrote: >> On Mon, Apr 30, 2018 at 03:20 PM +0200, John Ferlan >> wrote: >>> On 04/25/2018 11:55 AM, Marc Hartmayer wrote: >>>> 1. Don't all

Re: [libvirt] [PATCH 02/12] Introduce new domain create API virDomainCreateWithParams

2018-06-07 Thread Marc Hartmayer
ntext, adding options to edit the various bits makes sense, > so only the "edit -> start -> revert" thing would be needed there. > > WDYT? Wouldn’t be a (new) tool 'virt-start' better for that since virt-xml does only the XML manipulation? Thanks for thinking about it. >

Re: [libvirt] [PATCH v8 00/18] Add support for TPM emulator (for 4.5)

2018-06-04 Thread Marc Hartmayer
ulator-tpm2.xml > create mode 100644 tests/qemuxml2argvdata/tpm-emulator.x86_64-latest.args > create mode 100644 tests/qemuxml2argvdata/tpm-emulator.xml > create mode 100644 tests/qemuxml2xmloutdata/tpm-emulator-tpm2.xml > create mode 100644 tests/qemuxml2xmloutdata/tpm-emulator.xml

Re: [libvirt] [PATCH libvirt v2 1/9] virConnectRegisterCloseCallback: Cleanup 'opaque' if there is no connectRegisterCloseCallback

2018-06-03 Thread Marc Hartmayer
On Fri, Apr 27, 2018 at 02:16 AM +0200, John Ferlan wrote: > On 04/26/2018 12:09 PM, Marc Hartmayer wrote: >> On Thu, Apr 26, 2018 at 05:06 PM +0200, John Ferlan >> wrote: >>> On 04/12/2018 08:40 AM, Marc Hartmayer wrote: >>>> The commit 'close callback: mov

Re: [libvirt] [PATCH 10/12] conf: Add support for choosing emulation of a TPM 2

2018-05-24 Thread Marc Hartmayer
IN_TPM_VERSION_1_2; > +/* only TIS available for emulator */ > +if (def->type == VIR_DOMAIN_TPM_TYPE_EMULATOR) > +def->model = VIR_DOMAIN_TPM_MODEL_TIS; This will silently overwrite an already defined model - is this intended? Also this seems like some kin

Re: [libvirt] [PATCH 02/12] Introduce new domain create API virDomainCreateWithParams

2018-05-16 Thread Marc Hartmayer
On Wed, May 09, 2018 at 05:40 PM +0200, "Daniel P. Berrangé" <berra...@redhat.com> wrote: > On Wed, May 09, 2018 at 04:56:12PM +0200, Marc Hartmayer wrote: >> Introduce new libvirt API virDomainCreateWithParams that allows to >> temporarily boot from another boo

Re: [libvirt] [PATCH python 0/5] Some fixes and one improvement

2018-05-16 Thread Marc Hartmayer
On Wed, May 16, 2018 at 10:54 AM +0200, Michal Privoznik <mpriv...@redhat.com> wrote: > On 05/16/2018 10:24 AM, Marc Hartmayer wrote: >> Boris Fiuczynski (1): >> libvirt-override.py: fix sparseSendAll >> >> Marc Hartmayer (4): >> libvirt_qemu/lxc: imp

[libvirt] [PATCH python 5/5] Allow virConnect to be used as a context manager

2018-05-16 Thread Marc Hartmayer
From: Marc Hartmayer <mhart...@linux.vnet.ibm.com> The libvirt python bindings are now more 'pythonic' as virConnect can now be used as a context manager. For example, it's possible to write the following code: with libvirt.open() as conn: # do something with the connection...

[libvirt] [PATCH python 1/5] libvirt_qemu/lxc: import 'sys' package

2018-05-16 Thread Marc Hartmayer
From: Marc Hartmayer <mhart...@linux.vnet.ibm.com> This fixes the pylint [1] warning "E: 25,16: Undefined variable 'sys' (undefined-variable)". [1] https://www.pylint.org/ Signed-off-by: Marc Hartmayer <mhart...@linux.vnet.ibm.com> Reviewed-by: Boris Fiuczynski <

[libvirt] [PATCH python 4/5] libvirt-override.py: remove unused import

2018-05-16 Thread Marc Hartmayer
From: Marc Hartmayer <mhart...@linux.vnet.ibm.com> Signed-off-by: Marc Hartmayer <mhart...@linux.vnet.ibm.com> Reviewed-by: Boris Fiuczynski <fiu...@linux.vnet.ibm.com> Reviewed-by: Bjoern Walk <bw...@linux.vnet.ibm.com> --- libvirt-override.py | 1 - 1 file changed, 1

[libvirt] [PATCH python 0/5] Some fixes and one improvement

2018-05-16 Thread Marc Hartmayer
Boris Fiuczynski (1): libvirt-override.py: fix sparseSendAll Marc Hartmayer (4): libvirt_qemu/lxc: import 'sys' package libvirt_qemu/lxc: fix a namespace issue libvirt-override.py: remove unused import Allow virConnect to be used as a context manager generator.py | 8

[libvirt] [PATCH python 2/5] libvirt_qemu/lxc: fix a namespace issue

2018-05-16 Thread Marc Hartmayer
From: Marc Hartmayer <mhart...@linux.vnet.ibm.com> Signed-off-by: Marc Hartmayer <mhart...@linux.vnet.ibm.com> Reviewed-by: Bjoern Walk <bw...@linux.vnet.ibm.com> Reviewed-by: Boris Fiuczynski <fiu...@linux.vnet.ibm.com> --- generator.py | 4 ++-- 1 file changed, 2 in

[libvirt] [PATCH python 3/5] libvirt-override.py: fix sparseSendAll

2018-05-16 Thread Marc Hartmayer
From: Boris Fiuczynski <fiu...@linux.vnet.ibm.com> Variable ret is used before assignment. Signed-off-by: Boris Fiuczynski <fiu...@linux.vnet.ibm.com> Signed-off-by: Marc Hartmayer <mhart...@linux.vnet.ibm.com> --- libvirt-override-virStream.py | 2 +- 1 file changed, 1 insert

Re: [libvirt] [PATCH v4 09/11] security: Label the external swtpm with SELinux labels

2018-05-15 Thread Marc Hartmayer
On Tue, May 15, 2018 at 05:50 PM +0200, Stefan Berger <stef...@linux.vnet.ibm.com> wrote: > On 05/15/2018 11:45 AM, Stefan Berger wrote: >> On 05/15/2018 11:38 AM, Marc Hartmayer wrote: >>> On Thu, May 10, 2018 at 11:57 PM +0200, Stefan Berger >>> &

Re: [libvirt] [PATCH v4 09/11] security: Label the external swtpm with SELinux labels

2018-05-15 Thread Marc Hartmayer
gt; + > +if (ret < 0 || exitstatus != 0) { > VIR_ERROR(_("Could not start 'swtpm'. exitstatus: %d " > "stderr: %s"), exitstatus, errbuf); > virReportError(VIR_ERR_INTERNAL_ERROR, Don't we have to set ret to -1 here (for the

Re: [libvirt] [PATCH v4 06/11] qemu: Extend QEMU with external TPM support

2018-05-15 Thread Marc Hartmayer
if (virCommandRun(cmd, ) < 0 || exitstatus != 0) { > +VIR_ERROR(_("Could not start 'swtpm'. exitstatus: %d " > +"stderr: %s"), exitstatus, errbuf); > +virReportError(VIR_ERR_INTERNAL_ERROR, > + _("Cou

Re: [libvirt] [PATCH] virDomainMemoryDefParseXML: Don't leak discard

2018-05-15 Thread Marc Hartmayer
_FREE(tmp); > > /* source */ > if ((node = virXPathNode("./source", ctxt)) && > -- > 2.16.1 > > -- > libvir-list mailing list > libvir-list@redhat.com > https://www.redhat.com/mailman/listinfo/libvir-list > Reviewed-by: Marc Hartma

Re: [libvirt] [PATCH v4 06/11] qemu: Extend QEMU with external TPM support

2018-05-15 Thread Marc Hartmayer
he code? “ if (!vm->persistent) { virReportError(VIR_ERR_OPERATION_INVALID, "%s", _("cannot undefine transient domain")); … ” You’re validating that the domain is not persistent… but your comment says 'not running'. And why are you doing this

Re: [libvirt] [PATCH v4 01/11] conf: Add support for external swtpm TPM emulator to domain XML

2018-05-15 Thread Marc Hartmayer
IR_DOMAIN_TPM_TYPE_EMULATOR: > +VIR_FREE(def->data.emulator.source.data.nix.path); Why do we not need virDomainChrSourceDefFree/virObjectUnref(>data.emulator.source); here? (the same applies to case VIR_DOMAIN_TPM_TYPE_PASSTHROUGH) > +VIR_FREE(def->data.emulator.storag

Re: [libvirt] [PATCH 03/12] Parse domain XML to generate virDomainLoaderDef & virDomainNvramDef.

2018-05-14 Thread Marc Hartmayer
irDomainLoaderDefParseXML(loader_node, def->os.loader) < 0) > +def->os.loader->src = NULL; > +def->os.loader->nvram = NULL; Should be unneeded as VIR_ALLOC used calloc. > +if (virDomainLoaderDefParseXML(loader_node, ctxt, > def->os.loa

[libvirt] [PATCH 03/12] remote: Add support for virDomainCreateWithParams

2018-05-09 Thread Marc Hartmayer
Add support for virDomainCreateWithParams to the remote driver. Signed-off-by: Marc Hartmayer <mhart...@linux.vnet.ibm.com> Reviewed-by: Boris Fiuczynski <fiu...@linux.ibm.com> Reviewed-by: Stefan Zimmermann <s...@linux.ibm.com> --- src/remote/remote_driver.c

[libvirt] [PATCH 05/12] conf: Add functions to change the boot configuration of a domain

2018-05-09 Thread Marc Hartmayer
Add functions for changing the boot configuration of a domain in preparation for upcoming patches. It's possible to change the used kernel, initrd, cmdline, and the used boot device. Signed-off-by: Marc Hartmayer <mhart...@linux.vnet.ibm.com> Reviewed-by: Boris Fiuczynski <fiu...@linu

[libvirt] [PATCH 01/12] virsh: Force boot emulation is only required for virDomainCreateWithFlags

2018-05-09 Thread Marc Hartmayer
and simplifies the function. In addition, it's now easier to extend the function. Signed-off-by: Marc Hartmayer <mhart...@linux.vnet.ibm.com> Reviewed-by: Boris Fiuczynski <fiu...@linux.ibm.com> --- tools/virsh-domain.c | 52 1 file

[libvirt] [PATCH 02/12] Introduce new domain create API virDomainCreateWithParams

2018-05-09 Thread Marc Hartmayer
. Signed-off-by: Marc Hartmayer <mhart...@linux.vnet.ibm.com> Reviewed-by: Stefan Zimmermann <s...@linux.ibm.com> Reviewed-by: Boris Fiuczynski <fiu...@linux.ibm.com> --- include/libvirt/libvirt-domain.h | 37 +++ src/driver-hypervisor.h | 6 sr

<    1   2   3   4   5   >