[libvirt] [libvirt-php][PATCH] screenshot of remote host is available

2011-06-02 Thread warp . kawada
screenshot of remote host is available. get_domain_object make so many error to message log, so you had better not use . diff --git a/examples/libvirt.php b/examples/libvirt.php index 1ca71b6..bf903f6 100644 --- a/examples/libvirt.php +++ b/examples/libvirt.php @@ -29,9 +29,9 @@ } function

Re: [libvirt] [PATCH] Fix netdev detection on RHEL6x versions of qemu

2011-06-02 Thread Neil Wilson
On Wed, 2011-06-01 at 13:38 -0600, Eric Blake wrote: Meanwhile, as to your question about the libvirt testsuit including RHEL qemu -help output: that merely proves that libvirt is properly parsing the available -help output, and not that libvirt is inferring any special properties of RHEL

[libvirt] [PATCH] Use VIR_USE_CPU instead of new wheel

2011-06-02 Thread Osier Yang
* src/libxl/libxl_driver.c * src/qemu/qemu_process.c --- src/libxl/libxl_driver.c |7 ++- src/qemu/qemu_process.c | 13 ++--- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c index 3491f40..aaab044 100644 ---

[libvirt] [PATCH] docs: Add doc for video element

2011-06-02 Thread Osier Yang
For backwards compatability, if no video is set but there is a graphics tag, then we add a default video according to the guest type. Add docs to tell the user about this to not make them confused. Especially if they remove the video (such as via virsh edit), it will be surprised for them to see

[libvirt] [PATCH] virsh: Document nodeinfo output

2011-06-02 Thread Jiri Denemark
--- tools/virsh.pod |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/tools/virsh.pod b/tools/virsh.pod index 9251db6..1f41652 100644 --- a/tools/virsh.pod +++ b/tools/virsh.pod @@ -235,7 +235,9 @@ Print the XML representation of the hypervisor sysinfo, if available.

Re: [libvirt] [PATCH] Fix QEMU XML-2-ARGV graphics-spice-timeout test

2011-06-02 Thread Daniel P. Berrange
On Wed, Jun 01, 2011 at 02:26:54PM -0600, Eric Blake wrote: On 06/01/2011 10:13 AM, Matthias Bolte wrote: The test used an emulator that is not supported in testutilsqemu.c. Swicth from qemu-kvm to kvm to fix this. --- This patch addresses the problem discussed here:

[libvirt] [PATCH] Fix handling of VIR_EVENT_HANDLE_ERROR in QEMU monitor

2011-06-02 Thread Daniel P. Berrange
Commit 4454a9efc728b91e791b1f14c26ea23a19d57f48 introduced bad behaviour on the VIR_EVENT_HANDLE_ERROR condition. This condition is only hit when an invalid FD is used in poll() (typically due to a double-close bug). The QEMU monitor code was treating this condition as non-fatal, and thus libvirt

[libvirt] [PATCH] Add call to sanlock_restrict() in QEMU lock driver

2011-06-02 Thread Daniel P. Berrange
In between fork and exec, a connection to sanlock is acquired and the socket file descriptor is intionally leaked to the child process. sanlock watches this FD for POLL_HANGUP to detect when QEMU has exited. We don't want a rogus/compromised QEMU from issuing sanlock RPC calls on the leaked FD

[libvirt] [PATCH v3] screenshot: Expose the new API in virsh

2011-06-02 Thread Michal Privoznik
* tools/virsh.c: Add screenshot command * tools/virsh.pod: Document new command * src/libvirt.c: Fix off-be-one error --- diff to v1: - make filename optional and generate filename when missing diff to v2: - Eric's review suggestions included src/libvirt.c |2 +- tools/virsh.c | 187

Re: [libvirt] [PATCH] build: avoid corrupting / in RHEL 5

