[libvirt] [PATCH] virsh: Return false if only '--wipe-storage' is assigned when undefine a domain

2014-05-13 Thread Li Yang
For now, if only '--wipe-storage' is assigned, user can undefine a domain normally. But actually '--wipe-storage' doesn't work, this may confuse user. And since '--wipe-storage' wipes data on the removed volumes, if no removed volume storage assigned, we'd better raise an error message. Before: $

Re: [libvirt] [PATCH] network: Defer online of macvtap during qemu migration

2014-05-13 Thread Wangrui (K)
> -Original Message- > From: sendmail [mailto:justsendmailnothinge...@gmail.com] On Behalf Of > Laine Stump > Sent: Tuesday, May 13, 2014 10:11 PM > To: Matthew Rosato; libvir-list@redhat.com > Cc: Wangrui (K) > Subject: Re: [libvirt] [PATCH] network: Defer online of macvtap during qemu >

Re: [libvirt] [libvirt-python PATCH v2] override: add virDomainFSFreeze and virDomainFSThaw API

2014-05-13 Thread tomoki . sekiyama
From: Tomoki Sekiyama Hello Michael, Thank you for posting v2. May be we should add following diff to avoid sanitytest.pl's mapping error. --- diff --git a/sanitytest.py b/sanitytest.py index cff30d5..62fe42b 100644 --- a/sanitytest.py +++ b/sanitytest.py @@ -207,6 +207,8 @@ for name in sorted

[libvirt] Is there a way to get host uptime in remote libvirt

2014-05-13 Thread coffeeball
We manage hypervisors (VMWare ESXi/vCenter, KVM, XEN, Hyper-V) by remote Libvirt API, in our case we need to get the host uptime via the same libvirt interface. Is there a way get this info now for all the aforementioned hypervisor types? The APIs virConnectGetSysinfo(), virNodeGetInfo() provid

Re: [libvirt] daemon-config-network dependency

2014-05-13 Thread Cedric Bosdonnat
Hi all, Thanks for your prompt answer. Good to know there is a reason for this: I'll handle that differently on the suse side then. Regards, -- Cedric On Tue, 2014-05-13 at 12:18 -0400, Daniel P. Berrange wrote: > On Tue, May 13, 2014 at 05:53:26PM +0200, Cedric Bosdonnat wrote: > > Hi all, > >

Re: [libvirt] [PATCH v4 2/3] qemu: extract common PCI handling functions

2014-05-13 Thread Roman Bogorodskiy
Ján Tomko wrote: > On 05/11/2014 08:48 AM, Roman Bogorodskiy wrote: > > Move sharable PCI handling functions to domain_addr.[ch], and > > change theirs prefix from 'qemu' to 'vir': > > > > - virDomainPCIAddressAsString; > > - virDomainPCIAddressBusSetModel; > > - virDomainPCIAddressEnsureAdd

Re: [libvirt] [PATCH 1/4] conf: use typedefs for enums in "src/conf/{node_device_conf, nwfilter_params}.h"

2014-05-13 Thread Julio Faracco
Nehal: I'm sorry. My fault. When Eric said that I thought that he was talking about the short commit message. Well, now I know that he is talking about the whole commit messages. Eric: Thanks for your help. I'm still familiarizing myself with the rules of the group and patches. It's ok for me to g

Re: [libvirt] daemon-config-network dependency

2014-05-13 Thread Daniel P. Berrange
On Tue, May 13, 2014 at 05:53:26PM +0200, Cedric Bosdonnat wrote: > Hi all, > > The libvirt-daemon-config-network package is only pulled by libvirt. So > a user installing only libvirt-daemon-lxc (qemu, xen, etc) won't get > that package... and no default network. > > Would it be OK if I move the

[libvirt] daemon-config-network dependency

2014-05-13 Thread Cedric Bosdonnat
Hi all, The libvirt-daemon-config-network package is only pulled by libvirt. So a user installing only libvirt-daemon-lxc (qemu, xen, etc) won't get that package... and no default network. Would it be OK if I move the dependency to libvirt-daemon-{lxc,qemu,xen,...} packages? -- Cedric -- libvir

Re: [libvirt] [PATCH v4 3/3] bhyve: implement PCI address allocation

2014-05-13 Thread Roman Bogorodskiy
Ján Tomko wrote: > On 05/11/2014 08:48 AM, Roman Bogorodskiy wrote: > > Automatically allocate PCI addresses for devices instead > > of hardcoding them in the driver code. The current > > allocation schema is to dedicate an entire slot for each devices. > > > > > Also, allow having arbitrary n

