Re: [libvirt] [PATCH] Allow execute access to /var/lib/libvirt/qemu/ for others

2015-09-08 Thread Martin Kletzander
On Tue, Sep 08, 2015 at 08:49:16PM +0200, Jiri Denemark wrote: On Tue, Sep 08, 2015 at 19:07:09 +0200, Martin Kletzander wrote: Commit f1f68ca33433 tried fixing running multiple domains under various users, but if the user can't browse the directory, it's hard for the qemu running under that use

Re: [libvirt] [PATCH] Ignore virtio-mmio disks in qemuAssignDevicePCISlots()

2015-09-08 Thread Pavel Fedin
Hello! > How did you manage to do that? Probably i forgot to explicitly specify that it affects ARM 'virt' machine. Before we added PCIe support we were able to use only virtio-mmio there. Now we can use both, because virtio-mmio support in qemu didn't go anywhere. It worked before PCIe supp

Re: [libvirt] [PATCH v2 2/2] virsh: Enhance the detailed output of domblklist for networked source

2015-09-08 Thread Lin Ma
在 2015年09月04日 18:53, John Ferlan 写道: On 09/04/2015 04:26 AM, Michal Privoznik wrote: On 03.09.2015 22:47, John Ferlan wrote: On 09/02/2015 11:58 AM, Michal Privoznik wrote: From: Lin Ma Format & output more detailed information about networked source e.g: The output without the patch: $

Re: [libvirt] [PATCH v2 2/2] virsh: Enhance the detailed output of domblklist for networked source

2015-09-08 Thread Lin Ma
在 2015年09月08日 20:10, Peter Krempa 写道: On Wed, Sep 02, 2015 at 17:58:19 +0200, Michal Privoznik wrote: From: Lin Ma Format & output more detailed information about networked source e.g: The output without the patch: $ virsh domblklist $DOMAIN --details Type Device Target Source

Re: [libvirt] [PATCH] qemu: migration: Relax enforcement of memory hotplug support

2015-09-08 Thread Jiri Denemark
On Tue, Sep 08, 2015 at 15:09:37 +0200, Peter Krempa wrote: > If the current live definition does not have memory hotplug enabled, but > the persistent one does libvirt would reject migration if the > destination does not support memory hotplug even if the user didn't want > to persist the VM at th

Re: [libvirt] [PATCH] Allow execute access to /var/lib/libvirt/qemu/ for others

2015-09-08 Thread Jiri Denemark
On Tue, Sep 08, 2015 at 19:07:09 +0200, Martin Kletzander wrote: > Commit f1f68ca33433 tried fixing running multiple domains under various > users, but if the user can't browse the directory, it's hard for the > qemu running under that user to create the monitor socket. > > The permissions need to

Re: [libvirt] [PATCH] qemu: Report error if per-VM directory cannot be created

2015-09-08 Thread Jiri Denemark
On Tue, Sep 08, 2015 at 19:24:15 +0200, Martin Kletzander wrote: > Commit f1f68ca33433 did not report an error if virFileMakePath() > returned -1. Well, who would've guessed function with name starting > with 'vir' sets an errno instead of reporting an error the libvirt way. > Anyway, let's fix it

Re: [libvirt] [PATCH] docs: Drop unused rule for internals/%.html.tmp target

2015-09-08 Thread Guido Günther
On Tue, Sep 08, 2015 at 09:58:12AM +0200, Martin Kletzander wrote: [..snip..] > No message like that for me. I completes with 2 test failures (namely > qemuxml2argvtest and virsh-uriprecedence), but no problem with any That's caused by: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=78123

[libvirt] [PATCH] qemu: Report error if per-VM directory cannot be created

2015-09-08 Thread Martin Kletzander
Commit f1f68ca33433 did not report an error if virFileMakePath() returned -1. Well, who would've guessed function with name starting with 'vir' sets an errno instead of reporting an error the libvirt way. Anyway, let's fix it, so the output changes from: $ virsh start arm error: Failed to sta

