[libvirt] [libvirt-test-API][PATCH V4 0/4] Add test case for virconnect V4

2014-04-25 Thread Jincheng Miao
V3-V4: Remove getSysinfo() check for lxc connection. Fix minor problems. V2-V3: Refactor connection_nodeinfo. Change the way of getting version number. V1-V2: Seperate check functions in each test case. Improve log message. V1: Add test case for virconnect Add test case for nodeinfo of

[libvirt] [libvirt-test-API][PATCH V4 1/4] Add test case for virConnect

2014-04-25 Thread Jincheng Miao
From: jmiao jm...@redhat.com Add a connect_attributes.py for testing API: isAlive, getType, getURI, getHostname, getSysinfo, getCapabilities. Signed-off-by: jmiao jm...@redhat.com --- repos/virconn/__init__.py | 0 repos/virconn/connection_attributes.py | 92

[libvirt] [libvirt-test-API][PATCH V4 2/4] Add connection_nodeinfo test case

2014-04-25 Thread Jincheng Miao
From: jmiao jm...@redhat.com The connection_nodeinfo.py test the node infomation the virConnect saved, like: arch, memory, cpus. Signed-off-by: jmiao jm...@redhat.com --- repos/virconn/connection_nodeinfo.py | 146 +++ 1 file changed, 146 insertions(+) create

[libvirt] [libvirt-test-API][PATCH V4 3/4] Add connection_version test case

2014-04-25 Thread Jincheng Miao
From: jmiao jm...@redhat.com The connection_version.py test the version of libvirt and hypervisor the virConnect saved. Currently, hypervisor checking only support qemu and lxc, need expanding more hypervisors in furture. Signed-off-by: jmiao jm...@redhat.com ---

[libvirt] [libvirt-test-API][PATCH V4 4/4] Add test_connection.conf

2014-04-25 Thread Jincheng Miao
From: jmiao jm...@redhat.com Signed-off-by: jmiao jm...@redhat.com --- cases/test_connection.conf | 31 +++ 1 file changed, 31 insertions(+) create mode 100644 cases/test_connection.conf diff --git a/cases/test_connection.conf b/cases/test_connection.conf new file

Re: [libvirt] [PATCH 4/4] Add support for addressing backing stores by index

2014-04-25 Thread Jiri Denemark
On Thu, Apr 24, 2014 at 13:43:48 -0600, Eric Blake wrote: On 04/22/2014 06:49 AM, Jiri Denemark wrote: Each backing store of a given disk is associated with a unique index (which is also formated in domain XML) for easier addressing of any s/formated/formatted/ particular backing

Re: [libvirt] [PATCH v2 0/2] bhyve: implement connectDomainXMLToNative

2014-04-25 Thread Roman Bogorodskiy
Roman Bogorodskiy wrote: Changes from v1: - Return both bhyveload and bhyve commands, not only bhyve. Roman Bogorodskiy (2): bhyve: improve bhyve_command.c testability bhyve: implement connectDomainXMLToNative src/bhyve/bhyve_command.c | 85

Re: [libvirt] [PATCH v5 1/5] Introduce virDomainFSFreeze() and virDomainFSThaw() public API

2014-04-25 Thread Daniel P. Berrange
On Thu, Apr 24, 2014 at 09:29:04PM +, Tomoki Sekiyama wrote: On 4/24/14 4:58 , Daniel P. Berrange berra...@redhat.com wrote: On Thu, Apr 24, 2014 at 12:16:00AM +, Tomoki Sekiyama wrote: Hi Daniel, On 4/23/14 5:55 , Daniel P. Berrange berra...@redhat.com wrote: On Tue, Apr

Re: [libvirt] [PATCH] Add test suite for viralloc APIs

