Re: [libvirt] [PATCH] maint: update to latest gnulib

2013-12-06 Thread Michal Privoznik
On 06.12.2013 00:52, Eric Blake wrote: A couple of fixes for bootstrap issues reported on IRC: - on some older glibc systems, ./configure could deadlock due to a glibc malloc bug - on FreeBSD systems, a broken autom4te coupled with gettext 0.18.3 prevents bootstrap; we can't work around it,

Re: [libvirt] [PATCH]lxc: remove redundant mount operation

2013-12-06 Thread Chen Hanxiao
ping -Original Message- From: libvir-list-boun...@redhat.com [mailto:libvir-list-boun...@redhat.com] On Behalf Of Chen Hanxiao Sent: Tuesday, December 03, 2013 4:37 PM To: libvir-list@redhat.com Subject: Re: [libvirt] [PATCH]lxc: remove redundant mount operation ping

Re: [libvirt] [PATCH] qemu: snapshot: Fix incorrect disk type for auto-generated disks

2013-12-06 Thread Peter Krempa
On 12/05/13 20:25, Eric Blake wrote: On 12/05/2013 09:30 AM, Peter Krempa wrote: On 12/05/13 17:17, Peter Krempa wrote: When changing the parsing and formatting functions in commit 43f2ccdc73090bd03f64de4d58d46ffa0134d705 I forgot to update the qemu disk alingnment function for snapshots that

Re: [libvirt] [PATCH] conf: Fix XML formatting of RNG device info

2013-12-06 Thread Peter Krempa
On 12/05/13 20:26, Eric Blake wrote: On 12/05/2013 10:36 AM, Peter Krempa wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1035118 When outputting the XML for the RNG device, the code didn't format the PCI address info. Additionally the schema wasn't expecting the info although it was

Re: [libvirt] [PATCH] qemu: Improve error when setting invalid count of vcpus via agent

2013-12-06 Thread Peter Krempa
On 12/05/13 20:25, Eric Blake wrote: On 12/05/2013 09:50 AM, Peter Krempa wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1035108 When attempting to enable more vCPUs in the guest than is currently enabled in the guest but less than the maximum count for the VM we currently reported an

[libvirt] [libvirt-glib] config: Fix typo preventing clock removal from a domain

2013-12-06 Thread Christophe Fergeau
Commit 1c8ce29 added a way to unset a GVirConfigDomainClock set on a GVirConfigDomain by calling gvir_config_domain_set_clock() with a NULL argument. However, a typo in a g_return_if_fail precondition prevents this code from ever being called: g_return_if_fail(clock != NULL) is used while it

[libvirt] Add GVirConfigDomainDiskDriver

2013-12-06 Thread Christophe Fergeau
Hey, I wanted to add support in libvirt-gconfig for the 'discard' attribute of the disk driver node. If I follow the way the API is currently done, it would be an additional method to GVirConfigDomainDisk. However, there are quite a few attributes attached to the disk driver node, so I felt it

[libvirt] [libvirt-glib 1/4] Add GVirConfigDomainDiskDriver

2013-12-06 Thread Christophe Fergeau
This class wraps creation of configuration data for the driver part of a domain disk device. The methods needed for this are currently part of GVirConfigDomainDisk, but since the disk driver is getting more and more attributes, it's better to move such configuration to a dedicated class to avoid a

[libvirt] [libvirt-glib 4/4] Add basic test for gvir_config_domain_disk_driver_set_copy_on_read()

2013-12-06 Thread Christophe Fergeau
--- libvirt-gconfig/tests/test-domain-create.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libvirt-gconfig/tests/test-domain-create.c b/libvirt-gconfig/tests/test-domain-create.c index b5c2cf3..e0d6c00 100644 --- a/libvirt-gconfig/tests/test-domain-create.c +++

[libvirt] [libvirt-glib 2/4] Implement gvir_config_domain_disk_[gs]et_driver()

2013-12-06 Thread Christophe Fergeau
--- libvirt-gconfig/libvirt-gconfig-domain-disk.c | 42 +++ libvirt-gconfig/libvirt-gconfig-domain-disk.h | 58 +++ libvirt-gconfig/libvirt-gconfig.sym | 3 ++ 3 files changed, 77 insertions(+), 26 deletions(-) diff --git

[libvirt] [libvirt-glib 3/4] Deprecate gvir_config_domain_disk_[gs]et_driver_*

