Re: [libvirt] [PATCH] lxc: Do not try to reconnect inactive domain when do lxcStartup

2011-05-03 Thread Osier Yang
于 2011年04月29日 23:11, Eric Blake 写道: On 04/29/2011 01:21 AM, Osier Yang wrote: Otherwise if there are inactive lxc domains, lxcStartup will try to reconnect to sockets of these domains, which results in errors in libvirtd log. --- src/lxc/lxc_driver.c |3 +++ 1 files changed, 3

Re: [libvirt] [PATCH] fix missing VLAN id for Qbg example

2011-05-03 Thread Gerhard Stenzel
On Mon, 2011-05-02 at 12:07 -0400, Laine Stump wrote: Just so I understand correctly - the 802.1Qbg standard requires using a VLAN, but the vepa implementation doesn't have that restriction, so it is still okay for someone using a vepa switch to not use a VLAN. Correct? yes -- Best

Re: [libvirt] [PATCH v2] Fix disability to run on systems with no PCI bus

2011-05-03 Thread Daniel P. Berrange
On Fri, Apr 22, 2011 at 02:24:54PM +0200, Michal Privoznik wrote: The patch which moved libpciaccess initialization to one place caused regression - we were not able to run on system with no PCI bus, like s390(x). --- src/node_device/node_device_udev.c |9 + 1 files changed, 9

[libvirt] [PATCH] spice: support streaming-video parameter

2011-05-03 Thread Alon Levy
This adds a streaming-video=filter|all|off attribute. It is used to change the behavior of video stream detection in spice, the default is filter (the default for libvirt is not to specify it - the actual default is defined in libspice-server.so). Usage: graphics type='spice' autoport='yes'

Re: [libvirt] [PATCH] lxc: Do not try to reconnect inactive domain when do lxcStartup

2011-05-03 Thread Daniel P. Berrange
On Fri, Apr 29, 2011 at 03:21:03PM +0800, Osier Yang wrote: Otherwise if there are inactive lxc domains, lxcStartup will try to reconnect to sockets of these domains, which results in errors in libvirtd log. --- src/lxc/lxc_driver.c |3 +++ 1 files changed, 3 insertions(+), 0

Re: [libvirt] [PATCH] spice: support streaming-video parameter

2011-05-03 Thread Michal Prívozník
On 05/03/2011 03:05 PM, Alon Levy wrote: This adds a streaming-video=filter|all|off attribute. It is used to change the behavior of video stream detection in spice, the default is filter (the default for libvirt is not to specify it - the actual default is defined in libspice-server.so). Usage:

Re: [libvirt] Support for more than 32 virtio devices

2011-05-03 Thread Daniel P. Berrange
On Mon, May 02, 2011 at 08:09:07AM -0700, Badari Pulavarty wrote: Hi, How can I make use of multifunction functionality to support more than 32 virtio devices in QEMU through libvirt ? It isn't supported because it doesn't work with hotplug. Are there corresponding changes in libvirt ? To

[libvirt] [PATCH] Fix security driver handling of FIFOs with QEMU

2011-05-03 Thread Daniel P. Berrange
When setting up a FIFO for QEMU, it allows either a pair of fifos used unidirectionally, or a single fifo used bidirectionally. Look for the bidirectional fifo first when labelling since that is more useful * src/security/security_dac.c, src/security/security_selinux.c: Fix fifo handling ---

Re: [libvirt] [PATCH 1/6] Add new API virDomainStreamDisk[Info] to header and drivers

2011-05-03 Thread Stefan Hajnoczi
On Mon, May 02, 2011 at 04:29:49PM -0500, Adam Litke wrote: typedef enum { /* If set, virDomainBlockAllocate() will return immediately * allowing polling for operation completion status */ VIR_DOMAIN_DISK_STREAM_NONBLOCK, }

Re: [libvirt] [PATCH] tests: suppress more valgrind situations

2011-05-03 Thread Eric Blake
On 05/02/2011 09:36 PM, Daniel Veillard wrote: On Mon, May 02, 2011 at 04:56:53PM -0600, Eric Blake wrote: * tests/.valgrind.supp: Consolidate bash suppressions. Ignore more libnl issues. --- Matthias tested on a debian-based system; I found more issues when testing on Fedora 14. With

Re: [libvirt] [PATCH] lxc: Do not try to reconnect inactive domain when do lxcStartup