[libvirt] [PATCH] Allow execute access to /var/lib/libvirt/qemu/ for others

2015-09-08 Thread Martin Kletzander
Commit f1f68ca33433 tried fixing running multiple domains under various users, but if the user can't browse the directory, it's hard for the qemu running under that user to create the monitor socket. The permissions need to be fixed in two places due to support for both installations with and with

Re: [libvirt] [PATCH sandbox v5 00/20] Docker image support

2015-09-08 Thread Cole Robinson
On 09/08/2015 12:29 PM, Daniel P. Berrange wrote: > > Daniel P Berrange (1): > Add virt-sandbox-image > > Daniel P. Berrange (1): > Rename 'name' to 'template' to disambiguate Two different .gitconfig ? - Cole -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailm

[libvirt] [PATCH sandbox v5 05/20] Image: virt-sandbox-image default dir constants

2015-09-08 Thread Daniel P. Berrange
From: Eren Yagdiran Define some constants to refer to the default image and template storage directories Signed-off-by: Daniel P. Berrange --- libvirt-sandbox/image/cli.py | 10 ++ 1 file changed, 10 insertions(+) diff --git a/libvirt-sandbox/image/cli.py b/libvirt-sandbox/image/cli.p

[libvirt] [PATCH sandbox v5 09/20] Image: Add get_command function to Source

2015-09-08 Thread Daniel P. Berrange
From: Eren Yagdiran Provide a way to know how a template can be started depending on the used source DockerSource will need to parse the topmost config file in order to find the igniter command Signed-off-by: Daniel P. Berrange --- libvirt-sandbox/image/sources/DockerSource.py | 31 ++

[libvirt] [PATCH sandbox v5 06/20] Image: Add download function

2015-09-08 Thread Daniel P. Berrange
From: Eren Yagdiran Refactor download function from virt-sandbox-image to use the newly introduced Source abstract class. The docker-specific download code is moved to a new DockerSource class. Signed-off-by: Daniel P. Berrange --- libvirt-sandbox/image/cli.py | 204 --

[libvirt] [PATCH sandbox v5 10/20] Image: Add run args

2015-09-08 Thread Daniel P. Berrange
From: Eren Yagdiran Commandline parameters for running a template Signed-off-by: Daniel P. Berrange --- libvirt-sandbox/image/cli.py | 25 + 1 file changed, 25 insertions(+) diff --git a/libvirt-sandbox/image/cli.py b/libvirt-sandbox/image/cli.py index 5490c4b..6f9a5e7

[libvirt] [PATCH sandbox v5 17/20] Add environment parameter to virt-sandbox

2015-09-08 Thread Daniel P. Berrange
From: Eren Yagdiran Allow users to add custom environment variables to their sandbox. Signed-off-by: Daniel P. Berrange --- bin/virt-sandbox.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/bin/virt-sandbox.c b/bin/virt-sandbox.c index 332e53e..4c400d5 100644 --- a/bin/vir

[libvirt] [PATCH sandbox v5 19/20] Image: Add custom environment support

2015-09-08 Thread Daniel P. Berrange
From: Eren Yagdiran Any custom key=value pair can be used as a custom environment variable in virt-sandbox-image. e.g virt-sandbox-image run ubuntu /var/lib/libvirt/templates -c lxc:/// -i /bin/bash -e key1=val1 Signed-off-by: Daniel P. Berrange --- libvirt-sandbox/image/cli.py

[libvirt] [PATCH sandbox v5 07/20] Image: Refactor create function

2015-09-08 Thread Daniel P. Berrange
From: Eren Yagdiran Move the docker-related code to the DockerSource and use the Source mechanism Signed-off-by: Daniel P. Berrange --- libvirt-sandbox/image/cli.py | 76 +- libvirt-sandbox/image/sources/DockerSource.py | 90 +++ lib

