[libvirt] [PATCH] LXC: support block devices for container

2012-04-06 Thread Gao feng
This patch allows to config block device for container. the disk node is used to point out source device and target device source device is the device path in host, and target device is the device name in container. such as disk type='block' device='disk' driver name=lxc/ source

Re: [libvirt] [PATCH] xen config: No vfb in HVM guest configuration

2012-04-06 Thread Stefan Bader
2012/4/6 Daniel Veillard veill...@redhat.com: On Thu, Apr 05, 2012 at 06:44:35PM +0200, Stefan Bader wrote: This causes an implicit vkbd device to be added which takes 6min to finally fail being initialized in the guest. http://lists.xen.org/archives/html/xen-devel/2012-04/msg00409.html

Re: [libvirt] [PATCHv2 10/15] blockjob: support pivot operation on cancel

2012-04-06 Thread Paolo Bonzini
Il 06/04/2012 06:36, Eric Blake ha scritto: If only qemu could get 'drive-reopen' inside 'transaction'... Just a quick answer to this: if qemu could get 'drive-reopen' inside 'transaction', the standalone command could be made safe just as easily. In fact, in QEMU 1.1 the blockdev-snapshot-sync

Re: [libvirt] [PATCH] xen config: No vfb in HVM guest configuration

2012-04-06 Thread Daniel Veillard
On Fri, Apr 06, 2012 at 08:33:28AM +0200, Stefan Bader wrote: 2012/4/6 Daniel Veillard veill...@redhat.com: On Thu, Apr 05, 2012 at 06:44:35PM +0200, Stefan Bader wrote: This causes an implicit vkbd device to be added which takes 6min to finally fail being initialized in the guest.

Re: [libvirt] [PATCHv2 08/15] blockjob: expose qemu commands for mirrored storage migration

2012-04-06 Thread Paolo Bonzini
Il 06/04/2012 06:36, Eric Blake ha scritto: +int +qemuMonitorJSONDriveMirror(qemuMonitorPtr mon ATTRIBUTE_UNUSED, + virJSONValuePtr actions, + const char *device, const char *file, + const char *format, int mode)

Re: [libvirt] [PATCH] xen config: No vfb in HVM guest configuration

2012-04-06 Thread Stefan Bader
2012/4/6 Daniel Veillard veill...@redhat.com: On Fri, Apr 06, 2012 at 08:33:28AM +0200, Stefan Bader wrote: 2012/4/6 Daniel Veillard veill...@redhat.com: On Thu, Apr 05, 2012 at 06:44:35PM +0200, Stefan Bader wrote: This causes an implicit vkbd device to be added which takes 6min to

Re: [libvirt] [test-API PATCHv2 2/2] repo: Add test for mutualy exclusive console access

2012-04-06 Thread Martin Kletzander
On 04/05/2012 01:58 PM, Peter Krempa wrote: This test case checks if the console connection code works in a safe way that the connection don't get messed up. --- Diff to v1: -- removed semicolons at the end of statements (the C language left some habits :D) -- added call to usage function

[libvirt] [test-API PATCH 0/2] support variables share across testcases

2012-04-06 Thread Guannan Ren
These two patch is to create a shared module in the root of test-API The framework will create connection object for shared use in testcases based on environment checking results. sharedmod.py # This is a module for variable sharing across testcases during # running. You have to import it in

[libvirt] [test-API PATCH 1/2] sharedmod: Add a new file for variable sharing in testcases

2012-04-06 Thread Guannan Ren
sharedmod.py: in root directory --- sharedmod.py | 13 + 1 files changed, 13 insertions(+), 0 deletions(-) create mode 100644 sharedmod.py diff --git a/sharedmod.py b/sharedmod.py new file mode 100644 index 000..f3de5a6 --- /dev/null +++ b/sharedmod.py @@ -0,0 +1,13 @@ +#

[libvirt] [test-API PATCH 2/2] rewrite env_inspect.py and setup shared conn obj via sharedmod

