Re: [libvirt] [PATCH v2 0/5] Introduce virDomainMigrateSetMaxDowntime API

2010-03-22 Thread Jiri Denemark
This API call sets maximum tolerable time for which the domain is allowed to be paused at the end of live migration. It's supposed to be called while the domain is being live-migrated as a reaction to migration progress. Changes in version 3: - use milliseconds instead of

Re: [libvirt] Bug 526913 - libvirt does not lock disk files

2010-03-22 Thread Daniel P. Berrange
On Fri, Mar 19, 2010 at 04:21:43PM -0400, Ric Foster wrote: https://bugzilla.redhat.com/show_bug.cgi?id=526913 Will this bug get fixed? I had hoped the using CLVM would keep the guest disk image from getting corrupted if a running guest was inadvertently started on another cluster node.

Re: [libvirt] [PATCH 1/14] Adding recursive locks

2010-03-22 Thread Paolo Bonzini
On 03/18/2010 06:04 PM, Eric Blake wrote: ACK. I had to double-check MSDN to make sure that threads-win32 already creates recursive mutex by default. I don't supposed you read if its possible to make it non-recursive, since the orginal impl is supposed to be non-recursive !

Re: [libvirt] [PATCH Java] Add finalize to automatically free libvirt objects

2010-03-22 Thread Bryan Kearney
Committed. Thank you! -- bk On 03/20/2010 03:18 PM, Matthias Bolte wrote: The Connect and Network classes already had finalize, add it to all other classes that wrap libvirt objects to unify the behavior. --- src/main/java/org/libvirt/Device.java |5 +

Re: [libvirt] [PATCH 01/13] Introduce a new public API for domain events

2010-03-22 Thread Daniel Veillard
On Fri, Mar 19, 2010 at 03:38:49PM +, Daniel P. Berrange wrote: The current API for domain events has a number of problems - Only allows for domain lifecycle change events - Does not allow the same callback to be registered multiple times - Does not allow filtering of events to a

Re: [libvirt] [PATCH] dont't crash in virsh dominfo domain

2010-03-22 Thread Guido Günther
On Thu, Mar 18, 2010 at 02:48:46PM +0100, Daniel Veillard wrote: On Wed, Mar 17, 2010 at 09:11:07PM +0100, Guido Günther wrote: Hi, virsh dominfo domain crashes with: #0 strlen () at ../sysdeps/i386/i486/strlen.S:69 #1 0x080891c9 in qemudNodeGetSecurityModel (conn=0x8133940,

Re: [libvirt] [PATCH 02/13] Make internal domain events struct definitions private

2010-03-22 Thread Daniel Veillard
On Fri, Mar 19, 2010 at 03:38:50PM +, Daniel P. Berrange wrote: The virtual box driver was directly accesing the domain events structs instead of using the APIs provided. To prevent this kind of abuse, make the struct definitions private, forcing use of the internal APIs. This requires

Re: [libvirt] [PATCH 03/13] Refactor domain events to handle multiple event types

2010-03-22 Thread Daniel Veillard
On Fri, Mar 19, 2010 at 03:38:51PM +, Daniel P. Berrange wrote: The internal domain events APIs are designed to handle the lifecycle events. This needs to be refactored to allow arbitrary new event types to be handled. * The signature of virDomainEventDispatchFunc changes to use

Re: [libvirt] [PATCH 04/13] Add new internal domain events APIs for handling other event types

2010-03-22 Thread Daniel Veillard
On Fri, Mar 19, 2010 at 03:38:52PM +, Daniel P. Berrange wrote: The current internal domain events API tracks callbacks based on the function pointer, and only supports lifecycle events. This adds new internal APIs for registering callbacks for other event types. These new APIs are

[libvirt] [PATCH] security: selinux: Fix crash when releasing non-existent label

2010-03-22 Thread Cole Robinson
This can be triggered by the qemuStartVMDaemon cleanup path if a VM references a non-existent USB device (by product) in the XML. Signed-off-by: Cole Robinson crobi...@redhat.com --- src/security/security_selinux.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git

Re: [libvirt] [PATCH] tests: Don't add extra padding if counter mod 40 is 0

2010-03-22 Thread Daniel P. Berrange
On Sat, Mar 20, 2010 at 06:14:44PM +0100, Matthias Bolte wrote: --- tests/test-lib.sh | 10 ++ tests/testutils.c |2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/tests/test-lib.sh b/tests/test-lib.sh index 43265f3..57fd438 100644 --- a/tests/test-lib.sh

Re: [libvirt] [PATCH] esx: Generate method mappings via macros

2010-03-22 Thread Daniel P. Berrange
On Mon, Mar 22, 2010 at 01:53:50AM +0100, Matthias Bolte wrote: This is actually a consequence of the reworked required parameter checking: Unify the required parameter check into a Validate function instead of doing it separately im the (de)serialization part. The required parameter

Re: [libvirt] [PATCH] esx: Cleanup file header comments

2010-03-22 Thread Daniel P. Berrange
On Mon, Mar 22, 2010 at 01:55:05AM +0100, Matthias Bolte wrote: Replace 'method' with 'function' and get the filename's suffix right. --- src/esx/esx_device_monitor.c |2 +- src/esx/esx_driver.c |4 ++-- src/esx/esx_driver.h |4 ++--

Re: [libvirt] [PATCH] esx: Add esxVI_LookupVirtualMachineByName