2011-05-03 Thread Eric Blake
On 05/03/2011 07:09 AM, Daniel P. Berrange wrote: On Fri, Apr 29, 2011 at 03:21:03PM +0800, Osier Yang wrote: Otherwise if there are inactive lxc domains, lxcStartup will try to reconnect to sockets of these domains, which results in errors in libvirtd log. --- src/lxc/lxc_driver.c |3

Re: [libvirt] [PATCH] Fix security driver handling of FIFOs with QEMU

2011-05-03 Thread Eric Blake
On 05/03/2011 08:41 AM, Daniel P. Berrange wrote: When setting up a FIFO for QEMU, it allows either a pair of fifos used unidirectionally, or a single fifo used bidirectionally. Look for the bidirectional fifo first when labelling since that is more useful * src/security/security_dac.c,

[libvirt] [PATCH] pci: fix null pointer dereference

2011-05-03 Thread Eric Blake
Clang detected a null-pointer dereference regression, introduced in commit 4e8969eb. Without this patch, a device with unbind_from_stub set to false would eventually try to call virFileExists on uncomputed drvdir. * src/util/pci.c (pciUnbindDeviceFromStub): Ensure drvdir is set before use. ---

Re: [libvirt] [PATCH] lxc: Do not try to reconnect inactive domain when do lxcStartup

2011-05-03 Thread Daniel P. Berrange
On Tue, May 03, 2011 at 09:19:59AM -0600, Eric Blake wrote: On 05/03/2011 07:09 AM, Daniel P. Berrange wrote: On Fri, Apr 29, 2011 at 03:21:03PM +0800, Osier Yang wrote: Otherwise if there are inactive lxc domains, lxcStartup will try to reconnect to sockets of these domains, which results

[libvirt] [PATCH] qemu: avoid null pointer dereference

2011-05-03 Thread Eric Blake
This code has had problems historically. As originally written, in commit 6bcf2501 (Jun 08), it could call unlink on a random string, nuking an unrelated file. Then commit 182a80b9 (Sep 09), the code was rewritten to allocate tmp, with both a use-after-free bug and a chance to call unlink(NULL).

Re: [libvirt] [PATCH] lxc: Do not try to reconnect inactive domain when do lxcStartup

2011-05-03 Thread Eric Blake
On 05/03/2011 09:37 AM, Daniel P. Berrange wrote: Osier, can you get this done before 0.9.1, or are we better off reverting commit 0e7f7f85 for the release and resolving this post-release? I vote for reverting it, since the original problem was merely a harmless message in the logs which

[libvirt] [PATCH] tests: avoid null pointer dereference

2011-05-03 Thread Eric Blake
Unlikely to hit in real life, but clang noticed it. * tests/commandtest.c (test4): Avoid unlink(NULL) on OOM. --- Much like a similar patch I sent for qemu_driver, but this time the unlink(NULL) is much harder to trigger. tests/commandtest.c |3 ++- 1 files changed, 2 insertions(+), 1

Re: [libvirt] [PATCH] tests: avoid null pointer dereference

2011-05-03 Thread Daniel P. Berrange
On Tue, May 03, 2011 at 10:38:00AM -0600, Eric Blake wrote: Unlikely to hit in real life, but clang noticed it. * tests/commandtest.c (test4): Avoid unlink(NULL) on OOM. --- Much like a similar patch I sent for qemu_driver, but this time the unlink(NULL) is much harder to trigger.

[libvirt] [PATCH] virsh: avoid null pointer dereference

2011-05-03 Thread Eric Blake
Clang detected that vol-download will call unlink(NULL) if there is a parse error during option parsing. Also, mingw doesn't like unlinking an open file. * tools/virsh.c (cmdVolDownload): Only unlink file if created. --- tools/virsh.c |9 + 1 files changed, 5 insertions(+), 4

Re: [libvirt] [PATCH] qemu: avoid null pointer dereference

2011-05-03 Thread Daniel P. Berrange
On Tue, May 03, 2011 at 09:46:15AM -0600, Eric Blake wrote: This code has had problems historically. As originally written, in commit 6bcf2501 (Jun 08), it could call unlink on a random string, nuking an unrelated file. Then commit 182a80b9 (Sep 09), the code was rewritten to allocate tmp,

Re: [libvirt] [PATCH] pci: fix null pointer dereference

2011-05-03 Thread Daniel P. Berrange
On Tue, May 03, 2011 at 09:34:11AM -0600, Eric Blake wrote: Clang detected a null-pointer dereference regression, introduced in commit 4e8969eb. Without this patch, a device with unbind_from_stub set to false would eventually try to call virFileExists on uncomputed drvdir. * src/util/pci.c

Re: [libvirt] [PATCH] virsh: avoid null pointer dereference

