Re: [libvirt] [PATCH] fix deadlock when qemu cannot start

2012-03-30 Thread Daniel Veillard
On Fri, Mar 16, 2012 at 02:37:42PM +0800, Wen Congyang wrote: When qemu cannot start, we may call qemuProcessStop() twice. We have check whether the vm is running at the beginning of qemuProcessStop() to avoid libvirt deadlock. We call qemuProcessStop() with driver and vm locked. It seems that

Re: [libvirt] [PATCHv2] qemu: support live change of the bridge used by a guest network device

2012-03-30 Thread Laine Stump
On 03/29/2012 05:52 PM, Daniel P. Berrange wrote: On Thu, Mar 29, 2012 at 04:38:50PM -0400, Laine Stump wrote: +if (oldbridge +virNetDevBridgeRemovePort(oldbridge, olddev-ifname) 0) { +return -1; +} +if (virNetDevBridgeAddPort(newbridge, olddev-ifname) 0) { +

[libvirt] [PATCH] qemu: set default name for SPICE agent channel when generating command

2012-03-30 Thread Laine Stump
commit b0e2bb33 set a default value for the SPICE agent channel by inserting it during parsing of the channel XML. That method of setting a default is problematic because it makes a format/parse roundtrip unclean, and experience with setting other values as a side effect of parsing has led to

Re: [libvirt] [PATCH] qemu: set default name for SPICE agent channel when generating command

2012-03-30 Thread Christophe Fergeau
Hey, Patch looks good to me, thanks for writing it :) Christophe On Fri, Mar 30, 2012 at 03:50:37AM -0400, Laine Stump wrote: commit b0e2bb33 set a default value for the SPICE agent channel by inserting it during parsing of the channel XML. That method of setting a default is problematic

[libvirt] [PATCH] storage backend: Add RBD (RADOS Block Device) support

2012-03-30 Thread Wido den Hollander
This patch adds support for a new storage backend with RBD support. RBD is the RADOS Block Device and is part of the Ceph distributed storage system. It comes in two flavours: Qemu-RBD and Kernel RBD, this storage backend only supports Qemu-RBD, thus limiting the use of this storage driver to

Re: [libvirt] [PATCH] build: silence recent syntax check violations

2012-03-30 Thread Michal Privoznik
On 30.03.2012 05:23, Eric Blake wrote: An upstream gnulib bug meant that some of our syntax checks weren't being run. Fix up our offenders before we upgrade to a newer gnulib. * src/util/virnetdevtap.c (virNetDevTapCreate): Use flags. * tests/lxcxml2xmltest.c (mymain): Strip useless ().

Re: [libvirt] [test-API] RFC: Stabilization of libvirt-test-API

2012-03-30 Thread Martin Kletzander
On 03/29/2012 03:42 PM, Osier Yang wrote: On 2012年03月29日 20:14, Martin Kletzander wrote: Hi everyone, following our minutes, I'd like to start a discussion on what should be done with libvirt-test-API so we can say it's stable and usable. I would like to stress out that everything mentioned

Re: [libvirt] [test-API] RFC: Stabilization of libvirt-test-API

2012-03-30 Thread Martin Kletzander
On 03/29/2012 04:20 PM, Guannan Ren wrote: On 03/29/2012 08:14 PM, Martin Kletzander wrote: - fix hard-coded options into real options (e.g. commit 65449e) - fix some env_* and util* code (functions duplicated with different behavior) - fix or remove harmful and pointless code (at this

[libvirt] [PATCH] conf: Prevent crash of libvirtd without channel target name

2012-03-30 Thread Alex Jia
* src/conf/domain_conf.c (virDomainChannelDefCheckABIStability): avoid crashing libvirtd due to derefing a NULL pointer. For details, please see bug: RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=808371 Signed-off-by: Alex Jia a...@redhat.com --- src/conf/domain_conf.c |4 ++-- 1

Re: [libvirt] [PATCH] conf: Prevent crash of libvirtd without channel target name

2012-03-30 Thread Michal Privoznik
On 30.03.2012 11:44, Alex Jia wrote: * src/conf/domain_conf.c (virDomainChannelDefCheckABIStability): avoid crashing libvirtd due to derefing a NULL pointer. For details, please see bug: RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=808371 Signed-off-by: Alex Jia a...@redhat.com

Re: [libvirt] [PATCH] conf: Prevent crash of libvirtd without channel target name

2012-03-30 Thread Alex Jia
Thanks and pushed now. - Original Message - From: Michal Privoznik mpriv...@redhat.com To: Alex Jia a...@redhat.com Cc: libvir-list@redhat.com Sent: Friday, March 30, 2012 6:02:21 PM Subject: Re: [libvirt] [PATCH] conf: Prevent crash of libvirtd without channel target name On 30.03.2012

Re: [libvirt] [PATCHv2] qemu: support live change of the bridge used by a guest network device

2012-03-30 Thread Daniel P. Berrange
On Fri, Mar 30, 2012 at 03:13:31AM -0400, Laine Stump wrote: On 03/29/2012 05:52 PM, Daniel P. Berrange wrote: On Thu, Mar 29, 2012 at 04:38:50PM -0400, Laine Stump wrote: +if (oldbridge +virNetDevBridgeRemovePort(oldbridge, olddev-ifname) 0) { +return -1; +}

Re: [libvirt] [test-API] RFC: Stabilization of libvirt-test-API

2012-03-30 Thread Guannan Ren
On 03/30/2012 05:33 PM, Martin Kletzander wrote: To answer two of your questions at once, I'll show you an example of what I had in mind (BTW: one of the current disadvantages is also the fact that each indentation level _must_ be 4 spaces, otherwise you'll get an error). Please be aware that