2010-03-22 Thread Daniel P. Berrange
On Mon, Mar 22, 2010 at 01:56:46AM +0100, Matthias Bolte wrote: Used in esxDomainLookupByName and to be used in esxDomainDefineXML later. --- src/esx/esx_driver.c | 66 + src/esx/esx_vi.c | 72

Re: [libvirt] [PATCH 02/15] Make sure uid_t and gid_t are available

2010-03-22 Thread Daniel P. Berrange
On Mon, Mar 22, 2010 at 02:25:32AM +0100, Matthias Bolte wrote: --- configure.ac |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/configure.ac b/configure.ac index 654b9a8..1a3c788 100644 --- a/configure.ac +++ b/configure.ac @@ -61,6 +61,7 @@ gl_INIT

Re: [libvirt] [PATCH] esx: Fix potential memory leak in esxVI_BuildFullTraversalSpecItem

2010-03-22 Thread Daniel P. Berrange
On Mon, Mar 22, 2010 at 01:55:45AM +0100, Matthias Bolte wrote: If esxVI_String_DeepCopyValue or esxVI_SelectionSpec_AppendToList fail then selectionSpec would leak. Add a free call in the failure path to fix the leak. --- src/esx/esx_vi.c |4 ++-- 1 files changed, 2 insertions(+), 2

Re: [libvirt] [PATCH 01/15] gnulib: Add usleep for MinGW builds

2010-03-22 Thread Daniel P. Berrange
On Mon, Mar 22, 2010 at 02:25:31AM +0100, Matthias Bolte wrote: --- bootstrap.conf |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/bootstrap.conf b/bootstrap.conf index 157092f..fb862ad 100644 --- a/bootstrap.conf +++ b/bootstrap.conf @@ -56,6 +56,7 @@ strsep

Re: [libvirt] [PATCH 04/15] Remove interfaceRegister from libvirt_private.syms

2010-03-22 Thread Daniel P. Berrange
On Mon, Mar 22, 2010 at 02:25:34AM +0100, Matthias Bolte wrote: This symbol is conditional, it would need to be exported conditional to work properly with MinGW. So just remove it, as no other driver register function is listed in the symbols files. --- src/libvirt_private.syms |4

Re: [libvirt] [PATCH 03/15] Export conditional state driver symbols only when they are defined

2010-03-22 Thread Daniel P. Berrange
On Mon, Mar 22, 2010 at 02:25:33AM +0100, Matthias Bolte wrote: This is necessary for MinGW builds. --- src/Makefile.am |7 ++- src/libvirt_daemon.syms | 10 ++ src/libvirt_private.syms |5 - 3 files changed, 16 insertions(+), 6 deletions(-) create mode

Re: [libvirt] [PATCH 05/15] Fix export of virConnectAuthPtrDefault for MinGW builds

2010-03-22 Thread Daniel P. Berrange
On Mon, Mar 22, 2010 at 02:25:35AM +0100, Matthias Bolte wrote: Use the __declspec(dllexport/dllimport) stuff to export the symbol, otherwise accessing virConnectAuthPtrDefault triggers a segfault. --- configure.ac | 11 +++ docs/apibuild.py |1 +

Re: [libvirt] [PATCH 06/15] Generate libvirt.def from libvirt.syms

2010-03-22 Thread Daniel P. Berrange
On Mon, Mar 22, 2010 at 02:25:36AM +0100, Matthias Bolte wrote: The MinGW linker needs the libvirt.def file. --- configure.ac|5 + src/.gitignore |1 + src/Makefile.am | 15 +++ 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/src/Makefile.am

Re: [libvirt] [PATCH 07/15] virsh: Handle absence of SA_SIGINFO

2010-03-22 Thread Daniel P. Berrange
On Mon, Mar 22, 2010 at 02:25:37AM +0100, Matthias Bolte wrote: MinGW and gnulib don't provide SA_SIGINFO on Windows. --- tools/virsh.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/tools/virsh.c b/tools/virsh.c index 32895b2..1c932bd 100644 ---

Re: [libvirt] [PATCH 09/15] util: Make some conditional symbols unconditional

2010-03-22 Thread Daniel P. Berrange
On Mon, Mar 22, 2010 at 02:25:39AM +0100, Matthias Bolte wrote: Add dummy bodies for HAVE_GETPWUID_R and HAVE_MNTENT_H dependent functions for MinGW builds. --- src/util/util.c | 54 -- src/util/util.h |4 2 files changed, 52

Re: [libvirt] [PATCH 11/15] util: Handle lack of (f)chmod and (f)chown on Windows

2010-03-22 Thread Daniel P. Berrange
On Mon, Mar 22, 2010 at 02:25:41AM +0100, Matthias Bolte wrote: Even if gnulib can provide stubs, it won't help that much. So just replace affected util functions (virFileOperation and virDirCreate) with stubs on Windows. Both functions aren't used on libvirt's client side, so this is fine for

Re: [libvirt] [PATCH 08/15] Make sure virtTestCaptureProgramOutput has a body on Windows

2010-03-22 Thread Daniel P. Berrange
On Mon, Mar 22, 2010 at 02:25:38AM +0100, Matthias Bolte wrote: Now the virsh tests compile at least. --- tests/testutils.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/tests/testutils.c b/tests/testutils.c index 8764673..4f17e51 100644 ---

Re: [libvirt] [PATCH 10/15] bootstrap: Remove rsync from buildreq list