[libvirt] [PATCH sandbox v5 20/20] Image: Add Volume Support

2015-09-08 Thread Daniel P. Berrange
From: Eren Yagdiran Volumes let user to map host-paths into sandbox. Docker containers need volumes for data persistence. Signed-off-by: Daniel P. Berrange --- libvirt-sandbox/image/cli.py | 24 +++- libvirt-sandbox/image/sources/DockerSource.py | 13 ++

[libvirt] [PATCH sandbox v5 14/20] Image: Add network support

2015-09-08 Thread Daniel P. Berrange
From: Eren Yagdiran Virt-sandbox-image will pass exact network arguments to virt-sandbox Signed-off-by: Daniel P. Berrange --- libvirt-sandbox/image/cli.py | 8 1 file changed, 8 insertions(+) diff --git a/libvirt-sandbox/image/cli.py b/libvirt-sandbox/image/cli.py index a06eb9c..30e

[libvirt] [PATCH sandbox v5 12/20] Image: Add get_disk function to Source

2015-09-08 Thread Daniel P. Berrange
From: Eren Yagdiran Provide a way to know which disk image to use for the sandbox depending on the used source DockerSource will need to locate the topmost disk image among all the layers images Signed-off-by: Daniel P. Berrange --- libvirt-sandbox/image/sources/DockerSource.py | 12

[libvirt] [PATCH sandbox v5 00/20] Docker image support

2015-09-08 Thread Daniel P. Berrange
This is an update of Eren's v4 patch series to provide Docker image support. In this v5 I have incorporated fixes for all of the feedback I gave Eren against the v4, so I think this series is ready for merging now. One thing I still want to look at separately is how applicable this design is to ot

[libvirt] [PATCH sandbox v5 18/20] init-common: Exporting custom environment variables

2015-09-08 Thread Daniel P. Berrange
From: Eren Yagdiran Common-init reads config file and exports custom environment variables from config file and applies them to the running sandbox. Signed-off-by: Daniel P. Berrange --- libvirt-sandbox/libvirt-sandbox-init-common.c | 18 ++ 1 file changed, 18 insertions(+) di

[libvirt] [PATCH sandbox v5 03/20] Fix docker authentication handling

2015-09-08 Thread Daniel P. Berrange
From: Eren Yagdiran Authentication fix for Docker REST API. Signed-off-by: Daniel P. Berrange --- libvirt-sandbox/image/cli.py | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/libvirt-sandbox/image/cli.py b/libvirt-sandbox/image/cli.py index 89eef1a..ea04820 10064

[libvirt] [PATCH sandbox v5 13/20] Image: Add run function

2015-09-08 Thread Daniel P. Berrange
From: Eren Yagdiran Run an already-built template If there is no execution command specified by user, source.get_command will find the command to invoke Signed-off-by: Daniel P. Berrange --- libvirt-sandbox/image/cli.py | 33 + 1 file changed, 33 insertions(+)

[libvirt] [PATCH sandbox v5 08/20] Image: Add delete function

2015-09-08 Thread Daniel P. Berrange
From: Eren Yagdiran Refactoring delete function from virt-sandbox-image to DockerSource. Delete function can delete templates by name. Signed-off-by: Daniel P. Berrange --- libvirt-sandbox/image/cli.py | 58 --- libvirt-sandbox/image/sources/DockerSour

[libvirt] [PATCH sandbox v5 16/20] Add config for environment variables

2015-09-08 Thread Daniel P. Berrange
From: Eren Yagdiran Add the config gobject to store custom environment variables. This will allow creating custom environment variables on a sandbox with a parameter formatted like --env key1=val1 Add testcase for custom environment variables "make check" now includes testcase for environment v

[libvirt] [PATCH sandbox v5 01/20] Add virt-sandbox-image