[libvirt] [PATCH] virnetdevtap: Don't check for flags in virNetDevTapCreateFlags

2012-03-30 Thread Michal Privoznik
With latest gnulib we are checking even the lowest level functions whether they check flags. Moreover, we are shadowing the real error on system without TUNSETIFF support. --- cfg.mk |2 +- src/util/virnetdevtap.c |5 + 2 files changed, 2 insertions(+), 5 deletions(-)

[libvirt] [PATCH] libvirt:qemu: fix max_balloon less than cur_balloon

2012-03-30 Thread Zhou Peng
In qemuDomainGetXMLDesc, if cur_balloon is bigger than max_balloon, max_balloon should be updated too, otherwise the currentMemory is bigger than memory in dumped xml, which will produce invalid checkpoint by virsh-save. The bug appears like this below: $virsh save vm-num foo.ckp $virsh restore

Re: [libvirt] [PATCH] virnetdevtap: Don't check for flags in virNetDevTapCreateFlags

2012-03-30 Thread Eric Blake
On 03/30/2012 05:49 AM, Michal Privoznik wrote: With latest gnulib we are checking even the lowest level functions whether they check flags. Moreover, we are shadowing the real error on system without TUNSETIFF support. --- cfg.mk |2 +- src/util/virnetdevtap.c |5

[libvirt] [PATCH] Refactor the libvirt RPM daemon pieces

2012-03-30 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com NB: this is in response to a Fedora 17 beta blocker bug. Currently gnome-boxes depends on 'libvirt' which pulls in the default virtual network, which kills networking if you install Fedora 17 inside a KVM guest. There are a number of flaws with our

Re: [libvirt] [PATCH] virnetdevtap: Don't check for flags in virNetDevTapCreateFlags

2012-03-30 Thread Michal Privoznik
On 30.03.2012 15:04, Eric Blake wrote: On 03/30/2012 05:49 AM, Michal Privoznik wrote: With latest gnulib we are checking even the lowest level functions whether they check flags. Moreover, we are shadowing the real error on system without TUNSETIFF support. --- cfg.mk |

Re: [libvirt] [PATCH] fix deadlock when qemu cannot start

2012-03-30 Thread Serge Hallyn
Quoting Daniel Veillard (veill...@redhat.com): On Fri, Mar 16, 2012 at 02:37:42PM +0800, Wen Congyang wrote: When qemu cannot start, we may call qemuProcessStop() twice. We have check whether the vm is running at the beginning of qemuProcessStop() to avoid libvirt deadlock. We call

Re: [libvirt] [PATCH v2] qemu_agent: Issue guest-sync prior to every command

2012-03-30 Thread Jiri Denemark
On Fri, Mar 16, 2012 at 17:35:09 +0100, Michal Privoznik wrote: If we issue guest command and GA is not running, the issuing thread will block endlessly. We can check for GA presence by issuing guest-sync with unique ID (timestamp). We don't want to issue real command as even if GA is not

Re: [libvirt] [PATCHv2] qemu: support live change of the bridge used by a guest network device