2011-06-02 Thread Daniel P. Berrange
On Wed, Jun 01, 2011 at 11:52:00AM -0600, Eric Blake wrote: I noticed this while building from libvirt.git on RHEL 5.6: Generating internals/command.html.tmp mkdir: cannot create directory `/internals': Permission denied If I had been building as root instead, this pollutes /. Older

Re: [libvirt] [PATCH] build: avoid corrupting / in RHEL 5

2011-06-02 Thread Eric Blake
On 06/02/2011 05:26 AM, Daniel P. Berrange wrote: I've seen a strange build error from autobuild.sh which I'm thinking may be related to this patch Generating drivers.html.tmp Stubbing todo.html.in Generating internals/locking.html.tmp Generating internals/command.html.tmp There's no

Re: [libvirt] [PATCH 0/2] libxl driver additions

2011-06-02 Thread Daniel Veillard
On Wed, Jun 01, 2011 at 12:55:32PM +0200, Markus Groß wrote: I know it is very late for 0.9.2 but perhabs we could squeeze these patches in (then the version numbers of the functions in patch 2 have to be changed to 0.9.2). Markus Groß (2): Get maximum memory of running domain in libxl

Re: [libvirt] [PATCH] build: avoid corrupting / in RHEL 5

2011-06-02 Thread Daniel P. Berrange
On Thu, Jun 02, 2011 at 05:48:39AM -0600, Eric Blake wrote: On 06/02/2011 05:26 AM, Daniel P. Berrange wrote: I've seen a strange build error from autobuild.sh which I'm thinking may be related to this patch Generating drivers.html.tmp Stubbing todo.html.in Generating

Re: [libvirt] [PATCH v3] screenshot: Expose the new API in virsh

2011-06-02 Thread Daniel Veillard
On Thu, Jun 02, 2011 at 01:26:22PM +0200, Michal Privoznik wrote: * tools/virsh.c: Add screenshot command * tools/virsh.pod: Document new command * src/libvirt.c: Fix off-be-one error --- diff to v1: - make filename optional and generate filename when missing diff to v2: - Eric's review

Re: [libvirt] [PATCH] Fix handling of VIR_EVENT_HANDLE_ERROR in QEMU monitor

2011-06-02 Thread Daniel Veillard
On Thu, Jun 02, 2011 at 11:52:10AM +0100, Daniel P. Berrange wrote: Commit 4454a9efc728b91e791b1f14c26ea23a19d57f48 introduced bad behaviour on the VIR_EVENT_HANDLE_ERROR condition. This condition is only hit when an invalid FD is used in poll() (typically due to a double-close bug). The QEMU

Re: [libvirt] [PATCH] Add call to sanlock_restrict() in QEMU lock driver

2011-06-02 Thread Daniel Veillard
On Thu, Jun 02, 2011 at 11:52:57AM +0100, Daniel P. Berrange wrote: In between fork and exec, a connection to sanlock is acquired and the socket file descriptor is intionally leaked to the child process. sanlock watches this FD for POLL_HANGUP to detect when QEMU has exited. We don't want a

Re: [libvirt] [PATCH v3] screenshot: Expose the new API in virsh

2011-06-02 Thread Michal Prívozník
On 02.06.2011 14:55, Daniel Veillard wrote: On Thu, Jun 02, 2011 at 01:26:22PM +0200, Michal Privoznik wrote: * tools/virsh.c: Add screenshot command * tools/virsh.pod: Document new command * src/libvirt.c: Fix off-be-one error --- diff to v1: - make filename optional and generate filename

[libvirt] Libvirt 0.9.2 week freeze, RC2 available

2011-06-02 Thread Daniel Veillard
I just pushed a second release candidate ftp://libvirt.org/libvirt/libvirt-0.9.2-rc2.tar.gz with corresponding rpm builds, this includes the extrenal lock support. On Wed, Jun 01, 2011 at 12:49:52PM +0200, Ruben Kerkhof wrote: On Wed, Jun 1, 2011 at 10:31, Matthias Bolte

Re: [libvirt] Libvirt 0.9.2 week freeze, RC2 available

2011-06-02 Thread Ruben Kerkhof
On Thu, Jun 2, 2011 at 15:05, Daniel Veillard veill...@redhat.com wrote:  I just pushed a second release candidate    ftp://libvirt.org/libvirt/libvirt-0.9.2-rc2.tar.gz with corresponding rpm builds, this includes the extrenal lock support. On Wed, Jun 01, 2011 at 12:49:52PM +0200, Ruben

[libvirt] [PATCH] Make sure virDomainSave/virDomainManagedSave reset id to -1

2011-06-02 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com After successfull virDomainSave/virDomainManagedSave calls the guest will no longer be active, so the domain ID must be reset to -1 * daemon/remote_generator.pl: Special case virDomainSave virDomainManagedSave for same reason as virDomainDestroy

[libvirt] [PATCH] Fix return value in lock manager hotplug methods

2011-06-02 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Refactoring of the lock manager hotplug methods lost the ret = 0 assignment for successful return path * src/locking/domain_lock.c: Add missing ret = 0 assignments --- src/locking/domain_lock.c |8 1 files changed, 8 insertions(+), 0

[libvirt] [PATCH] Avoid crash on NULL pointer in lock driver impls during hotplug

2011-06-02 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com When virLockDriverAcquire is invoked during hotplug the state parameter will be left as NULL. * src/locking/lock_driver_nop.c, src/locking/lock_driver_sanlock.c: Don't reference NULL state parameter --- src/locking/lock_driver_nop.c |7

[libvirt] [PATCH] Fix auditing of disk hotunplug operations

2011-06-02 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com The qemuAuditDisk calls in disk hotunplug operations were being passed 'ret = 0', but the code which sets ret to 0 was not yet executed, and the error path had already jumped to the 'cleanup' label. This meant hotunplug failures were never audited, and

[libvirt] [PATCH] Fix error reporting with virDomainBlockStats on inactive guest

2011-06-02 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Pull the check on virDomainIsActive upto top of the QEMU impl of virDomainBlockStats so that is is reported promptly * src/qemu/qemu_driver.c: Check if guest is active immediately --- src/qemu/qemu_driver.c |6 ++ 1 files changed, 6

Re: [libvirt] [PATCH] build: avoid corrupting / in RHEL 5

2011-06-02 Thread Eric Blake
On 06/02/2011 06:35 AM, Daniel P. Berrange wrote: On Thu, Jun 02, 2011 at 05:48:39AM -0600, Eric Blake wrote: On 06/02/2011 05:26 AM, Daniel P. Berrange wrote: I've seen a strange build error from autobuild.sh which I'm thinking may be related to this patch Generating drivers.html.tmp

Re: [libvirt] Libvirt 0.9.2 week freeze, RC2 available

2011-06-02 Thread Eric Blake
On 06/02/2011 07:45 AM, Ruben Kerkhof wrote: If people could also try -rc2 it would be great too, thanks ! Daniel Still works on OSX. This time I had to remove the --with-openvz option from the Homebrew formula. Why were you using --with-openvz in the first place? Does OpenVZ work on

Re: [libvirt] [PATCH] Fix return value in lock manager hotplug methods

2011-06-02 Thread Eric Blake
On 06/02/2011 07:57 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Refactoring of the lock manager hotplug methods lost the ret = 0 assignment for successful return path * src/locking/domain_lock.c: Add missing ret = 0 assignments ---

Re: [libvirt] [PATCH] Make sure virDomainSave/virDomainManagedSave reset id to -1

2011-06-02 Thread Eric Blake
On 06/02/2011 07:57 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com After successfull virDomainSave/virDomainManagedSave calls the guest will no longer be active, so the domain ID must be reset to -1 * daemon/remote_generator.pl: Special case virDomainSave

Re: [libvirt] Libvirt 0.9.2 week freeze, RC2 available

2011-06-02 Thread Ruben Kerkhof
Hi Eric, On Thu, Jun 2, 2011 at 16:06, Eric Blake ebl...@redhat.com wrote: Why were you using --with-openvz in the first place? You have to ask Justin, I used his Homebrew formula :-). It's always been in there I think. Does OpenVZ work on OSX, in which case commit e85a602b represents a

Re: [libvirt] [PATCH] Avoid crash on NULL pointer in lock driver impls during hotplug

2011-06-02 Thread Eric Blake
On 06/02/2011 07:58 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com When virLockDriverAcquire is invoked during hotplug the state parameter will be left as NULL. * src/locking/lock_driver_nop.c, src/locking/lock_driver_sanlock.c: Don't reference NULL state

Re: [libvirt] [PATCH] Fix auditing of disk hotunplug operations

2011-06-02 Thread Eric Blake
On 06/02/2011 07:58 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com The qemuAuditDisk calls in disk hotunplug operations were being passed 'ret = 0', but the code which sets ret to 0 was not yet executed, and the error path had already jumped to the 'cleanup'

Re: [libvirt] [PATCH] Fix error reporting with virDomainBlockStats on inactive guest

2011-06-02 Thread Eric Blake
On 06/02/2011 07:58 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Pull the check on virDomainIsActive upto top of the QEMU s/upto/up to/ impl of virDomainBlockStats so that is is reported promptly * src/qemu/qemu_driver.c: Check if guest is active immediately

Re: [libvirt] Building on Solaris 11 Express

2011-06-02 Thread Ruben Kerkhof
Hi Matthias, On Sun, May 29, 2011 at 12:34, Matthias Bolte matthias.bo...@googlemail.com wrote: That's strange, configure should automatically disable the Xen driver if it can't find the required headers and libs. The only way I can see from the logic in configure is that configure found

[libvirt] [PATCH] Explicitly set VM state to paused after migration completes

2011-06-02 Thread Daniel P. Berrange
In v3 migration, once migration is completed, the VM needs to be left in a paused state until after Finish3 has been executed on the target. Only then will the VM be killed off. When using non-JSON QEMU monitor though, we don't receive any 'STOP' event from QEMU, so we need to manually set our

Re: [libvirt] [PATCHv2] docs: document iface-* commands

2011-06-02 Thread Laine Stump
On 05/31/2011 04:43 PM, Eric Blake wrote: I intentionally set things up so 'virsh help interface' lists commands in alphabetical order, but 'man virsh' lists them in topical order; this matches our practice on some other commands. * tools/virsh.pod: Document all iface commands. * tools/virsh.c

Re: [libvirt] [PATCH] Fix error reporting with virDomainBlockStats on inactive guest

2011-06-02 Thread Daniel P. Berrange
On Thu, Jun 02, 2011 at 08:26:50AM -0600, Eric Blake wrote: On 06/02/2011 07:58 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Pull the check on virDomainIsActive upto top of the QEMU s/upto/up to/ impl of virDomainBlockStats so that is is reported

[libvirt] [PATCH] Fix regressions BlockStats/Info APIs in QEMU driver

2011-06-02 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com The change 18c2a592064d69499f70428e498f4a3cb5161cda caused some regressions in behaviour of virDomainBlockStats and virDomainBlockInfo in the QEMU driver. The virDomainBlockInfo API stopped working for inactive guests if querying a block device. The

[libvirt] [PATCH] to correct UML command line networking parameters

2011-06-02 Thread Heath Petersen
I have been finding that some UML command line networking parameters are being generated incorrectly. Attached is a patch that corrects the problem. For more information, see https://bugzilla.redhat.com/show_bug.cgi?id=706295 . diff -Naur libvirt-0.9.1.orig/src/uml/uml_conf.c

Re: [libvirt] [PATCH] Explicitly set VM state to paused after migration completes

2011-06-02 Thread Eric Blake
On 06/02/2011 09:42 AM, Daniel P. Berrange wrote: In v3 migration, once migration is completed, the VM needs to be left in a paused state until after Finish3 has been executed on the target. Only then will the VM be killed off. When using non-JSON QEMU monitor though, we don't receive any

Re: [libvirt] [PATCH] Fix regressions BlockStats/Info APIs in QEMU driver

2011-06-02 Thread Eric Blake
On 06/02/2011 10:03 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com The change 18c2a592064d69499f70428e498f4a3cb5161cda caused some regressions in behaviour of virDomainBlockStats and virDomainBlockInfo in the QEMU driver. The virDomainBlockInfo API stopped

[libvirt] [PATCH 0/7] lxc: Improve container startup error reporting

2011-06-02 Thread Cole Robinson
Currently most LXC container startup failures result in a reported success followed immediately by a guest shutoff. This patch series tries to improve the situation by adding a basic handshake from driver-controller and controller-container. If the handshake fails, the driver will return the

[libvirt] [PATCH 5/7] lxc: controller: Improve container error reporting

2011-06-02 Thread Cole Robinson
Add a handshake with the cloned container process to try and detect if it fails to start. Signed-off-by: Cole Robinson crobi...@redhat.com --- src/lxc/lxc_container.c | 18 ++ src/lxc/lxc_container.h |1 + src/lxc/lxc_controller.c | 17 + 3 files

[libvirt] [PATCH 2/7] lxc: Don't report error in Wait/SendContinue

2011-06-02 Thread Cole Robinson
We will reuse these shortly, and each use should have a different error message. Signed-off-by: Cole Robinson crobi...@redhat.com --- src/lxc/lxc_container.c | 15 ++- src/lxc/lxc_controller.c |5 - 2 files changed, 10 insertions(+), 10 deletions(-) diff --git

[libvirt] [PATCH 3/7] lxc: Refactor controller command building

2011-06-02 Thread Cole Robinson
Arranges things similar to the qemu driver. Will allow us to more easilly report command error output. Signed-off-by: Cole Robinson crobi...@redhat.com --- src/lxc/lxc_driver.c | 74 ++--- 1 files changed, 39 insertions(+), 35 deletions(-) diff

[libvirt] [PATCH 7/7] lxc: Ensure container init actually exists

2011-06-02 Thread Cole Robinson
Since we can't really get useful error reporting from virCommandExec since it needs to be the last thing we do. Signed-off-by: Cole Robinson crobi...@redhat.com --- src/lxc/lxc_container.c |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/src/lxc/lxc_container.c

[libvirt] [PATCH 4/7] lxc: Improve guest startup error reporting

2011-06-02 Thread Cole Robinson
Add a simple handshake with the lxc_controller process so we can detect process startup failures. We do this by adding a new --handshake cli arg to lxc_controller for passing a file descriptor. If the process fails to launch, we scrape all output from the logfile and report it to the user.

[libvirt] [PATCH 6/7] lxc: Verify root fs exists before mounting

2011-06-02 Thread Cole Robinson
Otherwise the following virFileMakePath will create the directory for us and fail further ahead, which probably isn't intended. Signed-off-by: Cole Robinson crobi...@redhat.com --- src/lxc/lxc_controller.c |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git

Re: [libvirt] [PATCH] to correct UML command line networking parameters

2011-06-02 Thread Eric Blake
On 06/02/2011 10:23 AM, Heath Petersen wrote: I have been finding that some UML command line networking parameters are being generated incorrectly. Attached is a patch that corrects the problem. For more information, see https://bugzilla.redhat.com/show_bug.cgi?id=706295 . Thanks for the

Re: [libvirt] [PATCHv2] docs: document iface-* commands

2011-06-02 Thread Eric Blake
On 06/02/2011 09:56 AM, Laine Stump wrote: On 05/31/2011 04:43 PM, Eric Blake wrote: I intentionally set things up so 'virsh help interface' lists commands in alphabetical order, but 'man virsh' lists them in topical order; this matches our practice on some other commands. * tools/virsh.pod:

Re: [libvirt] [Qemu-devel] QMP: RFC: I/O error info query-stop-reason

2011-06-02 Thread Anthony Liguori
On 06/02/2011 02:13 PM, Luiz Capitulino wrote: On Thu, 02 Jun 2011 13:33:52 -0500 Anthony Liguorianth...@codemonkey.ws wrote: On 06/02/2011 01:09 PM, Luiz Capitulino wrote: On Thu, 02 Jun 2011 13:00:04 -0500 Anthony Liguorianth...@codemonkey.ws wrote: On 06/02/2011 12:57 PM, Luiz

Re: [libvirt] [PATCH 1/7] lxc: Drop container stdio as late as possible

2011-06-02 Thread Eric Blake
On 06/02/2011 01:40 PM, Cole Robinson wrote: Makes it more likely we get useful error output in the logs Signed-off-by: Cole Robinson crobi...@redhat.com --- src/lxc/lxc_container.c | 29 - 1 files changed, 16 insertions(+), 13 deletions(-) ACK; however, this

Re: [libvirt] [PATCH 2/7] lxc: Don't report error in Wait/SendContinue

2011-06-02 Thread Eric Blake
On 06/02/2011 01:40 PM, Cole Robinson wrote: We will reuse these shortly, and each use should have a different error message. Signed-off-by: Cole Robinson crobi...@redhat.com --- src/lxc/lxc_container.c | 15 ++- src/lxc/lxc_controller.c |5 - 2 files changed, 10

Re: [libvirt] [Qemu-devel] QMP: RFC: I/O error info query-stop-reason

2011-06-02 Thread Eric Blake
On 06/02/2011 02:03 PM, Anthony Liguori wrote: { event: BLOCK_IO_ERROR, data: { device: ide0-hd1, operation: write, action: stop, reason: enospc, } I'm ok with either way. But in case you meant the second one, I guess we should

Re: [libvirt] [PATCH 3/7] lxc: Refactor controller command building

2011-06-02 Thread Eric Blake
On 06/02/2011 01:40 PM, Cole Robinson wrote: Arranges things similar to the qemu driver. Will allow us to more easilly s/easilly/easily/ report command error output. Signed-off-by: Cole Robinson crobi...@redhat.com --- src/lxc/lxc_driver.c | 74

Re: [libvirt] [PATCH 4/7] lxc: Improve guest startup error reporting

2011-06-02 Thread Eric Blake
On 06/02/2011 01:40 PM, Cole Robinson wrote: Add a simple handshake with the lxc_controller process so we can detect process startup failures. We do this by adding a new --handshake cli arg to lxc_controller for passing a file descriptor. If the process fails to launch, we scrape all output

Re: [libvirt] [PATCH 5/7] lxc: controller: Improve container error reporting

2011-06-02 Thread Eric Blake
On 06/02/2011 01:40 PM, Cole Robinson wrote: Add a handshake with the cloned container process to try and detect if it fails to start. Signed-off-by: Cole Robinson crobi...@redhat.com --- src/lxc/lxc_container.c | 18 ++ src/lxc/lxc_container.h |1 +

Re: [libvirt] [PATCH 6/7] lxc: Verify root fs exists before mounting

2011-06-02 Thread Eric Blake
On 06/02/2011 01:40 PM, Cole Robinson wrote: Otherwise the following virFileMakePath will create the directory for us and fail further ahead, which probably isn't intended. Signed-off-by: Cole Robinson crobi...@redhat.com --- src/lxc/lxc_controller.c |8 1 files changed, 8

Re: [libvirt] [PATCH 7/7] lxc: Ensure container init actually exists

2011-06-02 Thread Eric Blake
On 06/02/2011 01:40 PM, Cole Robinson wrote: Since we can't really get useful error reporting from virCommandExec since it needs to be the last thing we do. Signed-off-by: Cole Robinson crobi...@redhat.com --- src/lxc/lxc_container.c |7 +++ 1 files changed, 7 insertions(+), 0

Re: [libvirt] [Qemu-devel] QMP: RFC: I/O error info query-stop-reason

2011-06-02 Thread Anthony Liguori
On 06/02/2011 03:13 PM, Eric Blake wrote: On 06/02/2011 02:03 PM, Anthony Liguori wrote: { event: BLOCK_IO_ERROR, data: { device: ide0-hd1, operation: write, action: stop, reason: enospc, } I'm ok with either way. But in case

Re: [libvirt] [PATCH 2/2] Add managedSave support to libxl driver

2011-06-02 Thread Jim Fehlig
Markus Groß wrote: --- src/libxl/libxl_driver.c | 353 -- 1 files changed, 276 insertions(+), 77 deletions(-) diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c index 61c3494..9bcc3b9 100644 --- a/src/libxl/libxl_driver.c +++

[libvirt] [PATCH] Fix minor issues in libxenlight managed save

2011-06-02 Thread Jim Fehlig
There were a few minor issues in commit 5b6c961e - leak managed save path - leak managed save fd - functions that open an fd should also close it --- src/libxl/libxl_driver.c | 30 -- 1 files changed, 20 insertions(+), 10 deletions(-) diff --git

Re: [libvirt] [PATCH] Fix minor issues in libxenlight managed save

2011-06-02 Thread Eric Blake
On 06/02/2011 04:04 PM, Jim Fehlig wrote: There were a few minor issues in commit 5b6c961e - leak managed save path - leak managed save fd - functions that open an fd should also close it --- src/libxl/libxl_driver.c | 30 -- 1 files changed, 20 insertions(+),

Re: [libvirt] [PATCH] Fix minor issues in libxenlight managed save

2011-06-02 Thread Jim Fehlig
Eric Blake wrote: On 06/02/2011 04:04 PM, Jim Fehlig wrote: There were a few minor issues in commit 5b6c961e - leak managed save path - leak managed save fd - functions that open an fd should also close it --- src/libxl/libxl_driver.c | 30 -- 1 files

[libvirt] [PATCH 03/10] storage: avoid memory leak

2011-06-02 Thread Eric Blake
Coverity detected that options was being set by strdup but never freed. But why even bother with an options variable? The options parameter never changes! Leak present since commit 44948f5b (0.7.0). This function could probably be rewritten to take better advantage of virCommand, but that is

[libvirt] [PATCH 02/10] libvirtd: avoid leak on failure

2011-06-02 Thread Eric Blake
Spotted by Coverity. Only possible on an OOM condition, so unlikely to bite in the wild. * daemon/libvirtd.c (qemudSetLogging): Don't leak memory. --- daemon/libvirtd.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/daemon/libvirtd.c b/daemon/libvirtd.c index

[libvirt] [PATCH 00/10] coverity cleanups, round 1

2011-06-02 Thread Eric Blake
Coverity reported a number of bugs against libvirt. I ran out of time to get through them all today, but there are certainly some real doozies in here. I've blamed commits where non-trivial bugs were introduced, to help distros decide if things need back-porting (I think that leaks on OOM

[libvirt] [PATCH 01/10] command: avoid leak on failure

2011-06-02 Thread Eric Blake
Detected by Coverity. While it is possible on OOM condition, as well as with bad code that passes binary == NULL, it is unlikely to be encountered in the wild. * src/util/command.c (virCommandNewArgList): Don't leak memory. --- src/util/command.c |2 +- 1 files changed, 1 insertions(+), 1

[libvirt] [PATCH 05/10] lock: avoid leak on failure

2011-06-02 Thread Eric Blake
Detected by Coverity. Only possible on OOM situations. * src/locking/lock_manager.c (virLockManagerPluginNew): Plug leak. --- src/locking/lock_manager.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/src/locking/lock_manager.c b/src/locking/lock_manager.c index

[libvirt] [PATCH 06/10] remote: avoid leak on failure

2011-06-02 Thread Eric Blake
Detected by Coverity. Only possible in OOM situations. * daemon/remote.c (remoteDispatchDomainScreenshot): Plug leak. --- daemon/remote.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/daemon/remote.c b/daemon/remote.c index 2a32ee8..49058f2 100644 ---

[libvirt] [PATCH 07/10] qemu: avoid memory leak on vcpupin

2011-06-02 Thread Eric Blake
Detected by Coverity. This leaked a cpumap on every iteration of the loop. Leak introduced in commit 1cc4d02 (v0.9.0). * src/qemu/qemu_process.c (qemuProcessSetVcpuAffinites): Plug leak, and hoist allocation outside loop. --- src/qemu/qemu_process.c | 21 + 1 files

[libvirt] [PATCH 08/10] event: avoid memory leak on cleanup

2011-06-02 Thread Eric Blake
Detected by Coverity. Introduced in commit aaf2b70, and turned into a regression in the next few commits through 4e6e6672 (unreleased). * src/conf/domain_event.c (virDomainEventStateFree): Free object, per documentation. --- src/conf/domain_event.c |3 ++- 1 files changed, 2 insertions(+),

[libvirt] [PATCH 09/10] build: silence coverity false positive

2011-06-02 Thread Eric Blake
Coverity complained that infd could be -1 at the point where it is passed to write, when in reality, this code can only be reached if infd is non-negative. * src/util/command.c (virCommandProcessIO): Help out coverity. --- src/util/command.c |3 +++ 1 files changed, 3 insertions(+), 0

[libvirt] [PATCH 10/10] build: silence coverity false positive

2011-06-02 Thread Eric Blake
* src/remote/remote_driver.c (remoteGenericOpen): Help coverity. --- src/remote/remote_driver.c |7 ++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c index 14c3d24..fcb4c14 100644 --- a/src/remote/remote_driver.c +++

[libvirt] [PATCHv2 10/10] build: silence coverity false positive

2011-06-02 Thread Eric Blake
Coverity couldn't see that priv is clean on failure. But on failure, we might as well guarantee that callers don't try to free uninitialized memory. * src/remote/remote_driver.c (remoteGenericOpen): Even on failure, pass priv back to caller. --- In reading my own mail, I decided that patch 10

[libvirt] [PATCH 11/10] migrate: detect xml incompatibility

2011-06-02 Thread Eric Blake
Detected by Coverity. Bug introduced in 08106e2044 (unreleased). * src/conf/domain_conf.c (virDomainChannelDefCheckABIStability): Use correct sizeof operand. --- src/conf/domain_conf.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/src/conf/domain_conf.c

Re: [libvirt] Building on Solaris 11 Express

2011-06-02 Thread Ruben Kerkhof
On Mon, May 30, 2011 at 08:52, Matthias Bolte matthias.bo...@googlemail.com wrote: 2011/5/30 Ruben Kerkhof ru...@rubenkerkhof.com: On Sun, May 29, 2011 at 19:45, Matthias Bolte matthias.bo...@googlemail.com wrote: 2011/5/29 Richard Laager rlaa...@wiktel.com: On Sun, 2011-05-29 at 12:34 +0200,

Re: [libvirt] [PATCH] Fix minor issues in libxenlight managed save

2011-06-02 Thread Daniel Veillard
On Thu, Jun 02, 2011 at 04:04:40PM -0600, Jim Fehlig wrote: There were a few minor issues in commit 5b6c961e - leak managed save path - leak managed save fd - functions that open an fd should also close it Oops, thanks for quickly checking this out ! Daniel -- Daniel Veillard |

Re: [libvirt] [PATCH 01/10] command: avoid leak on failure

2011-06-02 Thread Daniel Veillard
On Thu, Jun 02, 2011 at 05:07:53PM -0600, Eric Blake wrote: Detected by Coverity. While it is possible on OOM condition, as well as with bad code that passes binary == NULL, it is unlikely to be encountered in the wild. * src/util/command.c (virCommandNewArgList): Don't leak memory. ---

Re: [libvirt] [PATCH 02/10] libvirtd: avoid leak on failure

2011-06-02 Thread Daniel Veillard
On Thu, Jun 02, 2011 at 05:07:54PM -0600, Eric Blake wrote: Spotted by Coverity. Only possible on an OOM condition, so unlikely to bite in the wild. * daemon/libvirtd.c (qemudSetLogging): Don't leak memory. --- daemon/libvirtd.c |4 +++- 1 files changed, 3 insertions(+), 1

Re: [libvirt] [PATCH 03/10] storage: avoid memory leak

2011-06-02 Thread Daniel Veillard
On Thu, Jun 02, 2011 at 05:07:55PM -0600, Eric Blake wrote: Coverity detected that options was being set by strdup but never freed. But why even bother with an options variable? The options parameter never changes! Leak present since commit 44948f5b (0.7.0). This function could probably

Re: [libvirt] [PATCH 04/10] storage: avoid memory leak on stat failure

2011-06-02 Thread Daniel Veillard
On Thu, Jun 02, 2011 at 05:07:56PM -0600, Eric Blake wrote: Spotted by coverity. Triggers on failed stat, although I'm not sure how easy that condition is, so I'm not sure if this is a runtime memory hog. Regression introduced in commit 8077d64 (unreleased). * src/util/storage_file.c

Re: [libvirt] [PATCH 05/10] lock: avoid leak on failure

2011-06-02 Thread Daniel Veillard
On Thu, Jun 02, 2011 at 05:07:57PM -0600, Eric Blake wrote: Detected by Coverity. Only possible on OOM situations. * src/locking/lock_manager.c (virLockManagerPluginNew): Plug leak. --- src/locking/lock_manager.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git

Re: [libvirt] [PATCH 06/10] remote: avoid leak on failure

2011-06-02 Thread Daniel Veillard
On Thu, Jun 02, 2011 at 05:07:58PM -0600, Eric Blake wrote: Detected by Coverity. Only possible in OOM situations. * daemon/remote.c (remoteDispatchDomainScreenshot): Plug leak. --- daemon/remote.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/daemon/remote.c

Re: [libvirt] [PATCH 07/10] qemu: avoid memory leak on vcpupin

2011-06-02 Thread Daniel Veillard
On Thu, Jun 02, 2011 at 05:07:59PM -0600, Eric Blake wrote: Detected by Coverity. This leaked a cpumap on every iteration of the loop. Leak introduced in commit 1cc4d02 (v0.9.0). * src/qemu/qemu_process.c (qemuProcessSetVcpuAffinites): Plug leak, and hoist allocation outside loop. ---

Re: [libvirt] [PATCH 08/10] event: avoid memory leak on cleanup

2011-06-02 Thread Daniel Veillard
On Thu, Jun 02, 2011 at 05:08:00PM -0600, Eric Blake wrote: Detected by Coverity. Introduced in commit aaf2b70, and turned into a regression in the next few commits through 4e6e6672 (unreleased). * src/conf/domain_event.c (virDomainEventStateFree): Free object, per documentation. ---

[libvirt] [PATCH v2 3/3] Update qemuDomainSetBlkioParameters to use flags

2011-06-02 Thread Hu Tao
--- src/qemu/qemu_driver.c | 126 ++-- 1 files changed, 90 insertions(+), 36 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 7b855d6..edefb5a 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -4694,14

[libvirt] [PATCH v2 0/3] add support for changing blkio parameters for inactive domains

2011-06-02 Thread Hu Tao
This series enables user to change blkio parameters for inactive domains from virsh command line. CHANGES: v1-v2: - unify PARAM_CONFIG/PARAM_LIVE/PARAM_CURRENT Hu Tao (3): unify PARAM_CURRENT/PARAM_LIVE/PARAM_CONFIG flags update qemuDomainGetBlkioParameters to use flags Update

[libvirt] [PATCH v2 1/3] unify PARAM_CURRENT/PARAM_LIVE/PARAM_CONFIG flags

2011-06-02 Thread Hu Tao
This patch unify the PARAM_CURRENT/PARAM_LIVE/PARAM_CONFIG flags as Daniel Veillard suggested. --- include/libvirt/libvirt.h.in | 58 - src/esx/esx_driver.c | 10 +- src/libvirt.c|4 +- src/openvz/openvz_driver.c | 10 +- src/qemu/qemu_driver.c

[libvirt] [PATCH v2 2/3] update qemuDomainGetBlkioParameters to use flags

2011-06-02 Thread Hu Tao
--- src/qemu/qemu_driver.c | 124 +--- 1 files changed, 86 insertions(+), 38 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 43bb0fc..7b855d6 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -4773,18

Re: [libvirt] [PATCH 09/10] build: silence coverity false positive

2011-06-02 Thread Daniel Veillard
On Thu, Jun 02, 2011 at 05:08:01PM -0600, Eric Blake wrote: Coverity complained that infd could be -1 at the point where it is passed to write, when in reality, this code can only be reached if infd is non-negative. * src/util/command.c (virCommandProcessIO): Help out coverity. ---

Re: [libvirt] [PATCHv2 10/10] build: silence coverity false positive

2011-06-02 Thread Daniel Veillard
On Thu, Jun 02, 2011 at 05:24:25PM -0600, Eric Blake wrote: Coverity couldn't see that priv is clean on failure. But on failure, we might as well guarantee that callers don't try to free uninitialized memory. * src/remote/remote_driver.c (remoteGenericOpen): Even on failure, pass priv back

Re: [libvirt] [PATCH 11/10] migrate: detect xml incompatibility

2011-06-02 Thread Daniel Veillard
On Thu, Jun 02, 2011 at 05:42:27PM -0600, Eric Blake wrote: Detected by Coverity. Bug introduced in 08106e2044 (unreleased). * src/conf/domain_conf.c (virDomainChannelDefCheckABIStability): Use correct sizeof operand. --- src/conf/domain_conf.c |3 ++- 1 files changed, 2