2012-04-06 Thread Guannan Ren
dist/redhat/env_inspect.py: initialize shared conn obj for use in all testcases generator.py: make use of sharedmod --- dist/redhat/env_inspect.py | 173 +++- generator.py | 15 +--- 2 files changed,

Re: [libvirt] [test-API PATCH 0/2] support variables share across testcases

2012-04-06 Thread Guannan Ren
An example: #sharedvar.cfg domain:testa domain:testb #testa.py import sharedmod def testa(params): conn = sharedmod.conn logger = params['logger'] logger.info(conn.listNetworks()) sharedmod.defined_var1 = I am from testa return 0 #testb.py import sharedmod def

Re: [libvirt] [PATCH] LXC: support block devices for container

2012-04-06 Thread Daniel P. Berrange
On Fri, Apr 06, 2012 at 02:31:54PM +0800, Gao feng wrote: This patch allows to config block device for container. the disk node is used to point out source device and target device source device is the device path in host, and target device is the device name in container. such as disk

[libvirt] [PATCH] qemu_ga: Don't overwrite errors on FSThaw

2012-04-06 Thread Michal Privoznik
We can tell qemuDomainSnapshotFSThaw if we want it to report errors or not. However, if we don't want to and an error has been already set by previous qemuReportError() we must keep copy of that error not just a pointer to it. Otherwise, it get overwritten if FSThaw reports an error. ---

Re: [libvirt] [PATCH] qemu_ga: Don't overwrite errors on FSThaw

2012-04-06 Thread Jiri Denemark
On Fri, Apr 06, 2012 at 12:58:02 +0200, Michal Privoznik wrote: We can tell qemuDomainSnapshotFSThaw if we want it to report errors or not. However, if we don't want to and an error has been already set by previous qemuReportError() we must keep copy of that error not just a pointer to it.

Re: [libvirt] [PATCH] qemu_ga: Don't overwrite errors on FSThaw

2012-04-06 Thread Michal Privoznik
On 06.04.2012 13:38, Jiri Denemark wrote: On Fri, Apr 06, 2012 at 12:58:02 +0200, Michal Privoznik wrote: We can tell qemuDomainSnapshotFSThaw if we want it to report errors or not. However, if we don't want to and an error has been already set by previous qemuReportError() we must keep copy

[libvirt] [libvirt-glib 08/13] Implement GVirConfigDomainAddressPci

2012-04-06 Thread Christophe Fergeau
It already has the needed setters. --- libvirt-gconfig/Makefile.am|2 + .../libvirt-gconfig-domain-address-pci.c | 124 .../libvirt-gconfig-domain-address-pci.h | 78 libvirt-gconfig/libvirt-gconfig.h

[libvirt] [libvirt-glib 09/13] Implement gvir_config_domain_controller_set_address

2012-04-06 Thread Christophe Fergeau
--- .../libvirt-gconfig-domain-controller.c| 10 ++ .../libvirt-gconfig-domain-controller.h|2 ++ libvirt-gconfig/libvirt-gconfig.sym|1 + 3 files changed, 13 insertions(+) diff --git a/libvirt-gconfig/libvirt-gconfig-domain-controller.c

[libvirt] USB redirection support

2012-04-06 Thread Christophe Fergeau
Hey, This patch series adds the needed classes for apps to be able to use USB redirection. I've followed http://hansdegoede.livejournal.com/11084.html and added all the API needed to be able to get the same XML. However, I'm not 100% sure all these attributes are required, in particular the

[libvirt] [libvirt-glib 01/13] Add GVirConfigDomainController skeleton

2012-04-06 Thread Christophe Fergeau
--- libvirt-gconfig/Makefile.am|2 + .../libvirt-gconfig-domain-controller.c| 50 .../libvirt-gconfig-domain-controller.h| 63 libvirt-gconfig/libvirt-gconfig.h |1 +

