Re: [libvirt] [PATCH] qemu: qemuDomainRename and virDomainObjListNumOfDomains ABBA deadlock fix

2016-01-26 Thread Martin Kletzander
On Tue, Jan 26, 2016 at 01:31:25PM +0300, Maxim Nestratov wrote: 26.01.2016 12:29, Martin Kletzander пишет: On Mon, Jan 25, 2016 at 12:16:12PM +0300, Maxim Nestratov wrote: A pretty nasty deadlock occurs while trying to rename a VM in parallel with virDomainObjListNumOfDomains. The short

Re: [libvirt] [PATCH v2] virsh: improve waiting for block job readiness

2016-01-26 Thread Michael Chapman
On Mon, 25 Jan 2016, John Ferlan wrote: Since this has been sitting for a bit, I'll poke the bear, but also CC Peter since he reviewed V1 and had some specific concerns... Thanks for picking up this review. The concern before was how the code would handle the user passing a different,

Re: [libvirt] [PATCH] migration: add option to set target ndb server port

2016-01-26 Thread Nikolay Shirokovskiy
I'm looking forward to be reviewed) Sincerely yours, Patch Series On 13.01.2016 14:01, Nikolay Shirokovskiy wrote: > Current libvirt + qemu pair lacks secure migrations in case of > VMs with non-shared disks. The only option to migrate securely > natively is to use

Re: [libvirt] [PATCH] virsh: fix cpu-stats command output format issue

2016-01-26 Thread lhuang
On 01/26/2016 04:24 PM, Peter Krempa wrote: On Tue, Jan 26, 2016 at 10:25:05 +0800, Luyao Huang wrote: After commit 57177f1, the cpu-stats command format change to: CPU0: cpu_time 14401.507878990 seconds vcpu_time14378732785511 vcpu_time is not user friendly. After

[libvirt] [PATCH] vz: remove unused struct field

2016-01-26 Thread Mikhail Feoktistov
In commit 7039bb3c we have removed code that saves uuid to vzDomObj.uuid So this field is no longer needed. --- src/vz/vz_sdk.c | 5 - src/vz/vz_utils.h | 1 - 2 files changed, 6 deletions(-) diff --git a/src/vz/vz_sdk.c b/src/vz/vz_sdk.c index d610979..5e4c4ac 100644 --- a/src/vz/vz_sdk.c

[libvirt] [PATCH v2] qemu: add reporting of vCPU wait time

2016-01-26 Thread Daniel P. Berrange
The VIR_DOMAIN_STATS_VCPU flag to virDomainListGetStats enables reporting of stats about vCPUs. Currently we only report the cumulative CPU running time and the execution state. This adds reporting of the wait time - time the vCPU wants to run, but the host schedular has something else running

Re: [libvirt] [PATCH] qemu: qemuDomainRename and virDomainObjListNumOfDomains ABBA deadlock fix

2016-01-26 Thread Michal Privoznik
On 25.01.2016 10:16, Maxim Nestratov wrote: > A pretty nasty deadlock occurs while trying to rename a VM in parallel > with virDomainObjListNumOfDomains. > The short description of the problem is as follows: > > Thread #1: > > qemuDomainRename: > --> aquires domain lock by

Re: [libvirt] [PATCH] qemu: qemuDomainRename and virDomainObjListNumOfDomains ABBA deadlock fix

2016-01-26 Thread Martin Kletzander
On Mon, Jan 25, 2016 at 12:16:12PM +0300, Maxim Nestratov wrote: A pretty nasty deadlock occurs while trying to rename a VM in parallel with virDomainObjListNumOfDomains. The short description of the problem is as follows: Thread #1: qemuDomainRename: --> aquires domain lock by

Re: [libvirt] [PATCHv2] util: keep/use a bitmap of in-use macvtap devices

