[libvirt] [PATCH] Fix the coding style

2012-12-03 Thread Osier Yang
Fix the if ... else coding style, and indentions problem. --- src/libvirt.c | 107 ++-- 1 files changed, 57 insertions(+), 50 deletions(-) diff --git a/src/libvirt.c b/src/libvirt.c index f509cc7..1304853 100644 --- a/src/libvirt.c +++

Re: [libvirt] [PATCH] virsh: don't crash if shutdown --mode not provided

2012-12-03 Thread Daniel P. Berrange
On Fri, Nov 30, 2012 at 02:56:08PM -0700, Eric Blake wrote: virStringSplit requires a non-NULL input, but commit cef78ed forgot to follow the rule. * tools/virsh-domain.c (cmdReboot, cmdShutdown): Avoid NULL deref. --- Pushing under the build-breaker rule. tools/virsh-domain.c | 12

Re: [libvirt] [PATCH] Fix the coding style

2012-12-03 Thread Daniel P. Berrange
On Mon, Dec 03, 2012 at 04:41:45PM +0800, Osier Yang wrote: Fix the if ... else coding style, and indentions problem. --- src/libvirt.c | 107 ++-- 1 files changed, 57 insertions(+), 50 deletions(-) ACK, this does look nicer now. Daniel

Re: [libvirt] [PATCH v2] conf: prevent crash with no uuid in cephx auth secret

2012-12-03 Thread Peter Krempa
On 11/29/12 17:36, Ján Tomko wrote: Also remove the pointless check for NULL in auth.cephx.secret.uuid, since this is a static array. --- src/conf/storage_conf.c |8 +++- 1 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c

Re: [libvirt] [PATCHv2.1 4/4] v1: disable dnsmasq's RA service; use radvd

2012-12-03 Thread Gene Czarcinski
THIS PATCH IS WITHDRAWN!! If any of you are following Dnsmasq-discuss mailing list, you may be aware of the efforts to identify and correct the problem. The patch is no longer necessary because the problem has been discovered and a fix tested. The final fix by Simon Kelley will be included

Re: [libvirt] [PATCH] Fix the coding style

2012-12-03 Thread Osier Yang
On 2012年12月03日 19:10, Daniel P. Berrange wrote: On Mon, Dec 03, 2012 at 04:41:45PM +0800, Osier Yang wrote: Fix the if ... else coding style, and indentions problem. --- src/libvirt.c | 107 ++-- 1 files changed, 57 insertions(+), 50

Re: [libvirt] [PATCHv2 1/3] v1: allow guest to guest IPv6 without gateway definition

2012-12-03 Thread Gene Czarcinski
On 12/02/2012 12:39 PM, Laine Stump wrote: On 11/30/2012 10:01 AM, Gene Czarcinski wrote: This patch adds the capability for virtual guests to do IPv6 communication via a virtual network interface with no IPv6 (gateway) addresses specified. This capability currently exists for IPv4. This

[libvirt] [PATCH] maint: Misc whitespace cleanups

2012-12-03 Thread Peter Krempa
--- src/conf/storage_conf.c | 2 +- src/util/virtypedparam.c | 6 ++ tools/virsh-domain.c | 3 +-- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c index 3fdc5b6..2d72d06 100644 --- a/src/conf/storage_conf.c +++

[libvirt] [PATCH] virsh: Report errors if arguments of the schedinfo command are incorrect

2012-12-03 Thread Peter Krempa
Libvirt's helper API's when called directly don't raise the error so that virsh remembers it. Subsequent calls to libvirt API's might reset the error. In case of schedinfo virDomainFree() in the cleanup section resets the error when virTypedParameterAssignFromStr() fails. This patch adds

Re: [libvirt] [PATCH] maint: Misc whitespace cleanups

2012-12-03 Thread Osier Yang
On 2012年12月03日 21:46, Peter Krempa wrote: --- src/conf/storage_conf.c | 2 +- src/util/virtypedparam.c | 6 ++ tools/virsh-domain.c | 3 +-- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c index 3fdc5b6..2d72d06

Re: [libvirt] [PATCHv3] conf: prevent crash with no uuid in cephx auth secret

