[libvirt] [PATCH] Better error reporting for failed migration.

2009-10-15 Thread Chris Lalancette
The comment in the code says most of it, but when the destination hostname resolution is screwed up, print a proper error instead of the very unhelpful unknown error. Note that I'm not overly fond of the wording in the error message, so I'm open to suggestions. Signed-off-by: Chris Lalancette

Re: [libvirt] [PATCH] Avoid crash in virBufferEscapeString

2009-10-15 Thread Chris Lalancette
Laine Stump wrote: If virBufferEscapeString is called on a buffer that has 0 bytes of space, a size of -1 will be passed to snprintf, resulting in a segmentation fault. This patch checks for 0 space, and grows the buffer if needed prior to determining size. I discovered this when I

[libvirt] [PATCH] Don't copy old machines from a domain which has none

2009-10-15 Thread Mark McLoughlin
If the the qemu and kvm binaries are the same, we don't include machine types in the kvm domain info. However, the code which refreshes the machine types info from the previous capabilities structure first looks at the kvm domain's info, finds it matches and then copies the empty machine types

Re: [libvirt] [PATCH] Avoid crash in virBufferEscapeString

2009-10-15 Thread Daniel Veillard
On Wed, Oct 14, 2009 at 11:55:19PM -0400, Laine Stump wrote: If virBufferEscapeString is called on a buffer that has 0 bytes of space, a size of -1 will be passed to snprintf, resulting in a segmentation fault. This patch checks for 0 space, and grows the buffer if needed prior to determining

Re: [libvirt] [PATCH] Don't copy old machines from a domain which has none

2009-10-15 Thread Daniel Veillard
On Thu, Oct 15, 2009 at 12:16:55PM +0100, Mark McLoughlin wrote: If the the qemu and kvm binaries are the same, we don't include machine types in the kvm domain info. However, the code which refreshes the machine types info from the previous capabilities structure first looks at the kvm

Re: [libvirt] [PATCH] Avoid crash in virBufferEscapeString

2009-10-15 Thread Laine Stump
On 10/15/2009 06:03 AM, Chris Lalancette wrote: Good catch. The hardcode of 100 threw me at first, but I see that we appropriately grow the buffer as needed in the loop below, so I think this works. I thought of trying to make a better guess, but when I saw that virBufferVSprintf just

[libvirt] node device libudev backend second look

2009-10-15 Thread Dave Allan
Attached is a patch against the current head containing an implementation of node device enumeration using libudev. It is complete except for the monitor, but I'm submitting it now as I have a few questions about the implementation that I'd like advice on. They are marked XXX in comments in

Re: [libvirt] [PATCH 3/5] Implement a RWLock primitive for drivers to use

2009-10-15 Thread Matthias Bolte
2009/10/14 Daniel P. Berrange berra...@redhat.com: This implements a thin wrapper around the pthread_rwlock primitives. No impl is provided for Win32 at this time since it is rather hard, and none of our code yet requires it on Win32 * src/util/threads.h: Add virRWLockInit, virRWLockDestroy,

Re: [libvirt] [PATCH 5/5] Allow for a driver specific private data blob in virDomainObjPtr

2009-10-15 Thread Matthias Bolte
2009/10/14 Daniel P. Berrange berra...@redhat.com: The virDomainObjPtr object stores state about a running domain. This object is shared across all drivers so it is not appropriate to include driver specific state here. This patch adds the ability to request a blob of private data per domain

Re: [libvirt] [RFC] Support for CPUID masking

2009-10-15 Thread Dor Laor
On 10/13/2009 11:40 AM, Daniel P. Berrange wrote: On Tue, Oct 13, 2009 at 02:56:41AM -0400, john cooper wrote: Dor Laor wrote: What about another approach for the cpuid issue: I think that dealing with specific flags is pretty error prone on all levels - virt-mgr, libvirt, qemu, migration, and

Re: [libvirt] [PATCH 2/5] Convert virDomainObjListPtr to use a hash of domain objects

2009-10-15 Thread Matthias Bolte
2009/10/14 Daniel P. Berrange berra...@redhat.com: The current virDomainObjListPtr object stores domain objects in an array. This means that to find a particular objects requires O(n) time, and more critically acquiring O(n) mutex locks. The new impl replaces the array with a virHashTable,

Re: [libvirt] [PATCH] LXC complement PATH environment variable of a controller

2009-10-15 Thread Amy Griffis
Ryota Ozaki wrote: [Tue Oct 13 2009, 05:05:15PM EDT] Hi, lxc controller usually executes 'ip' command to control veths, however now PATH environment variable of the controller is not set (logging code resets environment variables all) and the execution will definitely fail because the controller

Re: [libvirt] [PATCH 4/5] Convert QEMU driver mutex into a rwlock

2009-10-15 Thread Matthias Bolte
2009/10/14 Daniel P. Berrange berra...@redhat.com: A number of driver API methods which acquire the driver mutex only ever used the driver object in a read-only fashion. All these uses are converted to call qemuDriverLockRO() allowing for greater concurrency. * src/qemu/qemu_conf.h: