[libvirt] [PATCH] virfile: safezero: fall back to writing block by block if mmap fails

2013-10-02 Thread Oskari Saarenmaa
mmap can fail on 32-bit systems if we're trying to zero out a lot of data. Fall back to using block-by-block writing in that case. While we could map smaller blocks it's unlikely that this code is used a lot and its easier to just fall back to one of the existing methods. Also modified the

[libvirt] [PATCHv2 1/2] qemu_hotplug: Allow QoS update in qemuDomainChangeNet

2013-10-02 Thread Michal Privoznik
The qemuDomainChangeNet() is called when 'virsh update-device' is invoked on a NIC. Currently, we fail to update the QoS even though we have routines for that. Signed-off-by: Michal Privoznik mpriv...@redhat.com --- src/qemu/qemu_hotplug.c | 20 ++-- 1 file changed, 18

[libvirt] [PATCHv2 0/2] Allow updating QoS via virDomainUpdateDeviceFlags

2013-10-02 Thread Michal Privoznik
*** BLURB HERE *** Michal Privoznik (2): qemu_hotplug: Allow QoS update in qemuDomainChangeNet virNetDevBandwidthEqual: Make it more robust src/qemu/qemu_hotplug.c | 20 ++-- src/util/virnetdevbandwidth.c | 26 -- 2 files changed, 38

[libvirt] [PATCHv2 2/2] virNetDevBandwidthEqual: Make it more robust

2013-10-02 Thread Michal Privoznik
So far the virNetDevBandwidthEqual() expected both -in and -out items to be allocated for both @a and @b compared. This is not necessary true for all our code. For instance, running 'update-device' twice over a NIC with the very same XML results in SIGSEGV-ing in this function. Signed-off-by:

Re: [libvirt] [PATCHv4 1/4] net-dhcp-leases: Implement the public APIs

2013-10-02 Thread Daniel P. Berrange
On Tue, Oct 01, 2013 at 05:39:02PM -0600, Eric Blake wrote: On 09/26/2013 02:08 AM, Nehal J Wani wrote: Introduce 3 new APIs, virNetworkGetDHCPLeases, virNetworkGetDHCPLeasesForMAC and virNetworkDHCPLeaseFree. * virNetworkGetDHCPLeases: returns the dhcp leases information for a given

Re: [libvirt] error: server response too large

2013-10-02 Thread Daniel P. Berrange
On Tue, Oct 01, 2013 at 06:57:56PM +0200, Viktor Mihajlovski wrote: On 10/01/2013 06:19 PM, Daniel P. Berrange wrote: What were you doing to get a message greater than 256KB ? This patch did not attempt to fix all possible combinations. If a API call such as virConnectListAllDomains has

Re: [libvirt] libvirt-glib fails to compile with CLANG compiler

2013-10-02 Thread Christophe Fergeau
Hey, On Tue, Oct 01, 2013 at 01:05:33PM -0700, Jason Helfman wrote: Here are some build logs. The first is for amd64, and the latter is for i386. https://redports.org/~jgh/20131001181900-6317-149023/libvirt-glib-0.1.7.log

Re: [libvirt] [PATCHv2 1/2] qemu_hotplug: Allow QoS update in qemuDomainChangeNet

2013-10-02 Thread Laine Stump
On 10/02/2013 03:34 AM, Michal Privoznik wrote: The qemuDomainChangeNet() is called when 'virsh update-device' is invoked on a NIC. Currently, we fail to update the QoS even though we have routines for that. Signed-off-by: Michal Privoznik mpriv...@redhat.com --- src/qemu/qemu_hotplug.c |

Re: [libvirt] [PATCHv2 2/2] virNetDevBandwidthEqual: Make it more robust

2013-10-02 Thread Laine Stump
On 10/02/2013 03:34 AM, Michal Privoznik wrote: So far the virNetDevBandwidthEqual() expected both -in and -out items to be allocated for both @a and @b compared. This is not necessary true for all our code. For instance, running 'update-device' twice over a NIC with the very same XML results

[libvirt] [PATCHv3] lxc veth interfaces: fix interface name collisions

2013-10-02 Thread Oskari Saarenmaa
The previous veth interface naming scheme tried to find the lowest unused index for both the parent and container veth interfaces. That's susceptible to race conditions when multiple containers are started at the same time. Try to pick a random unused interface id for the parent if one wasn't