2014-04-25 Thread Daniel P. Berrange
On Thu, Apr 24, 2014 at 04:00:35PM -0600, Eric Blake wrote: On 04/24/2014 02:25 PM, Nehal J Wani wrote: +static int +testAllocScalar(const void *opaque ATTRIBUTE_UNUSED) +{ +testDummyStruct *t; +int ret = -1; + +if (VIR_ALLOC(t) 0) +return -1; + +if (t

Re: [libvirt] [PATCH 9/9] Use virFileFindResource to locate CPU map XML

2014-04-25 Thread Daniel P. Berrange
On Thu, Apr 24, 2014 at 04:18:02PM -0600, Eric Blake wrote: On 04/24/2014 10:05 AM, Daniel P. Berrange wrote: Replace use of cpuMapOverride with virFileFindResource to locate CPU map from build dir. Signed-off-by: Daniel P. Berrange berra...@redhat.com --- daemon/libvirtd.c|

Re: [libvirt] [PATCH] build: avoid 'index' as variable name

2014-04-25 Thread Daniel P. Berrange
On Thu, Apr 24, 2014 at 03:43:31PM -0600, Eric Blake wrote: Once again, gcc 4.4.7 (hello RHEL) rears its ugly head: conf/domain_conf.c: In function 'virDomainDiskBackingStoreFormat': conf/domain_conf.c:14940: error: declaration of 'index' shadows a global declaration [-Wshadow]

Re: [libvirt] [PATCH 1/9] Add helpers for resolving path to resources in build tree

2014-04-25 Thread Daniel P. Berrange
On Fri, Apr 25, 2014 at 12:51:54AM +0530, Nehal J Wani wrote: + * virFileFindResourceFull: + * @filename: libvirt distributed filename without any path + * @prefix: optional string to prepend to filename + * @suffix: optional string to append to filename + * @builddir: location of the

[libvirt] [PATCH 0/3] Use virFileFindResource for libvirtd/virtlockd autostart

2014-04-25 Thread Daniel P. Berrange
This small series converts the two places where we autostart libvirtd/virtlockd over to use virFileFindResource so that ./tools/virsh -c qemu:///session will use the daemons from the source tree instead of /usr/sbin Daniel P. Berrange (3): Use virFileFindResource to locate libvirtd daemon Use

[libvirt] [PATCH 1/3] Use virFileFindResource to locate libvirtd daemon

2014-04-25 Thread Daniel P. Berrange
Make the remote driver use virFileFindResource to find the libvirt daemon path, so that it executes the in-builddir daemon if run from source tree. Signed-off-by: Daniel P. Berrange berra...@redhat.com --- src/remote/remote_driver.c | 44 ++-- 1 file

[libvirt] [PATCH 2/3] Use virFileFindResource to locate virtlockd daemon

2014-04-25 Thread Daniel P. Berrange
Make the lock plugin use virFileFindResource to find the virtlockd daemon path, so that it executes the in-builddir daemon if run from source tree. Signed-off-by: Daniel P. Berrange berra...@redhat.com --- src/locking/lock_driver_lockd.c | 25 +++-- 1 file changed, 7

[libvirt] [PATCH 3/3] Make autostart of virtlockd actually work

2014-04-25 Thread Daniel P. Berrange
The virnetsocket.c API is hardcoded to pass --timeout=30 to any daemon it auto-starts. For inexplicable reasons the virtlockd daemon did not implement the --timeout option, so it would immediately exit on autostart with an error. Signed-off-by: Daniel P. Berrange berra...@redhat.com ---

[libvirt] [PATCH] Recheck disk backing chains after snapshot

2014-04-25 Thread Jiri Denemark
When a snapshot operation finishes we have to recheck the backing chain of all disks involved in the snapshot. And we need to do that even if the operation failed because some of the disks might have changed if QEMU did not support transactions. Signed-off-by: Jiri Denemark jdene...@redhat.com

Re: [libvirt] [PATCH 14/26] Add test for converting network XML to iptables rules

2014-04-25 Thread Daniel P. Berrange
On Wed, Apr 16, 2014 at 03:54:48PM +0200, Ján Tomko wrote: On 04/08/2014 05:38 PM, Daniel P. Berrange wrote: Using the virCommand dry run capability, capture iptables rules created by various network XML documents. Signed-off-by: Daniel P. Berrange berra...@redhat.com --- diff

Re: [libvirt] [PATCH 1/3] Use virFileFindResource to locate libvirtd daemon

2014-04-25 Thread Eric Blake
On 04/25/2014 05:28 AM, Daniel P. Berrange wrote: Make the remote driver use virFileFindResource to find the libvirt daemon path, so that it executes the in-builddir daemon if run from source tree. Signed-off-by: Daniel P. Berrange berra...@redhat.com --- src/remote/remote_driver.c | 44

[libvirt] [PATCH] qemu: Avoid overflow when setting migration speed on inactive domains

2014-04-25 Thread Jiri Denemark
Commit c4206d7 fixed the overflow for running domains. However, we need a similar check when setting migration speed on inactive domains. At first look, it may seem the check in c4206d7 is now redundant but qemuDomainMigrateSetMaxSpeed is not the only caller of qemuMonitorSetMigrationSpeed so we

Re: [libvirt] [PATCH 2/3] Use virFileFindResource to locate virtlockd daemon

2014-04-25 Thread Eric Blake
On 04/25/2014 05:28 AM, Daniel P. Berrange wrote: Make the lock plugin use virFileFindResource to find the virtlockd daemon path, so that it executes the in-builddir daemon if run from source tree. Signed-off-by: Daniel P. Berrange berra...@redhat.com --- src/locking/lock_driver_lockd.c |

Re: [libvirt] [PATCH 14/26] Add test for converting network XML to iptables rules

2014-04-25 Thread Eric Blake
On 04/25/2014 07:37 AM, Daniel P. Berrange wrote: On Wed, Apr 16, 2014 at 03:54:48PM +0200, Ján Tomko wrote: On 04/08/2014 05:38 PM, Daniel P. Berrange wrote: Using the virCommand dry run capability, capture iptables rules created by various network XML documents. + * And we're munging it

Re: [libvirt] [PATCH] qemu: Avoid overflow when setting migration speed on inactive domains

2014-04-25 Thread Eric Blake
On 04/25/2014 08:04 AM, Jiri Denemark wrote: Commit c4206d7 fixed the overflow for running domains. However, we need a similar check when setting migration speed on inactive domains. At first look, it may seem the check in c4206d7 is now redundant but qemuDomainMigrateSetMaxSpeed is not the

Re: [libvirt] [PATCH 3/3] Make autostart of virtlockd actually work

2014-04-25 Thread Eric Blake
On 04/25/2014 05:28 AM, Daniel P. Berrange wrote: The virnetsocket.c API is hardcoded to pass --timeout=30 to any daemon it auto-starts. For inexplicable reasons the virtlockd daemon did not implement the --timeout option, so it would immediately exit on autostart with an error.

Re: [libvirt] [PATCH v5 1/5] Introduce virDomainFSFreeze() and virDomainFSThaw() public API

2014-04-25 Thread Tomoki Sekiyama
On 4/25/14 5:44 , Daniel P. Berrange berra...@redhat.com wrote: On Thu, Apr 24, 2014 at 09:29:04PM +, Tomoki Sekiyama wrote: On 4/24/14 4:58 , Daniel P. Berrange berra...@redhat.com wrote: On Thu, Apr 24, 2014 at 12:16:00AM +, Tomoki Sekiyama wrote: Hi Daniel, On 4/23/14

Re: [libvirt] [PATCH 1/3] Use virFileFindResource to locate libvirtd daemon

2014-04-25 Thread Daniel P. Berrange
On Fri, Apr 25, 2014 at 08:01:58AM -0600, Eric Blake wrote: On 04/25/2014 05:28 AM, Daniel P. Berrange wrote: Make the remote driver use virFileFindResource to find the libvirt daemon path, so that it executes the in-builddir daemon if run from source tree. Signed-off-by: Daniel P.

Re: [libvirt] [PATCH] qemu: Avoid overflow when setting migration speed on inactive domains

2014-04-25 Thread Jiri Denemark
On Fri, Apr 25, 2014 at 08:09:10 -0600, Eric Blake wrote: On 04/25/2014 08:04 AM, Jiri Denemark wrote: Commit c4206d7 fixed the overflow for running domains. However, we need a similar check when setting migration speed on inactive domains. At first look, it may seem the check in c4206d7

[libvirt] [PATCH] libxl: Support PV consoles

2014-04-25 Thread Ian Campbell
Currently the driver only exposes the ability to connect to the serial console of a Xen guest, which doesn't work for a PV guest. Instead look for a PV console first and a serial console second, if an HVM guest has a PV console then it is a good bet that it is preferred, I think. Tested with the

[libvirt] Schedule for next release 1.2.4

2014-04-25 Thread Daniel Veillard
Sorry about the late notice, I forgot about the end of month coming. It seems we are trying a lot of patches in right now, but it would be good to not drift too much, so I am suggesting to enter the freeze on Monday morning. This mean I could push 1.2.4 either on Friday if everything looks

Re: [libvirt] [PATCH] libxl: Support PV consoles

2014-04-25 Thread Daniel P. Berrange
On Fri, Apr 25, 2014 at 03:22:25PM +0100, Ian Campbell wrote: Currently the driver only exposes the ability to connect to the serial console of a Xen guest, which doesn't work for a PV guest. Instead look for a PV console first and a serial console second, if an HVM guest has a PV console then

Re: [libvirt] [PATCH] Fix vlan ID detection in udev interface driver

2014-04-25 Thread Dave Allan
On Thu, Apr 24, 2014 at 03:19:45PM +0200, Ján Tomko wrote: Instead of guessing it from the interface name, look into /proc/net/vlan/interface. This works for devices not named real_device.vlan ID, avoiding an error flood when virt-manager keeps asking about them every second:

Re: [libvirt] [PATCH] libxl: Support PV consoles

2014-04-25 Thread Ian Campbell
On Fri, 2014-04-25 at 16:15 +0100, Daniel P. Berrange wrote: I think we can in fact just replace 'nserials' / 'serials' with 'nconsoles' / 'consoles' unconditionally. If a guest has a traditional serial port, then this wil be duplicated into the 'def-consoles' array too. So soley looking at

Re: [libvirt] [PATCH 0/2] esx: Add libcurl based stream driver and implement virDomainScreenshot

2014-04-25 Thread Dawid Zamirski
On Sun, 2014-03-30 at 21:03 +0200, Matthias Bolte wrote: I had the code in these two patches bascially sitting around since 2012, yes 2012! But I never managed to get the code properly split into patches and touched up good enough to post it here. This was also hindered by the fact that I had

[libvirt] [PATCH v2] libxl: Support PV consoles

2014-04-25 Thread Ian Campbell
Currently the driver only exposes the ability to connect to the serial console of a Xen guest, which doesn't work for a PV guest. Since for an HVM guest the serial devices are duplicated as consoles it is sufficient to just use the console devices unconditionally. Tested with the following bit of

Re: [libvirt] [PATCH v2] libxl: Support PV consoles

2014-04-25 Thread Daniel P. Berrange
On Fri, Apr 25, 2014 at 04:54:20PM +0100, Ian Campbell wrote: Currently the driver only exposes the ability to connect to the serial console of a Xen guest, which doesn't work for a PV guest. Since for an HVM guest the serial devices are duplicated as consoles it is sufficient to just use the

Re: [libvirt] [Xen-devel] [PATCH v2] libxl: Support PV consoles

2014-04-25 Thread Jim Fehlig
Ian Campbell wrote: Currently the driver only exposes the ability to connect to the serial console of a Xen guest, which doesn't work for a PV guest. Since for an HVM guest the serial devices are duplicated as consoles it is sufficient to just use the console devices unconditionally. Tested

[libvirt] [PATCH] build: add nwfilterxml2firewalldata to dist

2014-04-25 Thread Dwight Engen
Signed-off-by: Dwight Engen dwight.en...@oracle.com --- tests/Makefile.am | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/Makefile.am b/tests/Makefile.am index ba79d64..4a5e14b 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -96,6 +96,7 @@ EXTRA_DIST = \

[libvirt] [PATCH] Don't use SO_REUSEADDR on Win32 platforms

2014-04-25 Thread Daniel P. Berrange
SO_REUSEADDR on Windows is actually akin to SO_REUSEPORT on Linux/BSD. ie it allows 2 apps to listen to the same port at once. Thus we must not set it on Win32 platforms See http://msdn.microsoft.com/en-us/library/windows/desktop/ms740621.aspx Signed-off-by: Daniel P. Berrange

Re: [libvirt] [PATCH] build: add nwfilterxml2firewalldata to dist

2014-04-25 Thread Daniel P. Berrange
On Fri, Apr 25, 2014 at 12:46:02PM -0400, Dwight Engen wrote: Signed-off-by: Dwight Engen dwight.en...@oracle.com --- tests/Makefile.am | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/Makefile.am b/tests/Makefile.am index ba79d64..4a5e14b 100644 --- a/tests/Makefile.am +++

Re: [libvirt] [PATCH] Recheck disk backing chains after snapshot

2014-04-25 Thread Eric Blake
On 04/25/2014 07:13 AM, Jiri Denemark wrote: When a snapshot operation finishes we have to recheck the backing chain of all disks involved in the snapshot. And we need to do that even if the operation failed because some of the disks might have changed if QEMU did not support transactions.

Re: [libvirt] [PATCH 1/3] Use virFileFindResource to locate libvirtd daemon

2014-04-25 Thread Eric Blake
On 04/25/2014 08:25 AM, Daniel P. Berrange wrote: On Fri, Apr 25, 2014 at 08:01:58AM -0600, Eric Blake wrote: On 04/25/2014 05:28 AM, Daniel P. Berrange wrote: Make the remote driver use virFileFindResource to find the libvirt daemon path, so that it executes the in-builddir daemon if run

Re: [libvirt] [PATCH 1/3] Use virFileFindResource to locate libvirtd daemon

2014-04-25 Thread Eric Blake
On 04/25/2014 10:54 AM, Daniel P. Berrange wrote: # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -56,7 +56,6 @@ export LD_LIBRARY_PATH export LIBVIRT_DRIVER_DIR=$b/src/.libs export

Re: [libvirt] [PATCH] Don't use SO_REUSEADDR on Win32 platforms

2014-04-25 Thread Eric Blake
On 04/25/2014 10:47 AM, Daniel P. Berrange wrote: SO_REUSEADDR on Windows is actually akin to SO_REUSEPORT on Linux/BSD. ie it allows 2 apps to listen to the same port at once. Thus we must not set it on Win32 platforms See

Re: [libvirt] [PATCH 1/3] Use virFileFindResource to locate libvirtd daemon

2014-04-25 Thread Daniel P. Berrange
On Fri, Apr 25, 2014 at 10:52:23AM -0600, Eric Blake wrote: On 04/25/2014 08:25 AM, Daniel P. Berrange wrote: On Fri, Apr 25, 2014 at 08:01:58AM -0600, Eric Blake wrote: On 04/25/2014 05:28 AM, Daniel P. Berrange wrote: Make the remote driver use virFileFindResource to find the libvirt

Re: [libvirt] [Xen-devel] [PATCH v2] libxl: Support PV consoles

2014-04-25 Thread Jim Fehlig
Jim Fehlig wrote: Ian Campbell wrote: Currently the driver only exposes the ability to connect to the serial console of a Xen guest, which doesn't work for a PV guest. Since for an HVM guest the serial devices are duplicated as consoles it is sufficient to just use the console devices

Re: [libvirt] [PATCH] Fix vlan ID detection in udev interface driver

2014-04-25 Thread Laine Stump
On 04/25/2014 06:21 PM, Dave Allan wrote: On Thu, Apr 24, 2014 at 03:19:45PM +0200, Ján Tomko wrote: Instead of guessing it from the interface name, look into /proc/net/vlan/interface. This works for devices not named real_device.vlan ID, avoiding an error flood when virt-manager keeps

Re: [libvirt] [Xen-devel] [PATCH v2] libxl: Support PV consoles

2014-04-25 Thread Konrad Rzeszutek Wilk
On Fri, Apr 25, 2014 at 11:24:07AM -0600, Jim Fehlig wrote: Jim Fehlig wrote: Ian Campbell wrote: Currently the driver only exposes the ability to connect to the serial console of a Xen guest, which doesn't work for a PV guest. Since for an HVM guest the serial devices are

Re: [libvirt] [PATCHv2 0.5/4] network: fix virNetworkObjAssignDef and persistence

2014-04-25 Thread Laine Stump
On 04/24/2014 07:09 PM, John Ferlan wrote: On 04/23/2014 09:49 AM, Laine Stump wrote: Experimentation showed that if virNetworkCreateXML() was called for a network that was already defined, and then the network was subsequently shutdown, the network would continue to be persistent after the

[libvirt] [PATCH] ESX: add virStorageVolGetInfo in iSCSI backend.

2014-04-25 Thread Dawid Zamirski
Since the ESX storage implements VMFS and iSCSI storage backends and chooses relevant backend dynamically at runtime, there was a segfault when issuing vol-info on iSCSI volume due to unimplemented virStorageGetInfo function. This patch implements that function that was missing in iSCSI backend

Re: [libvirt] [PATCHv2 0.5/4] network: fix virNetworkObjAssignDef and persistence

2014-04-25 Thread John Ferlan
On 04/25/2014 01:55 PM, Laine Stump wrote: On 04/24/2014 07:09 PM, John Ferlan wrote: On 04/23/2014 09:49 AM, Laine Stump wrote: Experimentation showed that if virNetworkCreateXML() was called for a network that was already defined, and then the network was subsequently shutdown, the

Re: [libvirt] [Xen-devel] [PATCH v2] libxl: Support PV consoles

2014-04-25 Thread Ian Campbell
On Fri, 2014-04-25 at 11:24 -0600, Jim Fehlig wrote: Jim Fehlig wrote: Ian Campbell wrote: Currently the driver only exposes the ability to connect to the serial console of a Xen guest, which doesn't work for a PV guest. Since for an HVM guest the serial devices are duplicated

Re: [libvirt] [Xen-devel] [PATCH v2] libxl: Support PV consoles

2014-04-25 Thread Ian Campbell
On Fri, 2014-04-25 at 13:32 -0400, Konrad Rzeszutek Wilk wrote: The development version of Xen is 4.5. The latest stable is Xen 4.4. If you want to backport it - then your suggestion is correct. Or just backport the relevant patches ? This patch is against libvirt, which wishes to support

Re: [libvirt] [Xen-devel] [PATCH v2] libxl: Support PV consoles

2014-04-25 Thread Konrad Rzeszutek Wilk
On Fri, Apr 25, 2014 at 07:52:55PM +0100, Ian Campbell wrote: On Fri, 2014-04-25 at 13:32 -0400, Konrad Rzeszutek Wilk wrote: The development version of Xen is 4.5. The latest stable is Xen 4.4. If you want to backport it - then your suggestion is correct. Or just backport the relevant

[libvirt] [PATCH] build: -avoid-version on libvirt_driver_nwfilter

2014-04-25 Thread Dwight Engen
This fixes the following make rpm warning: warning: Installed (but unpackaged) file(s) found: /usr/lib64/libvirt/connection-driver/libvirt_driver_nwfilter.so.0 /usr/lib64/libvirt/connection-driver/libvirt_driver_nwfilter.so.0.0.0 Signed-off-by: Dwight Engen dwight.en...@oracle.com ---

Re: [libvirt] [Xen-devel] [PATCH v2] libxl: Support PV consoles

2014-04-25 Thread Jim Fehlig
Ian Campbell wrote: On Fri, 2014-04-25 at 11:24 -0600, Jim Fehlig wrote: Jim Fehlig wrote: Ian Campbell wrote: Currently the driver only exposes the ability to connect to the serial console of a Xen guest, which doesn't work for a PV guest. Since for an HVM guest the

Re: [libvirt] [PATCH] Fix vlan ID detection in udev interface driver

2014-04-25 Thread Dave Allan
On Fri, Apr 25, 2014 at 08:28:32PM +0300, Laine Stump wrote: On 04/25/2014 06:21 PM, Dave Allan wrote: On Thu, Apr 24, 2014 at 03:19:45PM +0200, Ján Tomko wrote: Instead of guessing it from the interface name, look into /proc/net/vlan/interface. This works for devices not named

[libvirt] [PATCH v5] Add helper program to create custom leases

2014-04-25 Thread Nehal J Wani
Introduce helper program to catch events from dnsmasq and maintain a custom lease file per network. It supports dhcpv4 and dhcpv6. The file is saved as interface-name.status. Each lease contains the following info: expiry-time (epoch time) mac iaid ip-address hostname clientid Example of custom

[libvirt] [PATCHv2 0/7] saner readdir usage

2014-04-25 Thread Eric Blake
This extends the work started by Nataneal to cover the entire tree. Basically, readdir() is awkward to use correctly: to properly check for (unlikely) errors, one must pre-set errno. Forcing everything to go through a wrapper ensures that all our uses will be consistent; this also fixes several