2015-09-08 Thread Daniel P. Berrange
From: Daniel P Berrange virt-sandbox-image.py is a python script that lets you download Docker images easily. It is a proof of concept code and consumes Docker Rest API. Signed-off-by: Daniel P. Berrange --- bin/Makefile.am | 3 +- bin/virt-sandbox-image| 8 +

[libvirt] [PATCH sandbox v5 15/20] Image: man file for virt-sandbox-image

2015-09-08 Thread Daniel P. Berrange
From: Eren Yagdiran Signed-off-by: Daniel P. Berrange --- bin/Makefile.am| 5 ++ bin/virt-sandbox-image.pod | 169 + libvirt-sandbox.spec.in| 1 + 3 files changed, 175 insertions(+) create mode 100644 bin/virt-sandbox-image.pod d

[libvirt] [PATCH sandbox v5 02/20] Rename 'name' to 'template' to disambiguate

2015-09-08 Thread Daniel P. Berrange
Multiple objects have names, and it is desirable to reserve the 'name' arg to refer to the name of the sandbox instance, so rename 'name' to 'template'. Signed-off-by: Daniel P. Berrange --- libvirt-sandbox/image/cli.py | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(

[libvirt] [PATCH sandbox v5 11/20] Image: Add check_connect function

2015-09-08 Thread Daniel P. Berrange
From: Eren Yagdiran Check if user-specified connect argument is valid Signed-off-by: Daniel P. Berrange --- libvirt-sandbox/image/cli.py | 6 ++ 1 file changed, 6 insertions(+) diff --git a/libvirt-sandbox/image/cli.py b/libvirt-sandbox/image/cli.py index 6f9a5e7..2672a20 100755 --- a/lib

[libvirt] [PATCH sandbox v5 04/20] Image: Add Hooking Mechanism

2015-09-08 Thread Daniel P. Berrange
From: Eren Yagdiran Define a 'Source' class which is an abstract base to use for different template repository sources. Initially there will be a docker source which can talk to the Docker repository REST API, but others may follow. Signed-off-by: Daniel P. Berrange --- .gitignore

Re: [libvirt] [sandbox PATCH v4 16/21] Image: Add Volume Support

2015-09-08 Thread Daniel P. Berrange
On Fri, Aug 28, 2015 at 01:47:44PM +, Eren Yagdiran wrote: > Volumes let user to map host-paths into sandbox. Docker containers > need volumes for data persistence. I'm a little bit puzzelled about how this feature is supposed to be used. IIUC, in the Docker json file we have something like {

Re: [libvirt] [PATCH] Distribute only generated virkeymaps.h

2015-09-08 Thread Martin Kletzander
On Tue, Sep 08, 2015 at 02:10:18PM +0100, Daniel P. Berrange wrote: On Tue, Sep 08, 2015 at 03:06:41PM +0200, Martin Kletzander wrote: We are distributing virkeymaps.h and all the tools needed to rebuild that file. On top of that, we are generating that file into the $(srcdir) and that sometime

Re: [libvirt] [sandbox PATCH v4 10/21] Image: Add get_command function to Source

2015-09-08 Thread Daniel P. Berrange
On Fri, Aug 28, 2015 at 01:47:38PM +, Eren Yagdiran wrote: > Provide a way to know how a template can be started depending on the used > source > DockerSource will need to parse the topmost config file in order to find the > igniter command > --- > virt-sandbox-image/sources/DockerSource.py

Re: [libvirt] [sandbox PATCH v4 11/21] Image: Add run args

2015-09-08 Thread Daniel P. Berrange
On Fri, Aug 28, 2015 at 01:47:39PM +, Eren Yagdiran wrote: > Commandline parameters for running a template > --- > virt-sandbox-image/virt-sandbox-image.py | 13 + > 1 file changed, 13 insertions(+) > > diff --git a/virt-sandbox-image/virt-sandbox-image.py > b/virt-sandbox-image/

Re: [libvirt] [sandbox PATCH v4 07/21] Image: Add download function

2015-09-08 Thread Daniel P. Berrange
On Fri, Aug 28, 2015 at 01:47:35PM +, Eren Yagdiran wrote: > Refactor download function from virt-sandbox-image to use > the newly introduced Source abstract class. The docker-specific > download code is moved to a new DockerSource class. > --- > virt-sandbox-image/Makefile.am |

Re: [libvirt] [PATCH 2/2] virDomainLockManagerAddImage: Recursively lock backing chain

2015-09-08 Thread Peter Krempa
On Tue, Sep 08, 2015 at 17:17:19 +0200, Michal Privoznik wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1192399 > > It's known fact for a while now that we should not only lock the > top level layers of backing chain but the rest of it too. And > well known too that we are not doing that. We

Re: [libvirt] [PATCH 2/2] virDomainLockManagerAddImage: Recursively lock backing chain

2015-09-08 Thread Daniel P. Berrange
On Tue, Sep 08, 2015 at 05:59:45PM +0200, Peter Krempa wrote: > On Tue, Sep 08, 2015 at 17:17:19 +0200, Michal Privoznik wrote: > > https://bugzilla.redhat.com/show_bug.cgi?id=1192399 > > > > It's known fact for a while now that we should not only lock the > > top level layers of backing chain but

Re: [libvirt] [PATCH 1/2] qemuProcessStart: Parse backingStore for all disks

2015-09-08 Thread Peter Krempa
On Tue, Sep 08, 2015 at 17:17:18 +0200, Michal Privoznik wrote: Subject is misleading. Backing store is detected from disk images not parsed from XML. > Later, in the next commit, we are going to need backing chain > for all the disks within the domain. Let's parse them at domain > startup phase.

[libvirt] [PATCH 0/2] Recursively lock backing chain

2015-09-08 Thread Michal Privoznik
This is how I tested the feature: Create couple of disks: qemu-img create -f qcow2 /var/lib/libvirt/images/test1.qcow2 1G qemu-img create -f qcow2 /var/lib/libvirt/images/test2.qcow2 -b /var/lib/libvirt/images/test1.qcow2 qemu-img create -f qcow2 /var/lib/libvirt/images/test3.qcow2 -b /var/lib/

[libvirt] [PATCH 1/2] qemuProcessStart: Parse backingStore for all disks

2015-09-08 Thread Michal Privoznik
Later, in the next commit, we are going to need backing chain for all the disks within the domain. Let's parse them at domain startup phase. Signed-off-by: Michal Privoznik --- src/qemu/qemu_domain.c | 11 +++ src/qemu/qemu_process.c | 6 +- 2 files changed, 8 insertions(+), 9 dele

[libvirt] [PATCH 2/2] virDomainLockManagerAddImage: Recursively lock backing chain

2015-09-08 Thread Michal Privoznik
https://bugzilla.redhat.com/show_bug.cgi?id=1192399 It's known fact for a while now that we should not only lock the top level layers of backing chain but the rest of it too. And well known too that we are not doing that. Well, up until this commit. The reason is that while one guest can have for

Re: [libvirt] [PATCH v2] lxc: fuse mount for /proc/cpuinfo

2015-09-08 Thread Fabio Kung
On Mon, Sep 7, 2015 at 8:55 AM, Serge Hallyn wrote: > > Ah, my memory was failing me, so took a bit of searching, but > > http://fabiokung.com/2014/03/13/memory-inside-linux-containers/ > > I can't find anything called 'libmymem', and in 2014 he said > > https://github.com/docker/docker/issues/842

Re: [libvirt] [PATCH] Ignore virtio-mmio disks in qemuAssignDevicePCISlots()

2015-09-08 Thread Martin Kletzander
[Please don't Cc random people when they did not request it, all developers are subscribed to the list] On Tue, Sep 08, 2015 at 03:23:27PM +0300, Pavel Fedin wrote: Fixes the following error when attempting to add a disk with bus='virtio': virtio only support device address type 'PCI' How di

Re: [libvirt] [PATCH] Distribute only generated virkeymaps.h

2015-09-08 Thread Martin Kletzander
On Tue, Sep 08, 2015 at 02:10:18PM +0100, Daniel P. Berrange wrote: On Tue, Sep 08, 2015 at 03:06:41PM +0200, Martin Kletzander wrote: We are distributing virkeymaps.h and all the tools needed to rebuild that file. On top of that, we are generating that file into the $(srcdir) and that sometime

Re: [libvirt] [PATCH] util: Add win32 version of virFileUnlink

2015-09-08 Thread Martin Kletzander
On Tue, Sep 08, 2015 at 09:12:11AM -0400, John Ferlan wrote: On 09/07/2015 04:25 AM, Martin Kletzander wrote: Commit 35847860f65f Added the virFileUnlink function, but failed to add a version for mingw build, causing the following error: Cannot export virFileUnlink: symbol not defined Sign

Re: [libvirt] [PATCH] util: Add win32 version of virFileUnlink

2015-09-08 Thread John Ferlan
On 09/07/2015 04:25 AM, Martin Kletzander wrote: > Commit 35847860f65f Added the virFileUnlink function, but failed to add > a version for mingw build, causing the following error: > > Cannot export virFileUnlink: symbol not defined > > Signed-off-by: Martin Kletzander > --- > src/util/virf

Re: [libvirt] [PATCH] Distribute only generated virkeymaps.h

2015-09-08 Thread Daniel P. Berrange
On Tue, Sep 08, 2015 at 03:06:41PM +0200, Martin Kletzander wrote: > We are distributing virkeymaps.h and all the tools needed to rebuild > that file. On top of that, we are generating that file into the > $(srcdir) and that sometimes fails for me when trying to do make dist in > VPATH on rawhide

[libvirt] [PATCH] qemu: migration: Relax enforcement of memory hotplug support

2015-09-08 Thread Peter Krempa
If the current live definition does not have memory hotplug enabled, but the persistent one does libvirt would reject migration if the destination does not support memory hotplug even if the user didn't want to persist the VM at the destination and thus the XML containing the memory hotplug definit

[libvirt] [PATCH] Distribute only generated virkeymaps.h

2015-09-08 Thread Martin Kletzander
We are distributing virkeymaps.h and all the tools needed to rebuild that file. On top of that, we are generating that file into the $(srcdir) and that sometimes fails for me when trying to do make dist in VPATH on rawhide fedora. And we don't clean the file when maintainer-clean make target is r

Re: [libvirt] [PATCH] migration: support all toURI and proto combos

2015-09-08 Thread Nikolay Shirokovskiy
On 08.09.2015 15:14, Jiri Denemark wrote: > On Tue, Sep 08, 2015 at 13:43:09 +0300, Nikolay Shirokovskiy wrote: >> Current implementation of 'toURI' migration interfaces does not support all >> combinations of interface versions and protocol versions. For example >> 'toURI2' >> with p2p flag wil

Re: [libvirt] [PATCH] util: Add win32 version of virFileUnlink

2015-09-08 Thread Pavel Hrdina
On Mon, Sep 07, 2015 at 10:25:24AM +0200, Martin Kletzander wrote: > Commit 35847860f65f Added the virFileUnlink function, but failed to add > a version for mingw build, causing the following error: > > Cannot export virFileUnlink: symbol not defined > > Signed-off-by: Martin Kletzander > ---

Re: [libvirt] [PATCH] docs: Remove last use of double semicolon in Makefile

2015-09-08 Thread Pavel Hrdina
On Mon, Sep 07, 2015 at 10:36:18AM +0200, Martin Kletzander wrote: > Double semicolons have special meaning in makefiles, but they would have > to be combined with other rules witch such separators in order to be > used as intended. Since there are no other rules like that, let's > clean it up. >

[libvirt] [PATCH] Ignore virtio-mmio disks in qemuAssignDevicePCISlots()

2015-09-08 Thread Pavel Fedin
Fixes the following error when attempting to add a disk with bus='virtio': virtio only support device address type 'PCI' Signed-off-by: Pavel Fedin --- src/qemu/qemu_command.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_comma

Re: [libvirt] [PATCH] migration: support all toURI and proto combos

2015-09-08 Thread Jiri Denemark
On Tue, Sep 08, 2015 at 13:43:09 +0300, Nikolay Shirokovskiy wrote: > Current implementation of 'toURI' migration interfaces does not support all > combinations of interface versions and protocol versions. For example 'toURI2' > with p2p flag will not migrate if driver supports only v3params proto.

Re: [libvirt] [PATCH v2 2/2] virsh: Enhance the detailed output of domblklist for networked source

2015-09-08 Thread Peter Krempa
On Wed, Sep 02, 2015 at 17:58:19 +0200, Michal Privoznik wrote: > From: Lin Ma > > Format & output more detailed information about networked source > > e.g: The output without the patch: > $ virsh domblklist $DOMAIN --details > Type Device Target Source > --

Re: [libvirt] [PATCHv2] qemu: Validate address type when attaching a disk device.

2015-09-08 Thread Ján Tomko
On Mon, Sep 07, 2015 at 07:22:01PM +0800, Ruifeng Bian wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1257844 > > Attach-device can hotplug a virtio disk device with any address type now, > it need to validate the address type before the attachment. > > Coldplug a scsi disk device without c

[libvirt] [PATCH] migration: support all toURI and proto combos

2015-09-08 Thread Nikolay Shirokovskiy
Current implementation of 'toURI' migration interfaces does not support all combinations of interface versions and protocol versions. For example 'toURI2' with p2p flag will not migrate if driver supports only v3params proto. This is not convinient as drivers that starts to support migration have

Re: [libvirt] [PATCH] conf: fix crash when parse a disordered numa settings

2015-09-08 Thread lhuang
On 09/08/2015 04:40 PM, Michal Privoznik wrote: On 08.09.2015 06:59, Luyao Huang wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1260846 Introduced by 8fedbbdb, if we parse the disordered numa cell, will get segfault. This is because we allow parse the numa cell not in order and we alloc th

Re: [libvirt] [PATCH] conf: fix crash when parse a disordered numa settings

2015-09-08 Thread Michal Privoznik
On 08.09.2015 06:59, Luyao Huang wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1260846 > > Introduced by 8fedbbdb, if we parse the disordered numa > cell, will get segfault. This is because we allow parse > the numa cell not in order and we alloc them before the > parse loop, the cpumask ma

[libvirt] [PATCH RFC 5/7] libxl: implement virConnectGetAllDomainStats

2015-09-08 Thread Joao Martins
Introduce support for connectGetAllDomainStats call that allow us to _all_ domain(s) statistics including network, block, cpus and memory. Changes are rather mechanical and mostly take care of the format to export the data. Signed-off-by: Joao Martins --- src/libxl/libxl_driver.c | 267 +

[libvirt] [PATCH RFC 2/7] libxl: implement virDomainMemorystats

2015-09-08 Thread Joao Martins
Introduce support for domainMemoryStats API call, which consequently enables the use of `virsh dommemstat` command to query for memory statistics of a domain. We support the following statistics: balloon info, available and currently in use. swap-in, swap-out, major-faults, minor-faults require coo

[libvirt] [PATCH RFC 3/7] libxl: implement virDomainInterfaceStats

2015-09-08 Thread Joao Martins
Introduce support for domainInterfaceStats API call for querying network interface statistics. Consequently it also enables the use of `virsh domifstat ` command. For getting statistics we resort to virNetInterfaceStats and let libvirt handle the platform specific nits. Note that the latter is no

[libvirt] [PATCH RFC 4/7] libxl: implement virDomainBlockStats

2015-09-08 Thread Joao Martins
Introduce initial support for domainBlockStats API call that allow us to query block device statistics. openstack nova uses this API call to query block statistics, alongside virDomainMemoryStats and virDomainInterfaceStats. Note that this patch only introduces it for VBD for starters. QDisk will

[libvirt] [PATCH RFC 7/7] libxl: implement virDomainGetJobStats

2015-09-08 Thread Joao Martins
Introduces support for domainGetJobStats which has the same info as domainGetJobInfo but in a slightly different format. Another difference is that virDomainGetJobStats can also retrieve info on the most recently completed job. Though so far this is only used in the source node to know if the migra

[libvirt] [PATCH RFC 6/7] libxl: implement virDomainGetJobInfo

2015-09-08 Thread Joao Martins
Introduce support for domainGetJobInfo to get info about the ongoing job. If the job is active it will update the timeElapsed which is computed with the "started" field added to struct libxlDomainJobObj. For now we support just the very basic info and all jobs have VIR_DOMAIN_JOB_UNBOUNDED (i.e. n

[libvirt] [PATCH RFC 1/7] libxl: implement virDomainGetCPUStats

2015-09-08 Thread Joao Martins
Introduce support for domainGetCPUStats API call and consequently allow us to use `virsh cpu-stats`. The latter returns a more brief output than the one provided by`virsh vcpuinfo`. Signed-off-by: Joao Martins --- src/libxl/libxl_driver.c | 111 +++ 1

[libvirt] [PATCH RFC 0/7] libxl: domain statistics support

2015-09-08 Thread Joao Martins
Hey Jim, This series bring support for various statistics about domains regarding CPU, Memory, Network Interfaces and BlockStats. Not all of the statistics are implemented: qdisk support is missing in this series and some of the memory statistics aren't available. With this series we further impl

[libvirt] [PATCH RFC 2/2] libxl: add v3 migration w/o params

2015-09-08 Thread Joao Martins
This patch introduces migration v3 without ext. params. Most of the changes are mechanical and most of it is moving code and handling of the arguments in different way. Functional-wise it works same way as its "Params" variants. By having v3 migration we end up supporting older variants of virDoma

[libvirt] [PATCH RFC 1/2] libxl: add p2p migration

2015-09-08 Thread Joao Martins
Introduce support for VIR_MIGRATE_PEER2PEER in libvirt migration. Most of the changes occur at the source and no modifications at the receiver. In P2P mode there is only the Perform phase so we must handle the connection with the destination and actually perform the migration. libxlDomainPerformP2

[libvirt] [PATCH RFC 0/2] libxl: migration v3 and p2p support

2015-09-08 Thread Joao Martins
Hey Jim, These series introduce support for peer2peer and plain v3 migration without extensible parameters. This patch series is organized as follows: The first patch introduces the P2P where the source host must take care of connection handling with destination libvirtd and is responsible for p

Re: [libvirt] [PATCH] admin: Resolve leaked reference to private data

2015-09-08 Thread Erik Skultety
On 08/09/15 10:04, Martin Kletzander wrote: > On Mon, Sep 07, 2015 at 05:45:57PM +0200, Erik Skultety wrote: >> Running valgrind on a very simplistic program consisting only from >> opening and closing admin connection (virAdmConnect{Open,Close}) shows a >> leak in remoteAdminPrivNew, because the l

Re: [libvirt] [PATCH] admin: Resolve leaked reference to private data

2015-09-08 Thread Martin Kletzander
On Mon, Sep 07, 2015 at 05:45:57PM +0200, Erik Skultety wrote: Running valgrind on a very simplistic program consisting only from opening and closing admin connection (virAdmConnect{Open,Close}) shows a leak in remoteAdminPrivNew, because the last reference to privateData is not decremented, thus