2013-12-06 Thread Christophe Fergeau
They are replaced by equivalent methods in GVirConfigDomainDiskDriver. Initially, we had only one or two attributes to set on the 'driver' child of the 'disk' node. Nowadays, we more than 5 attributes to set on this node, mapping it as a separate object is more consistent with the rest of

[libvirt] [libvirt-glib 0/4] Add symbol files checks to make check

2013-12-06 Thread Christophe Fergeau
Hey, This series is based of the libosinfo work danpb did recently to reuse libvirt scripts to validate the symbol files. These make sure the exported symbols match what is listed in the sym file, and that these files are alphabetically ordered. This caught 2 minor errors in the sym files we

[libvirt] [libvirt-glib 1/4] Alphabetically sort libvirt-glib sym files

2013-12-06 Thread Christophe Fergeau
This is in preparation to enforcing this sorting during make check. The script only checks for alphabetical sorting, which leads to unexpected sorting between classes sharing a common prefix (eg the correct order is: gvir_config_domain_get_foo; gvir_config_domain_interface_set_foo;

[libvirt] [libvirt-glib 3/4] Fix typo in symbol name in libvirt-gobject.sym

2013-12-06 Thread Christophe Fergeau
gvir_connection_restore_domain_from_file_finish was not properly exported because of a typo in the symbol name. This commit also removes a newer occurrence of this symbol in the file (without the typo). This can be done without breaking ABI as we haven't made a release since this duplicate symbol

[libvirt] [libvirt-glib 4/4] Add scripts for validating the libvirt-glib symbol files

2013-12-06 Thread Christophe Fergeau
Import two test scripts from libvirt code which validate that all symbols in libvirt-glib symbol files exist in the ELF binary, and also validate the alphabetical sorting. These are hooked up to run with 'make check'. This commit is based on a libosinfo patch from Daniel P. Berrange ---

[libvirt] [libvirt-glib 2/4] Remove gvir_config_domain_cpu_get_features() from sym file

2013-12-06 Thread Christophe Fergeau
This method was never exported. GVirConfigDomainCpu inherits from GVirConfigCapabilitiesCpu so gvir_config_capabilities_cpu_get_features() should be used to get these features (this calls the virtual method GVirConfigCapabilities::get_features() which GVirConfigDomainCpu implements). ---

[libvirt] [PATCH] Add qxl ram size to ABI stability check

2013-12-06 Thread Ján Tomko
55bfd02 added a 'ram' attribute for qxl video devices but didn't update the ABI check. https://bugzilla.redhat.com/show_bug.cgi?id=1035123 --- src/conf/domain_conf.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 0268847..b76cf26

Re: [libvirt] [PATCH] Add qxl ram size to ABI stability check

2013-12-06 Thread Peter Krempa
On 12/06/13 15:01, Ján Tomko wrote: 55bfd02 added a 'ram' attribute for qxl video devices but didn't update the ABI check. https://bugzilla.redhat.com/show_bug.cgi?id=1035123 --- src/conf/domain_conf.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/conf/domain_conf.c

Re: [libvirt] [PATCH] Add qxl ram size to ABI stability check

2013-12-06 Thread Ján Tomko
On 12/06/2013 03:10 PM, Peter Krempa wrote: On 12/06/13 15:01, Ján Tomko wrote: 55bfd02 added a 'ram' attribute for qxl video devices but didn't update the ABI check. https://bugzilla.redhat.com/show_bug.cgi?id=1035123 --- src/conf/domain_conf.c | 7 +++ 1 file changed, 7

[libvirt] [PATCH] network: only prevent forwarding of DNS requests for unqualified names

2013-12-06 Thread Laine Stump
In commit f386825 we began adding the option --local=/$mydomain/ to all dnsmasq commandlines (later changed to local=/$mydomain/ when we moved the options from the commandline to a conf file) with the stated reason of preventing forwarding of DNS queries for names that weren't fully qualified

[libvirt] [PATCH 0/3] Support more snapshot disk configs

2013-12-06 Thread Peter Krempa
A newly finished part of the large gluster snapshot series. These patches allow to parse and format definitions of snapshot disks including block, dir and network backing. Peter Krempa (3): snapshot: schema: Split out snapshot disk driver definition snapshot: Add support for specifying

[libvirt] [PATCH 1/3] snapshot: schema: Split out snapshot disk driver definition

2013-12-06 Thread Peter Krempa
Extract the definition to a new type to allow avoiding of duplication. --- docs/schemas/domainsnapshot.rng | 24 ++-- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/docs/schemas/domainsnapshot.rng b/docs/schemas/domainsnapshot.rng index 7b46df1..169fcfb 100644

[libvirt] [PATCH 3/3] snapshots: Test snapshot disk type specification

2013-12-06 Thread Peter Krempa
Amend tests to check parsing of the various new disk types that can now be specified. --- tests/domainsnapshotxml2xmlin/disk_snapshot.xml | 18 ++ tests/domainsnapshotxml2xmlout/disk_snapshot.xml | 18 ++ 2 files changed, 36 insertions(+) diff --git

[libvirt] [PATCH 2/3] snapshot: Add support for specifying snapshot disk backing type

2013-12-06 Thread Peter Krempa
Add support for specifying various types when doing snapshots. This will later allow to do snapshots on network backed volumes. Disks of type 'volume' are not supported by snapshots (yet). --- docs/schemas/domainsnapshot.rng | 76 +++-- src/conf/snapshot_conf.c

Re: [libvirt] [PATCH] Cgroup: Replace 'newpath' with 'newPath'

2013-12-06 Thread Michal Privoznik
On 06.12.2013 05:15, Wangyufei (James) wrote: From be1ce1c794b05a27aa85d037500a821b8c514d12 Mon Sep 17 00:00:00 2001 From: Zhou Yimin zhouyi...@huawei.com Date: Fri, 6 Dec 2013 11:38:14 +0800 Subject: [PATCH] Cgroup: Replace 'newpath' with 'newPath' Unifying codding style, replace 'newpath'

Re: [libvirt] [PATCH] lxc: return the right value if failed to make path

2013-12-06 Thread Michal Privoznik
On 06.12.2013 07:20, Chen Hanxiao wrote: From: Chen Hanxiao chenhanx...@cn.fujitsu.com If we failed to make path for pts, lxcContainerMountFSDevPTS will return the value virAsprintf returned rather than -1. Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com ---

Re: [libvirt] [PATCHv4 2/2] qemu: conf: Implement RBD storage pool support

2013-12-06 Thread Adam Walters
I tested the patch, and it didn't work for me (already found the bug, though, and a new patch will be sent shortly). The bug is related to the cGroup code (specifically, the virDomainDiskDefForeachPath function in conf/domain_conf.c). The entire libvirt codebase does not yet utilize the actualtype

Re: [libvirt] [PATCH 0/6] Various spec file enhancements

2013-12-06 Thread Michal Privoznik
On 06.12.2013 00:36, Jim Fehlig wrote: This series moves some driver-specific files from the main libvirt-daemon package to the respective libvirt-daemon-driver-* package when building with driver modules. This was originally all one patch that I found difficult to review, so I tried to

Re: [libvirt] [PATCH 1/6] spec: Conditionally add /etc/libvirt/nwfilter

2013-12-06 Thread Michal Privoznik
On 06.12.2013 00:36, Jim Fehlig wrote: Only add /etc/libvirt/nwfilter to the libvirt-daemon files list if building with nwfilter support. --- libvirt.spec.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libvirt.spec.in b/libvirt.spec.in index eff7103..7f2a23a 100644 ---

Re: [libvirt] [PATCH 1/6] spec: Conditionally add /etc/libvirt/nwfilter

2013-12-06 Thread Jim Fehlig
Michal Privoznik wrote: On 06.12.2013 00:36, Jim Fehlig wrote: Only add /etc/libvirt/nwfilter to the libvirt-daemon files list if building with nwfilter support. --- libvirt.spec.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libvirt.spec.in b/libvirt.spec.in index

Re: [libvirt] [PATCH 1/6] spec: Conditionally add /etc/libvirt/nwfilter

2013-12-06 Thread Jim Fehlig
Jim Fehlig wrote: Michal Privoznik wrote: On 06.12.2013 00:36, Jim Fehlig wrote: Only add /etc/libvirt/nwfilter to the libvirt-daemon files list if building with nwfilter support. --- libvirt.spec.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libvirt.spec.in

Re: [libvirt] [PATCH 1/6] spec: Conditionally add /etc/libvirt/nwfilter

2013-12-06 Thread Eric Blake
On 12/06/2013 10:19 AM, Jim Fehlig wrote: I modified commit message to reflect this change. Updated patch attached. ACK to the updated version. Thanks for tackling this series. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org

[libvirt] [PATCHv5 0/4] Implement RBD storage pool support

2013-12-06 Thread Adam Walters
Here are updated patches that implement RBD storage pool support in libvirt. By and large, my changes are confined to qemu_conf.c, but I did need a couple of changes in domain_conf.c in order to get things working. I've tested these patches on my equipment, and they worked there, but they could

[libvirt] [PATCHv5 4/4] domain: conf: Resolve bug related to network volume types

2013-12-06 Thread Adam Walters
While testing Peter's changes to my patches, I discovered that when restarting libvirt with domains running, they would no longer show up when a 'virsh list' was issued. I tracked this bug down to this section of code within virDomainDiskDefParseXML. The symptom was that libvirt was issuing an

[libvirt] [PATCHv5 1/4] qemu: conf: Add qemuAddRBDPoolSourceHost helper function

2013-12-06 Thread Adam Walters
This helper function pulls the host definitions from the RBD storage pool definition, and applies it to the disk definition. --- src/qemu/qemu_conf.c | 39 +++ 1 file changed, 39 insertions(+) diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c index

[libvirt] [PATCHv5 3/4] domain: conf: Bypass virDomainDiskDefForeachPath for network volumes

2013-12-06 Thread Adam Walters
virDomainDiskDefForeachPath returned 0 previously for disks of type VIR_DOMAIN_DISK_TYPE_NETWORK. This patch extends this check to also bypass the function for VIR_DOMAIN_DISK_TYPE_VOLUME, shoudl the new disk variable def-actualtype contain VIR_DOMAIN_DISK_TYPE_NETWORK. --- src/conf/domain_conf.c

[libvirt] [PATCHv5 2/4] qemu: conf: Implement RBD storage pool support

2013-12-06 Thread Adam Walters
This patch is updated to not contain a switch statement on the mode. The patch as a whole allows RBD storage pool volumes to be used within domain XML. --- src/qemu/qemu_conf.c | 23 ++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_conf.c

Re: [libvirt] [PATCH 0/6] Various spec file enhancements

2013-12-06 Thread Jim Fehlig
Michal Privoznik wrote: On 06.12.2013 00:36, Jim Fehlig wrote: This series moves some driver-specific files from the main libvirt-daemon package to the respective libvirt-daemon-driver-* package when building with driver modules. This was originally all one patch that I found difficult

Re: [libvirt] [PATCHv5 4/4] domain: conf: Resolve bug related to network volume types

2013-12-06 Thread Adam Walters
Unfortunately, after I got home, I discovered that this patch introduces a bug that seems to have been previously hidden behind the one that this fixes. Doubly unfortunate, is that domains using RBD (and probably ISCSI, but I don't have the facilities to test this) volumes with authentication

[libvirt] [libvirt-python 1/2] override: Fix exception handling syntax

2013-12-06 Thread Doug Goldstein
Python 3 no longer accepts 'except Exception, e:' as valid while Python 2.4 does not accept the new syntax 'except Exception as e:' so this uses a fall back method that is compatible with both. --- libvirt-override-virStream.py | 3 ++- libvirt-override.py | 8 ++-- 2 files changed,

[libvirt] [libvirt-python 2/2] test: Invoke print(...) instead of print ...

2013-12-06 Thread Doug Goldstein
The 'print' statement no longer exists in Python 3 and now must be called as a function. This is compatible down to Python 2.4 as we are not using any special syntax of the function. --- sanitytest.py | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sanitytest.py

Re: [libvirt] [PATCHv5 4/4] domain: conf: Resolve bug related to network volume types

2013-12-06 Thread Adam Walters
I built a test domain using the default storage pool, backed by files under /var/lib/libvirt/images/. I can confirm that the apparent race condition also appears there, too. So it definitely seems like using volumes in general can cause issues with domains being restarted after a libvirt restart.

[libvirt] [PATCH] qemu: conf: Work around race condition on libvirt start

2013-12-06 Thread Adam Walters
This patch works around a race condition present during libvirt startup. The race condition only applies when using storage pool volumes for domain disks, and even then, only when restarting libvirt with running domains. The gist of the patch is simply to enter a (limited) retry loop during

[libvirt] [PATCH] Workaround startup race condition

2013-12-06 Thread Adam Walters
This patch works around a race condition on libvirt start. It feels a little hackish to me, but I have a hard time letting go of problems, so I had to at least try and implement something before going to sleep. I'd love some comments on the workaround, and welcome any improvement suggestions, as