2012-12-03 Thread Peter Krempa
On 12/03/12 13:35, Ján Tomko wrote: Fix the null pointer access when UUID is not specified. Introduce a bool 'uuidUsable' to virStoragePoolAuthCephx that indicates if uuid was specified or not and use it instead of the pointless comparison of the static UUID array to NULL. Add an error message

Re: [libvirt] [PATCHv3] conf: prevent crash with no uuid in cephx auth secret

2012-12-03 Thread Peter Krempa
On 12/03/12 15:04, Peter Krempa wrote: On 12/03/12 13:35, Ján Tomko wrote: Fix the null pointer access when UUID is not specified. Introduce a bool 'uuidUsable' to virStoragePoolAuthCephx that indicates if uuid was specified or not and use it instead of the pointless comparison of the static

Re: [libvirt] [PATCH] maint: Misc whitespace cleanups

2012-12-03 Thread Peter Krempa
On 12/03/12 14:59, Osier Yang wrote: On 2012年12月03日 21:46, Peter Krempa wrote: --- src/conf/storage_conf.c | 2 +- src/util/virtypedparam.c | 6 ++ tools/virsh-domain.c | 3 +-- 3 files changed, 4 insertions(+), 7 deletions(-) ... ACK Thanks, pushed. Peter --

Re: [libvirt] [PATCH] virsh: Report errors if arguments of the schedinfo command are incorrect

2012-12-03 Thread Jiri Denemark
On Mon, Dec 03, 2012 at 14:46:51 +0100, Peter Krempa wrote: Libvirt's helper API's when called directly don't raise the error so that virsh remembers it. Subsequent calls to libvirt API's might reset the error. In case of schedinfo virDomainFree() in the cleanup section resets the error

[libvirt] virSecurity hook for hugepages?

2012-12-03 Thread Serge Hallyn
Hi, Currently the hugepages support can automatically detect the hugepages mount, but it doesn't update the security information. At least for apparmor we need to be able to add permission for the domain to access the hugetlbfs mount path. There are a few ways this could be done, 1. add a

Re: [libvirt] [PATCH] util: refactor iptables command construction into multiple steps

2012-12-03 Thread Natanael Copa
On Thu, 22 Nov 2012 15:02:18 +0100 Natanael Copa nc...@alpinelinux.org wrote: Instead of creating an iptables command in one shot, do it in steps so we can add conditional options like physdev and protocol. This removes code duplication while keeping existing behaviour. Signed-off-by:

Re: [libvirt] [PATCH v1 01/11] bandwidth: add new 'floor' attribute

2012-12-03 Thread Michal Privoznik
On 30.11.2012 13:14, Laine Stump wrote: On 11/19/2012 11:51 AM, Michal Privoznik wrote: This is however supported only on domain interfaces with type='network'. Moreover, target network needs to have at least inbound QoS set. This is required by hierarchical traffic shaping. From now on, the

Re: [libvirt] [PATCH v1 10/11] bandwidth: Attach sfq to leaf node

2012-12-03 Thread Michal Privoznik
On 30.11.2012 22:00, Laine Stump wrote: On 11/19/2012 11:51 AM, Michal Privoznik wrote: SFQ is qdisc which doesn't really shape any traffic but 'just' re-arrange packets in sending buffer so no stream starve. The goal is to ensure fairness. There is basically only one configuration parameter

Re: [libvirt] [PATCH v1 01/11] bandwidth: add new 'floor' attribute

2012-12-03 Thread Michal Privoznik
On 30.11.2012 13:58, Laine Stump wrote: On 11/19/2012 11:51 AM, Michal Privoznik wrote: This is however supported only on domain interfaces with type='network'. Moreover, target network needs to have at least inbound QoS set. This is required by hierarchical traffic shaping. From now on, the

Re: [libvirt] [PATCH v1 03/11] bandwidth: Create (un)plug functions

2012-12-03 Thread Michal Privoznik
On 30.11.2012 18:53, Laine Stump wrote: On 11/19/2012 11:51 AM, Michal Privoznik wrote: These set bridge part of QoS when bringing domain's interface up. Long story short, if there's a 'floor' set, a new QoS class is created. ClassID MUST be unique within the bridge and should be kept for