Re: [libvirt] [PATCHv2 2/2] virNetDevBandwidthEqual: Make it more robust

2013-10-02 Thread Michal Privoznik
On 02.10.2013 10:44, Laine Stump wrote: On 10/02/2013 03:34 AM, Michal Privoznik wrote: So far the virNetDevBandwidthEqual() expected both -in and -out items to be allocated for both @a and @b compared. This is not necessary true for all our code. For instance, running 'update-device' twice

Re: [libvirt] Attaching PCI devices to the PCIe root complex

2013-10-02 Thread Paolo Bonzini
Il 25/09/2013 10:59, Michael S. Tsirkin ha scritto: I couldn't find on PCIe spec any mention that Root Complex Integrated EndPoint must be PCIe. But, from spec 1.3.2.3: - A Root Complex Integrated Endpoint must not require I/O resources claimed through BAR(s). - A Root Complex

Re: [libvirt] ANNOUNCE: libvirt 1.0.5.6 maintenance release

2013-10-02 Thread Christophe Fergeau
On Mon, Sep 23, 2013 at 01:36:40PM -0400, Cole Robinson wrote: I basically do: - quick smoke test to make sure libvirt and virsh are working: -- stop system libvirtd -- sudo ./daemon/libvirt -- sudo ./tools/virsh list --all - make check make rpm make distcheck - cd po/ make update-po

Re: [libvirt] Attaching PCI devices to the PCIe root complex

2013-10-02 Thread Michael S. Tsirkin
On Wed, Oct 02, 2013 at 10:53:07AM +0200, Paolo Bonzini wrote: Il 25/09/2013 10:59, Michael S. Tsirkin ha scritto: I couldn't find on PCIe spec any mention that Root Complex Integrated EndPoint must be PCIe. But, from spec 1.3.2.3: - A Root Complex Integrated Endpoint must not

Re: [libvirt] [PATCHv4 1/4] net-dhcp-leases: Implement the public APIs

2013-10-02 Thread Nehal J Wani
On Wed, Oct 2, 2013 at 1:43 PM, Daniel P. Berrange berra...@redhat.com wrote: On Tue, Oct 01, 2013 at 05:39:02PM -0600, Eric Blake wrote: On 09/26/2013 02:08 AM, Nehal J Wani wrote: Introduce 3 new APIs, virNetworkGetDHCPLeases, virNetworkGetDHCPLeasesForMAC and virNetworkDHCPLeaseFree.

Re: [libvirt] [PATCHv4 1/4] net-dhcp-leases: Implement the public APIs

2013-10-02 Thread Daniel P. Berrange
On Wed, Oct 02, 2013 at 03:08:00PM +0530, Nehal J Wani wrote: On Wed, Oct 2, 2013 at 1:43 PM, Daniel P. Berrange berra...@redhat.com wrote: On Tue, Oct 01, 2013 at 05:39:02PM -0600, Eric Blake wrote: On 09/26/2013 02:08 AM, Nehal J Wani wrote: Introduce 3 new APIs,

Re: [libvirt] [PATCHv4 1/4] net-dhcp-leases: Implement the public APIs

2013-10-02 Thread Nehal J Wani
On Wed, Oct 2, 2013 at 3:18 PM, Daniel P. Berrange berra...@redhat.com wrote: On Wed, Oct 02, 2013 at 03:08:00PM +0530, Nehal J Wani wrote: On Wed, Oct 2, 2013 at 1:43 PM, Daniel P. Berrange berra...@redhat.com wrote: On Tue, Oct 01, 2013 at 05:39:02PM -0600, Eric Blake wrote: On

Re: [libvirt] [PATCH v3 3/8] test: Implement readonly snapshot APIs

2013-10-02 Thread John Ferlan
On 09/25/2013 03:15 PM, Cole Robinson wrote: This is just stolen from qemu_driver.c with tweaks to fit the test driver. --- src/test/test_driver.c | 392 + 1 file changed, 392 insertions(+) ... +static int

Re: [libvirt] [PATCHv4 1/4] net-dhcp-leases: Implement the public APIs

2013-10-02 Thread Daniel P. Berrange
On Wed, Oct 02, 2013 at 09:13:59AM +0100, Daniel P. Berrange wrote: On Tue, Oct 01, 2013 at 05:39:02PM -0600, Eric Blake wrote: On 09/26/2013 02:08 AM, Nehal J Wani wrote: Introduce 3 new APIs, virNetworkGetDHCPLeases, virNetworkGetDHCPLeasesForMAC and virNetworkDHCPLeaseFree.

Re: [libvirt] [PATCHv4 1/4] net-dhcp-leases: Implement the public APIs

2013-10-02 Thread Daniel P. Berrange
On Wed, Oct 02, 2013 at 03:41:56PM +0530, Nehal J Wani wrote: On Wed, Oct 2, 2013 at 3:18 PM, Daniel P. Berrange berra...@redhat.com wrote: On Wed, Oct 02, 2013 at 03:08:00PM +0530, Nehal J Wani wrote: On Wed, Oct 2, 2013 at 1:43 PM, Daniel P. Berrange berra...@redhat.com wrote: On

Re: [libvirt] [PATCHv4 1/4] net-dhcp-leases: Implement the public APIs

2013-10-02 Thread Laine Stump
On 10/02/2013 06:11 AM, Nehal J Wani wrote: On Wed, Oct 2, 2013 at 3:18 PM, Daniel P. Berrange berra...@redhat.com wrote: On Wed, Oct 02, 2013 at 03:08:00PM +0530, Nehal J Wani wrote: On Wed, Oct 2, 2013 at 1:43 PM, Daniel P. Berrange berra...@redhat.com wrote: On Tue, Oct 01, 2013 at

Re: [libvirt] [PATCHv4 1/4] net-dhcp-leases: Implement the public APIs

2013-10-02 Thread Nehal J Wani
On Wed, Oct 2, 2013 at 4:18 PM, Daniel P. Berrange berra...@redhat.com wrote: On Wed, Oct 02, 2013 at 03:41:56PM +0530, Nehal J Wani wrote: On Wed, Oct 2, 2013 at 3:18 PM, Daniel P. Berrange berra...@redhat.com wrote: On Wed, Oct 02, 2013 at 03:08:00PM +0530, Nehal J Wani wrote: On Wed,

Re: [libvirt] [PATCHv4 1/4] net-dhcp-leases: Implement the public APIs

2013-10-02 Thread Daniel P. Berrange
On Wed, Oct 02, 2013 at 04:30:16PM +0530, Nehal J Wani wrote: On Wed, Oct 2, 2013 at 4:18 PM, Daniel P. Berrange berra...@redhat.com wrote: On Wed, Oct 02, 2013 at 03:41:56PM +0530, Nehal J Wani wrote: On Wed, Oct 2, 2013 at 3:18 PM, Daniel P. Berrange berra...@redhat.com wrote: On

Re: [libvirt] [PATCHv3] lxc veth interfaces: fix interface name collisions

2013-10-02 Thread Daniel P. Berrange
On Wed, Oct 02, 2013 at 11:45:27AM +0300, Oskari Saarenmaa wrote: The previous veth interface naming scheme tried to find the lowest unused index for both the parent and container veth interfaces. That's susceptible to race conditions when multiple containers are started at the same time.

[libvirt] [PATCH 0/5] Fixes for lxc veth handling

2013-10-02 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com The primary goal of this series was to address the race condition in creation of veth device names. A few other bugs were identified along the way though fixed. Daniel P. Berrange (5): Don't set netdev offline in container cleanup Avoid reporting

[libvirt] [PATCH 3/5] Avoid deleting NULL veth device name

2013-10-02 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com If veth device allocation has a fatal error, the veths array may contain NULL device names. Avoid calling the virNetDevVethDelete function on such names. Signed-off-by: Daniel P. Berrange berra...@redhat.com --- src/lxc/lxc_process.c | 2 +- 1 file

[libvirt] [PATCH 2/5] Avoid reporting an error if veth device is already deleted

2013-10-02 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com The kernel automatically destroys veth devices when cleaning up the container network namepace. During normal shutdown, it is thus likely that the attempt to run 'ip link del vethN' will fail. If it fails, check if the device exists, and avoid

[libvirt] [PATCH 1/5] Don't set netdev offline in container cleanup

2013-10-02 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com During container cleanup there is a race where the kernel may have destroyed the veth device before we try to set it offline. This causes log error messages. Given that we're about to delete the device entirely, setting it offline is pointless.

[libvirt] [PATCH 4/5] Retry veth device creation on failure

2013-10-02 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com The veth device creation code run in two steps, first it looks for two free veth device names, then it runs ip link to create the veth pair. There is an obvious race between finding free names and creating them, when guests are started in parallel.

[libvirt] [PATCH 5/5] Use 'vnet' as prefix for veth devices

2013-10-02 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com The XML parser reserves 'vnet' as a prefix for automatically generated NIC device names. Switch the veth device creation to use this prefix, so it does not have to worry about clashes with user specified names in the XML. Signed-off-by: Daniel P.

Re: [libvirt] [PATCHv3] lxc veth interfaces: fix interface name collisions

2013-10-02 Thread Oskari Saarenmaa
On 02/10/13 14:30, Daniel P. Berrange wrote: On Wed, Oct 02, 2013 at 11:45:27AM +0300, Oskari Saarenmaa wrote: This does change the interface names from nice low integers to random larger integers, but I don't see that an issue. And the caller can select any other name they like if that's not

Re: [libvirt] [PATCHv4 1/4] net-dhcp-leases: Implement the public APIs

2013-10-02 Thread Eric Blake
On 10/02/2013 04:46 AM, Daniel P. Berrange wrote: Actually, I see that we already expose the IAID concept to the user in the XML for networks ip family=ipv6 address=2001:db8:ca2:2::1 prefix=64 dhcp host name=paul ip=2001:db8:ca2:2:3::1 / host

Re: [libvirt] [PATCHv4 1/4] net-dhcp-leases: Implement the public APIs