2011-05-03 Thread Daniel P. Berrange
On Tue, May 03, 2011 at 10:45:36AM -0600, Eric Blake wrote: Clang detected that vol-download will call unlink(NULL) if there is a parse error during option parsing. Also, mingw doesn't like unlinking an open file. * tools/virsh.c (cmdVolDownload): Only unlink file if created. ---

Re: [libvirt] [PATCH] tests: avoid null pointer dereference

2011-05-03 Thread Eric Blake
On 05/03/2011 10:42 AM, Daniel P. Berrange wrote: On Tue, May 03, 2011 at 10:38:00AM -0600, Eric Blake wrote: Unlikely to hit in real life, but clang noticed it. * tests/commandtest.c (test4): Avoid unlink(NULL) on OOM. --- cleanup: virCommandFree(cmd); -unlink(pidfile); +

Re: [libvirt] [PATCH] virsh: avoid null pointer dereference

2011-05-03 Thread Eric Blake
On 05/03/2011 10:49 AM, Daniel P. Berrange wrote: On Tue, May 03, 2011 at 10:45:36AM -0600, Eric Blake wrote: Clang detected that vol-download will call unlink(NULL) if there is a parse error during option parsing. Also, mingw doesn't like unlinking an open file. * tools/virsh.c

Re: [libvirt] [PATCH] pci: fix null pointer dereference

2011-05-03 Thread Eric Blake
On 05/03/2011 10:48 AM, Daniel P. Berrange wrote: On Tue, May 03, 2011 at 09:34:11AM -0600, Eric Blake wrote: Clang detected a null-pointer dereference regression, introduced in commit 4e8969eb. Without this patch, a device with unbind_from_stub set to false would eventually try to call

Re: [libvirt] [PATCH] qemu: avoid null pointer dereference

2011-05-03 Thread Eric Blake
On 05/03/2011 10:47 AM, Daniel P. Berrange wrote: On Tue, May 03, 2011 at 09:46:15AM -0600, Eric Blake wrote: This code has had problems historically. As originally written, in commit 6bcf2501 (Jun 08), it could call unlink on a random string, nuking an unrelated file. Then commit 182a80b9

[libvirt] [PATCH] Add support for YAJL version 2 API/ABI

2011-05-03 Thread Daniel P. Berrange
Version 2.0.0 or yajl changed API. It is fairly trivial for us to cope with both APIs in libvirt, so adapt. * configure.ac: Probe for yajl2 API * src/util/json.c: Conditional support for yajl2 API --- configure.ac|8 src/util/json.c | 44

Re: [libvirt] [PATCH] Add support for YAJL version 2 API/ABI

2011-05-03 Thread Eric Blake
On 05/03/2011 11:12 AM, Daniel P. Berrange wrote: Version 2.0.0 or yajl changed API. It is fairly trivial for us to cope with both APIs in libvirt, so adapt. * configure.ac: Probe for yajl2 API * src/util/json.c: Conditional support for yajl2 API +++ b/src/util/json.c @@ -709,7 +709,12 @@

[libvirt] [PATCH] remote: avoid null dereference on error

2011-05-03 Thread Eric Blake
Clang found three instances of uninitialized use of nparams in the cleanup path. Unfortunately, one is a false positive: clang couldn't see that ret-params.params_val is guaranteed to be NULL unless allocated within a function, and that nparams is guaranteed to be assigned prior to the

Re: [libvirt] [PATCH] remote: avoid null dereference on error

2011-05-03 Thread Eric Blake
On 05/03/2011 11:28 AM, Eric Blake wrote: Clang found three instances of uninitialized use of nparams in the cleanup path. Unfortunately, one is a false positive: clang couldn't see that ret-params.params_val is guaranteed to be NULL unless allocated within a function, and that nparams is

[libvirt] [PATCH] storage: avoid null deref and leak on failure

2011-05-03 Thread Eric Blake
Detected by clang. NULL deref added in commit 343a27a (Mar 11), but leak of voldef present since commit 2cd9b2d (Apr 09). * src/storage/storage_driver.c (storageVolumeCreateXML): Don't leak voldef or dereference null volobj. --- src/storage/storage_driver.c |4 +++- 1 files changed, 3

[libvirt] [PATCH] esx: avoid null dereference on error

2011-05-03 Thread Eric Blake
Detected by clang. * src/esx/esx_driver.c (esxDomainGetInfo): Fail early on error. --- src/esx/esx_driver.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c index 1f8f90b..e929208 100644 --- a/src/esx/esx_driver.c +++