Re: [libvirt] [PATCH v1 09/11] network: Allow class ID to be reused

2012-12-03 Thread Michal Privoznik
On 30.11.2012 21:55, Laine Stump wrote: On 11/19/2012 11:51 AM, Michal Privoznik wrote: With current implementation, class ID is just incremented. This can lead to its exhaustion as tc accepts only 16 bits long identifiers. Hence, it's better if we allow class ID to be reused. To keep track

Re: [libvirt] [PATCH v1 06/11] network: Create real network status files

2012-12-03 Thread Michal Privoznik
On 30.11.2012 20:04, Laine Stump wrote: On 11/19/2012 11:51 AM, Michal Privoznik wrote: Currently, we are only keeping a inactive XML configuration in status dir. This is no longer enough as we need to keep this class_id attribute so we don't overwrite old entries when the daemon restarts.

Re: [libvirt] [PATCH v1 05/11] bandwidth: Create network (un)plug functions

2012-12-03 Thread Michal Privoznik
On 30.11.2012 19:43, Laine Stump wrote: On 11/19/2012 11:51 AM, Michal Privoznik wrote: Network should be notified if we plug in or unplug an interface, so it can perform some action, e.g. set/unset network part of QoS. --- src/Makefile.am |7 ++- src/conf/domain_conf.h

Re: [libvirt] [PATCH v1 08/11] network: Update status file on (un)plug

2012-12-03 Thread Michal Privoznik
On 30.11.2012 21:00, Laine Stump wrote: On 11/19/2012 11:51 AM, Michal Privoznik wrote: Status file keeps track of class_id and floor_sum. It's better to keep it updated in case libvirtd is killed. I'm not sure why you're doing this type of iterative improvement in separate patches. Since

Re: [libvirt] [PATCH v1 02/11] bandwidth: Create hierarchical shaping classes

2012-12-03 Thread Michal Privoznik
On 30.11.2012 17:52, Laine Stump wrote: On 11/19/2012 11:51 AM, Michal Privoznik wrote: These classes can borrow unused bandwidth. Basically, only egress qdsics can have classes, therefore we can do this kind of traffic shaping only on host's outgoing, that is domain's incoming traffic. ---

Re: [libvirt] [PATCH v1 04/11] bandwidth: Create rate update function

2012-12-03 Thread Michal Privoznik
On 30.11.2012 18:56, Laine Stump wrote: On 11/19/2012 11:51 AM, Michal Privoznik wrote: This will be used whenever a NIC with guaranteed throughput is to be plugged into a bridge. It will adjust the average throughput of non guaranteed NICs (classid 1:2) to meet new requirements. ---

[libvirt] [PATCHv3 3/3] v7.9: put dnsmasq parameters into conf-file

2012-12-03 Thread Gene Czarcinski
This patch changes how parameters are passed to dnsmasq. Instead of being on the command line, the parameters are put into a file (one parameter per line) and a commandline --conf-file= specifies the location of the file. The file is located in the same directory as the leases file. This also

[libvirt] [PATCHv3 0/3] IPv6 enhancements; put dnsmasq parameters in conf-file

2012-12-03 Thread Gene Czarcinski
Rebased 3 December 2012 These three patch files are packaged together because they serially depend on each other. This version includes updates to add the ipv6='yes' for enabling the guest-to-guest communications. The DHCPv6 support checks dnsmasq's version and requires a minimum of 2.64.

[libvirt] [PATCHv3 1/3] v2.0: allow guest to guest IPv6 without gateway definition

2012-12-03 Thread Gene Czarcinski
This patch adds the capability for virtual guests to do IPv6 communication via a virtual network interface with no IPv6 (gateway) addresses specified. This capability currently exists for IPv4. This patch allows creation of a completely isolated IPv6 network. Note that virtual guests cannot

[libvirt] RFC: Coding style: require alphabetical header file sorting

2012-12-03 Thread Daniel P. Berrange
Thus far we only have one rule about header files, #include config.h must be first in all .c files. I'm wondering if it is time to introduce some new rules - All system headers must be grouped to preceed all local headers - All system headers must be sorted within their group - All local

Re: [libvirt] RFC: Coding style: require alphabetical header file sorting

