Re: [libvirt] [test-API 12/17] Substitute 'guest' with 'domain'

2012-04-23 Thread Peter Krempa
On 04/20/2012 08:46 AM, Osier Yang wrote: % for i in $(grep 'guest' * -r | awk -F':' '{print $1}'| uniq); do \ sed -i -e 's/guest/domain/g' $i; \ done This also affects the codes like: -url = global_parser.get_value(guest, gname + src) -dict['kickstart'] =

Re: [libvirt] [test-API 12/17] Substitute 'guest' with 'domain'

2012-04-23 Thread Osier Yang
On 2012年04月23日 15:40, Peter Krempa wrote: On 04/20/2012 08:46 AM, Osier Yang wrote: % for i in $(grep 'guest' * -r | awk -F':' '{print $1}'| uniq); do \ sed -i -e 's/guest/domain/g' $i; \ done This also affects the codes like: - url = global_parser.get_value(guest, gname + src) -

[libvirt] [test-API PATCH] Fix a bug in the case that clean flag is used

2012-04-23 Thread Guannan Ren
When clean flag is used in testcase, the framework reports 'KeyError'. The bug is caused is by getting mod_case earlier than checking whether the 'clean' flag is present or not. The testcases without flag set doesn't be affected. --- src/generator.py |2 +- 1 files

Re: [libvirt] [test-API PATCHv2 1/2] sharemod: Add a new file for variable sharing in testcases

2012-04-23 Thread Guannan Ren
On 04/16/2012 04:04 PM, Martin Kletzander wrote: On 04/16/2012 08:03 AM, Osier Yang wrote: s/sharing in/sharing among/, but given it's already pushed. let's live with it. On 2012年04月10日 21:38, Guannan Ren wrote: sharedmod.py --- sharedmod.py | 16 1 files

Re: [libvirt] [PATCH] vbox: Fix passing an empty IMedium* array to IMachine::Delete

2012-04-23 Thread Jean-Baptiste Rouault
On Sunday 22 April 2012 10:35:59 Matthias Bolte wrote: vboxArray is not castable to a COM item type. vboxArray is a wrapper around the XPCOM and MSCOM specific array handling. In this case we can avoid passing NULL as an empty array to IMachine::Delete by passing a dummy IMedium* array with

Re: [libvirt] [test-API PATCH] Fix a bug in the case that clean flag is used

2012-04-23 Thread Osier Yang
On 2012年04月23日 16:22, Guannan Ren wrote: When clean flag is used in testcase, the framework clean reports 'KeyError'. The bug is caused is by getting mod_case earlier mode_case than checking whether the 'clean' flag is present or not. I'd think it doesn't explain

Re: [libvirt] [test-API PATCH] Fix a bug in the case that clean flag is used

2012-04-23 Thread Guannan Ren
On 04/23/2012 05:23 PM, Osier Yang wrote: On 2012年04月23日 16:22, Guannan Ren wrote: When clean flag is used in testcase, the framework clean reports 'KeyError'. The bug is caused is by getting mod_case earlier mode_case than checking whether the 'clean' flag is

Re: [libvirt] [PATCH] cpu: Improve error reporting on incompatible CPUs

2012-04-23 Thread Peter Krempa
On 04/19/2012 03:45 PM, Jiri Denemark wrote: On Wed, Apr 18, 2012 at 15:19:53 +0200, Peter Krempa wrote: This patch modifies the CPU comparrison function to report the incompatibilities in more detail to ease identification of problems. * src/cpu/cpu.h: cpuGuestData(): Add argument to

[libvirt] [PATCH 1/2] [TCK] nwfilter: Adapt test program and cases to recent iptables

2012-04-23 Thread Stefan Berger
Recent iptables fixes a lot of issues with missing spaces and other information that was previously not reported properly. To make the test program and test cases work on old and newer installations of iptables tools, some adjustments need to be made. Fix a 'file not found error' when running

[libvirt] [PATCH 2/2] [TCK] nwfilter: Add test cases for ipset

2012-04-23 Thread Stefan Berger
Add test cases for the ipset extension. Since ipset may not be available on all system, the first line of the XML file containing the test filter has been extended with a specially formatted XML comment containing a command line test for whether the test case can be run at all. The format of that

[libvirt] [PATCH V3] nwfilter: Add support for ipset

2012-04-23 Thread Stefan Berger
This patch adds support for the recent ipset iptables extension to libvirt's nwfilter subsystem. Ipset allows to maintain 'sets' of IP addresses, ports and other packet parameters and allows for faster lookup (in the order of O(1) vs. O(n)) and rule evaluation to achieve higher throughput than