[libvirt] [PATCH] qemu: silence clang false positives

2011-05-03 Thread Eric Blake
Clang 2.8 wasn't quite able to follow that persistentDef was assigned earlier if (flags VIR_DOMAIN_MEM_CONFIG) is true. Silence this false positive, to make clang analysis easier to use. * src/qemu/qemu_driver.c (qemudDomainSetMemoryFlags): Add an annotation to silence clang's claim of a NULL

[libvirt] [PATCH] qemu: update qemuCgroupControllerActive signature

2011-05-03 Thread Eric Blake
Clang warned about a dead assignment. In the process, I noticed that we are only using the function for a bool value. I audited all other callers in qemu_{migration,cgroup,driver,hotplug), and all were making the call in a bool context. * src/qemu/qemu_cgroup.c (qemuSetupCgroup): Delete dead

[libvirt] [PATCH] util: remove dead assignment

2011-05-03 Thread Eric Blake
Clang complained about this, and it was easy enough to fix. * src/util/util.c (virFileOpenAs): Drop dead assignment. --- src/util/util.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/src/util/util.c b/src/util/util.c index 37472bb..9041ab6 100644 ---

Re: [libvirt] Problem with libvirt on Fedora 14 with virt-preview repo

2011-05-03 Thread Laine Stump
On 05/03/2011 04:16 PM, Scott Dowdle wrote: Greetings, I wasn't sure who to report this to... and I did a bugzilla search and didn't find anything... and I'm not sure where to report this to... since it isn't Fedora 14 exactly since I'm using the virt-preview repo. I *think* the best place

[libvirt] [PATCH] lxc: report correct error

2011-05-03 Thread Eric Blake
Clang noticed a dead assignment, which turned out to be the use of the wrong variable. rc starts life as -1, and is only ever assigned to 0 just before a successful cleanup. * src/lxc/lxc_driver.c (lxcSetupInterfaces): Don't call virReportSystemError(-1). --- src/lxc/lxc_driver.c |3 +-- 1

[libvirt] [PATCH] qemu: remove dead assignment

2011-05-03 Thread Eric Blake
Detected by clang. * src/qemu/qemu_migration.c (qemuMigrationToFile): Nothing later uses is_reg. --- src/qemu/qemu_migration.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 7f4b111..6c5bf66 100644 ---

Re: [libvirt] Problem with libvirt on Fedora 14 with virt-preview repo

2011-05-03 Thread Scott Dowdle
Greetings, - Original Message from Laine Stump - I'm not familiar with that part of the code, but it looks like the cert check happens if listen_tls = 1, which is its default value. You can disable it by uncommenting listen_tls=0 in /etc/libvirt/libvirtd.conf. I'm not sure what

[libvirt] [PATCH] cgroup: avoid leaking a file

2011-05-03 Thread Eric Blake
Clang detected a dead store to rc. It turns out that in fixing this, I also found a FILE* leak. * src/util/cgroup.c (virCgroupKillInternal): Abort rather than resuming loop on fscanf failure, and cleanup file on error. --- As a bonus, this also fixes a decl-after-statement for fp.

[libvirt] libvirt tracking of hung/stopped QEMU VMs

2011-05-03 Thread Ryan Harper
I've encountered an interesting scenario: 1. define a guest via virsh define xml 2 start this guest via virsh 3. one of the disk elements is a multipath device that is currently misconfigured such that any io to the device hangs the calling process 4. libvirt times out when attemping to

[libvirt] [PATCH] storage: use virCommand to avoid compiler warning

2011-05-03 Thread Eric Blake
clang didn't like the last increment to nargs. But why even track nargs ourselves, when virCommand does it for us? * src/storage/storage_backend_iscsi.c (virStorageBackendISCSIConnection): Switch to virCommand to avoid a dead-store warning on nargs. --- src/storage/storage_backend_iscsi.c |

[libvirt] [PATCH] esx: remove dead store

2011-05-03 Thread Eric Blake
Detected by clang. * src/esx/esx_util.c (esxUtil_ParseDatastorePath): No need to increment. --- src/esx/esx_util.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/esx/esx_util.c b/src/esx/esx_util.c index 9ef947c..640e984 100644 --- a/src/esx/esx_util.c +++

Re: [libvirt] Support for more than 32 virtio devices

2011-05-03 Thread Anthony Liguori
On 05/03/2011 09:33 AM, Daniel P. Berrange wrote: On Mon, May 02, 2011 at 08:09:07AM -0700, Badari Pulavarty wrote: Hi, How can I make use of multifunction functionality to support more than 32 virtio devices in QEMU through libvirt ? It isn't supported because it doesn't work with hotplug.