2013-10-02 Thread Eric Blake
On 09/26/2013 02:08 AM, Nehal J Wani wrote: + +typedef struct _virNetworkDHCPLeases virNetworkDHCPLeases; +typedef virNetworkDHCPLeases *virNetworkDHCPLeasesPtr; +struct _virNetworkDHCPLeases { +long long expirytime; /* Seconds since epoch */ +union { +char *mac;

[libvirt] [PATCH v2] LXC: Detect fs support. Mount only supported filesystems

2013-10-02 Thread Bogdan Purcareata
Kept ((access(dstpath, R_OK) 0) || (!lxcCheckFSSupport(mnt-type))) when determining support for the mount. Even if the filesystem type is supported, there is still a chance to fail when building the dstpath (virFileMakePath). If that call fails, starting the container will fail. Specifically

[libvirt] [PATCH 05/18] qemumonitorjsontest: Extend the test for yet another monitor commands

2013-10-02 Thread Michal Privoznik
So far, we're unit testing some basic functions and some (so called) simple functions (e.g. qmp_capabilities, system_powerdown). However, there are more functions which expect simple {'return': {}} reply, but takes more args to construct the command (for instance set_link). This patch aims on such

[libvirt] [PATCH 04/18] qemuMonitorTestFree: Join worker thread unconditionally

2013-10-02 Thread Michal Privoznik
The thread needs to be joined no matter if it was still running when qemuMonitorTestFree is called or not. The worker is thread spawned in qemuMonitorTestNew() and has to be joined. Signed-off-by: Michal Privoznik mpriv...@redhat.com --- tests/qemumonitortestutils.c | 3 +-- 1 file changed, 1

[libvirt] [PATCH 03/18] qemuMonitorJSONSendKey: Avoid double free

2013-10-02 Thread Michal Privoznik
After successful @cmd construction the memory where @keys points to is part of @cmd. Avoid double freeing it. Signed-off-by: Michal Privoznik mpriv...@redhat.com --- src/qemu/qemu_monitor_json.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/qemu/qemu_monitor_json.c

[libvirt] [PATCH 09/18] qemumonitorjsontest: Test qemuMonitorJSONGetBlockInfo

2013-10-02 Thread Michal Privoznik
Signed-off-by: Michal Privoznik mpriv...@redhat.com --- tests/qemumonitorjsontest.c | 143 1 file changed, 143 insertions(+) diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c index ba2de45..7a851bd 100644 ---

[libvirt] [PATCH 01/18] qemuMonitorJSONGetVirtType: Fix error message

2013-10-02 Thread Michal Privoznik
When querying for kvm, we try to find 'enabled' field. Hence the error message should report we haven't found 'enabled' and not 'running' (which is not even in the reply). Probably a typo or copy-paste error. Signed-off-by: Michal Privoznik mpriv...@redhat.com --- src/qemu/qemu_monitor_json.c |

[libvirt] [PATCH 07/18] qemumonitorjsontest: Test qemuMonitorJSONGetVirtType

2013-10-02 Thread Michal Privoznik
Signed-off-by: Michal Privoznik mpriv...@redhat.com --- tests/qemumonitorjsontest.c | 38 ++ 1 file changed, 38 insertions(+) diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c index 6eb26a1..587b66f 100644 ---

[libvirt] [PATCH 12/18] qemumonitorjsontest: Test qemuMonitorJSONGetMigrationStatus

2013-10-02 Thread Michal Privoznik
Signed-off-by: Michal Privoznik mpriv...@redhat.com --- tests/qemumonitorjsontest.c | 50 + 1 file changed, 50 insertions(+) diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c index 52df486..576288b 100644 ---

[libvirt] [PATCH 18/18] qemumonitorjsontest: Test qemuMonitorJSONGetMigrationCapability

2013-10-02 Thread Michal Privoznik
And so do qemuMonitorJSONSetMigrationCapability. Signed-off-by: Michal Privoznik mpriv...@redhat.com --- tests/qemumonitorjsontest.c | 46 + 1 file changed, 46 insertions(+) diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c index

[libvirt] [PATCH 16/18] qemumonitorjsontest: Test qemuMonitorJSONSetBlockIoThrottle

2013-10-02 Thread Michal Privoznik
And so do qemuMonitorJSONGetBlockIoThrottle. Signed-off-by: Michal Privoznik mpriv...@redhat.com --- tests/qemumonitorjsontest.c | 185 +++- 1 file changed, 115 insertions(+), 70 deletions(-) diff --git a/tests/qemumonitorjsontest.c

[libvirt] [PATCH 06/18] qemumonitorjsontest: Test qemuMonitorJSONGetCPUInfo

2013-10-02 Thread Michal Privoznik
Signed-off-by: Michal Privoznik mpriv...@redhat.com --- tests/qemumonitorjsontest.c | 77 + 1 file changed, 77 insertions(+) diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c index f52e970..6eb26a1 100644 ---

[libvirt] [PATCH 14/18] qemumonitorjsontest: Test qemuMonitorJSONGetPtyPaths

2013-10-02 Thread Michal Privoznik
Signed-off-by: Michal Privoznik mpriv...@redhat.com --- tests/qemumonitorjsontest.c | 67 + 1 file changed, 67 insertions(+) diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c index b6adb35..14c64fd 100644 ---

[libvirt] [PATCH 13/18] qemumonitorjsontest: Test qemuMonitorJSONGetSpiceMigrationStatus

2013-10-02 Thread Michal Privoznik
Signed-off-by: Michal Privoznik mpriv...@redhat.com --- tests/qemumonitorjsontest.c | 40 1 file changed, 40 insertions(+) diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c index 576288b..b6adb35 100644 ---

[libvirt] [PATCH 08/18] qemumonitorjsontest: Test qemuMonitorJSONGetBalloonInfo

2013-10-02 Thread Michal Privoznik
Signed-off-by: Michal Privoznik mpriv...@redhat.com --- tests/qemumonitorjsontest.c | 37 + 1 file changed, 37 insertions(+) diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c index 587b66f..ba2de45 100644 --- a/tests/qemumonitorjsontest.c

[libvirt] [PATCH 17/18] qemumonitorjsontest: Test qemuMonitorJSONGetTargetArch

2013-10-02 Thread Michal Privoznik
Signed-off-by: Michal Privoznik mpriv...@redhat.com --- tests/qemumonitorjsontest.c | 38 ++ 1 file changed, 38 insertions(+) diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c index 9e9dbcc..5636fb6 100644 ---

[libvirt] [PATCH 15/18] qemumonitorjsontest: Test qemuMonitorJSONSendKey

2013-10-02 Thread Michal Privoznik
Signed-off-by: Michal Privoznik mpriv...@redhat.com --- tests/qemumonitorjsontest.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c index 14c64fd..2c5c452 100644 --- a/tests/qemumonitorjsontest.c +++

[libvirt] [PATCH 00/18] qemumonitorjsontest: Introduce some tests

2013-10-02 Thread Michal Privoznik
and fix some bugs I've ran into while writing the tests. Michal Privoznik (18): qemuMonitorJSONGetVirtType: Fix error message qemumonitorjsontest: Test qemuMonitorJSONSystemPowerdown qemuMonitorJSONSendKey: Avoid double free qemuMonitorTestFree: Join worker thread unconditionally

[libvirt] [PATCH 02/18] qemumonitorjsontest: Test qemuMonitorJSONSystemPowerdown

2013-10-02 Thread Michal Privoznik
Right now, we are testing qemuMonitorSystemPowerdown instead of qemuMonitorJSONSystemPowerdown. It makes no harm, as both functions have the same header and the former is just a wrapper over the latter. But we should be consistent as we're testing the JSON functions only in here. Signed-off-by:

[libvirt] [PATCH 11/18] qemumonitorjsontest: Test qemuMonitorJSONGetMigrationCacheSize

2013-10-02 Thread Michal Privoznik
Signed-off-by: Michal Privoznik mpriv...@redhat.com --- tests/qemumonitorjsontest.c | 37 + 1 file changed, 37 insertions(+) diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c index 7ba8ad2..52df486 100644 --- a/tests/qemumonitorjsontest.c

[libvirt] [PATCH 10/18] qemumonitorjsontest: Test qemuMonitorJSONGetBlockStatsInfo

2013-10-02 Thread Michal Privoznik
While the reply can be reused test qemuMonitorJSONGetBlockExtent and qemuMonitorJSONGetBlockExtent too. Signed-off-by: Michal Privoznik mpriv...@redhat.com --- tests/qemumonitorjsontest.c | 212 1 file changed, 212 insertions(+) diff --git

Re: [libvirt] [PATCH 04/18] qemuMonitorTestFree: Join worker thread unconditionally

2013-10-02 Thread Daniel P. Berrange
On Wed, Oct 02, 2013 at 07:09:53PM +0200, Michal Privoznik wrote: The thread needs to be joined no matter if it was still running when qemuMonitorTestFree is called or not. The worker is thread spawned in qemuMonitorTestNew() and has to be joined. Signed-off-by: Michal Privoznik

Re: [libvirt] [PATCH 01/18] qemuMonitorJSONGetVirtType: Fix error message

2013-10-02 Thread Eric Blake
On 10/02/2013 11:09 AM, Michal Privoznik wrote: When querying for kvm, we try to find 'enabled' field. Hence the error message should report we haven't found 'enabled' and not 'running' (which is not even in the reply). Probably a typo or copy-paste error. Signed-off-by: Michal Privoznik

Re: [libvirt] [PATCH 02/18] qemumonitorjsontest: Test qemuMonitorJSONSystemPowerdown

2013-10-02 Thread Eric Blake
On 10/02/2013 11:09 AM, Michal Privoznik wrote: Right now, we are testing qemuMonitorSystemPowerdown instead of qemuMonitorJSONSystemPowerdown. It makes no harm, as both functions have the same header and the former is just a wrapper over the latter. But we should be consistent as we're

Re: [libvirt] [PATCH 03/18] qemuMonitorJSONSendKey: Avoid double free

2013-10-02 Thread Eric Blake
On 10/02/2013 11:09 AM, Michal Privoznik wrote: After successful @cmd construction the memory where @keys points to is part of @cmd. Avoid double freeing it. Signed-off-by: Michal Privoznik mpriv...@redhat.com --- src/qemu/qemu_monitor_json.c | 3 +++ 1 file changed, 3 insertions(+) ACK.

Re: [libvirt] [PATCH 05/18] qemumonitorjsontest: Extend the test for yet another monitor commands

2013-10-02 Thread Eric Blake
On 10/02/2013 11:09 AM, Michal Privoznik wrote: So far, we're unit testing some basic functions and some (so called) simple functions (e.g. qmp_capabilities, system_powerdown). However, there are more functions which expect simple {'return': {}} reply, but takes more args to construct the

Re: [libvirt] [PATCH 02/18] qemumonitorjsontest: Test qemuMonitorJSONSystemPowerdown

2013-10-02 Thread Daniel P. Berrange
On Wed, Oct 02, 2013 at 11:42:13AM -0600, Eric Blake wrote: On 10/02/2013 11:09 AM, Michal Privoznik wrote: Right now, we are testing qemuMonitorSystemPowerdown instead of qemuMonitorJSONSystemPowerdown. It makes no harm, as both functions have the same header and the former is just a

Re: [libvirt] ANNOUNCE: libvirt 1.0.5.6 maintenance release

2013-10-02 Thread Guido Günther
On Wed, Oct 02, 2013 at 10:59:03AM +0200, Christophe Fergeau wrote: On Mon, Sep 23, 2013 at 01:36:40PM -0400, Cole Robinson wrote: I basically do: - quick smoke test to make sure libvirt and virsh are working: -- stop system libvirtd -- sudo ./daemon/libvirt -- sudo ./tools/virsh

Re: [libvirt] [PATCH 06/18] qemumonitorjsontest: Test qemuMonitorJSONGetCPUInfo

2013-10-02 Thread Eric Blake
On 10/02/2013 11:09 AM, Michal Privoznik wrote: Signed-off-by: Michal Privoznik mpriv...@redhat.com --- tests/qemumonitorjsontest.c | 77 + 1 file changed, 77 insertions(+) + { +

Re: [libvirt] [PATCH 07/18] qemumonitorjsontest: Test qemuMonitorJSONGetVirtType

2013-10-02 Thread Eric Blake
On 10/02/2013 11:09 AM, Michal Privoznik wrote: Signed-off-by: Michal Privoznik mpriv...@redhat.com --- tests/qemumonitorjsontest.c | 38 ++ 1 file changed, 38 insertions(+) static int +testQemuMonitorJSONqemuMonitorJSONGetVirtType(const void *data)

Re: [libvirt] [PATCH 08/18] qemumonitorjsontest: Test qemuMonitorJSONGetBalloonInfo

2013-10-02 Thread Eric Blake
On 10/02/2013 11:09 AM, Michal Privoznik wrote: Signed-off-by: Michal Privoznik mpriv...@redhat.com --- tests/qemumonitorjsontest.c | 37 + 1 file changed, 37 insertions(+) + +if (qemuMonitorJSONGetBalloonInfo(qemuMonitorTestGetMonitor(test),

Re: [libvirt] [PATCH 09/18] qemumonitorjsontest: Test qemuMonitorJSONGetBlockInfo

2013-10-02 Thread Eric Blake
On 10/02/2013 11:09 AM, Michal Privoznik wrote: Signed-off-by: Michal Privoznik mpriv...@redhat.com --- tests/qemumonitorjsontest.c | 143 1 file changed, 143 insertions(+) ACK. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt

Re: [libvirt] [PATCH 10/18] qemumonitorjsontest: Test qemuMonitorJSONGetBlockStatsInfo

2013-10-02 Thread Eric Blake
On 10/02/2013 11:09 AM, Michal Privoznik wrote: While the reply can be reused test qemuMonitorJSONGetBlockExtent and qemuMonitorJSONGetBlockExtent too. Signed-off-by: Michal Privoznik mpriv...@redhat.com --- tests/qemumonitorjsontest.c | 212

Re: [libvirt] [PATCH 11/18] qemumonitorjsontest: Test qemuMonitorJSONGetMigrationCacheSize

2013-10-02 Thread Eric Blake
On 10/02/2013 11:10 AM, Michal Privoznik wrote: Signed-off-by: Michal Privoznik mpriv...@redhat.com --- tests/qemumonitorjsontest.c | 37 + 1 file changed, 37 insertions(+) ACK -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt

Re: [libvirt] [PATCH 12/18] qemumonitorjsontest: Test qemuMonitorJSONGetMigrationStatus

2013-10-02 Thread Eric Blake
On 10/02/2013 11:10 AM, Michal Privoznik wrote: Signed-off-by: Michal Privoznik mpriv...@redhat.com --- tests/qemumonitorjsontest.c | 50 + 1 file changed, 50 insertions(+) ACK -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt

Re: [libvirt] [PATCH 14/18] qemumonitorjsontest: Test qemuMonitorJSONGetPtyPaths

2013-10-02 Thread Eric Blake
On 10/02/2013 11:10 AM, Michal Privoznik wrote: Signed-off-by: Michal Privoznik mpriv...@redhat.com --- tests/qemumonitorjsontest.c | 67 + 1 file changed, 67 insertions(+) ACK. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt

Re: [libvirt] [PATCH 13/18] qemumonitorjsontest: Test qemuMonitorJSONGetSpiceMigrationStatus

2013-10-02 Thread Eric Blake
On 10/02/2013 11:10 AM, Michal Privoznik wrote: Signed-off-by: Michal Privoznik mpriv...@redhat.com --- tests/qemumonitorjsontest.c | 40 1 file changed, 40 insertions(+) ACK -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt

Re: [libvirt] [PATCH 15/18] qemumonitorjsontest: Test qemuMonitorJSONSendKey

2013-10-02 Thread Eric Blake
On 10/02/2013 11:10 AM, Michal Privoznik wrote: Signed-off-by: Michal Privoznik mpriv...@redhat.com --- tests/qemumonitorjsontest.c | 26 ++ 1 file changed, 26 insertions(+) static int +testQemuMonitorJSONqemuMonitorJSONSendKey(const void *data) +{ +

Re: [libvirt] [PATCH 18/18] qemumonitorjsontest: Test qemuMonitorJSONGetMigrationCapability

2013-10-02 Thread Eric Blake
On 10/02/2013 11:10 AM, Michal Privoznik wrote: And so do qemuMonitorJSONSetMigrationCapability. s/And so/Also/ Signed-off-by: Michal Privoznik mpriv...@redhat.com --- tests/qemumonitorjsontest.c | 46 + 1 file changed, 46 insertions(+)

Re: [libvirt] [PATCH 1/5] Don't set netdev offline in container cleanup

2013-10-02 Thread Eric Blake
On 10/02/2013 05:31 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com During container cleanup there is a race where the kernel may have destroyed the veth device before we try to set it offline. This causes log error messages. Given that we're about to delete the

Re: [libvirt] [PATCH 2/5] Avoid reporting an error if veth device is already deleted

2013-10-02 Thread Eric Blake
On 10/02/2013 05:31 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com The kernel automatically destroys veth devices when cleaning up the container network namepace. During normal shutdown, it s/namepace/namespace/ is thus likely that the attempt to run 'ip link

Re: [libvirt] [PATCHv4 1/4] net-dhcp-leases: Implement the public APIs

2013-10-02 Thread Nehal J Wani
So we can get the MAC addr if we use the '--dhcp-script' parameter to make dnsmasq invoke a helper program we create, to save the lease details we need. Incidentally, I see our XML format is actually wrong, because it says the 'mac' attribute is forbidden for host elements using IPv6.

Re: [libvirt] [PATCH 3/5] Avoid deleting NULL veth device name

2013-10-02 Thread Eric Blake
On 10/02/2013 05:31 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com If veth device allocation has a fatal error, the veths array may contain NULL device names. Avoid calling the virNetDevVethDelete function on such names. Signed-off-by: Daniel P. Berrange

Re: [libvirt] [PATCH 4/5] Retry veth device creation on failure

2013-10-02 Thread Eric Blake
On 10/02/2013 05:31 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com The veth device creation code run in two steps, first it looks for two free veth device names, then it runs ip link to create the veth pair. There is an obvious race between finding free names and

Re: [libvirt] [PATCH 5/5] Use 'vnet' as prefix for veth devices

2013-10-02 Thread Eric Blake
On 10/02/2013 05:31 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com The XML parser reserves 'vnet' as a prefix for automatically generated NIC device names. Switch the veth device creation to use this prefix, so it does not have to worry about clashes with user

Re: [libvirt] [PATCH 17/18] qemumonitorjsontest: Test qemuMonitorJSONGetTargetArch

2013-10-02 Thread Eric Blake
On 10/02/2013 11:10 AM, Michal Privoznik wrote: Signed-off-by: Michal Privoznik mpriv...@redhat.com --- tests/qemumonitorjsontest.c | 38 ++ 1 file changed, 38 insertions(+) ACK -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt

Re: [libvirt] [PATCH 16/18] qemumonitorjsontest: Test qemuMonitorJSONSetBlockIoThrottle

2013-10-02 Thread Eric Blake
On 10/02/2013 11:10 AM, Michal Privoznik wrote: And so do qemuMonitorJSONGetBlockIoThrottle. Signed-off-by: Michal Privoznik mpriv...@redhat.com --- tests/qemumonitorjsontest.c | 185 +++- 1 file changed, 115 insertions(+), 70 deletions(-) ACK.