Re: [libvirt] [PATCH v4 1/3] qemu: extract PCI handling structs

2014-05-13 Thread Roman Bogorodskiy
Eric Blake wrote: > On 05/13/2014 03:21 AM, Ján Tomko wrote: > > On 05/11/2014 08:48 AM, Roman Bogorodskiy wrote: > >> Introduce new files (domain_addr.[ch]) to provide > >> an API for domain device handling that could be > >> shared across the drivers. > >> > > > >> + * Author: Daniel P. Berr

Re: [libvirt] [PATCH] network: Defer online of macvtap during qemu migration

2014-05-13 Thread Laine Stump
On 05/13/2014 04:31 PM, Matthew Rosato wrote: > On 05/05/2014 12:33 PM, Matthew Rosato wrote: >> On 05/05/2014 12:26 PM, Matthew Rosato wrote: >>> When generating macvtaps via virNetDevMacVLanCreateWithVPortProfile, >>> the macvtap device is unconditionally set to the up state. However, >>> during

[libvirt] [PATCH 1/3] qemu: Make qemuDomainObjBeginNestedJob static

2014-05-13 Thread Jiri Denemark
It's only used within qemu_domain.c. Signed-off-by: Jiri Denemark --- src/qemu/qemu_domain.c | 2 +- src/qemu/qemu_domain.h | 4 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 34cc736..d4fb569 100644 --- a/src/qemu/qemu_do

[libvirt] [PATCH 3/3] qemu: Ignore temporary job errors when checking migration status

2014-05-13 Thread Jiri Denemark
When qemu driver is polling for migration to finish (in qemuMigrationWaitForCompletion), it may happen that another job allowed during migration is running and if it does not finish within 30 seconds, migration would be cancelled because of that. However, we can just ignore the timeout and let the

[libvirt] [PATCH 0/3] qemu: Ignore temporary job errors when checking migration status

2014-05-13 Thread Jiri Denemark
https://bugzilla.redhat.com/show_bug.cgi?id=1083238 Jiri Denemark (3): qemu: Make qemuDomainObjBeginNestedJob static qemuDomainObjBeginNestedJob: Return -2 for temporary failures qemu: Ignore temporary job errors when checking migration status src/qemu/qemu_domain.c| 41 +++

[libvirt] [PATCH 2/3] qemuDomainObjBeginNestedJob: Return -2 for temporary failures

2014-05-13 Thread Jiri Denemark
If job queue is full or waiting for a job times out, the function returns -2 so that it can be handled in a different way by callers. The change is safe since all existing callers of qemuDomainObjBeginNestedJob check the return value to be less than zero. Signed-off-by: Jiri Denemark --- src/qe

Re: [libvirt] [PATCH] network: Defer online of macvtap during qemu migration

2014-05-13 Thread Matthew Rosato
On 05/05/2014 12:33 PM, Matthew Rosato wrote: > On 05/05/2014 12:26 PM, Matthew Rosato wrote: >> When generating macvtaps via virNetDevMacVLanCreateWithVPortProfile, >> the macvtap device is unconditionally set to the up state. However, >> during migration, this results in a case where both the so

Re: [libvirt] [Qemu-devel] qemu leaving unix sockets behind after VM is shut down

2014-05-13 Thread Ján Tomko
On 05/06/2014 03:39 PM, Stefan Hajnoczi wrote: > On Tue, Apr 01, 2014 at 02:34:58PM -0600, Chris Friesen wrote: >> When running qemu with something like this >> >> -device virtio-serial \ >> -chardev socket,path=/tmp/foo,server,nowait,id=foo \ >> -device virtserialport,chardev=foo,name=host.port.0

[libvirt] [PATCH] Clean up chardev sockets on QEMU shutdown

2014-05-13 Thread Ján Tomko
https://bugzilla.redhat.com/show_bug.cgi?id=1088787 Clean up unix socket files for chardevs using mode='bind', like we clean up the monitor socket. They are created by QEMU on startup and not really useful after shutting it down. --- src/qemu/qemu_process.c | 19 +++ 1 file change

Re: [libvirt] [PATCH] util: refactor virNetlinkCommand to fix several bugs / style problems