2010-03-22 Thread Daniel P. Berrange
On Mon, Mar 22, 2010 at 02:25:40AM +0100, Matthias Bolte wrote: rsync is used to download .po files, but SKIP_PO=true is set and downloading .po files is skipped. This also fixes a problem with MinGW builds, because rsync is not available for MinGW. --- bootstrap.conf |1 - 1 files

Re: [libvirt] [PATCH 13/15] util: Replace pciWaitForDeviceCleanup with a stub on Windows

2010-03-22 Thread Daniel P. Berrange
On Mon, Mar 22, 2010 at 02:25:43AM +0100, Matthias Bolte wrote: sscanf doesn't support the L modifier on Windows and gnulib has no replacement for the scanf functions. Just replace the function with a stub on Windows, because it's not used on the libvirt client side. --- src/util/pci.c |

Re: [libvirt] [PATCH 14/15] Add HAVE_PTHREAD_H guard for pthread_sigmask

2010-03-22 Thread Daniel P. Berrange
On Mon, Mar 22, 2010 at 02:25:44AM +0100, Matthias Bolte wrote: Correctly disable pthread related code if pthread is not avialable, in order to get it compile with MinGW on Windows. --- src/remote/remote_driver.c |6 ++ src/util/util.c| 10 ++ 2 files changed,

Re: [libvirt] [PATCH 12/15] bootstrap: Enable copy-mode for MinGW builds

2010-03-22 Thread Daniel P. Berrange
On Mon, Mar 22, 2010 at 02:25:42AM +0100, Matthias Bolte wrote: MSYS' ln doesn't work well in the way bootstrap uses it with relative paths. --- bootstrap.conf |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/bootstrap.conf b/bootstrap.conf index

Re: [libvirt] [PATCH] Avoid libvirtd crash when cgroups is not configured on host

2010-03-22 Thread Daniel P. Berrange
On Sun, Mar 21, 2010 at 08:07:15PM -0600, Jim Fehlig wrote: Patch for libvirtd segfault discussed on IRC recently ... Regards, Jim commit f034c0bfd7089ba3400b7a44b97540c4a8785e35 Author: Jim Fehlig jfeh...@novell.com Date: Sun Mar 21 19:59:13 2010 -0600 Avoid libvirtd crash

Re: [libvirt] [PATCH 15/15] util: Add stubs for some functions on Windows

2010-03-22 Thread Daniel P. Berrange
On Mon, Mar 22, 2010 at 02:25:45AM +0100, Matthias Bolte wrote: virSetCloseExec and virExecDaemonize were missing a body on Windows. --- src/util/util.c | 34 ++ 1 files changed, 30 insertions(+), 4 deletions(-) ACK Daniel -- |: Red Hat, Engineering,

Re: [libvirt] [PATCH] security: selinux: Fix crash when releasing non-existent label

2010-03-22 Thread Daniel P. Berrange
On Mon, Mar 22, 2010 at 10:48:32AM -0400, Cole Robinson wrote: This can be triggered by the qemuStartVMDaemon cleanup path if a VM references a non-existent USB device (by product) in the XML. Signed-off-by: Cole Robinson crobi...@redhat.com --- src/security/security_selinux.c |3 ++-

Re: [libvirt] [PATCH] security: selinux: Fix crash when releasing non-existent label

2010-03-22 Thread Cole Robinson
On 03/22/2010 11:05 AM, Daniel P. Berrange wrote: On Mon, Mar 22, 2010 at 10:48:32AM -0400, Cole Robinson wrote: This can be triggered by the qemuStartVMDaemon cleanup path if a VM references a non-existent USB device (by product) in the XML. Signed-off-by: Cole Robinson crobi...@redhat.com

Re: [libvirt] [PATCH 05/13] Support new event register/deregister APis in all drivers except remote

2010-03-22 Thread Daniel Veillard
On Fri, Mar 19, 2010 at 03:38:53PM +, Daniel P. Berrange wrote: The libvirtd daemon impl will need to switch over to using the new event APIs. To make this simpler, ensure all drivers currently providing events support both the new APIs and old APIs. ACK, quite a bit of reformatting

Re: [libvirt] [PATCH 06/13] Remote driver daemon impl of new event API

2010-03-22 Thread Daniel Veillard
On Fri, Mar 19, 2010 at 03:38:54PM +, Daniel P. Berrange wrote: This wires up the remote driver to handle the new events APIs. The public API allows an application to request a callback filters events to a specific domain object, and register multiple callbacks for the same event type. On

Re: [libvirt] [PATCH] Avoid libvirtd crash when cgroups is not configured on host

2010-03-22 Thread Jim Fehlig
Daniel P. Berrange wrote: On Sun, Mar 21, 2010 at 08:07:15PM -0600, Jim Fehlig wrote: commit f034c0bfd7089ba3400b7a44b97540c4a8785e35 Author: Jim Fehlig jfeh...@novell.com Date: Sun Mar 21 19:59:13 2010 -0600 Avoid libvirtd crash when cgroups is not configured on host

Re: [libvirt] [PATCH 07/13] Convert domain events example to new API

2010-03-22 Thread Daniel Veillard
On Fri, Mar 19, 2010 at 03:38:55PM +, Daniel P. Berrange wrote: Convert the domain events example program to use the new events APIs for one of its callback registrations to demo the new API and interoperability with the old API. * examples/domain-events/events-c/event-test.c: Convert to