[libvirt] [libvirt-glib 07/13] Add GVirConfigDomainAddress abstract type

2012-04-06 Thread Christophe Fergeau
This is an abstract type which will be the base class for device addresses. --- libvirt-gconfig/Makefile.am |2 + libvirt-gconfig/libvirt-gconfig-domain-address.c | 50 + libvirt-gconfig/libvirt-gconfig-domain-address.h | 63 ++

[libvirt] [libvirt-glib 02/13] Implement gvir_config_domain_controller_[gs]et_index

2012-04-06 Thread Christophe Fergeau
--- .../libvirt-gconfig-domain-controller.c| 29 .../libvirt-gconfig-domain-controller.h|4 +++ libvirt-gconfig/libvirt-gconfig.sym|2 ++ 3 files changed, 35 insertions(+) diff --git

[libvirt] [libvirt-glib 05/13] Implement gvir_config_domain_controller_usb_set_master

2012-04-06 Thread Christophe Fergeau
--- .../libvirt-gconfig-domain-controller-usb.c| 21 .../libvirt-gconfig-domain-controller-usb.h|3 +++ libvirt-gconfig/libvirt-gconfig.sym|1 + 3 files changed, 25 insertions(+) diff --git

[libvirt] [libvirt-glib 04/13] Add gvir_config_domain_controller_usb_set_model

2012-04-06 Thread Christophe Fergeau
--- .../libvirt-gconfig-domain-controller-usb.c| 13 + .../libvirt-gconfig-domain-controller-usb.h| 15 +++ libvirt-gconfig/libvirt-gconfig.sym|2 ++ 3 files changed, 30 insertions(+) diff --git

[libvirt] [libvirt-glib 11/13] Implement GVirConfigDomainAddressUsb

2012-04-06 Thread Christophe Fergeau
--- libvirt-gconfig/Makefile.am|2 + .../libvirt-gconfig-domain-address-usb.c | 94 .../libvirt-gconfig-domain-address-usb.h | 71 +++ libvirt-gconfig/libvirt-gconfig.h |1 +

[libvirt] [libvirt-glib 06/13] test-domain-create: add USB controller creation

2012-04-06 Thread Christophe Fergeau
--- libvirt-gconfig/tests/test-domain-create.c | 25 + 1 file changed, 25 insertions(+) diff --git a/libvirt-gconfig/tests/test-domain-create.c b/libvirt-gconfig/tests/test-domain-create.c index 4ee33aa..7be9fc2 100644 --- a/libvirt-gconfig/tests/test-domain-create.c

[libvirt] [libvirt-glib 10/13] Improve USB device creation in test-domain-create

2012-04-06 Thread Christophe Fergeau
--- libvirt-gconfig/tests/test-domain-create.c | 53 +++- 1 file changed, 37 insertions(+), 16 deletions(-) diff --git a/libvirt-gconfig/tests/test-domain-create.c b/libvirt-gconfig/tests/test-domain-create.c index 7be9fc2..0c1aad5 100644 ---

[libvirt] [libvirt-glib 12/13] Implement gvir_config_domain_redirdev_set_address

2012-04-06 Thread Christophe Fergeau
--- libvirt-gconfig/libvirt-gconfig-domain-redirdev.c | 10 ++ libvirt-gconfig/libvirt-gconfig-domain-redirdev.h |2 ++ libvirt-gconfig/libvirt-gconfig.sym |1 + 3 files changed, 13 insertions(+) diff --git a/libvirt-gconfig/libvirt-gconfig-domain-redirdev.c

[libvirt] [libvirt-glib 13/13] test-domain-create: set an address for redirdev devices

2012-04-06 Thread Christophe Fergeau
--- libvirt-gconfig/tests/test-domain-create.c | 43 ++-- 1 file changed, 35 insertions(+), 8 deletions(-) diff --git a/libvirt-gconfig/tests/test-domain-create.c b/libvirt-gconfig/tests/test-domain-create.c index 0c1aad5..2b2f734 100644 ---