2012-12-03 Thread John Eckersberg
Daniel P. Berrange berra...@redhat.com writes: Thus far we only have one rule about header files, #include config.h must be first in all .c files. I'm wondering if it is time to introduce some new rules - All system headers must be grouped to preceed all local headers - All system headers

[libvirt] [PATCH] conf: fix virDomainNetGetActualDirect*() and BridgeName()

2012-12-03 Thread Laine Stump
This resolves: https://bugzilla.redhat.com/show_bug.cgi?id=881480 These three functions: virDomainNetGetActualBridgeName virDomainNetGetActualDirectDev virDomainNetGetActualDirectMode return attributes that are in a union whose contents are interpreted differently depending on the

Re: [libvirt] [PATCH] conf: fix virDomainNetGetActualDirect*() and BridgeName()

2012-12-03 Thread Eric Blake
This resolves: https://bugzilla.redhat.com/show_bug.cgi?id=881480 These three functions: virDomainNetGetActualBridgeName virDomainNetGetActualDirectDev virDomainNetGetActualDirectMode return attributes that are in a union whose contents are interpreted differently

Re: [libvirt] [PATCH] conf: fix virDomainNetGetActualDirect*() and BridgeName()

2012-12-03 Thread Laine Stump
On 12/03/2012 01:10 PM, Eric Blake wrote: This resolves: https://bugzilla.redhat.com/show_bug.cgi?id=881480 These three functions: virDomainNetGetActualBridgeName virDomainNetGetActualDirectDev virDomainNetGetActualDirectMode return attributes that are in a union whose contents

Re: [libvirt] [PATCHv2 0/2] qemu: support live update of an interface's filter

2012-12-03 Thread Laine Stump
On 11/29/2012 01:30 PM, Laine Stump wrote: These two patches enable making a live change to the nwfilter of a guest's interface via virDomainUpdateDeviceFlags (virsh update-device). Differences from V1: 1) add patch from Stefan Berger to do a proper comparison of the values stored in

Re: [libvirt] libvirt [PATCHv2 2/2] Add iSCSI backend storage driver for ESX.

2012-12-03 Thread Matthias Bolte
2012/11/10 Ata E Husain Bohra ata.hus...@hotmail.com: The patch adds the backend driver to support iSCSI format storage pools and volumes for ESX host. The mapping of ESX iSCSI specifics to Libvirt is as follows: 1. ESX static iSCSI target -- Libvirt Storage Pools 2. ESX iSCSI LUNs

[libvirt] [PATCH] build: fix incremental autogen.sh when no AUTHORS is present

2012-12-03 Thread Eric Blake
Commit 71d1256 tried to fix a problem where rebasing an old branch on top of newer libvirt.git resulted in automake failing because of a missing AUTHORS file. However, while the fix worked for an incremental 'make', it did not work for someone that directly reran './autogen.sh'. Reported by

Re: [libvirt] [PATCH] build: fix incremental autogen.sh when no AUTHORS is present

2012-12-03 Thread Laine Stump
On 12/03/2012 03:14 PM, Eric Blake wrote: Commit 71d1256 tried to fix a problem where rebasing an old branch on top of newer libvirt.git resulted in automake failing because of a missing AUTHORS file. However, while the fix worked for an incremental 'make', it did not work for someone that

Re: [libvirt] [PATCHv3 1/3] v2.0: allow guest to guest IPv6 without gateway definition

2012-12-03 Thread Laine Stump
On 12/03/2012 11:13 AM, Gene Czarcinski wrote: This patch adds the capability for virtual guests to do IPv6 communication via a virtual network interface with no IPv6 (gateway) addresses specified. This capability currently exists for IPv4. This patch allows creation of a completely

Re: [libvirt] [PATCH v1 09/11] network: Allow class ID to be reused

2012-12-03 Thread Laine Stump
On 12/03/2012 10:55 AM, Michal Privoznik wrote: On 30.11.2012 21:55, Laine Stump wrote: On 11/19/2012 11:51 AM, Michal Privoznik wrote: With current implementation, class ID is just incremented. This can lead to its exhaustion as tc accepts only 16 bits long identifiers. Hence, it's better if

Re: [libvirt] [PATCH v1 03/11] bandwidth: Create (un)plug functions

