[libvirt] [PATCH for 3.11 1/2] tests: Drop qemuxml2argv- prefix for qemuxml2argv-*.xml test cases

2017-12-01 Thread Michal Privoznik
These XMLs live in a separate directory, there's no need for them to have a special prefix in addition. It also doesn't play nicely with ':e' completion in Vim, finding proper file based on qemuxml2argvtest.c is also needlessly complicated. The files were renamed using the following commands. From

[libvirt] [PATCH for 3.11 0/2] qemuxml2argvdata: Drop useless prefix for test cases

2017-12-01 Thread Michal Privoznik
The patches are trimmed out a lot to fit the size limit of our list. Anyway, the interesting bits are kept and also you can find the patches at my github: https://github.com/zippy2/libvirt/commits/qemuxml2argvdata If this approach is ACKed, I can continue because some other files suffer the sam

[libvirt] [PATCH for 3.11 2/2] tests: Drop qemuxml2argv- prefix for qemuxml2argv test cases

2017-12-01 Thread Michal Privoznik
Similarly to the previous commit, rename .args files. The files were renamed using the following commands. From qemuxml2argvdata: for i in qemuxml2argv-*.args; do mv $i ${i#qemuxml2argv-}; done and then (to fix broken symlinks) from qemuxml2argvdata and qemuxml2xmloutdata: for i in $(find .

[libvirt] Availability of libvirt-3.10.0 release candidate 2

2017-12-01 Thread Daniel Veillard
Okay, the second release candidate is now tagged in git, signed tarball and rpms have been pushed to the usual location: ftp://libvirt.org/libvirt/ Seems to work fine in my limited testing, Jenkins is still all green at https://ci.centos.org/view/libvirt/ so it looks like we are lining up

Re: [libvirt] Entering freeze for libvirt-3.10.0

2017-12-01 Thread Daniel Veillard
On Fri, Dec 01, 2017 at 11:59:50AM +0100, Peter Krempa wrote: > On Thu, Nov 30, 2017 at 17:13:02 +0100, Peter Krempa wrote: > > On Wed, Nov 29, 2017 at 17:27:40 +0100, Daniel Veillard wrote: > > > As planned yesterday (but a bit late) I tagged Release Candidate 1 > > > in git and pushed the signe

Re: [libvirt] [PATCH 0/2] fix chardev security labels

2017-12-01 Thread Ján Tomko
On Fri, Dec 01, 2017 at 01:54:30PM +0100, Pavel Hrdina wrote: Pavel Hrdina (2): security: introduce virSecurityManager(Set|Restore)ChardevLabel qemu: fix security labeling for attach/detach of char devices src/libvirt_private.syms| 2 ++ src/qemu/qemu_hotplug.c | 10 +++ src

[libvirt] [PATCHv2 4/7] Introduce qemuDomainNamespaceMknodPath

2017-12-01 Thread Ján Tomko
Use this function in qemuDomainNamespaceSetup* functions which only require creating one device. --- src/qemu/qemu_domain.c | 120 +++-- 1 file changed, 26 insertions(+), 94 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index

[libvirt] [PATCHv2 1/7] qemuDomainNamespaceTeardownHostdev: rename path to paths

2017-12-01 Thread Ján Tomko
To match the "things/nthings" pattern used in virDomainDef. --- src/qemu/qemu_domain.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index e8e03134f..1c145365a 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_d

[libvirt] [PATCHv2 7/7] Do not pass driver to qemuDomainNamespace{Setup, Teardown} functions

2017-12-01 Thread Ján Tomko
The underlying function which needs the driver gets it from the passed virDomainObj object anyway. --- src/qemu/qemu_domain.c | 34 -- src/qemu/qemu_domain.h | 30 ++ src/qemu/qemu_driver.c | 2 +- src/qemu/qemu_hotplug.c | 42 +++

[libvirt] [PATCHv2 5/7] Introduce qemuDomainNamespaceUnlinkPaths

2017-12-01 Thread Ján Tomko
Split out the logic of unlinking devices from qemuDomainNamespaceTeardownHostdev for reuse in other functions. --- src/qemu/qemu_domain.c | 55 +++--- 1 file changed, 39 insertions(+), 16 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_

[libvirt] [PATCHv2 6/7] Introduce qemuDomainNamespaceUnlinkPath

2017-12-01 Thread Ján Tomko
Use it in every qemuDomainNamespaceTeardown* function that only wants to unlink one device. --- src/qemu/qemu_domain.c | 117 +++-- 1 file changed, 26 insertions(+), 91 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index ddc9

[libvirt] [PATCHv2 2/7] qemuDomainNamespaceSetupHostdev: rename path to paths

2017-12-01 Thread Ján Tomko
To match the "things/nthings" pattern used in virDomainDef. --- src/qemu/qemu_domain.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 1c145365a..d7f4b3fd7 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_d

[libvirt] [PATCHv2 3/7] Introduce qemuDomainNamespaceMknodPaths

2017-12-01 Thread Ján Tomko
Separate the logic of creating devices from their gathering. Use this new function in qemuDomainNamespaceSetupHostdev and qemuDomainNamespaceSetupDisk. --- src/qemu/qemu_domain.c | 74 ++ 1 file changed, 44 insertions(+), 30 deletions(-) diff --git

[libvirt] [PATCHv2 0/7] Remove some repetitive code from qemuDomainNamespace* functions

2017-12-01 Thread Ján Tomko
Rebased + rename path to paths in one more function. Ján Tomko (7): qemuDomainNamespaceTeardownHostdev: rename path to paths qemuDomainNamespaceSetupHostdev: rename path to paths Introduce qemuDomainNamespaceMknodPaths Introduce qemuDomainNamespaceMknodPath Introduce qemuDomainNamespaceU

Re: [libvirt] [PATCH v3 1/4] tests: qemuxml2argv: Use scsi controller instead of ide in pseries

2017-12-01 Thread Ján Tomko
On Fri, Dec 01, 2017 at 07:31:29PM +0800, Lin Ma wrote: Adding an IDE controller for a machinetype that has no built-in IDE controller, Libvirt will log an error. Currently the machinetype list which returns by qemuDomainMachineHasBuiltinIDE only includes 440fx, malta, sun4u and g3beige. Signed-

Re: [libvirt] [PATCH] apparmor: allow qemu abstraction to read /proc/pid/cmdline

2017-12-01 Thread Jim Fehlig
On 12/01/2017 06:26 AM, Jamie Strandboge wrote: On Thu, 2017-11-30 at 10:43 -0700, Jim Fehlig wrote: Noticed the following denial in audit.log when shutting down an apparmor confined domain type=AVC msg=audit(1512002299.742:131): apparmor="DENIED" operation="open" profile="libvirt-66154842-e926

Re: [libvirt] libvirt 3.9.0 locks (was libvirt 3.5.0 locks)

2017-12-01 Thread Vasiliy Tolstov
I know that libvirt 3.2 does not have this issue, this is last version that i try before this issue (after 3.2 i'm go to 3.5.0) 2017-12-01 16:14 GMT+03:00 Nikolay Shirokovskiy : > On 01.12.2017 15:26, Vasiliy Tolstov wrote: >> Hi again. I'm still try to determine why my libvirtd locks, this is >>

Re: [libvirt] libvirt 3.9.0 locks (was libvirt 3.5.0 locks)

2017-12-01 Thread Vasiliy Tolstov
May be i'm too late check the status, but always when i have such issue virsh says that domain in shutdown state, and qemu process not founded. 2017-12-01 16:10 GMT+03:00 Peter Krempa : > On Fri, Dec 01, 2017 at 15:26:35 +0300, Vasiliy Tolstov wrote: >> Hi again. I'm still try to determine why my

Re: [libvirt] [PATCH jenkins-ci] Make args to 'go test' configurable

2017-12-01 Thread Pavel Hrdina
On Thu, Nov 30, 2017 at 01:17:25PM +, Daniel P. Berrange wrote: > Each module has its own set of tags it may wish to pass to 'go test', > so set it based on an env variable > > Signed-off-by: Daniel P. Berrange > --- > jobs/go.yaml | 2 +- > projects/libvirt-go-xml.yaml | 2 +

Re: [libvirt] [PATCH v3 3/4] qemu_command: Drop IDE validation code in qemuBuildControllerDevStr

2017-12-01 Thread John Ferlan
On 12/01/2017 08:06 AM, Pavel Hrdina wrote: > On Fri, Dec 01, 2017 at 07:31:31PM +0800, Lin Ma wrote: >> The corresponding code will be moved to qemuDomainControllerDefValidate >> by next patch. >> >> Signed-off-by: Lin Ma >> --- >> src/qemu/qemu_command.c | 10 +- >> 1 file changed, 1

Re: [libvirt] [PATCH] apparmor: allow qemu abstraction to read /proc/pid/cmdline

2017-12-01 Thread Jamie Strandboge
On Thu, 2017-11-30 at 10:43 -0700, Jim Fehlig wrote: > Noticed the following denial in audit.log when shutting down > an apparmor confined domain > > type=AVC msg=audit(1512002299.742:131): apparmor="DENIED" > operation="open" profile="libvirt-66154842-e926-4f92-92f0- > 1c1bf61dd1ff" > name="/proc

Re: [libvirt] libvirt 3.9.0 locks (was libvirt 3.5.0 locks)

2017-12-01 Thread Nikolay Shirokovskiy
On 01.12.2017 15:26, Vasiliy Tolstov wrote: > Hi again. I'm still try to determine why my libvirtd locks, this is > another portion of gdb stuff: > https://gist.github.com/vtolstov/ae8c4a67e15b2fbd14bbb95c226fb427 > > error looks in logs like: > Dec 01 12:35:49 cn04 libvirtd[1171]: 2017-12-01 09:3

Re: [libvirt] libvirt 3.9.0 locks (was libvirt 3.5.0 locks)

2017-12-01 Thread Peter Krempa
On Fri, Dec 01, 2017 at 15:26:35 +0300, Vasiliy Tolstov wrote: > Hi again. I'm still try to determine why my libvirtd locks, this is > another portion of gdb stuff: > https://gist.github.com/vtolstov/ae8c4a67e15b2fbd14bbb95c226fb427 > > error looks in logs like: > Dec 01 12:35:49 cn04 libvirtd[117

Re: [libvirt] [PATCH v3 3/4] qemu_command: Drop IDE validation code in qemuBuildControllerDevStr

2017-12-01 Thread Pavel Hrdina
On Fri, Dec 01, 2017 at 07:31:31PM +0800, Lin Ma wrote: > The corresponding code will be moved to qemuDomainControllerDefValidate > by next patch. > > Signed-off-by: Lin Ma > --- > src/qemu/qemu_command.c | 10 +- > 1 file changed, 1 insertion(+), 9 deletions(-) > > diff --git a/src/qem

[libvirt] [PATCH 1/2] security: introduce virSecurityManager(Set|Restore)ChardevLabel

2017-12-01 Thread Pavel Hrdina
SELinux and DAC drivers already have both functions but they were not exported as public API of security manager. Signed-off-by: Pavel Hrdina --- src/libvirt_private.syms| 2 ++ src/security/security_dac.c | 3 +++ src/security/security_driver.h | 11 +++ src/security/secu

[libvirt] [PATCH 2/2] qemu: fix security labeling for attach/detach of char devices

2017-12-01 Thread Pavel Hrdina
Commit e93d844b90 was not enough to fix the permission denied issue. We need to apply security labels as well. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1465833 Signed-off-by: Pavel Hrdina --- src/qemu/qemu_hotplug.c | 10 src/qemu/qemu_security.c | 60 +++

[libvirt] [PATCH 0/2] fix chardev security labels

2017-12-01 Thread Pavel Hrdina
Pavel Hrdina (2): security: introduce virSecurityManager(Set|Restore)ChardevLabel qemu: fix security labeling for attach/detach of char devices src/libvirt_private.syms| 2 ++ src/qemu/qemu_hotplug.c | 10 +++ src/qemu/qemu_security.c| 60 +

Re: [libvirt] [PATCH v3 0/4] Move ide validation from qemuBuildControllerDevStr to qemuDomainDeviceDefValidate

2017-12-01 Thread John Ferlan
On 12/01/2017 06:31 AM, Lin Ma wrote: > Validate IDE controllers in qemuDomainDeviceDefValidate for reminding users > earlier. > > v2->v3: > * split original patch to multiple patches. > * making the validation is preferred over the PostParse for avoiding guests > disappear. > * remove ide fro

[libvirt] libvirt 3.9.0 locks (was libvirt 3.5.0 locks)

2017-12-01 Thread Vasiliy Tolstov
Hi again. I'm still try to determine why my libvirtd locks, this is another portion of gdb stuff: https://gist.github.com/vtolstov/ae8c4a67e15b2fbd14bbb95c226fb427 error looks in logs like: Dec 01 12:35:49 cn04 libvirtd[1171]: 2017-12-01 09:35:49.637+: 28063: error : qemuDomainObjBeginJobInter

[libvirt] [PATCH v3 3/4] qemu_command: Drop IDE validation code in qemuBuildControllerDevStr

2017-12-01 Thread Lin Ma
The corresponding code will be moved to qemuDomainControllerDefValidate by next patch. Signed-off-by: Lin Ma --- src/qemu/qemu_command.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 6a8da1d..2074ff6 100644 -

[libvirt] [PATCH v3 0/4] Move ide validation from qemuBuildControllerDevStr to qemuDomainDeviceDefValidate

2017-12-01 Thread Lin Ma
Validate IDE controllers in qemuDomainDeviceDefValidate for reminding users earlier. v2->v3: * split original patch to multiple patches. * making the validation is preferred over the PostParse for avoiding guests disappear. * remove ide from the pseries and the ccw tests. Lin Ma (4): tests: q

[libvirt] [PATCH v3 4/4] qemu_domain: Error out earlier when configuring IDE controller incorrectly

2017-12-01 Thread Lin Ma
Validate IDE controllers in qemuDomainDeviceDefValidate for reminding users earlier. Signed-off-by: Lin Ma --- src/qemu/qemu_domain.c | 35 ++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index e8e0

[libvirt] [PATCH v3 1/4] tests: qemuxml2argv: Use scsi controller instead of ide in pseries

2017-12-01 Thread Lin Ma
Adding an IDE controller for a machinetype that has no built-in IDE controller, Libvirt will log an error. Currently the machinetype list which returns by qemuDomainMachineHasBuiltinIDE only includes 440fx, malta, sun4u and g3beige. Signed-off-by: Lin Ma --- tests/qemuxml2argvdata/qemuxml2argv-d

[libvirt] [PATCH v3 2/4] tests: qemuhotplugtest: Drop ide controller in ccw

2017-12-01 Thread Lin Ma
Adding an IDE controller for a machinetype that has no built-in IDE controller, libvirt will log an error. Currently the machinetype list which returns by qemuDomainMachineHasBuiltinIDE only includes 440fx, malta, sun4u and g3beige. Signed-off-by: Lin Ma --- tests/qemuhotplugtestdomains/qemuhotp

Re: [libvirt] Entering freeze for libvirt-3.10.0

2017-12-01 Thread Peter Krempa
On Thu, Nov 30, 2017 at 17:13:02 +0100, Peter Krempa wrote: > On Wed, Nov 29, 2017 at 17:27:40 +0100, Daniel Veillard wrote: > > As planned yesterday (but a bit late) I tagged Release Candidate 1 > > in git and pushed the signed tarball and rpms to the usual place: > > > > ftp://libvirt.org/li

Re: [libvirt] [PATCH] apparmor: allow qemu abstraction to read /proc/pid/cmdline

2017-12-01 Thread intrigeri
Hi, Michal Privoznik: > On 11/30/2017 06:43 PM, Jim Fehlig wrote: >> I must admit it is not clear to me why >> /proc//cmdline is read on domain shutdown. > It's result of these qemu patches: > fbe7e3327a8cfa1b08664c2cda7a0a341cf0530a > 7dc9ae4339faa97e89daadb2e1098147ab4aadc8 > Whenever qemu re

Re: [libvirt] [PATCH 3/3] qemuStateInitialize: Don't leak @memoryBackingPath

2017-12-01 Thread Peter Krempa
On Fri, Dec 01, 2017 at 10:09:46 +0100, Michal Privoznik wrote: > ==899== 39 bytes in 1 blocks are definitely lost in loss record 732 of 1,003 > ==899==at 0x4C2AEDF: malloc (vg_replace_malloc.c:299) > ==899==by 0x8B68CE7: vasprintf (in /lib64/libc-2.25.so) > ==899==by 0x55498D2: virVasp

Re: [libvirt] [PATCH 2/3] virDomainDiskBackingStoreParse: Don't leak @idx

2017-12-01 Thread Peter Krempa
On Fri, Dec 01, 2017 at 10:09:45 +0100, Michal Privoznik wrote: > ==1277== 8 bytes in 4 blocks are definitely lost in loss record 39 of 131 > ==1277==at 0x4C2AEDF: malloc (vg_replace_malloc.c:299) > ==1277==by 0x68BBBC8: xmlStrndup (in /usr/lib64/libxml2.so.2.9.4) > ==1277==by 0x53B1DC2

Re: [libvirt] [PATCH 1/3] virDomainDiskSourceNetworkParse: Don't leak @tlsCfg or @haveTLS

2017-12-01 Thread Peter Krempa
On Fri, Dec 01, 2017 at 10:09:44 +0100, Michal Privoznik wrote: > ==861== 3 bytes in 1 blocks are definitely lost in loss record 3 of 168 > ==861==at 0x4C2AEDF: malloc (vg_replace_malloc.c:299) > ==861==by 0x8C7FBC8: xmlStrndup (in /usr/lib64/libxml2.so.2.9.4) > ==861==by 0x5DCCDC2: vir

Re: [libvirt] [PATCH 2/3] conf: Clean up virDomainNumaDefCPUFormatXML

2017-12-01 Thread Michal Privoznik
On 11/24/2017 06:18 PM, John Ferlan wrote: > Don't use a unary comparison for an int value - compare against zero > directly instead. > > Signed-off-by: John Ferlan > --- > src/conf/numa_conf.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/conf/numa_conf.c b/src/c

[libvirt] [PATCH 0/3] Couple of memleak fixes

2017-12-01 Thread Michal Privoznik
Ideally, I'd like to merge these to the release. Michal Privoznik (3): virDomainDiskSourceNetworkParse: Don't leak @tlsCfg or @haveTLS virDomainDiskBackingStoreParse: Don't leak @idx qemuStateInitialize: Don't leak @memoryBackingPath src/conf/domain_conf.c | 3 +++ src/qemu/qemu_driver.c |

[libvirt] [PATCH 2/3] virDomainDiskBackingStoreParse: Don't leak @idx

2017-12-01 Thread Michal Privoznik
==1277== 8 bytes in 4 blocks are definitely lost in loss record 39 of 131 ==1277==at 0x4C2AEDF: malloc (vg_replace_malloc.c:299) ==1277==by 0x68BBBC8: xmlStrndup (in /usr/lib64/libxml2.so.2.9.4) ==1277==by 0x53B1DC2: virXMLPropString (virxml.c:510) ==1277==by 0x53D696A: virDomainDis

[libvirt] [PATCH 3/3] qemuStateInitialize: Don't leak @memoryBackingPath

2017-12-01 Thread Michal Privoznik
==899== 39 bytes in 1 blocks are definitely lost in loss record 732 of 1,003 ==899==at 0x4C2AEDF: malloc (vg_replace_malloc.c:299) ==899==by 0x8B68CE7: vasprintf (in /lib64/libc-2.25.so) ==899==by 0x55498D2: virVasprintfInternal (virstring.c:708) ==899==by 0x55499E7: virAsprintfInte

[libvirt] [PATCH 1/3] virDomainDiskSourceNetworkParse: Don't leak @tlsCfg or @haveTLS

2017-12-01 Thread Michal Privoznik
==861== 3 bytes in 1 blocks are definitely lost in loss record 3 of 168 ==861==at 0x4C2AEDF: malloc (vg_replace_malloc.c:299) ==861==by 0x8C7FBC8: xmlStrndup (in /usr/lib64/libxml2.so.2.9.4) ==861==by 0x5DCCDC2: virXMLPropString (virxml.c:510) ==861==by 0x5DF1232: virDomainDiskSourc

Re: [libvirt] [PATCH 0/3] Adjust some formatting for numa distance code and resolve a memory leak

2017-12-01 Thread Michal Privoznik
On 11/24/2017 06:18 PM, John Ferlan wrote: > While reviewing the recent distance adjustments for Michal, I noted a > couple of minor formatting things as well as a memory leak when removing > the distances. > > John Ferlan (3): > conf: Clean up virDomainNumaDefNodeDistanceParseXML > conf: Clea

Re: [libvirt] [PATCH] apparmor: allow qemu abstraction to read /proc/pid/cmdline

2017-12-01 Thread Michal Privoznik
On 11/30/2017 06:43 PM, Jim Fehlig wrote: > Noticed the following denial in audit.log when shutting down > an apparmor confined domain > > type=AVC msg=audit(1512002299.742:131): apparmor="DENIED" > operation="open" profile="libvirt-66154842-e926-4f92-92f0-1c1bf61dd1ff" > name="/proc/1475/cmdline"