2016-01-26 Thread Pavel Hrdina
On Mon, Jan 25, 2016 at 09:00:27PM -0500, Laine Stump wrote: > >> +retries = MACVLAN_MAX_ID + 1; > >> +while (!ifnameCreated && retries) { > >> virMutexLock(); > >> -for (c = 0; c < 8192; c++) { > >> -snprintf(ifname, sizeof(ifname), pattern, c); > >> -

Re: [libvirt] [PATCH v5 6/7] Implement qemuSetupGlobalCpuCgroup

2016-01-26 Thread Maxim Nestratov
18.01.2016 13:08, Alexander Burluka пишет: This functions setups per-domain cpu bandwidth parameters Signed-off-by: Alexander Burluka --- src/qemu/qemu_cgroup.c | 54 + src/qemu/qemu_cgroup.h | 1 +

Re: [libvirt] Call for mentors and project ideas for Google Summer of Code 2016

2016-01-26 Thread Michal Privoznik
On 25.01.2016 18:28, Stefan Hajnoczi wrote: > The QEMU wiki page for Google Summer of Code 2016 is now available here: > > http://qemu-project.org/Google_Summer_of_Code_2016 > > QEMU will apply for Google Summer of Code 2016 (https://g.co/gsoc/). > If QEMU is accepted there will be funding for

Re: [libvirt] [PATCH] qemu: qemuDomainRename and virDomainObjListNumOfDomains ABBA deadlock fix

2016-01-26 Thread Maxim Nestratov
26.01.2016 12:29, Martin Kletzander пишет: On Mon, Jan 25, 2016 at 12:16:12PM +0300, Maxim Nestratov wrote: A pretty nasty deadlock occurs while trying to rename a VM in parallel with virDomainObjListNumOfDomains. The short description of the problem is as follows: Thread #1:

Re: [libvirt] Ability to add arbitrary data to snapshots

2016-01-26 Thread Jiri Denemark
On Tue, Jan 26, 2016 at 12:59:00 +0300, Alexander Burluka wrote: > On 01/25/2016 04:16 PM, Daniel P. Berrange wrote: > > On Mon, Jan 25, 2016 at 02:55:30PM +0300, Alexander Burluka wrote: > >> For example, we want to store suspended state of VM. > >> I'm aware that some other careless application

[libvirt] [PATCH] Dont set ABI update flag during migration cookie parsing for persistent copy

2016-01-26 Thread Shivaprasad G Bhat
The migration would fail if the checks in virDomainDefPostParseMemory() fail after ABI update. The ABI update normally done during the guest start and not during define. If someone is using --persistent with the virsh migrate it should be treated equivalent to domain define and not start. The

Re: [libvirt] [PATCH] Dont set ABI update flag during migration cookie parsing for persistent copy

2016-01-26 Thread Shivaprasad bhat
Please drop this patch. I sent it too early. I think the existing migration behavior with --persistent is expected. Thanks, Shiva On Tue, Jan 26, 2016 at 1:31 PM, Shivaprasad G Bhat < shivaprasadb...@gmail.com> wrote: > The migration would fail if the checks in virDomainDefPostParseMemory() >

Re: [libvirt] [PATCH] virsh: fix cpu-stats command output format issue

2016-01-26 Thread Peter Krempa
On Tue, Jan 26, 2016 at 10:25:05 +0800, Luyao Huang wrote: > After commit 57177f1, the cpu-stats command format change to: > > CPU0: > cpu_time 14401.507878990 seconds > vcpu_time14378732785511 > > vcpu_time is not user friendly. After this patch, it will > change back: >

Re: [libvirt] [PATCH] qemu: qemuDomainRename and virDomainObjListNumOfDomains ABBA deadlock fix

2016-01-26 Thread Jiri Denemark
On Tue, Jan 26, 2016 at 13:26:32 +0100, Michal Privoznik wrote: > On 25.01.2016 10:16, Maxim Nestratov wrote: ... > > > > virCheckFlags(0, ret); > > > > -if (!(vm = qemuDomObjFromDomain(dom))) > > +virObjectLock(driver->domains); > > This is rather ugly. While driver->domains is

Re: [libvirt] [PATCH] qemu: turn on virtlockd by default

2016-01-26 Thread Ján Tomko
On Fri, Jan 22, 2016 at 03:56:08PM +, Daniel P. Berrange wrote: > We have had virtlockd available for a long time now but > have always defaulted to the 'nop' lock driver which does > no locking. This gives users an unsafe deployment by > default unless they know to turn on lockd. Does the

Re: [libvirt] [PATCH] qemu: qemuDomainRename and virDomainObjListNumOfDomains ABBA deadlock fix

2016-01-26 Thread Martin Kletzander
On Tue, Jan 26, 2016 at 02:14:23PM +0100, Jiri Denemark wrote: On Tue, Jan 26, 2016 at 13:26:32 +0100, Michal Privoznik wrote: On 25.01.2016 10:16, Maxim Nestratov wrote: ... > > virCheckFlags(0, ret); > > -if (!(vm = qemuDomObjFromDomain(dom))) > +virObjectLock(driver->domains);

Re: [libvirt] [PATCH 1/4] logical: Fix comment examples for virStorageBackendLogicalFindLVs

2016-01-26 Thread Pavel Hrdina
On Fri, Jan 22, 2016 at 05:21:03PM -0500, John Ferlan wrote: > When commit id '82c1740a' made changes to the output format (changing from > using a ',' separator to '#'), the examples in the lvs output from the > comments weren't changed. > > Additionally, the two new fields added ('segtype' and

Re: [libvirt] [PATCH] qemu: turn on virtlockd by default

2016-01-26 Thread Daniel P. Berrange
On Tue, Jan 26, 2016 at 02:28:56PM +0100, Ján Tomko wrote: > On Fri, Jan 22, 2016 at 03:56:08PM +, Daniel P. Berrange wrote: > > We have had virtlockd available for a long time now but > > have always defaulted to the 'nop' lock driver which does > > no locking. This gives users an unsafe

Re: [libvirt] [PATCH] qemu: qemuDomainRename and virDomainObjListNumOfDomains ABBA deadlock fix

2016-01-26 Thread Maxim Nestratov
26.01.2016 16:33, Martin Kletzander пишет: On Tue, Jan 26, 2016 at 02:14:23PM +0100, Jiri Denemark wrote: On Tue, Jan 26, 2016 at 13:26:32 +0100, Michal Privoznik wrote: On 25.01.2016 10:16, Maxim Nestratov wrote: ... [snip] What if, instead of introducing bunch of Locked() functions we

Re: [libvirt] [PATCH] qemu: turn on virtlockd by default

2016-01-26 Thread Ján Tomko
On Fri, Jan 22, 2016 at 03:56:08PM +, Daniel P. Berrange wrote: > We have had virtlockd available for a long time now but > have always defaulted to the 'nop' lock driver which does > no locking. This gives users an unsafe deployment by > default unless they know to turn on lockd. virtlockd

Re: [libvirt] [PATCH v2] qemu: add reporting of vCPU wait time

2016-01-26 Thread Ján Tomko
On Tue, Jan 26, 2016 at 11:20:59AM +, Daniel P. Berrange wrote: > The VIR_DOMAIN_STATS_VCPU flag to virDomainListGetStats > enables reporting of stats about vCPUs. Currently we > only report the cumulative CPU running time and the > execution state. > > This adds reporting of the wait time -

Re: [libvirt] Compiling libvirt on Cygwin

2016-01-26 Thread Maarten Jacobs
Hello, It would seem this mailing list is pretty busy - however I have not seen any responses to my email? Is there anybody who can take a peek at this and give me some suggestions? Thanks, Maarten Jacobs From: maarten...@hotmail.com To: libvir-list@redhat.com Date: Sun, 24 Jan 2016 12:57:51

Re: [libvirt] [PATCH] qemu: turn on virtlockd by default

2016-01-26 Thread Daniel P. Berrange
On Tue, Jan 26, 2016 at 01:47:02PM +, Daniel P. Berrange wrote: > On Tue, Jan 26, 2016 at 02:28:56PM +0100, Ján Tomko wrote: > > On Fri, Jan 22, 2016 at 03:56:08PM +, Daniel P. Berrange wrote: > > > We have had virtlockd available for a long time now but > > > have always defaulted to the

[libvirt] [PATCH] lxc: don't try to hide parent cgroups inside container

2016-01-26 Thread Daniel P. Berrange
On the host when we start a container, it will be placed in a cgroup path of /machine.slice/machine-lxc\x2ddemo.scope under /sys/fs/cgroup/* Inside the containers' namespace we need to setup /sys/fs/cgroup mounts, and currently will bind mount /machine.slice/machine-lxc\x2ddemo.scope on the

Re: [libvirt] Compiling libvirt on Cygwin

2016-01-26 Thread Daniel P. Berrange
On Sun, Jan 24, 2016 at 12:57:51PM -0500, Maarten Jacobs wrote: > Hello, > I have been trying to get libvirt compiled on Cygwin but I have run into a > rather perplexing issue. > I am running a 32-bit installation of Cygwin on Windows 10: > CYGWIN_NT-10.0-WOW dell-desktop 2.4.0(0.293/5/3)

Re: [libvirt] [PATCH 2/4] logical: Create helper virStorageBackendLogicalParseVolDevice

2016-01-26 Thread Pavel Hrdina
On Fri, Jan 22, 2016 at 05:21:04PM -0500, John Ferlan wrote: > Create a helper routine in order to parse the 'device' string contained > within the generated 'lvs' output string. > > A future patch would then be able to avoid the code more cleanly > > Signed-off-by: John Ferlan

Re: [libvirt] [PATCH 4/4] logical: Adjust regex for devices

2016-01-26 Thread Pavel Hrdina
On Fri, Jan 22, 2016 at 05:21:06PM -0500, John Ferlan wrote: > From: Joe Harvell > > Since our 'devices' parsing logic now will use the 'nextents' (or > lvs 'stripes' output) to decide whether or not to parse the field, > use the regex of "(\\S*)" (e.g. zero or more)

Re: [libvirt] [PATCH v2 0/4] various test fixes and handling of input devices

2016-01-26 Thread Pavel Hrdina
ping -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH] lxc: don't try to hide parent cgroups inside container

2016-01-26 Thread Michal Privoznik
On 26.01.2016 15:37, Daniel P. Berrange wrote: > On the host when we start a container, it will be > placed in a cgroup path of > >/machine.slice/machine-lxc\x2ddemo.scope > > under /sys/fs/cgroup/* > > Inside the containers' namespace we need to setup > /sys/fs/cgroup mounts, and currently

Re: [libvirt] [PATCH v2 4/4] tests: update test XML files to follow input changes

2016-01-26 Thread Michal Privoznik
On 12.01.2016 13:06, Pavel Hrdina wrote: > Ok, so consider this squashed in, I've forgot to regenerate the tests after > rebase to current HEAD and there seems to be new tests. > > --- > Not only that. This needs to be squashed in too: diff --git

Re: [libvirt] [PATCH v2 0/4] various test fixes and handling of input devices

2016-01-26 Thread Michal Privoznik
On 12.01.2016 12:59, Pavel Hrdina wrote: > Some of the patches from v1 series are already pushed, only those 4 left for > review. > > Pavel Hrdina (4): > tests: use virtTestDifferenceFull in tests where we have output file > tests: add some missing tests to qemuxml2xmltest > device: cleanup

Re: [libvirt] [PATCH v2 3/4] device: cleanup input device code

2016-01-26 Thread Michal Privoznik
On 12.01.2016 12:59, Pavel Hrdina wrote: > The current code was a little bit odd. At first we've removed all > possible implicit input devices from domain definition to add them later > back if there was any graphics device defined while parsing XML > description. That's not all, while formating

Re: [libvirt] [PATCH v7 00/13] qemu: Add quorum support to libvirt

2016-01-26 Thread Peter Krempa
On Wed, Jan 20, 2016 at 16:47:56 +0200, Alberto Garcia wrote: > Hi Peter, Hi Alberto, > > I'm the current maintainer of Quorum in QEMU and I'd like to try to > answer some of your comments. > > On Fri, Jan 08, 2016 at 06:20:04PM +0100, Peter Krempa wrote: > > > So I have a few

[libvirt] high outage times for qemu virtio network links during live migration, trying to debug

2016-01-26 Thread Chris Friesen
Hi, I'm using libvirt (1.2.12) with qemu (2.2.0) in the context of OpenStack. If I live-migrate a guest with virtio network interfaces, I see a ~1200msec delay in processing the network packets, and several hundred of them get dropped. I get the dropped packets, but I'm not sure why the

Re: [libvirt] [PATCH v2 7/8] qemu: hotplug: Drop !QEMU_CAPS_DEVICE code

2016-01-26 Thread Laine Stump
On 01/22/2016 02:11 PM, Cole Robinson wrote: On 01/22/2016 02:09 PM, Cole Robinson wrote: Nowadays we only support qemu 0.12.0+ which provides QEMU_CAPS_DEVICE, so this is all dead code. --- src/qemu/qemu_hotplug.c | 480 +++- 1 file changed, 144

[libvirt] [PATCH] vircgroup: Finish renaming of virCgroupIsolateMount

2016-01-26 Thread Michal Privoznik
In dc576025c360 we renamed virCgroupIsolateMount function to virCgroupBindMount. However, we forgot about one occurrence in section of the code which provides stubs for platforms without support for CGroups like *BSD for instance. Signed-off-by: Michal Privoznik --- Pushed

Re: [libvirt] [Qemu-devel] high outage times for qemu virtio network links during live migration, trying to debug

2016-01-26 Thread Daniel P. Berrange
On Tue, Jan 26, 2016 at 10:41:12AM -0600, Chris Friesen wrote: > Hi, > > I'm using libvirt (1.2.12) with qemu (2.2.0) in the context of OpenStack. > > If I live-migrate a guest with virtio network interfaces, I see a ~1200msec > delay in processing the network packets, and several hundred of

Re: [libvirt] high outage times for qemu virtio network links during live migration, trying to debug

2016-01-26 Thread Paolo Bonzini
On 26/01/2016 17:41, Chris Friesen wrote: > I'm using libvirt (1.2.12) with qemu (2.2.0) in the context of OpenStack. > > If I live-migrate a guest with virtio network interfaces, I see a > ~1200msec delay in processing the network packets, and several hundred > of them get dropped. I get the

Re: [libvirt] high outage times for qemu virtio network links during live migration, trying to debug

2016-01-26 Thread Chris Friesen
On 01/26/2016 10:50 AM, Paolo Bonzini wrote: On 26/01/2016 17:41, Chris Friesen wrote: I'm using libvirt (1.2.12) with qemu (2.2.0) in the context of OpenStack. If I live-migrate a guest with virtio network interfaces, I see a ~1200msec delay in processing the network packets, and several

Re: [libvirt] high outage times for qemu virtio network links during live migration, trying to debug

2016-01-26 Thread Paolo Bonzini
On 26/01/2016 18:21, Chris Friesen wrote: >>> >>> My question is, why doesn't qemu continue processing virtio packets >>> while the dirty page scanning and memory transfer over the network is >>> proceeding? >> >> QEMU (or vhost) _are_ processing virtio traffic, because otherwise you'd >> have

Re: [libvirt] high outage times for qemu virtio network links during live migration, trying to debug

2016-01-26 Thread Chris Friesen
On 01/26/2016 11:31 AM, Paolo Bonzini wrote: On 26/01/2016 18:21, Chris Friesen wrote: My question is, why doesn't qemu continue processing virtio packets while the dirty page scanning and memory transfer over the network is proceeding? QEMU (or vhost) _are_ processing virtio traffic,

Re: [libvirt] high outage times for qemu virtio network links during live migration, trying to debug

2016-01-26 Thread Paolo Bonzini
On 26/01/2016 18:49, Chris Friesen wrote: >> >> That doesn't exclude a bug somewhere in net/ code. It doesn't pinpoint >> it to QEMU or vhost-net. >> >> In any case, what I would do is to use tracing at all levels (guest >> kernel, QEMU, host kernel) for packet rx and tx, and find out at which

[libvirt] [PATCH] Fix libvirtd free() segfault when migrating guest with deleted open vswitch port

2016-01-26 Thread Jason J. Herne
libvirtd crashes on free()ing portData for an open vswitch port if that port was deleted. To reproduce: ovs-vsctl del-port vnet0 virsh migrate --live kvm1 qemu+ssh://dstHost/system Error message: libvirtd: *** Error in `/usr/sbin/libvirtd': free(): invalid pointer: 0x03ff90001e20 *** The

Re: [libvirt] [Qemu-devel] high outage times for qemu virtio network links during live migration, trying to debug

2016-01-26 Thread Chris Friesen
On 01/26/2016 10:45 AM, Daniel P. Berrange wrote: On Tue, Jan 26, 2016 at 10:41:12AM -0600, Chris Friesen wrote: My question is, why doesn't qemu continue processing virtio packets while the dirty page scanning and memory transfer over the network is proceeding? The

Re: [libvirt] [PATCH v2 2/9] hostdev: Use common reattach code to rollback prepare errors

2016-01-26 Thread John Ferlan
Need something here... Perhaps to the effect of instead of inlining most of virHostdevOnlyReattachPCIDevice, call virHostdevOnlyReattachPCIDevice. One extra "call" or check being made by doing this is the virPCIDeviceGetStubDriver check and virPCIDeviceWaitForCleanup. Are there any "timing"

Re: [libvirt] [PATCH v2 1/9] hostdev: Add virHostdevOnlyReattachPCIDevice()

2016-01-26 Thread John Ferlan
w/r/t: your [0/7] from initial series... As much as you don't want to keep living Groundhog Day - resolution of bugs like this are job security :-)... The subtleties of hostdev device Attach, Reattach, ReAttach, and Detach are such a tangle morass of shinola (ref: Steve Martin in "The

Re: [libvirt] [PATCH v2 3/9] hostdev: Use common reattach code in virHostdevPCINodeDeviceReAttach()

2016-01-26 Thread John Ferlan
On 01/25/2016 11:20 AM, Andrea Bolognani wrote: > This ensures the behavior for reattach is consistent, no matter how it > was triggered (eg. 'virsh nodedev-reattach', 'virsh detach-device' or > shutdown of a domain that is configured to use hostdevs). Similar to 2/9 - using

Re: [libvirt] [PATCH v2 4/9] hostdev: Add virHostdevOnlyDetachPCIDevice()

2016-01-26 Thread John Ferlan
On 01/25/2016 11:20 AM, Andrea Bolognani wrote: > This function mirrors virHostdevOnlyDetachPCIDevice(). > > The handling of active and inactive devices is updated and made more > explicit, which means virHostdevPreparePCIDevices() has to be > updated as well. > --- > src/util/virhostdev.c |

Re: [libvirt] [PATCH v2 5/9] hostdev: Use common detach code in virHostdevPCINodeDeviceDetach()

2016-01-26 Thread John Ferlan
On 01/25/2016 11:21 AM, Andrea Bolognani wrote: > This ensures the behavior for detach is consistent, no matter how it > was triggered (eg. 'virsh nodedev-detach', 'virsh attach-device' or > startup of a domain that is configured to use hostdevs). > --- > src/util/virhostdev.c | 28

Re: [libvirt] [PATCH v2 8/9] pci: Phase out virPCIDeviceReattachInit()

2016-01-26 Thread John Ferlan
On 01/25/2016 11:21 AM, Andrea Bolognani wrote: > The name is confusing, and the only use left is in a test case. > --- > src/libvirt_private.syms | 1 - > src/util/virpci.c| 8 > src/util/virpci.h| 1 - > tests/virpcitest.c | 5 - > 4 files changed, 4

Re: [libvirt] [PATCH v2 9/9] pci: Add debug messages when unbinding from stub driver

2016-01-26 Thread John Ferlan
On 01/25/2016 11:21 AM, Andrea Bolognani wrote: > Unbinding a PCI device from the stub driver can require several steps, > and it can be useful for debugging to be able to trace which of these > steps are performed and which are skipped for each device. > --- > src/util/virpci.c | 22

Re: [libvirt] [PATCH v2 7/9] hostdev: Update comments

2016-01-26 Thread John Ferlan
On 01/25/2016 11:21 AM, Andrea Bolognani wrote: > Some of the comments are no longer accurate after the recent changes, > others have been expanded and hopefully improved. > > The initial summary of the operations has been removed so that two > separate edits are not needed when making changes.

Re: [libvirt] [PATCH v2 6/9] hostdev: Minor style adjustments

2016-01-26 Thread John Ferlan
On 01/25/2016 11:21 AM, Andrea Bolognani wrote: > Mostly labels names and whitespace. > > No functional changes. > --- > src/util/virhostdev.c | 23 ++- > 1 file changed, 14 insertions(+), 9 deletions(-) > Seems reasonable, ACK John -- libvir-list mailing list

[libvirt] [PATCH v3 3/4] virsh: ensure SIGINT action is reset on all errors

2016-01-26 Thread Michael Chapman
If virTimeMillisNow() fails, the SIGINT action must be reset back to its previous state. Signed-off-by: Michael Chapman --- tools/virsh-domain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index

[libvirt] [PATCH v3 2/4] virsh: be consistent with style of loop exit

2016-01-26 Thread Michael Chapman
When waiting for a block job, the various statuses (COMPLETED, READY, CANCELED, etc.) should all be treated consistently by having the loop be exited with "break". Use "goto cleanup" for the error cases only, when no block job status is available. Signed-off-by: Michael Chapman

[libvirt] [PATCH v3 0/4] virshBlockJobWait improvements

2016-01-26 Thread Michael Chapman
v2 discussion at: http://www.redhat.com/archives/libvir-list/2016-January/msg01063.html As requested I've split this into separate commits. All of the comment nitpicks have been applied. With regards to using "break" or "goto cleanup" to exit the loop, I decided to use "goto" on all the error

[libvirt] [PATCH v3 1/4] virsh: avoid unnecessary progress updates

2016-01-26 Thread Michael Chapman
There is no need to call virshPrintJobProgress() unless the block job's cur or end cursors have changed since the last iteration. Signed-off-by: Michael Chapman --- tools/virsh-domain.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git

[libvirt] [PATCH v3 4/4] virsh: improve waiting for block job readiness

2016-01-26 Thread Michael Chapman
After a block job hits 100%, we only need to apply a timeout waiting for a block job event if exactly one of the BLOCK_JOB or BLOCK_JOB_2 callbacks were able to be registered. If neither callback could be registered, there's clearly no need for a timeout. If both callbacks were registered, then

[libvirt] [PATCH] util: fix build without macvtap

2016-01-26 Thread Roman Bogorodskiy
Commit 370608b added new functions: - virNetDevMacVLanReleaseName, - virNetDevMacVLanReserveName. Add stubbed versions of them to fix build without macvtap. --- src/util/virnetdevmacvlan.c | 17 + 1 file changed, 17 insertions(+) diff --git a/src/util/virnetdevmacvlan.c

Re: [libvirt] Ability to add arbitrary data to snapshots

2016-01-26 Thread Alexander Burluka
On 01/25/2016 04:16 PM, Daniel P. Berrange wrote: On Mon, Jan 25, 2016 at 02:55:30PM +0300, Alexander Burluka wrote: For example, we want to store suspended state of VM. I'm aware that some other careless application dealing with libvirt may erase metadata section and info about additional