Re: [libvirt] [PATCH 08/13] Rename domain lifecycle event message

2010-03-22 Thread Daniel Veillard
On Fri, Mar 19, 2010 at 03:38:56PM +, Daniel P. Berrange wrote: To avoid confusion, rename the current REMOTE_PROC_DOMAIN_EVENT message to REMOTE_PROC_DOMAIN_EVENT_LIFECYCLE. This does not cause ABI problems, since the names are only relevant at the source code level. On the wire they

Re: [libvirt] [PATCH] tests: Don't add extra padding if counter mod 40 is 0

2010-03-22 Thread Eric Blake
On 03/20/2010 11:14 AM, Matthias Bolte wrote: if test $verbose = 0 ; then mod=`eval expr \( $counter + 1 \) % 40` -for i in `seq $mod 40` -do - echo -n -done +if test $mod != 0 -a $mod != 1 ; then test cond1 -a cond2 is not portable. Use test cond1 test

Re: [libvirt] [PATCH 09/13] Add support for an explicit guest reboot event

2010-03-22 Thread Daniel Veillard
On Fri, Mar 19, 2010 at 03:38:57PM +, Daniel P. Berrange wrote: The reboot event is not a normal lifecycle event, since the virtual machine on the host does not change state. Rather the guest OS is resetting the virtual CPUs. ie, the QEMU process does not restart. Thus, this does not

Re: [libvirt] [PATCH 12/13] Add support for an explicit IO error event