2012-12-03 Thread Laine Stump
On 12/03/2012 10:55 AM, Michal Privoznik wrote: On 30.11.2012 18:53, Laine Stump wrote: As I'm looking at all these uses of id's, I'm wondering if there's any danger of namespace conflict with other users of tc. (This isn't any critique, just curiousity). No, class ID is specific within an

Re: [libvirt] [PATCH v1 06/11] network: Create real network status files

2012-12-03 Thread Laine Stump
On 12/03/2012 10:55 AM, Michal Privoznik wrote: On 30.11.2012 20:04, Laine Stump wrote: On 11/19/2012 11:51 AM, Michal Privoznik wrote: Currently, we are only keeping a inactive XML configuration in status dir. This is no longer enough as we need to keep this class_id attribute so we don't

[libvirt] [PATCH] qemu: nicer error message if live disk snapshot unsupported

2012-12-03 Thread Eric Blake
Without this patch, attempts to create a disk snapshot when qemu is too old results in a cryptic message: virsh # snapshot-create 23 --disk-only error: operation failed: Failed to take snapshot: unknown command: 'snapshot_blkdev' Now it reports: virsh # snapshot-create 23 --disk-only error:

Re: [libvirt] [PATCH] build: fix incremental autogen.sh when no AUTHORS is present

2012-12-03 Thread Cole Robinson
On 12/03/2012 03:14 PM, Eric Blake wrote: Commit 71d1256 tried to fix a problem where rebasing an old branch on top of newer libvirt.git resulted in automake failing because of a missing AUTHORS file. However, while the fix worked for an incremental 'make', it did not work for someone that

Re: [libvirt] [PATCH] build: fix incremental autogen.sh when no AUTHORS is present

2012-12-03 Thread Eric Blake
Commit 71d1256 tried to fix a problem where rebasing an old branch on top of newer libvirt.git resulted in automake failing because of a missing AUTHORS file. However, while the fix worked for an incremental 'make', it did not work for someone that directly reran './autogen.sh'.

Re: [libvirt] [PATCHv3 1/3] v2.0: allow guest to guest IPv6 without gateway definition

2012-12-03 Thread Eric Blake
ACK with the changes I've squashed in. I've attached an interdiff of the changes I've made to this message, and will push as soon as someone else ACKs those additional changes. Thanks for the contribution! I know it's sometimes a pain to get things all the way to pushing, but it really

Re: [libvirt] [PATCHv3 1/3] v2.0: allow guest to guest IPv6 without gateway definition

2012-12-03 Thread Gene Czarcinski
On 12/03/2012 04:03 PM, Laine Stump wrote: On 12/03/2012 11:13 AM, Gene Czarcinski wrote: This patch adds the capability for virtual guests to do IPv6 communication via a virtual network interface with no IPv6 (gateway) addresses specified. This capability currently exists for IPv4. This

Re: [libvirt] [PATCH] build: fix incremental autogen.sh when no AUTHORS is present

2012-12-03 Thread Eric Blake
I'm not sure how if it impacts this particular change, but why don't we switch to AM_INIT_AUTOMAKE([foreign]) ? Since AUTHORS or ChangeLog are no longer static, it seems we are just causing ourselves pain by trying to work around auto* insisting those files exist. Then again I don't know

Re: [libvirt] [PATCH] build: fix incremental autogen.sh when no AUTHORS is present

2012-12-03 Thread Cole Robinson
On 12/03/2012 05:37 PM, Eric Blake wrote: I'm not sure how if it impacts this particular change, but why don't we switch to AM_INIT_AUTOMAKE([foreign]) ? Since AUTHORS or ChangeLog are no longer static, it seems we are just causing ourselves pain by trying to work around auto* insisting

Re: [libvirt] [PATCH] implement managedsave in libvirt xen legacy driver

2012-12-03 Thread Jim Fehlig
Jim Fehlig wrote: Bamvor Jian Zhang wrote: src/xen/xen_driver.c | 109 ++- src/xen/xen_driver.h | 2 + 2 files changed, 110 insertions(+), 1 deletion(-) diff --git a/src/xen/xen_driver.c b/src/xen/xen_driver.c index 5a40757..0b2418d