[libvirt] [libvirt-glib 03/13] Add GVirConfigDomainControllerUsb boilerplate

2012-04-06 Thread Christophe Fergeau
--- libvirt-gconfig/Makefile.am|2 + .../libvirt-gconfig-domain-controller-usb.c| 72 .../libvirt-gconfig-domain-controller-usb.h| 66 ++ libvirt-gconfig/libvirt-gconfig.h |3 +-

Re: [libvirt] [PATCHv2 02/15] blockjob: wire up qemu async virDomainBlockJobAbort

2012-04-06 Thread Adam Litke
On Thu, Apr 05, 2012 at 10:36:48PM -0600, Eric Blake wrote: From: Adam Litke a...@us.ibm.com Without the VIR_DOMAIN_BLOCK_JOB_ABORT_ASYNC flag, libvirt will internally poll using qemu's query-block-jobs API and will not return until the operation has been completed. API users are

Re: [libvirt] [PATCHv2 01/15] blockjob: add API for async virDomainBlockJobAbort

2012-04-06 Thread Adam Litke
On Thu, Apr 05, 2012 at 10:36:47PM -0600, Eric Blake wrote: From: Adam Litke a...@us.ibm.com Qemu has changed the semantics of the block_job_cancel API. The original qed implementation (pretty much only backported to RHEL 6.2 qemu) was synchronous (ie. upon command completion, the operation

Re: [libvirt] USB redirection support

2012-04-06 Thread Marc-André Lureau
On Fri, Apr 6, 2012 at 2:51 PM, Christophe Fergeau cferg...@redhat.com wrote: This patch series adds the needed classes for apps to be able to use USB redirection. I've followed http://hansdegoede.livejournal.com/11084.html and added all the API needed to be able to get the same XML. However,

Re: [libvirt] [PATCHv2 00/15] live block migration via virDomainBlockCopy

2012-04-06 Thread Eric Blake
On 04/05/2012 10:36 PM, Eric Blake wrote: v1 was here: https://www.redhat.com/archives/libvir-list/2012-April/msg00068.html changes from v1: Paolo has updated the qemu side of things, and built a scratch image for RHEL that I was able to test with for the new semantics. I was actually able

Re: [libvirt] [PATCHv3] snapshot: fix memory leak on error

2012-04-06 Thread Eric Blake
On 04/05/2012 10:56 PM, Daniel Veillard wrote: On Thu, Apr 05, 2012 at 10:24:49PM -0600, Eric Blake wrote: Leak introduced in commit 0436d32. If we allocate an actions array, but fail early enough to never consume it with the qemu monitor transaction call, we leaked memory. But our

Re: [libvirt] [PATCHv2 10/15] blockjob: support pivot operation on cancel

2012-04-06 Thread Eric Blake
On 04/06/2012 01:08 AM, Paolo Bonzini wrote: Il 06/04/2012 06:36, Eric Blake ha scritto: If only qemu could get 'drive-reopen' inside 'transaction'... Just a quick answer to this: if qemu could get 'drive-reopen' inside 'transaction', the standalone command could be made safe just as easily.

Re: [libvirt] [PATCHv2 08/15] blockjob: expose qemu commands for mirrored storage migration

2012-04-06 Thread Eric Blake
On 04/06/2012 01:13 AM, Paolo Bonzini wrote: Il 06/04/2012 06:36, Eric Blake ha scritto: +int +qemuMonitorJSONDriveMirror(qemuMonitorPtr mon ATTRIBUTE_UNUSED, + virJSONValuePtr actions, + const char *device, const char *file, +

Re: [libvirt] [PATCHv2 10/15] blockjob: support pivot operation on cancel

2012-04-06 Thread Paolo Bonzini
Il 06/04/2012 06:36, Eric Blake ha scritto: if 'block_job_cancel' were made part of 'transaction', you could copy multiple disks at the same point in time without pausing the domain. This is doable. The transactioned command would do a qemu_aio_flush() in the prepare phase, and a normal

Re: [libvirt] [PATCHv2 10/15] blockjob: support pivot operation on cancel

2012-04-06 Thread Eric Blake
On 04/06/2012 09:19 AM, Paolo Bonzini wrote: Il 06/04/2012 06:36, Eric Blake ha scritto: if 'block_job_cancel' were made part of 'transaction', you could copy multiple disks at the same point in time without pausing the domain. This is doable. The transactioned command would do a

Re: [libvirt] [PATCHv2 11/15] blockjob: implement block copy for qemu

2012-04-06 Thread Eric Blake
On 04/05/2012 10:36 PM, Eric Blake wrote: 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, SELinux must be disabled, a lock manager is not informed, and the audit logs aren't updated. But those

Re: [libvirt] [PATCHv2 08/15] blockjob: expose qemu commands for mirrored storage migration

2012-04-06 Thread Eric Blake
On 04/05/2012 10:36 PM, Eric Blake wrote: The new block copy storage migration sequence requires both the 'drive-mirror' action in 'transaction' (present if the 'drive-mirror' standalone monitor command also exists) and the 'drive-reopen' monitor command (it would be nice if that were also

Re: [libvirt] [PATCHv2 08/15] blockjob: expose qemu commands for mirrored storage migration

2012-04-06 Thread Federico Simoncelli
- Original Message - From: Eric Blake ebl...@redhat.com To: libvir-list@redhat.com Cc: pbonz...@redhat.com, fsimo...@redhat.com Sent: Friday, April 6, 2012 6:36:54 AM Subject: [PATCHv2 08/15] blockjob: expose qemu commands for mirrored storage migration The new block copy storage

Re: [libvirt] [PATCHv2 10/15] blockjob: support pivot operation on cancel

2012-04-06 Thread Paolo Bonzini
Il 06/04/2012 17:28, Eric Blake ha scritto: I'm talking about the guest agent. It may make a difference, but cannot be the default, because you cannot trust the guest agent to be present. I'm thinking this will be like the --quiesce operation of snapshot-create, as another situation where

Re: [libvirt] [PATCHv2 08/15] blockjob: expose qemu commands for mirrored storage migration

2012-04-06 Thread Eric Blake
On 04/06/2012 10:04 AM, Federico Simoncelli wrote: - Original Message - From: Eric Blake ebl...@redhat.com To: libvir-list@redhat.com Cc: pbonz...@redhat.com, fsimo...@redhat.com Sent: Friday, April 6, 2012 6:36:54 AM Subject: [PATCHv2 08/15] blockjob: expose qemu commands for

Re: [libvirt] [PATCHv2 11/15] blockjob: implement block copy for qemu

2012-04-06 Thread Eric Blake
On 04/06/2012 09:36 AM, Eric Blake wrote: On 04/05/2012 10:36 PM, Eric Blake wrote: 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, SELinux must be disabled, a lock manager is not informed,

Re: [libvirt] [PATCH 1/4] Split libvirtd config file loading out into separate files

2012-04-06 Thread Eric Blake
On 04/04/2012 08:07 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com To enable creation of unit tests, split the libvirtd config file loading code out into separate files. * daemon/libvirtd.c: Delete config loading code / structs * daemon/libvirtd-config.c,

Re: [libvirt] [PATCH 2/4] Add API for loading daemon config from in-memory blob

2012-04-06 Thread Eric Blake
On 04/04/2012 08:07 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com --- Sparse on the commit message; even mentioning the name of the new API will help a later 'git log' search for the introduction of the new name. daemon/libvirtd-config.c | 67

Re: [libvirt] [PATCH 3/4] Switch libvirtd config loading code to use error APIs

2012-04-06 Thread Eric Blake
On 04/04/2012 08:07 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Using VIR_ERROR means the test suite can't catch error messages easily. Use the proper error reporting APIs instead --- daemon/libvirtd-config.c | 56

Re: [libvirt] [PATCH 4/4] Replace daemon-conf test script with a proper test case

2012-04-06 Thread Eric Blake
On 04/04/2012 08:07 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com The daemon-conf test script continues to be very fragile to changes in libvirt. It currently fails 1 time in 3/4 due to race conditions in startup/shutdown of the test script. Replace it with a

[libvirt] [PATCHv3 01/16] blockjob: add API for async virDomainBlockJobAbort

2012-04-06 Thread Eric Blake
From: Adam Litke a...@us.ibm.com Qemu has changed the semantics of the block_job_cancel API. The original qed implementation (pretty much only backported to RHEL 6.2 qemu) was synchronous (ie. upon command completion, the operation was guaranteed to be completely stopped). With the new

[libvirt] [PATCHv3 10/16] blockjob: support pivot operation on cancel

2012-04-06 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, saving that for a

[libvirt] [PATCHv3 00/16] live block migration via virDomainBlockCopy

2012-04-06 Thread Eric Blake
v1 was here: https://www.redhat.com/archives/libvir-list/2012-April/msg00068.html v2 was here: https://www.redhat.com/archives/libvir-list/2012-April/msg00222.html changes from v2: added patch 12/16, addressed some review comments and made minor changes from more of my own testing CAVEAT: Paolo

[libvirt] [PATCHv3 03/16] blockjob: allow for fast-finishing job

2012-04-06 Thread Eric Blake
In my testing, I was able to provoke an odd block pull failure: $ virsh blockpull dom vda --bandwidth 1 error: Requested operation is not valid: No active operation on device: drive-virtio-disk0 merely by using gdb to artifically wait to do the block job set speed until after the pull had

[libvirt] [PATCHv3 04/16] blockjob: add new API flags

2012-04-06 Thread Eric Blake
This patch introduces a new block job, useful for live storage migration using pre-copy streaming. Using a live VM with the backing chain: base - snap1 - snap2 as the starting point, we have: - virDomainBlockRebase(dom, disk, /path/to/copy, 0, VIR_DOMAIN_BLOCK_REBASE_COPY) creates

[libvirt] [PATCHv3 07/16] blockjob: react to active block copy

2012-04-06 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] [PATCHv3 08/16] blockjob: expose qemu commands for mirrored storage migration

2012-04-06 Thread Eric Blake
The new block copy storage migration sequence requires both the 'drive-mirror' action in 'transaction' (present if the 'drive-mirror' standalone monitor command also exists) and the 'drive-reopen' monitor command (it would be nice if that were also part of a 'transaction', but the initial qemu

[libvirt] [PATCHv3 13/16] blockjob: accommodate RHEL backport names

2012-04-06 Thread Eric Blake
RHEL-only drive-mirror and drive-reopen are still under upstream qemu discussion; as a result, RHEL decided to backport things under a downstream name. Accommodate this alternate spelling. I don't think it's worth trying to support both spellings at once: if you build upstream libvirt on RHEL,

[libvirt] [PATCHv3 11/16] blockjob: implement block copy for qemu

2012-04-06 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] [PATCHv3 06/16] blockjob: enhance xml to track mirrors across libvirtd restart

2012-04-06 Thread Eric Blake
QUESTION: should we parse and ignore mirror on input, rather than rejecting it? By rejecting it, I can't add a unit test, since the unit test framework currently doesn't expose a way to trigger internal parsing. In order to track a block copy job across libvirtd restarts, we need to save

[libvirt] [PATCHv3 12/16] blockjob: allow for existing files

2012-04-06 Thread Eric Blake
This copies some of the checks from snapshots regarding testing when a file already exists. In the process, I noticed a missing sanity check in snapshots: REUSE_EXT should require the destination to already be present. * src/qemu/qemu_driver.c (qemuDomainBlockRebase): Allow REUSE_EXT flag.

[libvirt] [PATCHv3 14/16] blockjob: add virDomainBlockCopy

2012-04-06 Thread Eric Blake
This new API provides additional flexibility over what can be crammed on top of virDomainBlockRebase (namely, the ability to specify an arbitrary destination format, for things like copying qcow2 into qed without having to pre-create the destination), at the expense that it cannot be backported

Re: [libvirt] [PATCHv2 00/15] live block migration via virDomainBlockCopy

2012-04-06 Thread Eric Blake
On 04/06/2012 08:24 AM, Eric Blake wrote: On 04/05/2012 10:36 PM, Eric Blake wrote: v1 was here: https://www.redhat.com/archives/libvir-list/2012-April/msg00068.html changes from v1: Paolo has updated the qemu side of things, and built a scratch image for RHEL that I was able to test with

[libvirt] [PATCHv3 02/16] blockjob: wire up qemu async virDomainBlockJobAbort

2012-04-06 Thread Eric Blake
From: Adam Litke a...@us.ibm.com Without the VIR_DOMAIN_BLOCK_JOB_ABORT_ASYNC flag, libvirt will internally poll using qemu's query-block-jobs API and will not return until the operation has been completed. API users are advised that this operation is unbounded and further interaction with the

[libvirt] [PATCHv3 16/16] blockjob: wire up qemu and RPC for block copy

2012-04-06 Thread Eric Blake
Almost trivial; the trick was dealing with the fact that we're stuck with 'unsigned long bandwidth' due to earlier design decisions. Also, prefer the correct flag names (although we intentionally chose the _SHALLOW and _REUSE_EXT values to be equal, to allow for loose handling in our code). *

[libvirt] [PATCHv3 15/16] blockjob: enhance virsh 'blockcopy'

2012-04-06 Thread Eric Blake
Expose the full abilities of virDomainBlockCopy. * tools/virsh.c (blockJobImpl): Add --format option for block copy. * tools/virsh.pod (blockcopy): Document this. --- tools/virsh.c | 25 - tools/virsh.pod | 10 +- 2 files changed, 25 insertions(+), 10

[libvirt] [PATCHv3 05/16] blockjob: add 'blockcopy' to virsh

2012-04-06 Thread Eric Blake
Rather than further overloading 'blockpull', I decided to create a new virsh command to expose the new flags of virDomainBlockRebase. Someday, I'd also like to make blockpull and blockcopy have a synchronous mode, which blocks until the event happens or Ctrl-C is pressed, as well as a --verbose

[libvirt] [PATCHv3 09/16] blockjob: return appropriate event and info

2012-04-06 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. * src/qemu/qemu_monitor_json.c (qemuMonitorJSONHandleBlockJobImpl) (qemuMonitorJSONGetBlockJobInfoOne): Translate new job type. *

Re: [libvirt] Horrible performance of virDomainGetInfo()

2012-04-06 Thread Jiri Denemark
On Wed, Dec 07, 2011 at 18:20:16 +, Daniel P. Berrange wrote: On Wed, Dec 07, 2011 at 03:45:10PM +0100, Jiri Denemark wrote: On Wed, Dec 07, 2011 at 14:30:10 +, Daniel P. Berrange wrote: While investigating the RPC problems I've noticed that we have had a huge performance

[libvirt] [PATCH] Fix compilation error on 32bit

2012-04-06 Thread Stefan Berger
Below code failed to compile on a 32 bit machine with error typewrappers.c: In function 'libvirt_intUnwrap': typewrappers.c:135:5: error: logical 'and' of mutually exclusive tests is always false [-Werror=logical-op] cc1: all warnings being treated as errors The patch fixes this error.

[libvirt] [PATCH v2] qemu: change rbd auth_supported separation character to ;

2012-04-06 Thread Josh Durgin
This works with newer qemu that doesn't allow escaping spaces. It's backwards compatible as well. Signed-off-by: Josh Durgin josh.dur...@dreamhost.com --- Changes since v1: * update test as well src/qemu/qemu_command.c|2 +-