2012-03-30 Thread Laine Stump
On 03/30/2012 06:25 AM, Daniel P. Berrange wrote: On Fri, Mar 30, 2012 at 03:13:31AM -0400, Laine Stump wrote: On 03/29/2012 05:52 PM, Daniel P. Berrange wrote: On Thu, Mar 29, 2012 at 04:38:50PM -0400, Laine Stump wrote: +if (oldbridge +virNetDevBridgeRemovePort(oldbridge,

Re: [libvirt] [PATCHv2] qemu: support live change of the bridge used by a guest network device

2012-03-30 Thread Daniel P. Berrange
On Fri, Mar 30, 2012 at 10:30:01AM -0400, Laine Stump wrote: On 03/30/2012 06:25 AM, Daniel P. Berrange wrote: On Fri, Mar 30, 2012 at 03:13:31AM -0400, Laine Stump wrote: On 03/29/2012 05:52 PM, Daniel P. Berrange wrote: On Thu, Mar 29, 2012 at 04:38:50PM -0400, Laine Stump wrote: +

Re: [libvirt] [PATCH] qemu: set default name for SPICE agent channel when generating command

2012-03-30 Thread Michal Privoznik
On 30.03.2012 09:50, Laine Stump wrote: commit b0e2bb33 set a default value for the SPICE agent channel by inserting it during parsing of the channel XML. That method of setting a default is problematic because it makes a format/parse roundtrip unclean, and experience with setting other values

Re: [libvirt] [PATCH] Refactor the libvirt RPM daemon pieces

2012-03-30 Thread Dave Allan
On Fri, Mar 30, 2012 at 02:22:01PM +0100, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com NB: this is in response to a Fedora 17 beta blocker bug. Currently gnome-boxes depends on 'libvirt' which pulls in the default virtual network, which kills networking if you

Re: [libvirt] [PATCH] Refactor the libvirt RPM daemon pieces

2012-03-30 Thread Daniel P. Berrange
On Fri, Mar 30, 2012 at 02:22:01PM +0100, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com NB: this is in response to a Fedora 17 beta blocker bug. Currently gnome-boxes depends on 'libvirt' which pulls in the default virtual network, which kills networking if you

[libvirt] [ANNOUNCE] libvirt-glib 0.0.7 release

2012-03-30 Thread Daniel P. Berrange
am pleased to announce that a new release of the libvirt-glib package, version 0.0.7 is now available from ftp://libvirt.org/libvirt/glib/ The packages are GPG signed with Key fingerprint: DAF3 A6FD B26B 6291 2D0E 8E3F BE86 EBB4 1510 4FDF (4096R) New in this release: - Fix typo in

Re: [libvirt] [PATCH] fix deadlock when qemu cannot start

2012-03-30 Thread Daniel Veillard
On Fri, Mar 30, 2012 at 08:45:35AM -0500, Serge Hallyn wrote: Quoting Daniel Veillard (veill...@redhat.com): On Fri, Mar 16, 2012 at 02:37:42PM +0800, Wen Congyang wrote: When qemu cannot start, we may call qemuProcessStop() twice. We have check whether the vm is running at the beginning

[libvirt] [PATCHv2 2/2] conf: allow fuzz in XML with cur balloon max

2012-03-30 Thread Eric Blake
Commit 1b1402b introduced a regression. Since older libvirt versions would silently round memory up (until the previous patch), but populated current memory based on querying the guest, it was possible to have current maximum by the amount of the rounding. Accept this fuzz factor, and silently

[libvirt] [PATCHv2 1/2] qemu: reflect any memory rounding back to xml

2012-03-30 Thread Eric Blake
If we round up a user's memory request, we should update the XML to reflect the actual value in use by the VM, rather than giving an artificially small value back to the user. * src/qemu/qemu_command.c (qemuBuildNumaArgStr) (qemuBuildCommandLine): Reflect rounding back to XML. ---

[libvirt] [PATCHv2 0/2] allow for existing XML with cur max memory

2012-03-30 Thread Eric Blake
NACK to Zhou's patch (it is only a bandaid trying to cover the symptom, rather than fixing the real bug that happened earlier), but I'm proposing this series in its place. Eric Blake (2): qemu: reflect any memory rounding back to xml conf: allow fuzz in XML with cur balloon max

Re: [libvirt] [PATCH] Refactor the libvirt RPM daemon pieces

2012-03-30 Thread Laine Stump
On 03/30/2012 09:22 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com NB: this is in response to a Fedora 17 beta blocker bug. Currently gnome-boxes depends on 'libvirt' which pulls in the default virtual network, which kills networking if you install Fedora 17

Re: [libvirt] [PATCH v2] qemu_agent: Issue guest-sync prior to every command

2012-03-30 Thread Michal Privoznik
On 30.03.2012 16:31, Jiri Denemark wrote: On Fri, Mar 16, 2012 at 17:35:09 +0100, Michal Privoznik wrote: If we issue guest command and GA is not running, the issuing thread will block endlessly. We can check for GA presence by issuing guest-sync with unique ID (timestamp). We don't want to

Re: [libvirt] [PATCH] Refactor the libvirt RPM daemon pieces

2012-03-30 Thread Daniel P. Berrange
On Fri, Mar 30, 2012 at 12:13:13PM -0400, Laine Stump wrote: On 03/30/2012 09:22 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com NB: this is in response to a Fedora 17 beta blocker bug. Currently gnome-boxes depends on 'libvirt' which pulls in the default

Re: [libvirt] [PATCH] Refactor the libvirt RPM daemon pieces

2012-03-30 Thread Laine Stump
On 03/30/2012 12:20 PM, Daniel P. Berrange wrote: On Fri, Mar 30, 2012 at 12:13:13PM -0400, Laine Stump wrote: With the current setup, you can install the libvirt package, and it will just use/present whichever hypervisors happen to be installed on the machine. With the new setup, if you have

[libvirt] [PATCH] build: fix mingw ssize_t, syntax check

2012-03-30 Thread Eric Blake
We are so close to a release that we don't want to pull in a gnulib submodule update and risk regressions, since there has been a lot of other gnulib churn upstream. However, there are a couple of gnulib issues that are worth fixing in isolation, by applying local patches to gnulib. There was an

Re: [libvirt] [PATCH] build: fix mingw ssize_t, syntax check

2012-03-30 Thread Daniel P. Berrange
On Fri, Mar 30, 2012 at 10:35:41AM -0600, Eric Blake wrote: We are so close to a release that we don't want to pull in a gnulib submodule update and risk regressions, since there has been a lot of other gnulib churn upstream. However, there are a couple of gnulib issues that are worth fixing

[libvirt] [PATCH] Refactor the libvirt RPM daemon pieces

2012-03-30 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com There are a number of flaws with our packaging of the libvirtd daemon: - Installing 'libvirt' does not install 'qemu-kvm' or 'xen' etc which are required to actually run the hypervisor in question - Installing 'libvirt' pulls in the default

Re: [libvirt] [PATCH] qemu: set default name for SPICE agent channel when generating command

2012-03-30 Thread Laine Stump
On 03/30/2012 11:06 AM, Michal Privoznik wrote: On 30.03.2012 09:50, Laine Stump wrote: commit b0e2bb33 set a default value for the SPICE agent channel by inserting it during parsing of the channel XML. That method of setting a default is problematic because it makes a format/parse roundtrip

Re: [libvirt] [PATCHv2] qemu: support live change of the bridge used by a guest network device

2012-03-30 Thread Laine Stump
On 03/30/2012 10:39 AM, Daniel P. Berrange wrote: On Fri, Mar 30, 2012 at 10:30:01AM -0400, Laine Stump wrote: From 3b277f2c2138b98145d6b5e18c844be5d43b8b29 Mon Sep 17 00:00:00 2001 From: Laine Stump la...@laine.org Date: Fri, 30 Mar 2012 10:13:37 -0400 Subject: [PATCH] qemu: add audit logs

[libvirt] [PATCH] python: improve conversion validation

2012-03-30 Thread Eric Blake
Laszlo Ersek pointed out that in trying to convert a long to an unsigned int, we used: long long_val = ...; if ((unsigned int)long_val == long_val) According to C99 integer promotion rules, the if statement is equivalent to: (unsigned long)(unsigned int)long_val == (unsigned long)long_val

Re: [libvirt] [PATCH] Refactor the libvirt RPM daemon pieces

2012-03-30 Thread Laine Stump
On 03/30/2012 12:53 PM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com There are a number of flaws with our packaging of the libvirtd daemon: - Installing 'libvirt' does not install 'qemu-kvm' or 'xen' etc which are required to actually run the hypervisor in

[libvirt] [libvirt PATCHv8 1/1] add DHCP snooping

2012-03-30 Thread David L Stevens
This patch adds DHCP snooping support to libvirt. The learning method for IP addresses is specified by setting the ip_learning variable to one of any [default] (existing IP learning code), none (static only addresses) or dhcp (DHCP snooping). Active leases are saved in a lease file and reloaded

Re: [libvirt] [PATCH] Refactor the libvirt RPM daemon pieces

2012-03-30 Thread Daniel P. Berrange
On Fri, Mar 30, 2012 at 03:00:03PM -0400, Laine Stump wrote: On 03/30/2012 12:53 PM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com There are a number of flaws with our packaging of the libvirtd daemon: - Installing 'libvirt' does not install 'qemu-kvm' or

Re: [libvirt] [PATCH] Refactor the libvirt RPM daemon pieces

2012-03-30 Thread Laine Stump
On 03/30/2012 03:30 PM, Daniel P. Berrange wrote: On Fri, Mar 30, 2012 at 03:00:03PM -0400, Laine Stump wrote: On 03/30/2012 12:53 PM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com There are a number of flaws with our packaging of the libvirtd daemon: - Installing

Re: [libvirt] [PATCH] fix deadlock when qemu cannot start

2012-03-30 Thread Serge Hallyn
Quoting Daniel Veillard (veill...@redhat.com): On Fri, Mar 30, 2012 at 08:45:35AM -0500, Serge Hallyn wrote: Quoting Daniel Veillard (veill...@redhat.com): On Fri, Mar 16, 2012 at 02:37:42PM +0800, Wen Congyang wrote: When qemu cannot start, we may call qemuProcessStop() twice. We

Re: [libvirt] [PATCH] build: fix mingw ssize_t, syntax check

2012-03-30 Thread Eric Blake
On 03/30/2012 10:54 AM, Daniel P. Berrange wrote: On Fri, Mar 30, 2012 at 10:35:41AM -0600, Eric Blake wrote: We are so close to a release that we don't want to pull in a gnulib submodule update and risk regressions, since there has been a lot of other gnulib churn upstream. However, there

Re: [libvirt] [PATCHv2] qemu: support live change of the bridge used by a guest network device

2012-03-30 Thread Eric Blake
On 03/30/2012 12:22 PM, Laine Stump wrote: Subject: [PATCH] qemu: add audit logs when switching bridges This adds in a standard audit log for detaching and attaching a network device when the bridge being used is changed. All *attempts* to detach or attach a tap to a bridge are logged,

Re: [libvirt] [PATCH] Refactor the libvirt RPM daemon pieces

2012-03-30 Thread Eric Blake
On 03/30/2012 10:53 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com There are a number of flaws with our packaging of the libvirtd daemon: + +%if %{with_libvirtd} +%package daemon +Summary: Server side daemon and supporting files for libvirt library +Group:

[libvirt] [PATCH] build: fix build on cygwin

2012-03-30 Thread Eric Blake
Regression introduced when we changed types in commit 3e2c3d8f6. We've done this sort of cleanup before (see commit c685993d7). * src/conf/storage_conf.c (virStoragePoolDefFormat) (virStorageVolTargetDefFormat): Cast gid_t and uid_t. --- Pushing under the build-breaker rule.

[libvirt] [PATCH] openvz: Allow missing micro tag in the version

2012-03-30 Thread Osier Yang
No reason to cause the openvz driver to fail on startup if the micro tag in missed. This solves the problem: https://www.redhat.com/archives/libvirt-users/2012-March/msg00202.html --- src/openvz/openvz_conf.c |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git

Re: [libvirt] [PATCHv2] qemu: support live change of the bridge used by a guest network device

2012-03-30 Thread Laine Stump
On 03/30/2012 06:23 PM, Eric Blake wrote: On 03/30/2012 12:22 PM, Laine Stump wrote: Subject: [PATCH] qemu: add audit logs when switching bridges This adds in a standard audit log for detaching and attaching a network device when the bridge being used is changed. All *attempts* to detach or

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

2012-03-30 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 --- src/qemu/qemu_command.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_command.c

[libvirt] [PATCH] qemu: allow snapshotting of sheepdog and rbd disks

2012-03-30 Thread Josh Durgin
Signed-off-by: Josh Durgin josh.dur...@dreamhost.com --- .gnulib|2 +- src/qemu/qemu_driver.c | 14 ++ 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.gnulib b/.gnulib index d5612c7..6b93d00 16 --- a/.gnulib +++ b/.gnulib @@ -1 +1 @@

Re: [libvirt] [PATCHv2 2/2] conf: allow fuzz in XML with cur balloon max

2012-03-30 Thread Zhou Peng
Thanks for your patch serials. I think they fix the true bug. But I have a little doubt on the fuzz allowance, pls have a see comment in line below. On Fri, Mar 30, 2012 at 11:56 PM, Eric Blake ebl...@redhat.com wrote: Commit 1b1402b introduced a regression.  Since older libvirt versions