2014-05-13 Thread Wangrui (K)
Good improvement especially in coding style from which I learned difference between rc and ret. :) > -Original Message- > From: Laine Stump [mailto:la...@laine.org] > Sent: Tuesday, May 13, 2014 7:52 PM > To: libvir-list@redhat.com; Wangrui (K); Yanqiangjun; Zhangbo (Oscar) > Subject: [PA

Re: [libvirt] [libvirt-python PATCH] override: add virDomainFSFreeze and virDomainFSThaw API

2014-05-13 Thread Daniel P. Berrange
On Mon, May 12, 2014 at 05:12:45PM -0600, Eric Blake wrote: > On 05/12/2014 07:22 AM, Michal Privoznik wrote: > > On 10.05.2014 01:21, Tomoki Sekiyama wrote: > >> Add binding for the new virDomainFSFreeze and virDomainFSThaw functions > >> added in libvirt 1.2.5. These require override since these

Re: [libvirt] [PATCH v4 1/3] qemu: extract PCI handling structs

2014-05-13 Thread Eric Blake
On 05/13/2014 03:21 AM, Ján Tomko wrote: > On 05/11/2014 08:48 AM, Roman Bogorodskiy wrote: >> Introduce new files (domain_addr.[ch]) to provide >> an API for domain device handling that could be >> shared across the drivers. >> >> + * Author: Daniel P. Berrange >> + */ >> + > > I think you sho

[libvirt] [Question] (python API) setMemoryParameters doesn't support flags CONFIG | LIVE

2014-05-13 Thread Wangrui (K)
Hi, all when I use (python API) setMemoryParameters with flags= VIR_DOMAIN_AFFECT_CONFIG|VIR_DOMAIN_AFFECT_LIVE , an error occurs as follow: (libvirt 1.2.4) libvirt: error : flags 'affect live' and 'affect config' in virDomainGetMemoryParameters are mutually exclusive I check the function lib

[libvirt] [PATCH] Improve the error info when fail to start guest due to lack of cgroup controller

2014-05-13 Thread Shanzhi Yu
When cgroup controller cpu, cpuset and cpuacct are all unmounted, fail to start guest. The error info is not accurate. It will report "At least one cgroup controller is required" even though there is cgroup controller memory or blkio. Signed-off-by: Shanzhi Yu --- src/util/vircgroup.c | 5 +

[libvirt] [PATCH] util: refactor virNetlinkCommand to fix several bugs / style problems

2014-05-13 Thread Laine Stump
Inspired by a simpler patch from "Wangrui (K) ". A submitted patch pointed out that virNetlinkCommand() was doing an improper typecast of the return value from nl_recv() (int to unsigned), causing it to miss error returns, and that even after remedying that problem, virNetlinkCommand() was calling

Re: [libvirt] [PATCH] sanlock: avoid leak in acquire()

2014-05-13 Thread Martin Kletzander
On Tue, May 13, 2014 at 01:47:37PM +0200, Peter Krempa wrote: On 05/13/14 13:40, Martin Kletzander wrote: Signed-off-by: Martin Kletzander --- src/locking/lock_driver_sanlock.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/locking/lock_driver_sanlock.c b/src/lo

Re: [libvirt] [PATCH] sanlock: avoid leak in acquire()

2014-05-13 Thread Peter Krempa
On 05/13/14 13:40, Martin Kletzander wrote: > Signed-off-by: Martin Kletzander > --- > src/locking/lock_driver_sanlock.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/src/locking/lock_driver_sanlock.c > b/src/locking/lock_driver_sanlock.c > index b3d31bf..e4b4e8

[libvirt] [PATCH] sanlock: avoid leak in acquire()

2014-05-13 Thread Martin Kletzander
Signed-off-by: Martin Kletzander --- src/locking/lock_driver_sanlock.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/locking/lock_driver_sanlock.c b/src/locking/lock_driver_sanlock.c index b3d31bf..e4b4e8e 100644 --- a/src/locking/lock_driver_sanlock.c +++ b/src/l

Re: [libvirt] [PATCH 2/2] sanlock: don't fail with unregistered domains

2014-05-13 Thread Martin Kletzander
On Tue, May 13, 2014 at 07:25:29AM -0400, John Ferlan wrote: On 05/12/2014 09:37 AM, Martin Kletzander wrote: When a domain was started without registration in sanlock, but libvirt was restarted after that, most of the operations failed due to contacting sanlock about that process. E.g. migrati

[libvirt] [libvirt-python PATCH v2] override: add virDomainFSFreeze and virDomainFSThaw API

2014-05-13 Thread Michal Privoznik
From: Tomoki Sekiyama Add binding for the new virDomainFSFreeze and virDomainFSThaw functions added in libvirt 1.2.5. These require override since these take a list of mountpoints path string. The methods are named 'fsFreeze' and 'fsThaw'. Signed-off-by: Tomoki Sekiyama Signed-off-by: Michal Pr

Re: [libvirt] [PATCH 2/2] sanlock: don't fail with unregistered domains

2014-05-13 Thread John Ferlan
On 05/12/2014 09:37 AM, Martin Kletzander wrote: > When a domain was started without registration in sanlock, but libvirt > was restarted after that, most of the operations failed due to > contacting sanlock about that process. E.g. migration could not be > performed because the locks couldn't b

Re: [libvirt] [PATCH] apibuild: Disallow 'returns' return decription

2014-05-13 Thread Martin Kletzander
On Mon, May 12, 2014 at 02:29:44PM +0200, Michal Privoznik wrote: Our documentation generator is a bit messy, to say the least. For instance, the description to return values of a function is searched within C comment. Currently, all lines that start with 'returns' or 'Returns' are viewed as retu

Re: [libvirt] [PATCH] virsh: domain: Fix output of the VNC display number for domdisplay

2014-05-13 Thread Peter Krempa
On 05/13/14 11:32, Jiri Denemark wrote: > On Tue, May 13, 2014 at 11:32:03 +0200, Peter Krempa wrote: >> Commit 9976c4b9a665f10ab0d2071954efb7f432d194eb broke the output for VNC >> displays as the port number is converted to VNC display number by >> subtracting 5900. This yields port 0 for the firs

Re: [libvirt] [PATCH] virsh: domain: Fix output of the VNC display number for domdisplay

2014-05-13 Thread Jiri Denemark
On Tue, May 13, 2014 at 11:32:03 +0200, Peter Krempa wrote: > Commit 9976c4b9a665f10ab0d2071954efb7f432d194eb broke the output for VNC > displays as the port number is converted to VNC display number by > subtracting 5900. This yields port 0 for the first display and thus the > output would be skip

[libvirt] [PATCH] virsh: domain: Fix output of the VNC display number for domdisplay

2014-05-13 Thread Peter Krempa
Commit 9976c4b9a665f10ab0d2071954efb7f432d194eb broke the output for VNC displays as the port number is converted to VNC display number by subtracting 5900. This yields port 0 for the first display and thus the output would be skipped. Before: $ virsh domdisplay VM vnc://localhost After: $ too

Re: [libvirt] [PATCH v4 3/3] bhyve: implement PCI address allocation

2014-05-13 Thread Ján Tomko
On 05/11/2014 08:48 AM, Roman Bogorodskiy wrote: > Automatically allocate PCI addresses for devices instead > of hardcoding them in the driver code. The current > allocation schema is to dedicate an entire slot for each devices. > > Also, allow having arbitrary number of devices. I think this ca

Re: [libvirt] [PATCH v4 2/3] qemu: extract common PCI handling functions

2014-05-13 Thread Ján Tomko
On 05/11/2014 08:48 AM, Roman Bogorodskiy wrote: > Move sharable PCI handling functions to domain_addr.[ch], and > change theirs prefix from 'qemu' to 'vir': > > - virDomainPCIAddressAsString; > - virDomainPCIAddressBusSetModel; > - virDomainPCIAddressEnsureAddr; > - virDomainPCIAddressFlagsCo

Re: [libvirt] [PATCH v4 1/3] qemu: extract PCI handling structs

2014-05-13 Thread Ján Tomko
On 05/11/2014 08:48 AM, Roman Bogorodskiy wrote: > Introduce new files (domain_addr.[ch]) to provide > an API for domain device handling that could be > shared across the drivers. > > A list of data types were extracted and moved there: > > qemuDomainPCIAddressBus -> virDomainPCIAddressBus > qe

[libvirt] [libvirt-sandbox] virt-sandbox-service: fixed /lib/ into /usr/lib for searching unit files

2014-05-13 Thread Cédric Bosdonnat
--- bin/virt-sandbox-service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/virt-sandbox-service b/bin/virt-sandbox-service index 2dcbfb8..9ed37e0 100755 --- a/bin/virt-sandbox-service +++ b/bin/virt-sandbox-service @@ -1071,7 +1071,7 @@ class CheckUnit(argparse.Action):

[libvirt] [PATCH] vircgroup: Don't leak keypath if failed to kill process

2014-05-13 Thread Chen Hanxiao
Signed-off-by: Chen Hanxiao --- src/util/vircgroup.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c index fce380a..c578bd0 100644 --- a/src/util/vircgroup.c +++ b/src/util/vircgroup.c @@ -3370,7 +3370,7 @@ virCgroupKillRe