2010-03-22 Thread Eric Blake
On 03/19/2010 09:39 AM, Daniel P. Berrange wrote: This introduces a new event type VIR_DOMAIN_EVENT_ID_IO_ERROR This event includes the action that is about to be taken as a result of the watchdog triggering typedef enum { VIR_DOMAIN_EVENT_IO_ERROR_NONE = 0,

Re: [libvirt] [PATCH 13/13] Add domain events for graphics network clients

2010-03-22 Thread Eric Blake
On 03/19/2010 09:39 AM, Daniel P. Berrange wrote: This introduces a new event type VIR_DOMAIN_EVENT_ID_GRAPHICS The same event can be emitted in 3 scenarioes s/scenarioes/scenarios/ typedef enum { VIR_DOMAIN_EVENT_GRAPHICS_CONNECT = 0,

Re: [libvirt] [PATCH 01/15] gnulib: Add usleep for MinGW builds

2010-03-22 Thread Eric Blake
On 03/22/2010 08:54 AM, Daniel P. Berrange wrote: On Mon, Mar 22, 2010 at 02:25:31AM +0100, Matthias Bolte wrote: --- bootstrap.conf |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/bootstrap.conf b/bootstrap.conf index 157092f..fb862ad 100644 --- a/bootstrap.conf

Re: [libvirt] [PATCH 10/13] Add support for an explicit RTC change event

2010-03-22 Thread Daniel Veillard
On Fri, Mar 19, 2010 at 03:38:58PM +, Daniel P. Berrange wrote: This introduces a new event type VIR_DOMAIN_EVENT_ID_RTC_CHANGE This event includes the new UTC offset measured in seconds. Thus there is a new callback definition for this event type typedef void

Re: [libvirt] [PATCH 01/15] gnulib: Add usleep for MinGW builds

2010-03-22 Thread Daniel P. Berrange
On Mon, Mar 22, 2010 at 10:15:35AM -0600, Eric Blake wrote: On 03/22/2010 08:54 AM, Daniel P. Berrange wrote: On Mon, Mar 22, 2010 at 02:25:31AM +0100, Matthias Bolte wrote: --- bootstrap.conf |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/bootstrap.conf

Re: [libvirt] [PATCH 10/13] Add support for an explicit RTC change event

2010-03-22 Thread Daniel P. Berrange
On Mon, Mar 22, 2010 at 05:17:42PM +0100, Daniel Veillard wrote: On Fri, Mar 19, 2010 at 03:38:58PM +, Daniel P. Berrange wrote: This introduces a new event type VIR_DOMAIN_EVENT_ID_RTC_CHANGE This event includes the new UTC offset measured in seconds. Thus there is a new

Re: [libvirt] [PATCH 07/15] virsh: Handle absence of SA_SIGINFO

2010-03-22 Thread Eric Blake
On 03/22/2010 09:00 AM, Daniel P. Berrange wrote: On Mon, Mar 22, 2010 at 02:25:37AM +0100, Matthias Bolte wrote: MinGW and gnulib don't provide SA_SIGINFO on Windows. ACK, though we could fallback to the old style signal handler for Win32 gnulib provides sigaction, and even SIGPIPE

Re: [libvirt] [PATCH 11/13] Add support for an explicit watchdog event

2010-03-22 Thread Daniel Veillard
On Fri, Mar 19, 2010 at 03:38:59PM +, Daniel P. Berrange wrote: This introduces a new event type VIR_DOMAIN_EVENT_ID_WATCHDOG This event includes the action that is about to be taken as a result of the watchdog triggering typedef enum { VIR_DOMAIN_EVENT_WATCHDOG_NONE = 0,

Re: [libvirt] [PATCH 12/13] Add support for an explicit IO error event

2010-03-22 Thread Daniel Veillard
On Fri, Mar 19, 2010 at 03:39:00PM +, Daniel P. Berrange wrote: This introduces a new event type VIR_DOMAIN_EVENT_ID_IO_ERROR This event includes the action that is about to be taken as a result of the watchdog triggering typedef enum { VIR_DOMAIN_EVENT_IO_ERROR_NONE = 0,

Re: [libvirt] [PATCH 11/13] Add support for an explicit watchdog event

2010-03-22 Thread Daniel P. Berrange
On Mon, Mar 22, 2010 at 05:37:02PM +0100, Daniel Veillard wrote: On Fri, Mar 19, 2010 at 03:38:59PM +, Daniel P. Berrange wrote: This introduces a new event type VIR_DOMAIN_EVENT_ID_WATCHDOG This event includes the action that is about to be taken as a result of the watchdog

Re: [libvirt] [PATCH 13/15] util: Replace pciWaitForDeviceCleanup with a stub on Windows

2010-03-22 Thread Eric Blake
On 03/22/2010 09:03 AM, Daniel P. Berrange wrote: On Mon, Mar 22, 2010 at 02:25:43AM +0100, Matthias Bolte wrote: sscanf doesn't support the L modifier on Windows and gnulib has no replacement for the scanf functions. Just replace the function with a stub on Windows, because it's not used on

Re: [libvirt] [PATCH 13/13] Add domain events for graphics network clients

2010-03-22 Thread Daniel Veillard
On Fri, Mar 19, 2010 at 03:39:01PM +, Daniel P. Berrange wrote: This introduces a new event type VIR_DOMAIN_EVENT_ID_GRAPHICS The same event can be emitted in 3 scenarioes typedef enum { VIR_DOMAIN_EVENT_GRAPHICS_CONNECT = 0, VIR_DOMAIN_EVENT_GRAPHICS_INITIALIZE,

Re: [libvirt] [PATCH 10/13] Add support for an explicit RTC change event

2010-03-22 Thread Daniel Veillard
On Mon, Mar 22, 2010 at 04:20:59PM +, Daniel P. Berrange wrote: On Mon, Mar 22, 2010 at 05:17:42PM +0100, Daniel Veillard wrote: [...] --- a/include/libvirt/libvirt.h.in +++ b/include/libvirt/libvirt.h.in @@ -1842,6 +1842,10 @@ int virDomainAbortJob(virDomainPtr dom); typedef

Re: [libvirt] [PATCH 11/13] Add support for an explicit watchdog event

2010-03-22 Thread Daniel Veillard
On Mon, Mar 22, 2010 at 04:43:25PM +, Daniel P. Berrange wrote: On Mon, Mar 22, 2010 at 05:37:02PM +0100, Daniel Veillard wrote: On Fri, Mar 19, 2010 at 03:38:59PM +, Daniel P. Berrange wrote: +typedef enum { +VIR_DOMAIN_EVENT_WATCHDOG_NONE = 0, +

Re: [libvirt] [PATCH 13/15] util: Replace pciWaitForDeviceCleanup with a stub on Windows

2010-03-22 Thread Daniel P. Berrange
On Mon, Mar 22, 2010 at 10:54:09AM -0600, Eric Blake wrote: On 03/22/2010 09:03 AM, Daniel P. Berrange wrote: On Mon, Mar 22, 2010 at 02:25:43AM +0100, Matthias Bolte wrote: sscanf doesn't support the L modifier on Windows and gnulib has no replacement for the scanf functions. Just replace

Re: [libvirt] virStoragePoolDefParseString() fails with the following pool xml

2010-03-22 Thread Sharadha Prabhakar (3P)
Hi, I'm still having problems getting a virStoragePoolDefPtr from virStoragePoolDefParseString(xml). I've tried the example xmls in libvirt but still getting NULL. Can someone check if the following xml when passed to virStoragePoolDefParseString(..) returns a pointer to virStoragePoolDefPtr, so

Re: [libvirt] virStoragePoolDefParseString() fails with the following pool xml

2010-03-22 Thread Daniel P. Berrange
On Mon, Mar 22, 2010 at 06:08:46PM +, Sharadha Prabhakar (3P) wrote: Hi, I'm still having problems getting a virStoragePoolDefPtr from virStoragePoolDefParseString(xml). I've tried the example xmls in libvirt but still getting NULL. Can someone check if the following xml when passed to

[libvirt] [PATCH 16/15] build: update gnulib

2010-03-22 Thread Eric Blake
Picks up fix for gethostname compilation problems on mingw. * .gnulib: Update to latest. * build-aux/.gitignore: Regenerate. --- There is also a gnulib issue with MinGW on Windows pending. Eric and I are working on a patch for it. This should fix it.

[libvirt] [PATCH 0/6] Support VNC password changes on running guests

2010-03-22 Thread Daniel P. Berrange
This patch introduces a new virDomainUpdateDeviceFlags() API to allow the configuration of a device to be changed on the fly. It ports the existing CDROM media change code in all drivers to use this new API (keeps old support too). It then adds VNC password change support in the QEMU driver using

[libvirt] [PATCH 1/6] Introduce a new virDomainUpdateDeviceFlags public API

2010-03-22 Thread Daniel P. Berrange
The current virDomainAttachDevice API can be (ab)used to change the media of an existing CDROM/Floppy device. Going forward there will be more devices that can be configured on the fly and overloading virDomainAttachDevice for this is not too pleasant. This patch adds a new

[libvirt] [PATCH 6/6] Implement VNC password change in QEMU

2010-03-22 Thread Daniel P. Berrange
Use the new virDomainUpdateDeviceFlags API to allow the VNC password to be changed on the fly * src/internal.h: Define STREQ_NULLABLE() which is like STREQ() but does not crash if either argument is NULL, and treats two NULLs as equal. * src/libvirt_private.syms: Export

[libvirt] [PATCH 2/6] Remote protocol impl for virDomainUpdateDeviceFlags

2010-03-22 Thread Daniel P. Berrange
This defines the wire format for the new virDomainUpdateDeviceFlags() API, and implements the server client side of the marshalling code. * daemon/remote.c: Server side dispatch for virDomainUpdateDeviceFlags * src/remote/remote_driver.c: Client side serialization for

[libvirt] [PATCH 3/6] Implement virDomainUpdateDeviceFlags API in all drivers with media change

2010-03-22 Thread Daniel P. Berrange
To allow the new virDomainUpdateDeviceFlags() API to be universally used with all drivers, this patch adds an impl to all the current drivers which support CDROM or Floppy disk media change via the current virDomainAttachDeviceFlags API * src/qemu/qemu_driver.c, src/vbox/vbox_tmpl.c,

[libvirt] [PATCH 5/6] Allow parsing graphics in device XML

2010-03-22 Thread Daniel P. Berrange
Expand the parser for the standalone device XML format to allow inclusion of the graphics device type * src/conf/domain_conf.h: Add virDomainGraphicsDef to the virDomainDeviceDef struct * src/conf/domain_conf.c: Wire up parser for virDomainGraphicsDef to virDomainDeviceDefParse method ---

[libvirt] Supporting hypervisor specific APIs in libvirt

2010-03-22 Thread Anthony Liguori
Hi, I've mentioned this to a few folks already but I wanted to start a proper thread. We're struggling in qemu with usability and one area that concerns me is the disparity in features that are supported by qemu vs what's implemented in libvirt. This isn't necessarily libvirt's problem if

Re: [libvirt] Supporting hypervisor specific APIs in libvirt

2010-03-22 Thread Daniel P. Berrange
On Mon, Mar 22, 2010 at 02:25:00PM -0500, Anthony Liguori wrote: Hi, I've mentioned this to a few folks already but I wanted to start a proper thread. We're struggling in qemu with usability and one area that concerns me is the disparity in features that are supported by qemu vs what's

Re: [libvirt] [PATCH 1/6] Introduce a new virDomainUpdateDeviceFlags public API

2010-03-22 Thread Eric Blake
On 03/22/2010 01:05 PM, Daniel P. Berrange wrote: --- a/src/libvirt.c +++ b/src/libvirt.c @@ -5147,6 +5147,10 @@ error: * Create a virtual device attachment to backend. This function, * having hotplug semantics, is only allowed on an active domain. * + * For compatability, this

Re: [libvirt] [Qemu-devel] Supporting hypervisor specific APIs in libvirt

2010-03-22 Thread Daniel P. Berrange
On Mon, Mar 22, 2010 at 02:25:00PM -0500, Anthony Liguori wrote: Hi, I've mentioned this to a few folks already but I wanted to start a proper thread. We're struggling in qemu with usability and one area that concerns me is the disparity in features that are supported by qemu vs what's

Re: [libvirt] [PATCH] tests: Don't add extra padding if counter mod 40 is 0

2010-03-22 Thread Daniel P. Berrange
On Mon, Mar 22, 2010 at 09:17:21PM +0100, Matthias Bolte wrote: 2010/3/22 Daniel P. Berrange berra...@redhat.com: On Sat, Mar 20, 2010 at 06:14:44PM +0100, Matthias Bolte wrote: ---  tests/test-lib.sh |   10 ++  tests/testutils.c |    2 +-  2 files changed, 7 insertions(+), 5

Re: [libvirt] [PATCH 2/6] Remote protocol impl for virDomainUpdateDeviceFlags

2010-03-22 Thread Eric Blake
On 03/22/2010 01:05 PM, Daniel P. Berrange wrote: +if (virDomainUpdateDeviceFlags (dom, args-xml, args-flags) == -1) { +virDomainFree(dom); Inconsistency in whether there is a space before ( in function calls. Which style is intended, or are both permitted? Otherwise, ACK. --

Re: [libvirt] Migration of domains across nodes

2010-03-22 Thread Chris Lalancette
On 03/21/2010 11:21 AM, Sagar Dixit wrote: Hi, I came across http://wiki.libvirt.org/page/TodoSecureMigration and very much interested in contributing to the feature. I am looking for a mentor / more details on this project. Do contact me if anyone is interested.. Actually, it was

Re: [libvirt] [PATCH] virDomainDiskDefAssignAddress: return int, not void

2010-03-22 Thread Jim Meyering
Jim Meyering wrote: Daniel P. Berrange wrote: On Fri, Mar 19, 2010 at 05:00:21PM +0100, Jim Meyering wrote: Per discussion a week or so ago, here's a fix for virDomainDiskDefAssignAddress. However, this change is incomplete, because making that function reject erroneous input has exposed

[libvirt] [PATCH] vbox: Fix segfault on empty device source

2010-03-22 Thread Matthias Bolte
source file=''/ results in def-disks[i]-src == NULL. But vboxDomainDefineXML didn't check def-disks[i]-src for NULL and expected it to be a valid string. Add checks for def-disks[i]-src != NULL to fix the segfault. --- src/vbox/vbox_tmpl.c |6 -- 1 files changed, 4 insertions(+), 2

Re: [libvirt] [PATCH 3/6] Implement virDomainUpdateDeviceFlags API in all drivers with media change

2010-03-22 Thread Eric Blake
On 03/22/2010 01:05 PM, Daniel P. Berrange wrote: To allow the new virDomainUpdateDeviceFlags() API to be universally used with all drivers, this patch adds an impl to all the current drivers which support CDROM or Floppy disk media change via the current virDomainAttachDeviceFlags API +

Re: [libvirt] [PATCH] vbox: Fix segfault on empty device source

2010-03-22 Thread Eric Blake
On 03/22/2010 02:40 PM, Matthias Bolte wrote: source file=''/ results in def-disks[i]-src == NULL. But vboxDomainDefineXML didn't check def-disks[i]-src for NULL and expected it to be a valid string. Add checks for def-disks[i]-src != NULL to fix the segfault. ACK, but did you catch all the

Re: [libvirt] [PATCH] virDomainDiskDefAssignAddress: return int, not void

2010-03-22 Thread Eric Blake
On 03/22/2010 02:38 PM, Jim Meyering wrote: Here's the final piece. Here's the final series. I'm including the result of Dan's review as a separate patch only for review. I'll fold it into the 3/4 before pushing. ACK from me on the series. -- Eric Blake ebl...@redhat.com

Re: [libvirt] [PATCH 6/6] Implement VNC password change in QEMU

2010-03-22 Thread Eric Blake
On 03/22/2010 01:05 PM, Daniel P. Berrange wrote: Use the new virDomainUpdateDeviceFlags API to allow the VNC password to be changed on the fly * src/internal.h: Define STREQ_NULLABLE() which is like STREQ() but does not crash if either argument is NULL, and treats two NULLs as equal.

Re: [libvirt] Migration of domains across nodes

2010-03-22 Thread Sagar Dixit
Hi Chris, Thanks for the reply. I was actually looking to implement / support tunnelled migration of OpenVZ or LXC containers using libvirt APIs Is that feasible ? - Sagar On Mon, Mar 22, 2010 at 4:29 PM, Chris Lalancette clala...@redhat.comwrote: On 03/21/2010 11:21 AM, Sagar Dixit wrote:

Re: [libvirt] Supporting hypervisor specific APIs in libvirt

2010-03-22 Thread Anthony Liguori
On 03/22/2010 03:10 PM, Daniel P. Berrange wrote: This isn't necessarily libvirt's problem if it's mission is to provide a common hypervisor API that covers the most commonly used features. That is more or less our current mission. If this mission leads to QEMU creating a non-libvirt

Re: [libvirt] [Qemu-devel] Re: Supporting hypervisor specific APIs in libvirt

2010-03-22 Thread Anthony Liguori
On 03/22/2010 04:33 PM, Gerd Hoffmann wrote: Hi, Stepping back a bit first, there are the two core areas in which people can be limited by libvirt currently. 2. Command line flags For me: This one, and monitor access. libvirt is very unfriendly to qemu hackers. There is no easy

Re: [libvirt] [Qemu-devel] Re: Supporting hypervisor specific APIs in libvirt

2010-03-22 Thread Cole Robinson
On 03/22/2010 05:33 PM, Gerd Hoffmann wrote: Hi, Stepping back a bit first, there are the two core areas in which people can be limited by libvirt currently. 2. Command line flags For me: This one, and monitor access. libvirt is very unfriendly to qemu hackers. There is no

Re: [libvirt] [PATCH] esx: Cleanup file header comments

2010-03-22 Thread Matthias Bolte
2010/3/22 Daniel P. Berrange berra...@redhat.com: On Mon, Mar 22, 2010 at 01:55:05AM +0100, Matthias Bolte wrote: Replace 'method' with 'function' and get the filename's suffix right. ---  src/esx/esx_device_monitor.c   |    2 +-  src/esx/esx_driver.c           |    4 ++--  

Re: [libvirt] [PATCH] esx: Generate method mappings via macros

2010-03-22 Thread Matthias Bolte
2010/3/22 Daniel P. Berrange berra...@redhat.com: On Mon, Mar 22, 2010 at 01:53:50AM +0100, Matthias Bolte wrote: This is actually a consequence of the reworked required parameter checking: Unify the required parameter check into a Validate function instead of doing it separately im the

Re: [libvirt] [PATCH] esx: Fix potential memory leak in esxVI_BuildFullTraversalSpecItem

2010-03-22 Thread Matthias Bolte
2010/3/22 Daniel P. Berrange berra...@redhat.com: On Mon, Mar 22, 2010 at 01:55:45AM +0100, Matthias Bolte wrote: If esxVI_String_DeepCopyValue or esxVI_SelectionSpec_AppendToList fail then selectionSpec would leak. Add a free call in the failure path to fix the leak. ---  src/esx/esx_vi.c |

Re: [libvirt] [PATCH] esx: Add esxVI_LookupVirtualMachineByName

2010-03-22 Thread Matthias Bolte
2010/3/22 Daniel P. Berrange berra...@redhat.com: On Mon, Mar 22, 2010 at 01:56:46AM +0100, Matthias Bolte wrote: Used in esxDomainLookupByName and to be used in esxDomainDefineXML later. ---  src/esx/esx_driver.c |   66 +  src/esx/esx_vi.c     |  

Re: [libvirt] [PATCH 04/15] Remove interfaceRegister from libvirt_private.syms

2010-03-22 Thread Matthias Bolte
2010/3/22 Daniel P. Berrange berra...@redhat.com: On Mon, Mar 22, 2010 at 02:25:34AM +0100, Matthias Bolte wrote: This symbol is conditional, it would need to be exported conditional to work properly with MinGW. So just remove it, as no other driver register function is listed in the symbols

Re: [libvirt] [PATCH 02/15] Make sure uid_t and gid_t are available

2010-03-22 Thread Matthias Bolte
2010/3/22 Daniel P. Berrange berra...@redhat.com: On Mon, Mar 22, 2010 at 02:25:32AM +0100, Matthias Bolte wrote: ---  configure.ac |    1 +  1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/configure.ac b/configure.ac index 654b9a8..1a3c788 100644 --- a/configure.ac +++

Re: [libvirt] [PATCH 03/15] Export conditional state driver symbols only when they are defined

2010-03-22 Thread Matthias Bolte
2010/3/22 Daniel P. Berrange berra...@redhat.com: On Mon, Mar 22, 2010 at 02:25:33AM +0100, Matthias Bolte wrote: This is necessary for MinGW builds. ---  src/Makefile.am          |    7 ++-  src/libvirt_daemon.syms  |   10 ++  src/libvirt_private.syms |    5 -  3 files

Re: [libvirt] [PATCH 08/15] Make sure virtTestCaptureProgramOutput has a body on Windows

2010-03-22 Thread Matthias Bolte
2010/3/22 Daniel P. Berrange berra...@redhat.com: On Mon, Mar 22, 2010 at 02:25:38AM +0100, Matthias Bolte wrote: Now the virsh tests compile at least. ---  tests/testutils.c |    6 ++  1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/tests/testutils.c b/tests/testutils.c

Re: [libvirt] [PATCH 15/15] util: Add stubs for some functions on Windows

2010-03-22 Thread Matthias Bolte
2010/3/22 Daniel P. Berrange berra...@redhat.com: On Mon, Mar 22, 2010 at 02:25:45AM +0100, Matthias Bolte wrote: virSetCloseExec and virExecDaemonize were missing a body on Windows. ---  src/util/util.c |   34 ++  1 files changed, 30 insertions(+), 4

Re: [libvirt] [PATCH 05/15] Fix export of virConnectAuthPtrDefault for MinGW builds

2010-03-22 Thread Matthias Bolte
2010/3/22 Daniel P. Berrange berra...@redhat.com: On Mon, Mar 22, 2010 at 02:25:35AM +0100, Matthias Bolte wrote: Use the __declspec(dllexport/dllimport) stuff to export the symbol, otherwise accessing virConnectAuthPtrDefault triggers a segfault. ---  configure.ac                 |   11

Re: [libvirt] [PATCH 09/15] util: Make some conditional symbols unconditional

2010-03-22 Thread Matthias Bolte
2010/3/22 Daniel P. Berrange berra...@redhat.com: On Mon, Mar 22, 2010 at 02:25:39AM +0100, Matthias Bolte wrote: Add dummy bodies for HAVE_GETPWUID_R and HAVE_MNTENT_H dependent functions for MinGW builds. ---  src/util/util.c |   54 --  

Re: [libvirt] [PATCH 14/15] Add HAVE_PTHREAD_H guard for pthread_sigmask

2010-03-22 Thread Matthias Bolte
2010/3/22 Daniel P. Berrange berra...@redhat.com: On Mon, Mar 22, 2010 at 02:25:44AM +0100, Matthias Bolte wrote: Correctly disable pthread related code if pthread is not avialable, in order to get it compile with MinGW on Windows. ---  src/remote/remote_driver.c |    6 ++  

Re: [libvirt] [PATCH 10/15] bootstrap: Remove rsync from buildreq list

2010-03-22 Thread Matthias Bolte
2010/3/22 Daniel P. Berrange berra...@redhat.com: On Mon, Mar 22, 2010 at 02:25:40AM +0100, Matthias Bolte wrote: rsync is used to download .po files, but SKIP_PO=true is set and downloading .po files is skipped. This also fixes a problem with MinGW builds, because rsync is not available for

Re: [libvirt] [PATCH 11/15] util: Handle lack of (f)chmod and (f)chown on Windows

2010-03-22 Thread Matthias Bolte
2010/3/22 Daniel P. Berrange berra...@redhat.com: On Mon, Mar 22, 2010 at 02:25:41AM +0100, Matthias Bolte wrote: Even if gnulib can provide stubs, it won't help that much. So just replace affected util functions (virFileOperation and virDirCreate) with stubs on Windows. Both functions aren't

Re: [libvirt] [PATCH 12/15] bootstrap: Enable copy-mode for MinGW builds

2010-03-22 Thread Matthias Bolte
2010/3/22 Daniel P. Berrange berra...@redhat.com: On Mon, Mar 22, 2010 at 02:25:42AM +0100, Matthias Bolte wrote: MSYS' ln doesn't work well in the way bootstrap uses it with relative paths. ---  bootstrap.conf |    6 ++  1 files changed, 6 insertions(+), 0 deletions(-) diff --git

[libvirt] website: API reference for virterror contains libvirt API also

2010-03-22 Thread Matthias Bolte
The API reference website [1] for virterror contains the API reference for virterror as expected. But the complete libvirt API reference, that is already found at [2], is appended too. I looked into the XSLT process that generates those two HTML files from the libvirt-api.xml to understand why