Re: [libvirt] [PATCH 00/13] Network disk improvements (NBD libiscsi)

2013-02-28 Thread Paolo Bonzini
Il 28/02/2013 06:10, Eric Blake ha scritto: It's too late for me tonight to do any more reviewing, but I also hope to check tomorrow whether any of 2-6 also make sense during the freeze. Patches 7-13 should wait until after 1.0.3 is out, since they are definitely new material and not bug

Re: [libvirt] [PATCH 01/13] qemu: fix use-after-free when parsing NBD disk

2013-02-28 Thread Paolo Bonzini
Il 28/02/2013 06:03, Eric Blake ha scritto: diff --git i/src/qemu/qemu_command.c w/src/qemu/qemu_command.c index 0a7d4ec..f8f3ade 100644 --- i/src/qemu/qemu_command.c +++ w/src/qemu/qemu_command.c @@ -8832,11 +8832,11 @@ virDomainDefPtr qemuParseCommandLine(virCapsPtr qemuCaps,

[libvirt] [PATCH 0/4]typo fix and codes improvement in generator.py

2013-02-28 Thread Guannan Ren
This four patches try to fix various typoes, fd leaks and optimize codes in generator.py script. This is the first round. Guannan Ren(4) [PATCH 1/4] python: global variable and debugging improvement for [PATCH 2/4] python: fix typoes and repeated global vars references [PATCH 3/4] python:

[libvirt] [PATCH 3/4] python: optimize SAX xml parsing event handler

2013-02-28 Thread Guannan Ren
close(), getmethodname(), cdata() are not standard methods from parent class ContentHandler and not being used anywhere in codes, so remove them. In docParser, actually, we are overloading three parent methods startElement(), endElement() and characters(), so I rename back three of these method

[libvirt] [PATCH 2/4] python: fix typoes and repeated global vars references

2013-02-28 Thread Guannan Ren
--- python/generator.py | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/python/generator.py b/python/generator.py index 246767c..39e654b 100755 --- a/python/generator.py +++ b/python/generator.py @@ -781,11 +781,11 @@ def buildStubs(module, stubs_buiding_debug = False,

[libvirt] [PATCH 4/4] python: fix fd leak in generator.py

2013-02-28 Thread Guannan Ren
--- python/generator.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python/generator.py b/python/generator.py index 7ccd471..4b62f83 100755 --- a/python/generator.py +++ b/python/generator.py @@ -771,6 +771,7 @@ def buildStubs(module, stubs_buiding_debug = False, xml_parsing_debug =

Re: [libvirt] Release candidate 2 of 1.0.3 is available

2013-02-28 Thread Peter Krempa
On 02/27/13 15:26, Michal Privoznik wrote: On 27.02.2013 12:20, Daniel Veillard wrote: I have just tagged git and pushed the tarball. The rpms for F17 are at the usual place too: ftp://libvirt.org/libvirt/ I gave a try to the set of rpms and this seems to work fine for relatively

Re: [libvirt] [PATCH 1/4] rename qemuGetNumadAdvice to virDomainGetNumadAdvice

2013-02-28 Thread Gao feng
On 2013/02/28 01:16, Daniel P. Berrange wrote: On Wed, Feb 27, 2013 at 05:11:06PM +, Daniel P. Berrange wrote: On Wed, Feb 27, 2013 at 04:09:35PM +0800, Gao feng wrote: qemuGetNumadAdvice will be used by LXC driver,rename it to virDomainGetNumaAdvice and move it to domain_conf.c

Re: [libvirt] a script for libvirt-llxc + systemd on Fedora18

2013-02-28 Thread Gao feng
On 2013/02/27 17:33, Kamezawa Hiroyuki wrote: Hi. At playing libvirt-lxc on Fedora18, I found that the user needs some workarounds to run /sbin/init as the root process of container. With Fedora15, I found this https://gist.github.com/peo3/1142202. And I know virt-sandbox-service have some

Re: [libvirt] [PATCH 1/1] Remove contiguous CPU indexes assumption

2013-02-28 Thread Li Zhang
On 2013年02月28日 14:27, Li Zhang wrote: On 2013年02月28日 07:13, Eric Blake wrote: On 02/27/2013 05:13 AM, Li Zhang wrote: Hi Eric, This should belong to bug-fix, could it be pushed to 1.0.3? Without any test case under 'make check' that exposes the failure, I'm a bit worried that this might

[libvirt] [PATCH] qemu: virConnectGetVersion returns bogus value

2013-02-28 Thread Viktor Mihajlovski
The unitialized local variable qemuVersion can cause an random value to be returned for the hypervisor version, observable with virsh version. Introduced by commit b46f7f4a0b96c2d2d01d64d960bd7bc90dc16b0c Signed-off-by: Viktor Mihajlovski mihaj...@linux.vnet.ibm.com --- src/qemu/qemu_driver.c |

Re: [libvirt] [PATCH] qemu: virConnectGetVersion returns bogus value

2013-02-28 Thread Peter Krempa
On 02/28/13 11:11, Viktor Mihajlovski wrote: The unitialized local variable qemuVersion can cause an random value to be returned for the hypervisor version, observable with virsh version. Introduced by commit b46f7f4a0b96c2d2d01d64d960bd7bc90dc16b0c Signed-off-by: Viktor Mihajlovski

Re: [libvirt] Release candidate 2 of 1.0.3 is available

2013-02-28 Thread Daniel P. Berrange
On Thu, Feb 28, 2013 at 11:00:28AM +0100, Peter Krempa wrote: On 02/27/13 15:26, Michal Privoznik wrote: On 27.02.2013 12:20, Daniel Veillard wrote: I have just tagged git and pushed the tarball. The rpms for F17 are at the usual place too: ftp://libvirt.org/libvirt/ I gave a

Re: [libvirt] a script for libvirt-llxc + systemd on Fedora18

2013-02-28 Thread Daniel P. Berrange
On Thu, Feb 28, 2013 at 06:03:46PM +0800, Gao feng wrote: On 2013/02/27 17:33, Kamezawa Hiroyuki wrote: Hi. At playing libvirt-lxc on Fedora18, I found that the user needs some workarounds to run /sbin/init as the root process of container. With Fedora15, I found this

Re: [libvirt] [PATCH 1/1] Clear PIIX3/PIIX4_USB capabilities for non-X86 platforms

2013-02-28 Thread Jiri Denemark
On Thu, Feb 28, 2013 at 10:39:56 +0800, Li Zhang wrote: On Thu, Feb 28, 2013 at 10:06 AM, Li Zhang zhlci...@gmail.com wrote: I also hope that QEMU capabilities depend on the binary by QMP. But the flags in virQEMUCapsObjectTypes are all set in virQEMUCapsInitQMP. virQEMUCapsInitQMP -

Re: [libvirt] [PATCH v2] qemu: Don't fail to shutdown domains with unresponsive agent

2013-02-28 Thread Michal Privoznik
On 28.02.2013 02:13, Eric Blake wrote: On 02/27/2013 03:30 AM, Michal Privoznik wrote: On 27.02.2013 00:22, Eric Blake wrote: On 02/26/2013 04:02 AM, Michal Privoznik wrote: Currently, qemuDomainShutdownFlags() chooses the agent method of shutdown whenever the agent is configured. However,

[libvirt] virnettlscontexttest test fails on Fedora Rawhide x86_64

2013-02-28 Thread Richard W.M. Jones
Still investigating, but the log is attached. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming blog: http://rwmj.wordpress.com Fedora now supports 80 OCaml packages (the OPEN alternative to F#) =

Re: [libvirt] [PATCH 1/1] Clear PIIX3/PIIX4_USB capabilities for non-X86 platforms

2013-02-28 Thread Li Zhang
On 2013年02月28日 19:39, Jiri Denemark wrote: On Thu, Feb 28, 2013 at 10:39:56 +0800, Li Zhang wrote: On Thu, Feb 28, 2013 at 10:06 AM, Li Zhang zhlci...@gmail.com wrote: I also hope that QEMU capabilities depend on the binary by QMP. But the flags in virQEMUCapsObjectTypes are all set in

Re: [libvirt] virnettlscontexttest test fails on Fedora Rawhide x86_64

2013-02-28 Thread Daniel P. Berrange
On Thu, Feb 28, 2013 at 11:44:02AM +, Richard W.M. Jones wrote: Still investigating, but the log is attached. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming blog: http://rwmj.wordpress.com Fedora now supports 80 OCaml

Re: [libvirt] [PATCH 1/1] Clear PIIX3/PIIX4_USB capabilities for non-X86 platforms

2013-02-28 Thread Jiri Denemark
On Thu, Feb 28, 2013 at 19:47:47 +0800, Li Zhang wrote: On 2013年02月28日 19:39, Jiri Denemark wrote: I tried to execute qom-list-types command, I get a lot of return values including X86 and other platforms. I think this is the real problem. QEMU binary emulating PPC architecture should

Re: [libvirt] [PATCH 1/1] Clear PIIX3/PIIX4_USB capabilities for non-X86 platforms

2013-02-28 Thread Li Zhang
On 2013年02月28日 19:47, Li Zhang wrote: On 2013年02月28日 19:39, Jiri Denemark wrote: On Thu, Feb 28, 2013 at 10:39:56 +0800, Li Zhang wrote: On Thu, Feb 28, 2013 at 10:06 AM, Li Zhang zhlci...@gmail.com wrote: It seems that command qom-list-types just give all architectures' list, not

Re: [libvirt] [PATCHv3 0/5] snapshot revert-and-create

2013-02-28 Thread Peter Krempa
On 11/21/12 01:36, Eric Blake wrote: v2 was here: https://www.redhat.com/archives/libvir-list/2012-November/msg00818.html One patch from v2 has already been committed. This patch additionally adds a qemu implementation for the new flag, and I have tested creation of offline branches (I still

Re: [libvirt] [PATCHv2] qemu: fix graphics port allocation

2013-02-28 Thread Ján Tomko
On 02/28/13 00:17, Eric Blake wrote: On 02/27/2013 04:51 AM, Ján Tomko wrote: Only release ports that have been allocated before. This fixes these issues: * trying to release ports when qemuProcessStart fails before port allocation * trying to release the SPICE TLS port if spice_tls is 0

[libvirt] [PATCH] Fix crash in QEMU auto-destroy with transient guests

2013-02-28 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com When the auto-destroy callback runs it is supposed to return NULL if the virDomainObjPtr is no longer valid. It was not doing this for transient guests, so we tried to virObjectUnlock a mutex which had been freed. This often led to a crash.

Re: [libvirt] [PATCH 10/10] docs: Describe the dhcp 'enable' and 'relay' attributes

2013-02-28 Thread Daniel Veillard
On Wed, Feb 27, 2013 at 09:38:33PM -0700, Eric Blake wrote: On 02/27/2013 09:29 PM, TJ wrote: [...] And a big THANK YOU for contributing to the community. Too often, I forget to express gratitude for new contributors braving the unknown waters of posting to a list where they are not sure of

Re: [libvirt] Release candidate 2 of 1.0.3 is available

2013-02-28 Thread Daniel P. Berrange
On Wed, Feb 27, 2013 at 03:26:24PM +0100, Michal Privoznik wrote: On 27.02.2013 12:20, Daniel Veillard wrote: I have just tagged git and pushed the tarball. The rpms for F17 are at the usual place too: ftp://libvirt.org/libvirt/ I gave a try to the set of rpms and this seems

Re: [libvirt] [Qemu-devel] [PATCH v2] vl.c: Support multiple CPU ranges on -numa option

2013-02-28 Thread Markus Armbruster
Anthony Liguori anth...@codemonkey.ws writes: Paolo Bonzini pbonz...@redhat.com writes: Il 27/02/2013 16:42, Anthony Liguori ha scritto: There's such thing as list support in QemuOpts. The only way QemuOptsVisitor was able to implement it was to expose QemuOpts publicly via options_int.h

Re: [libvirt] virnettlscontexttest test fails on Fedora Rawhide x86_64

2013-02-28 Thread Richard W.M. Jones
On Thu, Feb 28, 2013 at 11:53:12AM +, Daniel P. Berrange wrote: [...] In that test case we're creating a CA cert which has the key-usage policy set to digital signature instead of key signing. However we also set the flag non-critical so a failing key usage policy check should still

Re: [libvirt] [Qemu-devel] [PATCH v2] vl.c: Support multiple CPU ranges on -numa option

2013-02-28 Thread Markus Armbruster
Paolo Bonzini pbonz...@redhat.com writes: Il 27/02/2013 17:19, Eduardo Habkost ha scritto: If it is meant as a prototype only, and the final command-line syntax would be with repeated keys, that's okay. I think that Eduardo/Markus/I are focusing on the user interface, you're focusing

Re: [libvirt] Release candidate 2 of 1.0.3 is available

2013-02-28 Thread Michal Privoznik
On 28.02.2013 13:42, Daniel P. Berrange wrote: On Wed, Feb 27, 2013 at 03:26:24PM +0100, Michal Privoznik wrote: On 27.02.2013 12:20, Daniel Veillard wrote: I have just tagged git and pushed the tarball. The rpms for F17 are at the usual place too: ftp://libvirt.org/libvirt/ I

Re: [libvirt] [Qemu-devel] [PATCH v2] vl.c: Support multiple CPU ranges on -numa option

2013-02-28 Thread Markus Armbruster
Anthony Liguori anth...@codemonkey.ws writes: Paolo Bonzini pbonz...@redhat.com writes: Il 27/02/2013 18:08, Anthony Liguori ha scritto: No, no, no. This makes ':' special, which means you can't have lists of anything containing ':'. Your cure is worse than the disease. Let go of

[libvirt] [PATCH] qemu: Make sure qemuProcessStart is run within a job

2013-02-28 Thread Jiri Denemark
qemuProcessStart expects to be run with a job already set and every caller except for qemuMigrationPrepareAny use it correctly. This bug can be observed in libvirtd logs during incoming migration as warning : qemuDomainObjEnterMonitorInternal:979 : This thread seems to be the async job

Re: [libvirt] [Qemu-devel] [PATCH v2] vl.c: Support multiple CPU ranges on -numa option

2013-02-28 Thread Anthony Liguori
Markus Armbruster arm...@redhat.com writes: Anthony Liguori anth...@codemonkey.ws writes: Paolo Bonzini pbonz...@redhat.com writes: What about: [numa] node=1 cpus=2 cpus=3 qemu -readconfig numa.cfg -numa node=1,cpus=1 I figure you mean

[libvirt] [PATCH] Fix deadlock in QEMU close callback APIs

2013-02-28 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com There is a lock ordering problem in the QEMU close callback APIs. When starting a guest we have a lock on the VM. We then set a autodestroy callback, which acquires a lock on the close callbacks. When running auto-destroy, we obtain a lock on the

[libvirt] [PATCH] Fix error report from nl_recvmsg

2013-02-28 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com The nl_recvmsg does not always set errno. Instead it returns its own custom set of error codes. Thus we were reporting the wrong data. --- src/util/virnetlink.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git

Re: [libvirt] [Qemu-devel] [PATCH v2] vl.c: Support multiple CPU ranges on -numa option

2013-02-28 Thread Anthony Liguori
Markus Armbruster arm...@redhat.com writes: Related: overwrite something you got from a config file on the command line. In both your example and mine, we have entirely separate options, and they have perfectly ordinary overwrite semantics: each option overwrites the given keys with the

Re: [libvirt] [PATCH] Fix deadlock in QEMU close callback APIs

2013-02-28 Thread Daniel P. Berrange
On Thu, Feb 28, 2013 at 01:33:31PM +, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com There is a lock ordering problem in the QEMU close callback APIs. When starting a guest we have a lock on the VM. We then set a autodestroy callback, which acquires a lock on

Re: [libvirt] [PATCH] Fix deadlock in QEMU close callback APIs

2013-02-28 Thread Jiri Denemark
On Thu, Feb 28, 2013 at 13:33:31 +, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com There is a lock ordering problem in the QEMU close callback APIs. When starting a guest we have a lock on the VM. We then set a autodestroy callback, which acquires a lock on the

Re: [libvirt] [PATCH] Fix deadlock in QEMU close callback APIs

2013-02-28 Thread Daniel P. Berrange
On Thu, Feb 28, 2013 at 02:50:34PM +0100, Jiri Denemark wrote: On Thu, Feb 28, 2013 at 13:33:31 +, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com There is a lock ordering problem in the QEMU close callback APIs. When starting a guest we have a lock on the

Re: [libvirt] [Qemu-devel] [PATCH v2] vl.c: Support multiple CPU ranges on -numa option

2013-02-28 Thread Paolo Bonzini
Il 28/02/2013 14:32, Anthony Liguori ha scritto: qemu -numa node=1,cpus=0,cpus=1,cpus=2,cpus=3,cpus=8,cpus=9,cpus=10,cpus=11 Let me pick up the baby you just threw out with the bathwater for you: qemu -numa node,nodeid=1,cpus=0-3,cpus=8-11 If you're okay with making '-' be special

Re: [libvirt] [Qemu-devel] [PATCH v2] vl.c: Support multiple CPU ranges on -numa option

2013-02-28 Thread Paolo Bonzini
Il 28/02/2013 14:41, Anthony Liguori ha scritto: This is certainly ambiguous. Does this mean that you have a single cpu for the node (VCPU 4) or does it mean the node have 4 cpus (presumably ranged 0-3). Given that ambiguity the following: qemu -numa node,nodeid=2,cpus=4,cpus=8

[libvirt] [PATCH] virnetdevmacvlan.c: Introduce mutex for macvlan creation

2013-02-28 Thread Michal Privoznik
Currently, after we removed the qemu driver lock, it may happen that two or more threads will start up a machine with macvlan and race over virNetDevMacVLanCreateWithVPortProfile(). However, there's a racy section in which we are generating a sequence of possible device names and detecting if they

Re: [libvirt] [PATCH] Fix error report from nl_recvmsg

2013-02-28 Thread Laine Stump
On 02/28/2013 08:37 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com The nl_recvmsg does not always set errno. Instead it returns its own custom set of error codes. Thus we were reporting the wrong data. --- src/util/virnetlink.c | 5 +++-- 1 file changed, 3

Re: [libvirt] [PATCH] Fix error report from nl_recvmsg

2013-02-28 Thread Daniel P. Berrange
On Thu, Feb 28, 2013 at 11:11:53AM -0500, Laine Stump wrote: On 02/28/2013 08:37 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com The nl_recvmsg does not always set errno. Instead it returns its own custom set of error codes. Thus we were reporting the wrong

Re: [libvirt] [PATCH] Fix error report from nl_recvmsg

2013-02-28 Thread Daniel P. Berrange
On Thu, Feb 28, 2013 at 04:16:37PM +, Daniel P. Berrange wrote: On Thu, Feb 28, 2013 at 11:11:53AM -0500, Laine Stump wrote: On 02/28/2013 08:37 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com The nl_recvmsg does not always set errno. Instead it returns

Re: [libvirt] [PATCH] Fix error report from nl_recvmsg

2013-02-28 Thread Daniel Veillard
On Thu, Feb 28, 2013 at 04:24:17PM +, Daniel P. Berrange wrote: On Thu, Feb 28, 2013 at 04:16:37PM +, Daniel P. Berrange wrote: [...] Oh joy, it is worse than you could possibly imagine. On libnl1 the return value is a valid -errno, while in libnl3 the return value is an error code

Re: [libvirt] [PATCH] Fix deadlock in QEMU close callback APIs

2013-02-28 Thread Daniel P. Berrange
On Thu, Feb 28, 2013 at 01:33:31PM +, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com There is a lock ordering problem in the QEMU close callback APIs. When starting a guest we have a lock on the VM. We then set a autodestroy callback, which acquires a lock on

[libvirt] [PATCH] Revert hack for autodestroy in qemuProcessStop

2013-02-28 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com This reverts the hack done in commit 568a6cda277f04ab9baaeb97490e548b7b608aa6 Author: Jiri Denemark jdene...@redhat.com Date: Fri Feb 15 15:11:47 2013 +0100 qemu: Avoid deadlock in autodestroy since we now have a fix which avoids the deadlock

Re: [libvirt] [Qemu-devel] [PATCH v2] vl.c: Support multiple CPU ranges on -numa option

2013-02-28 Thread Markus Armbruster
Anthony Liguori anth...@codemonkey.ws writes: Markus Armbruster arm...@redhat.com writes: Related: overwrite something you got from a config file on the command line. In both your example and mine, we have entirely separate options, and they have perfectly ordinary overwrite semantics:

Re: [libvirt] [PATCH] Fix crash in QEMU auto-destroy with transient guests

2013-02-28 Thread Eric Blake
On 02/28/2013 05:19 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com When the auto-destroy callback runs it is supposed to return NULL if the virDomainObjPtr is no longer valid. It was not doing this for transient guests, so we tried to virObjectUnlock a mutex

Re: [libvirt] [Qemu-devel] [PATCH v2] vl.c: Support multiple CPU ranges on -numa option

2013-02-28 Thread Markus Armbruster
Anthony Liguori anth...@codemonkey.ws writes: Markus Armbruster arm...@redhat.com writes: Anthony Liguori anth...@codemonkey.ws writes: Paolo Bonzini pbonz...@redhat.com writes: What about: [numa] node=1 cpus=2 cpus=3 qemu -readconfig

Re: [libvirt] [PATCH] Fix crash in QEMU auto-destroy with transient guests

2013-02-28 Thread Laine Stump
On 02/28/2013 07:19 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com When the auto-destroy callback runs it is supposed to return NULL if the virDomainObjPtr is no longer valid. It was not doing this for transient guests, so we tried to virObjectUnlock a mutex which

Re: [libvirt] [PATCH 06/10] network: Bridge - Add support for a DHCP Relay Agent

2013-02-28 Thread Eric Blake
On 02/27/2013 11:32 PM, TJ wrote: One thing I'm not yet sure how to deal with is the difference between build and deployment systems when one or the other doesn't have access to 'dhcp-helper', since as I understand it, some distributions do not include it in their package archives (it is

Re: [libvirt] [PATCH] Fix error report from nl_recvmsg

2013-02-28 Thread Laine Stump
On 02/28/2013 11:37 AM, Daniel P. Berrange wrote: On Fri, Mar 01, 2013 at 12:31:34AM +0800, Daniel Veillard wrote: On Thu, Feb 28, 2013 at 04:24:17PM +, Daniel P. Berrange wrote: On Thu, Feb 28, 2013 at 04:16:37PM +, Daniel P. Berrange wrote: [...] Oh joy, it is worse than you could

Re: [libvirt] [PATCH 01/10] conf: DHCP - add state for DHCP Relay and On/Off switch

2013-02-28 Thread Laine Stump
On 02/27/2013 10:26 PM, TJ wrote: On 28/02/13 03:15, Eric Blake wrote: Does your series ever allow dnsmasq and dhcprelay to run at the same time, or can we use a single pid_t field that covers the mutually exclusive choice of which helper is running based on the rest of the config? When

Re: [libvirt] [PATCH 03/10] conf: Network - add pointers to enabled virNetworkIpDef DHCP settings

2013-02-28 Thread Laine Stump
On 02/27/2013 09:57 PM, TJ wrote: From: TJ li...@iam.tj Having previously introduced DHCP enabled and relay state within the virNetworkIpDef structure - which can be one of many on each network - these pointers allow us to track and easily access the DHCP state for IPv4 and IPv6 when setting

Re: [libvirt] [PATCH 02/10] conf: Network - add ability to read/write XML DHCP state

2013-02-28 Thread Laine Stump
On 02/27/2013 09:57 PM, TJ wrote: From: TJ li...@iam.tj Maintain backwards XML compatibility by assuming existing default values and only adding the additional XML properties if settings are not default. Signed-off-by: TJ li...@iam.tj --- src/conf/network_conf.c | 28

Re: [libvirt] [PATCH 01/10] conf: DHCP - add state for DHCP Relay and On/Off switch

2013-02-28 Thread Laine Stump
On 02/27/2013 09:18 PM, TJ wrote: Signed-off-by: TJ li...@iam.tj --- src/conf/network_conf.h | 5 + 1 file changed, 5 insertions(+) diff --git a/src/conf/network_conf.h b/src/conf/network_conf.h index c509915..8400eab 100644 --- a/src/conf/network_conf.h +++ b/src/conf/network_conf.h

Re: [libvirt] [PATCH 04/10] conf: Network - keep track of active DHCP stanza in virNetworkDef

2013-02-28 Thread Laine Stump
On 02/27/2013 09:57 PM, TJ wrote: From: TJ li...@iam.tj To avoid iterating all virNetworkIpDef entries when determining DHCP state keep track of the first enabled DHCP stanza in the network definition itself, for both IPv4 and IPv6. A by-product of this change is it allows the XML to

Re: [libvirt] [PATCH] Fix deadlock in QEMU close callback APIs

2013-02-28 Thread Jiri Denemark
On Thu, Feb 28, 2013 at 13:33:31 +, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com There is a lock ordering problem in the QEMU close callback APIs. When starting a guest we have a lock on the VM. We then set a autodestroy callback, which acquires a lock on the

Re: [libvirt] [PATCH 05/10] network: Bridge - use IPv4 and IPv6 active DHCP stanza pointers

2013-02-28 Thread Laine Stump
On 02/27/2013 09:57 PM, TJ wrote: From: TJ li...@iam.tj Rather than iterate through virNetworkIPDef arrays multiple times use the new virNetworkDef ipv4_dhcp and ipv6_dhcp active stanza pointers. Signed-off-by: TJ li...@iam.tj --- src/network/bridge_driver.c | 63

Re: [libvirt] [PATCH 06/10] network: Bridge - Add support for a DHCP Relay Agent

2013-02-28 Thread Laine Stump
On 02/27/2013 09:57 PM, TJ wrote: From: TJ li...@iam.tj A DHCP relay daemon will be started that will forward all DHCP/BOOTP requests on the bridge network via the first declared forward interface. Okay, I think we've got our first candidate for something we might want to configure. Picking

Re: [libvirt] [PATCH] Revert hack for autodestroy in qemuProcessStop

2013-02-28 Thread Jiri Denemark
On Thu, Feb 28, 2013 at 16:44:38 +, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com This reverts the hack done in commit 568a6cda277f04ab9baaeb97490e548b7b608aa6 Author: Jiri Denemark jdene...@redhat.com Date: Fri Feb 15 15:11:47 2013 +0100 qemu: Avoid

Re: [libvirt] [PATCH 06/10] network: Bridge - Add support for a DHCP Relay Agent

2013-02-28 Thread Laine Stump
On 02/28/2013 01:32 AM, TJ wrote: That then leaves the issue of different DHCP relay agents requiring different command-line parameters. I was looking at the discussion about the option element and wondering if that could have a dual use here, especially in the name= variety, e.g: ip ...

Re: [libvirt] [PATCH 07/10] network: Bridge - don't offer dnsmasq DHCP services when DHCP relay is enabled

2013-02-28 Thread Laine Stump
On 02/27/2013 09:57 PM, TJ wrote: From: TJ li...@iam.tj When dnsmasq's DNS services are required but the network is configured to use a DHCP relay agent (other than dnsmasq's proxy services) the configuration generated for dnsmasq should not enable DHCP services. Signed-off-by: TJ

Re: [libvirt] [PATCH 08/10] configure: Add DHCPRELAY to the set of external program definitions

2013-02-28 Thread Laine Stump
On 02/27/2013 09:57 PM, TJ wrote: From: TJ li...@iam.tj This variable should name the path to the system's DHCP relay daemon. At this time the expected daemon is dhcp-helper, a DHCP relay agent from Simon Kelly, author of dnsmasq. The supporting code, however, has been designed to work

Re: [libvirt] VG backed storage pool start behavior.

2013-02-28 Thread Luke Varnadore
This was the change that moved the lvm tools: https://projects.archlinux.org/svntogit/packages.git/commit/trunk?h=packages/lvm2id=a54404dbc41bdf5a9dc60ac754311297938c0a4d I wouldn't know if libvirt needed to be changed to support finding them when configuring, but that sounds like it should

[libvirt] libvirt does not logout of iscsi targets, causing system hang on shutdown

2013-02-28 Thread Fritz Elfert
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi guys, There's a quite old bug entry here: https://bugzilla.redhat.com/show_bug.cgi?id=700010 I just stumbled over that very issue on F18. Doing a little bit debugging of the shutdown sequence, it turns out that - at least on my F18 installation

Re: [libvirt] [PATCH] qemu: Make sure qemuProcessStart is run within a job

2013-02-28 Thread Eric Blake
On 02/28/2013 06:22 AM, Jiri Denemark wrote: qemuProcessStart expects to be run with a job already set and every caller except for qemuMigrationPrepareAny use it correctly. This bug can be observed in libvirtd logs during incoming migration as warning :

Re: [libvirt] [PATCH 1/4] python: global variable and debugging improvement for generator.py

2013-02-28 Thread Eric Blake
On 02/28/2013 03:03 AM, Guannan Ren wrote: * Put import clause in front of global variables * Sink __name__ == __main__ to the bottom of this script and support import generator * Remove quiet and debug global variables and use stubs_buiding_debug and xml_parsing_debug variable instead

Re: [libvirt] [PATCH 2/4] python: fix typoes and repeated global vars references

2013-02-28 Thread Eric Blake
On 02/28/2013 03:03 AM, Guannan Ren wrote: --- python/generator.py | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) ACK. I don't have to understand python to see that this one makes sense :) -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library

Re: [libvirt] [PATCH 3/4] python: optimize SAX xml parsing event handler

2013-02-28 Thread Eric Blake
On 02/28/2013 03:03 AM, Guannan Ren wrote: close(), getmethodname(), cdata() are not standard methods from parent class ContentHandler and not being used anywhere in codes, so remove them. In docParser, actually, we are overloading three parent methods startElement(), endElement() and

Re: [libvirt] [PATCH 4/4] python: fix fd leak in generator.py

2013-02-28 Thread Eric Blake
On 02/28/2013 03:03 AM, Guannan Ren wrote: --- python/generator.py | 3 +++ 1 file changed, 3 insertions(+) At first, I was worried that this is a leak in the generated code. But it looks like it is only a leak in the generator, and that the generated code is safe. So it's not an essential

[libvirt] [trivial PATCH 1/1] Fix a message typo

2013-02-28 Thread Serge Hallyn
As pointed out in https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1034661 The sentence The function of PCI device addresses must less than 8 does not quite make sense. Update that to read The function of PCI device addresses must be less than 8 Signed-off-by: Serge Hallyn

Re: [libvirt] [trivial PATCH 1/1] Fix a message typo

2013-02-28 Thread Eric Blake
On 02/28/2013 03:08 PM, Serge Hallyn wrote: As pointed out in https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1034661 The sentence The function of PCI device addresses must less than 8 does not quite make sense. Update that to read The function of PCI device addresses must be

Re: [libvirt] libvirt does not logout of iscsi targets, causing system hang on shutdown

2013-02-28 Thread Eric Blake
On 02/28/2013 01:46 PM, Fritz Elfert wrote: Hi guys, There's a quite old bug entry here: https://bugzilla.redhat.com/show_bug.cgi?id=700010 I just stumbled over that very issue on F18. Doing a little bit debugging of the shutdown sequence, it turns out that - at least on my F18

Re: [libvirt] [PATCH] Fix starting qemu instances when apparmor driver is enabled

2013-02-28 Thread Eric Blake
On 02/27/2013 04:51 PM, Jim Fehlig wrote: With the apparmor security driver enabled, qemu instances fail to start # grep ^security_driver /etc/libvirt/qemu.conf security_driver = apparmor # virsh start test-kvm error: Failed to start domain test-kvm error: internal error security label

Re: [libvirt] libvirt does not logout of iscsi targets, causing system hang on shutdown

2013-02-28 Thread Fritz Elfert
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/28/2013 11:38 PM, Eric Blake wrote: On 02/28/2013 01:46 PM, Fritz Elfert wrote: Hi guys, There's a quite old bug entry here: https://bugzilla.redhat.com/show_bug.cgi?id=700010 I just stumbled over that very issue on F18. Doing a little

Re: [libvirt] [PATCH 01/10] conf: DHCP - add state for DHCP Relay and On/Off switch

2013-02-28 Thread TJ
On 28/02/13 19:45, Laine Stump wrote: [...sni[...] I think Eric mentioned elsewhere that your patches are *extremely* small. At least both the data structure, parser, and formatter changes should go into a single patch. For that matter, this functionality is small enough that you could put

Re: [libvirt] [PATCH 05/10] network: Bridge - use IPv4 and IPv6 active DHCP stanza pointers

2013-02-28 Thread TJ
On 28/02/13 19:51, Laine Stump wrote: On 02/27/2013 09:57 PM, TJ wrote: From: TJ li...@iam.tj Rather than iterate through virNetworkIPDef arrays multiple times use the new virNetworkDef ipv4_dhcp and ipv6_dhcp active stanza pointers. Signed-off-by: TJ li...@iam.tj ---

Re: [libvirt] [PATCH 06/10] network: Bridge - Add support for a DHCP Relay Agent

2013-02-28 Thread TJ
On 28/02/13 19:56, Laine Stump wrote: On 02/27/2013 09:57 PM, TJ wrote: From: TJ li...@iam.tj A DHCP relay daemon will be started that will forward all DHCP/BOOTP requests on the bridge network via the first declared forward interface. Okay, I think we've got our first candidate for

Re: [libvirt] [PATCH 05/10] network: Bridge - use IPv4 and IPv6 active DHCP stanza pointers

2013-02-28 Thread TJ
On 28/02/13 19:51, Laine Stump wrote: On 02/27/2013 09:57 PM, TJ wrote: From: TJ li...@iam.tj Rather than iterate through virNetworkIPDef arrays multiple times use the new virNetworkDef ipv4_dhcp and ipv6_dhcp active stanza pointers. Signed-off-by: TJ li...@iam.tj ---

Re: [libvirt] [PATCH] Fix starting qemu instances when apparmor driver is enabled

2013-02-28 Thread Jim Fehlig
Eric Blake wrote: On 02/27/2013 04:51 PM, Jim Fehlig wrote: With the apparmor security driver enabled, qemu instances fail to start # grep ^security_driver /etc/libvirt/qemu.conf security_driver = apparmor # virsh start test-kvm error: Failed to start domain test-kvm error: internal

Re: [libvirt] [PATCH v4 0/4] add pci-bridge support

2013-02-28 Thread li guang
Hi, any other comments? 在 2013-02-25一的 09:38 +0800,li guang写道: ping ... 在 2013-02-19二的 10:25 +0800,liguang写道: Now, it's impossible to arrange devices into multi-pci-bus, for example: sound model='ac97' address type='pci' domain='0x' bus='0x00' slot='0x04'

Re: [libvirt] [PATCH] Fix starting qemu instances when apparmor driver is enabled

2013-02-28 Thread Guannan Ren
On 03/01/2013 08:37 AM, Jim Fehlig wrote: Eric Blake wrote: On 02/27/2013 04:51 PM, Jim Fehlig wrote: With the apparmor security driver enabled, qemu instances fail to start # grep ^security_driver /etc/libvirt/qemu.conf security_driver = apparmor # virsh start test-kvm error: Failed to

[libvirt] [PATCH 0/4] Add cpuset cgroup support for LXC

2013-02-28 Thread Gao feng
This patchset intend to add cpuset cgroup support for LXC. in order to don't create too many redundant codes, this patchset also rename some functions and structure. Gao feng (4): rename qemuGetNumadAdvice to virGetNumadAdvice LXC: allow uses advisory nodeset from querying numad remove the

[libvirt] [PATCH 1/4] rename qemuGetNumadAdvice to virGetNumadAdvice

2013-02-28 Thread Gao feng
qemuGetNumadAdvice will be used by LXC driver,rename it to virGetNumaAdvice and move it to virnuma.c Signed-off-by: Gao feng gaof...@cn.fujitsu.com --- po/POTFILES.in | 1 + src/Makefile.am | 1 + src/libvirt_private.syms | 3 +++ src/qemu/qemu_process.c | 33

[libvirt] [PATCH 2/4] LXC: allow uses advisory nodeset from querying numad

2013-02-28 Thread Gao feng
Allow lxc using the advisory nodeset from querying numad, this means if user doesn't specify the numa nodes that the lxc domain should assign to, libvirt will automatically bind the lxc domain to the advisory nodeset which queried from numad. Signed-off-by: Gao feng gaof...@cn.fujitsu.com ---

[libvirt] [PATCH 4/4] LXC: add cpuset cgroup support for lxc

2013-02-28 Thread Gao feng
This patch adds cpuset cgroup support for LXC. also set cpuset cgroup before setting cpu affinity and numa policy. Signed-off-by: Gao feng gaof...@cn.fujitsu.com --- src/lxc/lxc_cgroup.c | 57 +++- src/lxc/lxc_cgroup.h | 2 +-

[libvirt] [PATCH 3/4] remove the redundant codes

2013-02-28 Thread Gao feng
Intend to reduce the redundant code,use virSetupNumaMemoryPolicy to replace virLXCControllerSetupNUMAPolicy and qemuProcessInitNumaMemoryPolicy. Signed-off-by: Gao feng gaof...@cn.fujitsu.com --- src/conf/domain_conf.h | 23 + src/libvirt_private.syms | 1 + src/lxc/lxc_controller.c

Re: [libvirt] [PATCH 4/4] python: fix fd leak in generator.py

2013-02-28 Thread Guannan Ren
On 03/01/2013 06:26 AM, Eric Blake wrote: On 02/28/2013 03:03 AM, Guannan Ren wrote: --- python/generator.py | 3 +++ 1 file changed, 3 insertions(+) At first, I was worried that this is a leak in the generated code. But it looks like it is only a leak in the generator, and that the

Re: [libvirt] [PATCH] qemu: Make sure qemuProcessStart is run within a job

2013-02-28 Thread Jiri Denemark
On Thu, Feb 28, 2013 at 14:29:59 -0700, Eric Blake wrote: On 02/28/2013 06:22 AM, Jiri Denemark wrote: qemuProcessStart expects to be run with a job already set and every caller except for qemuMigrationPrepareAny use it correctly. This bug can be observed in libvirtd logs during incoming