[libvirt] failure to build on rawhide

2011-05-03 Thread Eric Blake
I'm getting this when trying to build libvirt on rawhide (using the package gnutls-devel-2.12.3-1.fc16.x86_64): remote/remote_driver.c: In function 'negotiate_gnutls_on_connection': remote/remote_driver.c:1361:9: error: 'gnutls_certificate_type_set_priority' is deprecated (declared at

Re: [libvirt] libvirt tracking of hung/stopped QEMU VMs

2011-05-03 Thread Ryan Harper
* Ryan Harper ry...@us.ibm.com [2011-05-03 16:57]: I've encountered an interesting scenario: 1. define a guest via virsh define xml 2 start this guest via virsh 3. one of the disk elements is a multipath device that is currently misconfigured such that any io to the device hangs the

Re: [libvirt] [PATCH] lxc: Do not try to reconnect inactive domain when do lxcStartup

2011-05-03 Thread Osier Yang
于 2011年05月04日 00:11, Eric Blake 写道: On 05/03/2011 09:37 AM, Daniel P. Berrange wrote: Osier, can you get this done before 0.9.1, or are we better off reverting commit 0e7f7f85 for the release and resolving this post-release? I vote for reverting it, since the original problem was merely a

Re: [libvirt] failure to build on rawhide

2011-05-03 Thread Daniel Veillard
On Tue, May 03, 2011 at 05:33:11PM -0600, Eric Blake wrote: I'm getting this when trying to build libvirt on rawhide (using the package gnutls-devel-2.12.3-1.fc16.x86_64): remote/remote_driver.c: In function 'negotiate_gnutls_on_connection': remote/remote_driver.c:1361:9: error:

Re: [libvirt] [PATCH] storage: use virCommand to avoid compiler warning

2011-05-03 Thread Laine Stump
On 05/03/2011 06:14 PM, Eric Blake wrote: clang didn't like the last increment to nargs. But why even track nargs ourselves, when virCommand does it for us? * src/storage/storage_backend_iscsi.c (virStorageBackendISCSIConnection): Switch to virCommand to avoid a dead-store warning on nargs.

Re: [libvirt] [PATCH] esx: remove dead store

2011-05-03 Thread Laine Stump
On 05/03/2011 06:17 PM, Eric Blake wrote: Detected by clang. * src/esx/esx_util.c (esxUtil_ParseDatastorePath): No need to increment. --- src/esx/esx_util.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/esx/esx_util.c b/src/esx/esx_util.c index

Re: [libvirt] [PATCH] lxc: report correct error

2011-05-03 Thread Laine Stump
On 05/03/2011 05:04 PM, Eric Blake wrote: Clang noticed a dead assignment, which turned out to be the use of the wrong variable. rc starts life as -1, and is only ever assigned to 0 just before a successful cleanup. * src/lxc/lxc_driver.c (lxcSetupInterfaces): Don't call

Re: [libvirt] [PATCH] util: remove dead assignment

2011-05-03 Thread Laine Stump
On 05/03/2011 04:29 PM, Eric Blake wrote: Clang complained about this, and it was easy enough to fix. * src/util/util.c (virFileOpenAs): Drop dead assignment. --- src/util/util.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/src/util/util.c b/src/util/util.c

Re: [libvirt] [PATCH] qemu: update qemuCgroupControllerActive signature

2011-05-03 Thread Laine Stump
On 05/03/2011 04:22 PM, Eric Blake wrote: Clang warned about a dead assignment. In the process, I noticed that we are only using the function for a bool value. I audited all other callers in qemu_{migration,cgroup,driver,hotplug), and all were making the call in a bool context. *

Re: [libvirt] [PATCH] esx: avoid null dereference on error

2011-05-03 Thread Laine Stump
On 05/03/2011 03:10 PM, Eric Blake wrote: Detected by clang. * src/esx/esx_driver.c (esxDomainGetInfo): Fail early on error. --- src/esx/esx_driver.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c index 1f8f90b..e929208

Re: [libvirt] [PATCH] storage: avoid null deref and leak on failure

2011-05-03 Thread Laine Stump
On 05/03/2011 01:58 PM, Eric Blake wrote: Detected by clang. NULL deref added in commit 343a27a (Mar 11), but leak of voldef present since commit 2cd9b2d (Apr 09). * src/storage/storage_driver.c (storageVolumeCreateXML): Don't leak voldef or dereference null volobj. ---