[libvirt] [test-API PATCH] remove original 'util' object in testcases

2012-04-23 Thread Guannan Ren
--- repos/domain/cpu_affinity.py|4 ++-- repos/domain/cpu_topology.py|8 repos/domain/ownership_test.py | 12 ++-- repos/domain/restore.py |8 repos/domain/save.py| 10 +- repos/libvirtd/qemu_hang.py | 12

Re: [libvirt] [test-API PATCH] remove original 'util' object in testcases

2012-04-23 Thread Osier Yang
On 2012年04月23日 21:46, Guannan Ren wrote: --- repos/domain/cpu_affinity.py|4 ++-- repos/domain/cpu_topology.py|8 repos/domain/ownership_test.py | 12 ++-- repos/domain/restore.py |8 repos/domain/save.py| 10 +-

Re: [libvirt] [test-API PATCH] remove original 'util' object in testcases

2012-04-23 Thread Guannan Ren
On 04/23/2012 10:17 PM, Osier Yang wrote: On 2012年04月23日 21:46, Guannan Ren wrote: --- repos/domain/cpu_affinity.py|4 ++-- repos/domain/cpu_topology.py|8 repos/domain/ownership_test.py | 12 ++-- repos/domain/restore.py |8

Re: [libvirt] [PATCHv5 04/23] blockjob: add new API flags

2012-04-23 Thread Eric Blake
On 04/18/2012 08:42 AM, Paolo Bonzini wrote: Il 18/04/2012 16:18, Jiri Denemark ha scritto: However, the question is whether we feel comfortable enough with pushing this with the risk that qemu implementation is not upstream yet. I think the API is sane but the history of pushing something

Re: [libvirt] [PATCH] vbox: Fix passing an empty IMedium* array to IMachine::Delete

2012-04-23 Thread Eric Blake
On 04/23/2012 02:29 AM, Jean-Baptiste Rouault wrote: On Sunday 22 April 2012 10:35:59 Matthias Bolte wrote: vboxArray is not castable to a COM item type. vboxArray is a wrapper around the XPCOM and MSCOM specific array handling. In this case we can avoid passing NULL as an empty array to

[libvirt] Failure to migrate a guest from libvirt-0.9.10+ to libvirt-0.9.4-

2012-04-23 Thread Laine Stump
On 04/10/2012 05:36 AM, Daniel P. Berrange wrote: On Tue, Apr 10, 2012 at 11:58:52AM +0800, Daniel Veillard wrote: I realize that we have that behaviour for quite some times but I wonder about it, basically we always dump an usb controller on the XML domain format: controller type='usb'

Re: [libvirt] [PATCH] openvz: add network interface stats

2012-04-23 Thread Guido Günther
On Fri, Apr 20, 2012 at 12:01:51PM -0400, Laine Stump wrote: On 04/19/2012 06:32 PM, Guido Günther wrote: This will only work for veth devices since venet devices don't have a target element. Well, there is precedent for having stats work on some types of interfaces and not on others -

Re: [libvirt] [PATCH] vbox: Fix passing an empty IMedium* array to IMachine::Delete

2012-04-23 Thread Matthias Bolte
Am 23. April 2012 18:48 schrieb Eric Blake ebl...@redhat.com: On 04/23/2012 02:29 AM, Jean-Baptiste Rouault wrote: On Sunday 22 April 2012 10:35:59 Matthias Bolte wrote: vboxArray is not castable to a COM item type. vboxArray is a wrapper around the XPCOM and MSCOM specific array handling.

Re: [libvirt] udevadm settle can take too long

2012-04-23 Thread Guido Günther
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 triggers this though for some users but not for

[libvirt] [PATCH] Add support for firewalld

2012-04-23 Thread Thomas Woerner
Add support for firewalld * bridge_driver, nwfilter_driver: new dbus filters to get FirewallD1.Reloaded signal and DBus.NameOwnerChanged on org.fedoraproject.FirewallD1 * iptables, ebtables, nwfilter_ebiptables_driver: use firewall-cmd direct passthrough interface --- configure.ac

Re: [libvirt] udevadm settle can take too long

2012-04-23 Thread Jim Paris
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 triggers this

[libvirt] [PATCH] openvz: read vmguarpages/privvmpages to set memory tunables

