Re: [libvirt] [PATCH v2] move format.py into src, cleanup module import code

2012-04-25 Thread Guannan Ren
On 04/25/2012 01:49 PM, Osier Yang wrote: On 2012年04月25日 12:45, Guannan Ren wrote: --- src/casecfgcheck.py |2 -- src/env_clear.py |4 ++-- src/env_inspect.py |2 +- src/env_parser.py|6 +- src/exception.py |2 -- {utils =

Re: [libvirt] [test-API PATCH 2/4] don't pop out element from optional_params

2012-04-25 Thread Guannan Ren
On 04/25/2012 11:11 AM, Osier Yang wrote: s/don't/Don't/ On 2012年04月24日 17:40, Guannan Ren wrote: This a bug, if we define a testcase that use xml file such as s/use/uses/ 'storage:define_dir_pool' more than once, the pop action will result in that the second call to the testcases fails

Re: [libvirt] [test-API PATCH 4/4] improve and fix testcases found during testcases run

2012-04-25 Thread Osier Yang
On 2012年04月25日 12:23, Guannan Ren wrote: On 04/25/2012 11:35 AM, Osier Yang wrote: On 2012年04月24日 17:40, Guannan Ren wrote: install_linux_cdrom.py: qemu process couldn't visit custom.iso that resides in other user's home, so we copy custom.iso into /tmp for easy use. We need something like

Re: [libvirt] [test-API PATCH v2] improve testcases after cleanup work

2012-04-25 Thread Osier Yang
On 2012年04月25日 13:23, Guannan Ren wrote: install_linux_cdrom.py: use global variable with value /var/cache/libvirt-test-API copy custom.iso into it for qemu process install_linux_check.py: use hddriver and nicdriver name network/create.py: in

Re: [libvirt] [test-API PATCH 4/4] improve and fix testcases found during testcases run

2012-04-25 Thread Guannan Ren
On 04/25/2012 04:10 PM, Osier Yang wrote: On 2012年04月25日 12:23, Guannan Ren wrote: On 04/25/2012 11:35 AM, Osier Yang wrote: On 2012年04月24日 17:40, Guannan Ren wrote: install_linux_cdrom.py: qemu process couldn't visit custom.iso that resides in other user's home, so we copy custom.iso into

Re: [libvirt] [test-API PATCH v2] improve testcases after cleanup work

2012-04-25 Thread Guannan Ren
On 04/25/2012 04:13 PM, Osier Yang wrote: On 2012年04月25日 13:23, Guannan Ren wrote: install_linux_cdrom.py: use global variable with value /var/cache/libvirt-test-API copy custom.iso into it for qemu process install_linux_check.py: use hddriver

Re: [libvirt] [test-API PATCH v2] improve testcases after cleanup work

2012-04-25 Thread Osier Yang
On 2012年04月25日 16:27, Guannan Ren wrote: On 04/25/2012 04:13 PM, Osier Yang wrote: On 2012年04月25日 13:23, Guannan Ren wrote: install_linux_cdrom.py: use global variable with value /var/cache/libvirt-test-API copy custom.iso into it for qemu process install_linux_check.py: use hddriver and

[libvirt] [PATCH 0/6] support to set cpu bandwidth for hypervisor threads

2012-04-25 Thread Wen Congyang
Currently, we only can set cpu bandwidth for vcpu. If the hypervisor threads consume too much cpu time, it may affect the vcpu. This patchset allows the user to control the cpu bandwidth for hypervisor threads. It does not change the behavior if the cpu bandwidth for hypervisor is unlimited. Wen

[libvirt] [PATCH 4/6] Update XML Schema for new entries

2012-04-25 Thread Wen Congyang
--- docs/schemas/domaincommon.rng | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index f116710..8165c5b 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -544,6

[libvirt] [test-API PATCH] use global variable domain_cache_folder to as cache folder for guest install

2012-04-25 Thread Guannan Ren
--- global.cfg | 15 +-- repos/domain/install_linux_cdrom.py | 22 ++ 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/global.cfg b/global.cfg index 6cfdcac..7b7b7cb 100644 --- a/global.cfg +++ b/global.cfg @@ -142,6

[libvirt] [PATCH 2/6] introduce the function virCgroupMoveTask()

2012-04-25 Thread Wen Congyang
introduce a new API to move all tasks from a cgroup to another cgroup --- src/util/cgroup.c | 55 + src/util/cgroup.h |2 + 2 files changed, 57 insertions(+), 0 deletions(-) diff --git a/src/util/cgroup.c b/src/util/cgroup.c index

[libvirt] [PATCH 6/6] qemu: Implement hypervisor_period and hypervisor_quota's modification

2012-04-25 Thread Wen Congyang
allow the user change/get hypervisor's period and quota when the vm is running. If the hypervisor's bandwidth is changed to unlimited, we should limit the vm's bandwidth again. If we limit the hypervisor's bandwidth, there is no need to limit the vm's bandwidth. --- include/libvirt/libvirt.h.in

[libvirt] [PATCH 3/6] create a new cgroup and move all hypervisor threads to the new cgroup

2012-04-25 Thread Wen Congyang
create a new cgroup and move all hypervisor threads to the new cgroup. And then we can do the other things: 1. limit only vcpu usage rather than the whole qemu 2. limit for hypervisor threads(include vhost-net threads) --- src/qemu/qemu_cgroup.c | 57

[libvirt] [PATCH 1/6] Introduce the function virCgroupForHypervisor

2012-04-25 Thread Wen Congyang
Introduce the function virCgroupForHypervisor() to create sub directory for hypervisor thread(include I/O thread, vhost-net thread) --- src/libvirt_private.syms |1 + src/util/cgroup.c| 42 ++ src/util/cgroup.h|4 3 files

[libvirt] [PATCH 5/6] qemu: Implement hypervisor's period and quota tunable XML configuration and parsing

2012-04-25 Thread Wen Congyang
set hypervisor's period and quota when the vm starts. It will affect to set vm's period and quota: donot set vm's period and quota if we limit hypevisor thread's bandwidth(hypervisor_quota 0). --- src/conf/domain_conf.c | 25 ++- src/conf/domain_conf.h |2 +

[libvirt] [test-API PATCH v2] add new template file in docs

2012-04-25 Thread Guannan Ren
--- docs/testcase.conf.templ | 70 ++ docs/testcase.py.templ | 48 +++ 2 files changed, 118 insertions(+), 0 deletions(-) create mode 100644 docs/testcase.conf.templ create mode 100644 docs/testcase.py.templ diff

[libvirt] [PATCH] storage: Allow multiple hosts for a storage pool

2012-04-25 Thread Wido den Hollander
The current storage pools for NFS and iSCSI only require one host to connect to. Future storage pools like RBD and Sheepdog will require multiple hosts. This patch allows multiple source hosts and rewrites the current storage drivers. Signed-off-by: Wido den Hollander w...@widodh.nl ---

Re: [libvirt] [PATCH] storage: Allow multiple hosts for a storage pool

2012-04-25 Thread Daniel P. Berrange
On Wed, Apr 25, 2012 at 12:43:09PM +0200, Wido den Hollander wrote: The current storage pools for NFS and iSCSI only require one host to connect to. Future storage pools like RBD and Sheepdog will require multiple hosts. This patch allows multiple source hosts and rewrites the current

[libvirt] [PATCH] macvtap: use embedded buffers for MAC address and UUID

2012-04-25 Thread Stefan Berger
Use embedded buffers for the MAC addresses and the VM's UUID. --- src/util/virnetdevmacvlan.c | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) Index: libvirt-acl/src/util/virnetdevmacvlan.c === ---

Re: [libvirt] [PATCH] macvtap: use embedded buffers for MAC address and UUID

2012-04-25 Thread Michal Privoznik
On 25.04.2012 13:48, Stefan Berger wrote: Use embedded buffers for the MAC addresses and the VM's UUID. --- src/util/virnetdevmacvlan.c | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) ACK Michal -- libvir-list mailing list libvir-list@redhat.com

Re: [libvirt] [PATCH] macvtap: use embedded buffers for MAC address and UUID

2012-04-25 Thread Stefan Berger
On 04/25/2012 07:50 AM, Michal Privoznik wrote: On 25.04.2012 13:48, Stefan Berger wrote: Use embedded buffers for the MAC addresses and the VM's UUID. --- src/util/virnetdevmacvlan.c | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) ACK Pushed. -- libvir-list

[libvirt] [PATCH 4/4] qemu: Avoid bogus error at the end of tunnelled migration

2012-04-25 Thread Jiri Denemark
Once qemu monitor reports migration has completed, we just closed our end of the pipe and let migration tunnel die. This generated bogus error in case we did so before the thread saw EOF on the pipe and migration was aborted even though it was in fact successful. With this patch we first wake up

[libvirt] [PATCH 1/4] qemu: Preserve original error during migration

2012-04-25 Thread Jiri Denemark
In some cases (spotted with broken connection during tunneled migration) we were overwriting the original error with worse or even misleading errors generated when we were cleaning up after failed migration. --- src/qemu/qemu_migration.c | 20 1 files changed, 20

Re: [libvirt] [PATCH] virNetDevMacVLanVPortProfileRegisterCallback: Fix segfault

2012-04-25 Thread Stefan Berger
On 04/24/2012 12:05 PM, Michal Privoznik wrote: On 24.04.2012 17:52, Michal Privoznik wrote: Self NACK; It turned out to be race because it's still reproducible in some cases: if(virPortProfile) evaluates to true; however gdb still catches SIGSEGV in memcpy(). Meanwhile, something free()

[libvirt] [PATCH 0/4] Fix tunnelled migration

2012-04-25 Thread Jiri Denemark
All bugs fixed by the following patches were spotted while testing tunnelled migration. However, the first three of them may also be hit in other scenarios. Jiri Denemark (4): qemu: Preserve original error during migration rpc: Discard non-blocking calls only when necessary qemu: Fix

[libvirt] [PATCH 3/4] qemu: Fix detection of failed migration

2012-04-25 Thread Jiri Denemark
When QEMU reported failed or canceled migration, we correctly detected it but didn't really consider it as an error condition and migration protocol just went on. Luckily, some of the subsequent steps eventually failed end we reported an (unrelated and mostly random) error back to the caller. ---

[libvirt] [PATCH 2/4] rpc: Discard non-blocking calls only when necessary

2012-04-25 Thread Jiri Denemark
Currently, non-blocking calls are either sent immediately or discarded in case sending would block. This was implemented based on the assumption that the non-blocking keepalive call is not needed as there are other calls in the queue which would keep the connection alive. However, if those calls

[libvirt] [PATCHv2] keepalive: Add ability to disable keepalive messages

2012-04-25 Thread Peter Krempa
The docs for virConnectSetKeepAlive() advertise that this function should be able to disable keepalives on negative or zero interval time. This patch removes the check that prohibited this and adds code to disable keepalives on negative/zero interval. * src/libvirt.c: virConnectSetKeepAlive(): -

[libvirt] [PATCH V13 4/5] nwfilter: Add multiple IP address support to DHCP snooping

2012-04-25 Thread Stefan Berger
With support for multiple IP addresses per interface in place, this patch now adds support for multiple IP addresses per interface for the DHCP snooping code. Testing: Since the infrastructure I tested this with does not provide multiple IP addresses per MAC address (anymore), I either had to

[libvirt] [PATCH V13 5/5] nwfilter: Display detected IP address in domain XML

2012-04-25 Thread Stefan Berger
Display detected IP addresses in the domain XML using the IP_LEASE variable name. This variable name now becomes a reserved variable name that can be read only but not set by the user. The format of the value is: ip addresss,lease timeout in seconds An example of a displayed XML may then be:

Re: [libvirt] [PATCH] build: Fix version of gettext macros

2012-04-25 Thread Jim Meyering
Eric Blake wrote: [adding bug-gnulib] On 04/24/2012 06:22 AM, Eric Blake wrote: On 04/24/2012 03:50 AM, Peter Krempa wrote: Commit c9cd419caba9effa11ca53e8696e5f6a4b424d60 added copying of the makefile for translation files from gnulib. The makefile from gnulib is of version 0.18 but the

Re: [libvirt] [PATCH] build: Fix version of gettext macros

2012-04-25 Thread Daniel P. Berrange
On Wed, Apr 25, 2012 at 03:04:05PM +0200, Jim Meyering wrote: Eric Blake wrote: [adding bug-gnulib] On 04/24/2012 06:22 AM, Eric Blake wrote: On 04/24/2012 03:50 AM, Peter Krempa wrote: Commit c9cd419caba9effa11ca53e8696e5f6a4b424d60 added copying of the makefile for translation files

[libvirt] [PATCH V13 0/5] Add DHCP snooping support to nwfilter

2012-04-25 Thread Stefan Berger
This series of patches adds DHCP snooping support to libvirt's nwfilter subsystem. DHCP snooping detects DHCP leases obtained by a VM and automatically adjusts the network traffic filters to reflect the IP addresses with which a VM may send its traffic, thus for example preventing IP address

[libvirt] [PATCH V13 3/5] nwfilter: move code for IP address map into separate file

2012-04-25 Thread Stefan Berger
The goal of this patch is to prepare for support for multiple IP addresses per interface in the DHCP snooping code. Move the code for the IP address map that maps interface names to IP addresses into their own file. Rename the functions on the way but otherwise leave the code as-is. Initialize

Re: [libvirt] [PATCH 1/4] qemu: Preserve original error during migration

2012-04-25 Thread Peter Krempa
On 04/25/2012 02:07 PM, Jiri Denemark wrote: In some cases (spotted with broken connection during tunneled migration) we were overwriting the original error with worse or even misleading errors generated when we were cleaning up after failed migration. --- src/qemu/qemu_migration.c | 20

[libvirt] [PATCH V13 1/5] Add new functions to virSocketAddr

2012-04-25 Thread Stefan Berger
Add 2 new functions to the virSocketAddr 'class': - virSocketAddrEqual: tests whether two IP addresses and their ports are equal - virSocketaddSetIPv4Addr: set a virSocketAddr given a 32 bit int --- Changes since v12: - fixed number of bytes compared when checking addresses for equality ---

Re: [libvirt] [PATCH V13 1/5] Add new functions to virSocketAddr

2012-04-25 Thread Daniel P. Berrange
On Wed, Apr 25, 2012 at 08:59:46AM -0400, Stefan Berger wrote: Add 2 new functions to the virSocketAddr 'class': - virSocketAddrEqual: tests whether two IP addresses and their ports are equal - virSocketaddSetIPv4Addr: set a virSocketAddr given a 32 bit int --- Changes since v12: -

Re: [libvirt] [PATCHv2] keepalive: Add ability to disable keepalive messages

2012-04-25 Thread Peter Krempa
On 04/25/2012 02:46 PM, Peter Krempa wrote: The docs for virConnectSetKeepAlive() advertise that this function should be able to disable keepalives on negative or zero interval time. This patch removes the check that prohibited this and adds code to disable keepalives on negative/zero interval.

Re: [libvirt] [PATCH V13 1/5] Add new functions to virSocketAddr

2012-04-25 Thread Stefan Berger
On 04/25/2012 09:42 AM, Daniel P. Berrange wrote: On Wed, Apr 25, 2012 at 08:59:46AM -0400, Stefan Berger wrote: Add 2 new functions to the virSocketAddr 'class': - virSocketAddrEqual: tests whether two IP addresses and their ports are equal - virSocketaddSetIPv4Addr: set a virSocketAddr given

[libvirt] [PATCHv3] keepalive: Add ability to disable keepalive messages

2012-04-25 Thread Peter Krempa
The docs for virConnectSetKeepAlive() advertise that this function should be able to disable keepalives on negative or zero interval time. This patch removes the check that prohibited this and adds code to disable keepalives on negative/zero interval. * src/libvirt.c: virConnectSetKeepAlive(): -

Re: [libvirt] [PATCH] storage backend: Add RBD (RADOS Block Device) support

2012-04-25 Thread Wido den Hollander
On 04/18/2012 12:36 PM, Daniel P. Berrange wrote: On Fri, Mar 30, 2012 at 11:04:43AM +0200, Wido den Hollander wrote: This patch adds support for a new storage backend with RBD support. RBD is the RADOS Block Device and is part of the Ceph distributed storage system. It comes in two

Re: [libvirt] udevadm settle can take too long

2012-04-25 Thread Osier Yang
On 2012年04月24日 03:47, Guido Günther wrote: Hi, On Sun, Apr 22, 2012 at 02:41:54PM -0400, Jim Paris wrote: Hi, http://bugs.debian.org/663931 is a bug I'm hitting, where virt-manager times out on the initial connection to libvirt. I reassigned the bug back to libvirt. I still wonder what

Re: [libvirt] [PATCH 2/4] rpc: Discard non-blocking calls only when necessary

2012-04-25 Thread Peter Krempa
On 04/25/2012 02:07 PM, Jiri Denemark wrote: Currently, non-blocking calls are either sent immediately or discarded in case sending would block. This was implemented based on the assumption that the non-blocking keepalive call is not needed as there are other calls in the queue which would keep

Re: [libvirt] [PATCH 3/4] qemu: Fix detection of failed migration

2012-04-25 Thread Peter Krempa
On 04/25/2012 02:07 PM, Jiri Denemark wrote: When QEMU reported failed or canceled migration, we correctly detected it but didn't really consider it as an error condition and migration protocol just went on. Luckily, some of the subsequent steps eventually failed end we reported an (unrelated

Re: [libvirt] [PATCHv3] keepalive: Add ability to disable keepalive messages

2012-04-25 Thread Jiri Denemark
On Wed, Apr 25, 2012 at 16:18:07 +0200, Peter Krempa wrote: The docs for virConnectSetKeepAlive() advertise that this function should be able to disable keepalives on negative or zero interval time. This patch removes the check that prohibited this and adds code to disable keepalives on

Re: [libvirt] [PATCH] build: Fix version of gettext macros

2012-04-25 Thread Eric Blake
On 04/25/2012 07:04 AM, Jim Meyering wrote: We need to fix gnulib to not force us to use gettext 0.18. I'll look into this. Here's what I'm playing with now; so far, it appears to make life happy for libvirt with its intentional AM_GNU_GETTEXT_VERSION([0.17]). Jim, does this look like a

Re: [libvirt] [PATCH] build: Fix version of gettext macros

2012-04-25 Thread Eric Blake
[adding bug-gnu-gettext] On 04/25/2012 07:04 AM, Jim Meyering wrote: *** error: gettext infrastructure mismatch: using a Makefile.in.in from gettext version 0.18 but the autoconf macros are from gettext version 0.17 NACK. RHEL 5 still uses gettext 0.17, and this breaks the build there.

[libvirt] More SR-IOV VF support needed (IFLA_VF_VLAN/IFLA_VF_SPOOFCHK)

2012-04-25 Thread Dax Kelson
Hi guys, I have some brand new hardware with a Intel X540-AT2 10Gbe NIC. I see that 0.9.11 added interface type='hostdev' with the ability define a MAC address to address the randomly generated MAC address issue. Thank you! I believe that additional functionality is needed in two areas, namely

[libvirt] [PATCH] util: fix crash when starting macvtap interfaces

2012-04-25 Thread Laine Stump
This patch resolves https://bugzilla.redhat.com/show_bug.cgi?id=815270 The function virNetDevMacVLanVPortProfileRegisterCallback() takes an arg virtPortProfile, and was checking it for non-NULL before using it. However, the prototype for virNetDevMacVLanPortProfileRegisterCallback had marked that

Re: [libvirt] [PATCH] util: fix crash when starting macvtap interfaces

2012-04-25 Thread Eric Blake
On 04/25/2012 02:01 PM, Laine Stump wrote: This patch resolves https://bugzilla.redhat.com/show_bug.cgi?id=815270 The function virNetDevMacVLanVPortProfileRegisterCallback() takes an arg virtPortProfile, and was checking it for non-NULL before using it. However, the prototype for

[libvirt] [PATCH] build: fix bootstrap on RHEL

2012-04-25 Thread Eric Blake
Commit 8fe455fd364cd7462e02170084c45a58ee302cc3 tried to work around a regression introduced in upstream gnulib that requires gettext 0.18 or newer on all projects using bootstrap, by making libvirt require gettext 0.18. But this fails on RHEL 6.2, which still ships gettext 0.17. Revert that

[libvirt] [PATCH] blockjob: fix block-stream bandwidth race

2012-04-25 Thread Eric Blake
With RHEL 6.2, virDomainBlockPull(dom, dev, bandwidth, 0) has a race with non-zero bandwidth: there is a window between the block_stream and block_job_set_speed monitor commands where an unlimited amount of data was let through, defeating the point of a throttle. This race was first identified in

Re: [libvirt] [PATCH] build: Fix version of gettext macros

2012-04-25 Thread Alex Jia
Hello Eric, I still met this issue on latest upstream HEAD(f78024b) when compiling libvirt: Making all in po make[2]: Entering directory `/home/ajia/Workspace/libvirt/po' *** error: gettext infrastructure mismatch: using a Makefile.in.in from gettext version 0.17 but the autoconf macros are from