2012-04-23 Thread Guido Günther
--- OpenVZ's memory paramters [1,2] aren't very well supported at the moment. Let's make a start with privvmpages/vmguarpages using already available memtune parameters. I hope the mapping looks correct. Cheers, -- Guido [1] http://wiki.openvz.org/UBC_primary_parameters [2]

Re: [libvirt] [PATCH] Add support for firewalld

2012-04-23 Thread Stefan Berger
On 04/23/2012 05:11 PM, Thomas Woerner wrote: Add support for firewalld * bridge_driver, nwfilter_driver: new dbus filters to get FirewallD1.Reloaded signal and DBus.NameOwnerChanged on org.fedoraproject.FirewallD1 * iptables, ebtables, nwfilter_ebiptables_driver: use firewall-cmd direct

[libvirt] [PATCHv6 2/8] blockjob: add qemu capabilities related to block jobs

2012-04-23 Thread Eric Blake
The new block copy storage migration sequence requires new monitor commands: adding just 'drive-mirror' allows live copy, and also adding 'drive-reopen' allows live migration. Both commands have been proposed[1] for qemu 1.1, although as of the writing of this commit message, it appears that

[libvirt] [PATCHv6 0/8] live block migration

2012-04-23 Thread Eric Blake
v5: https://www.redhat.com/archives/libvir-list/2012-April/msg00753.html Differences in v6: - rebased on top of accepted patches v5:1-4/23 and latest tree - corresponds to patches v5:7-14/23 - patch 5/8 is new - patch v5:12/23 is dropped; qemu is giving us something better, but I still need to

[libvirt] [PATCHv6 6/8] blockjob: implement block copy for qemu

2012-04-23 Thread Eric Blake
Minimal patch to wire up all the pieces in the previous patches to actually enable a block copy job. By minimal, I mean that qemu creates the file (that is, no REUSE_EXT flag support yet), SELinux must be disabled, a lock manager is not informed, and the audit logs aren't updated. But those will

[libvirt] [PATCHv6 8/8] blockjob: allow mirroring under SELinux

2012-04-23 Thread Eric Blake
This copies heavily from qemuDomainSnapshotCreateSingleDiskActive(), in order to set the SELinux label, obtain locking manager lease, and audit the fact that we hand a new file over to qemu. Alas, releasing the lease and label at the end of the mirroring is a trickier prospect (we would have to

[libvirt] [PATCHv6 5/8] blockjob: make drive-reopen safer

2012-04-23 Thread Eric Blake
Since libvirt drops locks between issuing a monitor command and getting a response, it is possible for libvirtd to be restarted before getting a response on a drive-reopen command; worse, it is also possible for the guest to shut itself down during the window while libvirtd is down, ending the

[libvirt] [PATCHv6 3/8] blockjob: return appropriate event and info

2012-04-23 Thread Eric Blake
Handle the new type of block copy event and info. Of course, this patch does nothing until a later patch actually allows the creation/abort of a block copy job. And we'd really love to have an event without having to poll for the transition between pull and mirroring, but that will have to wait

[libvirt] [PATCHv6 1/8] blockjob: react to active block copy

2012-04-23 Thread Eric Blake
For now, disk migration via block copy job is not implemented. But when we do implement it, we have to deal with the fact that qemu does not provide an easy way to re-start a qemu process with mirroring still intact (it _might_ be possible by using qemu -S then an initial 'drive-mirror' with disk

[libvirt] [PATCHv6 4/8] blockjob: support pivot operation on cancel

2012-04-23 Thread Eric Blake
This is the bare minimum to end a copy job (of course, until a later patch adds the ability to start a copy job, this patch doesn't do much in isolation; I've just split the patches to ease the review). This patch intentionally avoids SELinux, lock manager, and audit actions. Also, if libvirtd

Re: [libvirt] [PATCH 2/2] Adds support to VIR_DOMAIN_CPU_STATS_F_VCPU in qemu_driver.

2012-04-23 Thread Hu Tao
On Wed, Apr 18, 2012 at 08:43:42AM -0600, Eric Blake wrote: On 04/18/2012 05:14 AM, Hu Tao wrote: --- src/qemu/qemu_driver.c | 152 ++- src/util/cgroup.c |4 +- tools/virsh.c | 17 -- 3 files changed, 150

[libvirt] [PATCHv6 7/8] blockjob: allow for existing files

2012-04-23 Thread Eric Blake
This copies some of the checks from snapshots regarding testing when a file already exists. In the process, I noticed snapshots had hard-to-read logic, as well as a missing sanity check: REUSE_EXT should require the destination to already be present. * src/qemu/qemu_driver.c