[libvirt] [PATCH v2] RPC: Don't accept client if it would overcommit max_clients

2013-07-26 Thread Michal Privoznik
Currently, even if max_client limit is hit, we accept() incoming connection request, but close it immediately. This has disadvantage of not using listen() queue. We should accept() only those clients we know we can serve and let all other wait in the (limited) queue. --- diff to v1: -moved logic f

Re: [libvirt] [PATCH 0/2] Split driver StateAutoStart from StateInitialization

2013-07-26 Thread Michal Privoznik
On 25.07.2013 20:37, Daniel P. Berrange wrote: > On Thu, Jul 25, 2013 at 02:32:55PM -0400, John Ferlan wrote: >> The post push review/comments for the chap authentication determined that >> trying to connect to qemu driver from within the storage auto start would >> not be successful, see the follo

Re: [libvirt] Use flock() instead of fcntl()

2013-07-26 Thread David Weber
Am Donnerstag, 25. Juli 2013, 11:29:37 schrieb Daniel P. Berrange: > On Thu, Jul 25, 2013 at 12:07:44PM +0200, David Weber wrote: > > Thank you for your quick response! > > > > Am Donnerstag, 25. Juli 2013, 10:31:40 schrieb Daniel P. Berrange: > > > On Thu, Jul 25, 2013 at 08:23:24AM +, David

Re: [libvirt] Use flock() instead of fcntl()

2013-07-26 Thread Daniel P. Berrange
On Fri, Jul 26, 2013 at 10:44:24AM +0200, David Weber wrote: > > Looking again at flock() I see it cannot support locking of ranges, only > > the entire file. This makes it unsuitable as a replacement for libvirt's > > use of fcntl() I'm afraid. I can only sugggest you configure OCFS2 so > > that i

[libvirt] [PATCH] conf:Fix a copy paste error

2013-07-26 Thread Alex Jia
Signed-off-by: Alex Jia --- src/conf/domain_conf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 10cb7f6..0e74039 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -5153,7 +5153,7 @@ virDomainDiskDefPars

Re: [libvirt] [PATCH] conf:Fix a copy paste error

2013-07-26 Thread Martin Kletzander
On 07/26/2013 11:19 AM, Alex Jia wrote: > Signed-off-by: Alex Jia > --- > src/conf/domain_conf.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c > index 10cb7f6..0e74039 100644 > --- a/src/conf/domain_conf.c > +++ b/src/con

[libvirt] [PATCH] formatdomain.html.in: Correctly use in #elementQoS

2013-07-26 Thread Michal Privoznik
Interestingly, we had floor ... outbound which results in much larger block of text to be written in code style that intended. --- docs/formatdomain.html.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index 7601aaa..

[libvirt] [PATCH] formatdomain.html.in: Document implementation limitation of QoS

2013-07-26 Thread Michal Privoznik
The outbound/@peak is ignored (since QoS was introduced). This is due to kernel limitation of know allowing ingress filters to have peak just average rate. However, we should document this limitation to not confuse users. --- docs/formatdomain.html.in | 4 +++- 1 file changed, 3 insertions(+), 1 d

Re: [libvirt] [PATCH] conf:Fix a copy paste error

2013-07-26 Thread Michal Privoznik
On 26.07.2013 11:19, Alex Jia wrote: > Signed-off-by: Alex Jia > --- > src/conf/domain_conf.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c > index 10cb7f6..0e74039 100644 > --- a/src/conf/domain_conf.c > +++ b/src/conf/d

Re: [libvirt] [PATCH] formatdomain.html.in: Correctly use in #elementQoS

2013-07-26 Thread Martin Kletzander
On 07/26/2013 11:46 AM, Michal Privoznik wrote: > Interestingly, we had floor ... outbound which > results in much larger block of text to be written in code style that > intended. > --- > docs/formatdomain.html.in | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/docs/

Re: [libvirt] [PATCH] formatdomain.html.in: Document implementation limitation of QoS

2013-07-26 Thread Martin Kletzander
On 07/26/2013 11:46 AM, Michal Privoznik wrote: > The outbound/@peak is ignored (since QoS was introduced). This is due to > kernel limitation of know allowing ingress filters to have peak just > average rate. However, we should document this limitation to not confuse > users. > --- > docs/formatd

Re: [libvirt] [PATCH] conf:Fix a copy paste error

2013-07-26 Thread Martin Kletzander
On Fri 26 Jul 2013 11:50:17 AM CEST, Michal Privoznik wrote: > On 26.07.2013 11:19, Alex Jia wrote: >> Signed-off-by: Alex Jia >> --- >> src/conf/domain_conf.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c >> index 10cb

[libvirt] [PATCH 0/4] Fix a pair of crashes in DNS XML parsing

2013-07-26 Thread Ján Tomko
*** BLUAAARRRGHB HERE *** Ján Tomko (4): Set the number of elements to 0 in virNetwork*Clear Don't check validity of missing attributes in DNS SRV XML Remove double space in error messages Remove redundant free in virNetworkDNSHostDefParseXML src/conf/network_conf.c | 14 +-

[libvirt] [PATCH 1/4] Set the number of elements to 0 in virNetwork*Clear

2013-07-26 Thread Ján Tomko
Leaving it at -1 causes invalid free in virNetworkDefUpdateDNSHost if virNetworkDNSHostDefParseXML fails and virNetworkDNSHostDefClear gets called twice. --- src/conf/network_conf.c | 4 1 file changed, 4 insertions(+) diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c index d616

[libvirt] [PATCH 4/4] Remove redundant free in virNetworkDNSHostDefParseXML

2013-07-26 Thread Ján Tomko
ip has to be NULL at this point. --- src/conf/network_conf.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c index 2561c35..2040d26 100644 --- a/src/conf/network_conf.c +++ b/src/conf/network_conf.c @@ -859,7 +859,6 @@ virNetworkDNSHostDefParseX

[libvirt] [PATCH 3/4] Remove double space in error messages

2013-07-26 Thread Ján Tomko
--- src/conf/network_conf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c index 5faac92..2561c35 100644 --- a/src/conf/network_conf.c +++ b/src/conf/network_conf.c @@ -920,7 +920,7 @@ virNetworkDNSSrvDefParseXML(const char

[libvirt] [PATCH 2/4] Don't check validity of missing attributes in DNS SRV XML

2013-07-26 Thread Ján Tomko
This fixes a crash if one of them is missing. https://bugzilla.redhat.com/show_bug.cgi?id=988718 --- src/conf/network_conf.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c index e3e0e89..5faac92 100644 --- a/src/conf/netw

Re: [libvirt] Use flock() instead of fcntl()

2013-07-26 Thread David Weber
Am Freitag, 26. Juli 2013, 10:14:59 schrieb Daniel P. Berrange: > On Fri, Jul 26, 2013 at 10:44:24AM +0200, David Weber wrote: > > > Looking again at flock() I see it cannot support locking of ranges, only > > > the entire file. This makes it unsuitable as a replacement for libvirt's > > > use of f

Re: [libvirt] Use flock() instead of fcntl()

2013-07-26 Thread Daniel P. Berrange
On Fri, Jul 26, 2013 at 12:31:35PM +0200, David Weber wrote: > Am Freitag, 26. Juli 2013, 10:14:59 schrieb Daniel P. Berrange: > > On Fri, Jul 26, 2013 at 10:44:24AM +0200, David Weber wrote: > > > > Looking again at flock() I see it cannot support locking of ranges, only > > > > the entire file. T

Re: [libvirt] [PATCH 1/4] Set the number of elements to 0 in virNetwork*Clear

2013-07-26 Thread Michal Privoznik
On 26.07.2013 12:28, Ján Tomko wrote: > Leaving it at -1 causes invalid free in virNetworkDefUpdateDNSHost > if virNetworkDNSHostDefParseXML fails and virNetworkDNSHostDefClear > gets called twice. > --- > src/conf/network_conf.c | 4 > 1 file changed, 4 insertions(+) > > diff --git a/src/co

Re: [libvirt] [PATCH 3/4] Remove double space in error messages

2013-07-26 Thread Michal Privoznik
On 26.07.2013 12:28, Ján Tomko wrote: > --- > src/conf/network_conf.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c > index 5faac92..2561c35 100644 > --- a/src/conf/network_conf.c > +++ b/src/conf/network_conf.c > @@

Re: [libvirt] [PATCH 2/4] Don't check validity of missing attributes in DNS SRV XML

2013-07-26 Thread Michal Privoznik
On 26.07.2013 12:28, Ján Tomko wrote: > This fixes a crash if one of them is missing. > > https://bugzilla.redhat.com/show_bug.cgi?id=988718 > --- > src/conf/network_conf.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/src/conf/network_conf.c b/src/conf/network_co

Re: [libvirt] [PATCH 4/4] Remove redundant free in virNetworkDNSHostDefParseXML

2013-07-26 Thread Michal Privoznik
On 26.07.2013 12:28, Ján Tomko wrote: > ip has to be NULL at this point. > --- > src/conf/network_conf.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c > index 2561c35..2040d26 100644 > --- a/src/conf/network_conf.c > +++ b/src/conf/netwo

[libvirt] [PATCH v2] Set the number of elements 0 in virNetwork*Clear

2013-07-26 Thread Ján Tomko
Decrementing it when it was already 0 causes an invalid free in virNetworkDefUpdateDNSHost if virNetworkDNSHostDefParseXML fails and virNetworkDNSHostDefClear gets called twice. virNetworkForwardDefClear left the number untouched even if it freed all the elements. --- src/conf/network_conf.c | 21

Re: [libvirt] [PATCH v2] Set the number of elements 0 in virNetwork*Clear

2013-07-26 Thread Michal Privoznik
On 26.07.2013 12:54, Ján Tomko wrote: > Decrementing it when it was already 0 causes an invalid free > in virNetworkDefUpdateDNSHost if virNetworkDNSHostDefParseXML > fails and virNetworkDNSHostDefClear gets called twice. > > virNetworkForwardDefClear left the number untouched even if it > freed a

Re: [libvirt] [PATCH 4/4] Add inputpool to storagevolxml2argvtest

2013-07-26 Thread John Ferlan
<...snip...?>> diff --git a/tests/storagevolxml2argvtest.c b/tests/storagevolxml2argvtest.c > index b220994..3c338ce 100644 > --- a/tests/storagevolxml2argvtest.c > +++ b/tests/storagevolxml2argvtest.c > @@ -11,10 +11,32 @@ > > const char create_tool[] = "qemu-img"; > > +/* createVol sets this

Re: [libvirt] [PATCH v2] Set the number of elements 0 in virNetwork*Clear

2013-07-26 Thread Ján Tomko
On 07/26/2013 01:00 PM, Michal Privoznik wrote: > On 26.07.2013 12:54, Ján Tomko wrote: >> Decrementing it when it was already 0 causes an invalid free >> in virNetworkDefUpdateDNSHost if virNetworkDNSHostDefParseXML >> fails and virNetworkDNSHostDefClear gets called twice. >> >> virNetworkForwardD

Re: [libvirt] [PATCH 0/4] Fix a pair of crashes in DNS XML parsing

2013-07-26 Thread Daniel P. Berrange
On Fri, Jul 26, 2013 at 12:28:20PM +0200, Ján Tomko wrote: > *** BLUAAARRRGHB HERE *** > > Ján Tomko (4): > Set the number of elements to 0 in virNetwork*Clear > Don't check validity of missing attributes in DNS SRV XML > Remove double space in error messages > Remove redundant free in vir

[libvirt] [PATCH] Resolve Coverity complaint in storagevolxml2argvtest

2013-07-26 Thread Ján Tomko
Ignore NULL pool in testSetVolumeType to silence Coverity, even though we only call it with NULL pool when vol is also NULL. (13) Event var_deref_model: Passing null pointer "inputpool" to function "testSetVolumeType(virStorageVolDefPtr, virStoragePoolDefPtr)", which dereferences it. [details]

Re: [libvirt] [PATCH] virt-login-shell joins users into lxc container.

2013-07-26 Thread Daniel J Walsh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I can't seem to get the error reporting to turn on, what am I doing wrong., if (virInitialize() < 0) { fprintf(stderr, _("Failed to initialize libvirt")); return EXIT_FAILURE; } if (virErrorInitialize() < 0) { fpri

Re: [libvirt] [PATCH] virt-login-shell joins users into lxc container.

2013-07-26 Thread Daniel P. Berrange
On Fri, Jul 26, 2013 at 07:38:31AM -0400, Daniel J Walsh wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > I can't seem to get the error reporting to turn on, what am I doing wrong., > > if (virInitialize() < 0) { > fprintf(stderr, _("Failed to initialize libvirt")); >

Re: [libvirt] [PATCH] Resolve Coverity complaint in storagevolxml2argvtest

2013-07-26 Thread John Ferlan
On 07/26/2013 07:27 AM, Ján Tomko wrote: > Ignore NULL pool in testSetVolumeType to silence Coverity, > even though we only call it with NULL pool when vol is also NULL. > > (13) Event var_deref_model: Passing null pointer "inputpool" to > function "testSetVolumeType(virStorageVolDefPtr, virStor

Re: [libvirt] Entering freeze for libvirt-1.1.1

2013-07-26 Thread Daniel Veillard
On Fri, Jul 26, 2013 at 06:01:23AM -0400, Alex Jia wrote: > Hello Daniel, > I gave a basic try for libvirt-1.1.1-rc1 on RHEL6. > > [root@202 libvirt-1.1.1]# make > > Notes, sometimes, I can meet the following errors, it's not reproducible each > time, > maybe, it's a network issue. > > > > I/

[libvirt] [PATCH v2 0/2] Split driver StateAutoStart from StateInitialization

2013-07-26 Thread John Ferlan
This is an update to change the 'int' AutoStart function to 'void' as was discussed in the initial review: https://www.redhat.com/archives/libvir-list/2013-July/msg01674.html John Ferlan (2): Separate out StateAutoStart from StateInitialize virStateDriver - Separate AutoStart from Initialize

[libvirt] [PATCH v2 2/2] virStateDriver - Separate AutoStart from Initialize

2013-07-26 Thread John Ferlan
Adjust these drivers to handle their Autostart functionality after each of the drivers has gone through their Initialization functions --- src/libxl/libxl_driver.c | 16 +--- src/lxc/lxc_driver.c | 16 ++-- src/network/bridge_driver.c | 18 +- s

[libvirt] [PATCH v2 1/2] Separate out StateAutoStart from StateInitialize

2013-07-26 Thread John Ferlan
Separation allows for dependent drivers to be make a connection during the AutoStart phase of state initialization. --- src/driver.h | 4 src/libvirt.c | 14 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/driver.h b/src/driver.h index cc03e9f..be64333 1006

Re: [libvirt] [PATCH 0/4] Fix a pair of crashes in DNS XML parsing

2013-07-26 Thread Ján Tomko
On 07/26/2013 01:18 PM, Daniel P. Berrange wrote: > On Fri, Jul 26, 2013 at 12:28:20PM +0200, Ján Tomko wrote: >> Ján Tomko (4): >> Set the number of elements to 0 in virNetwork*Clear >> Don't check validity of missing attributes in DNS SRV XML >> Remove double space in error messages >> Re

Re: [libvirt] [PATCH] Resolve Coverity complaint in storagevolxml2argvtest

2013-07-26 Thread Ján Tomko
On 07/26/2013 01:42 PM, John Ferlan wrote: > On 07/26/2013 07:27 AM, Ján Tomko wrote: >> Ignore NULL pool in testSetVolumeType to silence Coverity, >> even though we only call it with NULL pool when vol is also NULL. >> >> (13) Event var_deref_model: Passing null pointer "inputpool" to >> function

Re: [libvirt] [PATCH] build: avoid -lgcrypt with newer gnutls

2013-07-26 Thread Daniel P. Berrange
On Thu, Jul 25, 2013 at 04:13:28PM -0600, Eric Blake wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=951637 > > Newer gnutls uses nettle, rather than gcrypt, which is a lot nicer > regarding initialization. Yet we were unconditionally initializing > gcrypt even when gnutls wouldn't be using

Re: [libvirt] [PATCH] build: avoid -lgcrypt with newer gnutls

2013-07-26 Thread Daniel P. Berrange
On Fri, Jul 26, 2013 at 01:26:56PM +0100, Daniel P. Berrange wrote: > On Thu, Jul 25, 2013 at 04:13:28PM -0600, Eric Blake wrote: > > https://bugzilla.redhat.com/show_bug.cgi?id=951637 > > > > Newer gnutls uses nettle, rather than gcrypt, which is a lot nicer > > regarding initialization. Yet we

Re: [libvirt] [PATCH 0/2] Split driver StateAutoStart from StateInitialization

2013-07-26 Thread Daniel Veillard
On Fri, Jul 26, 2013 at 09:19:48AM +0200, Michal Privoznik wrote: > On 25.07.2013 20:37, Daniel P. Berrange wrote: > > On Thu, Jul 25, 2013 at 02:32:55PM -0400, John Ferlan wrote: > >> The post push review/comments for the chap authentication determined that > >> trying to connect to qemu driver fr

[libvirt] [PATCH v2 0/3] ensure diskchain is not broken on guest bootup

2013-07-26 Thread Guannan Ren
v1->v2: Add a helper function qemuDiskChainCheckBroken to check diskchain after invoking qemuDomainDetermineDiskChain() This patchset try to check whether the diskchain is broken or not when domain boot up. If dischain is broken, report like: virsh start rhel6qcow2 error: Failed to start

[libvirt] [PATCH v2 1/3] qemu: refactor qemuDomainCheckDiskPresence for only disk presence check

2013-07-26 Thread Guannan Ren
Refactor this function to make it focus on disk presence checking, including diskchain checking, and not only for CDROM and Floppy. This change is good for the following patches. --- src/qemu/qemu_domain.c | 98 +- 1 file changed, 58 insertions(+), 4

[libvirt] [PATCH v2 3/3] qemu: check presence of each disk and its backing file as well

2013-07-26 Thread Guannan Ren
For disk with startupPolicy support, such as cdrom and floppy when its chain is broken, the startup policy will apply, otherwise, report an error on chain issue. --- src/qemu/qemu_domain.c | 21 - src/qemu/qemu_process.c | 6 -- 2 files changed, 12 insertions(+), 15 delet

[libvirt] [PATCH v2 2/3] qemu: add helper functions for diskchain checking

2013-07-26 Thread Guannan Ren
*src/util/virstoragefile.c: Add a helper function to get the first name of missing backing files, if the name is NULL, it means the diskchain is not broken. *src/qemu/qemu_domain.c: qemuDiskChainCheckBroken(disk) to check if its chain is broken --- src/libvirt_private.syms | 1 + src/qemu/qemu_d

Re: [libvirt] [Qemu-devel] [PATCH 4/7] qemu: Add monitor APIs to fetch CPUID data from QEMU

2013-07-26 Thread Andreas Färber
Am 25.07.2013 20:02, schrieb Eduardo Habkost: > On Thu, Jul 25, 2013 at 04:09:18PM +0200, Andreas Färber wrote: >> Am 25.07.2013 16:00, schrieb Eduardo Habkost: >>> libvirt >>> needs a way to find out how exactly "-machine foo-1.0 -cpu bar" looks >>> different from "-machine foo-1.1 -cpu bar", >> >

Re: [libvirt] [PATCH] build: avoid -lgcrypt with newer gnutls

2013-07-26 Thread Eric Blake
On 07/26/2013 06:29 AM, Daniel P. Berrange wrote: >>> This should probably go in for 1.1.1, but it's not a build-breaker >>> so it needs review. Glad I waited for a review. >> >> Not sure this approach to finding libgnutls.so is going to work >> reliably. eg, we allow --with-gnutls=/some/dir to

Re: [libvirt] [PATCH 2/4] qemu: report error if disk backing files doesn't exist

2013-07-26 Thread Guannan Ren
On 07/25/2013 10:17 PM, Martin Kletzander wrote: On 07/18/2013 01:32 PM, Guannan Ren wrote: s/doesn't/don't/ in $SUBJ Adding virFileAccessibleAs() to check if the backing file described in disk meta exist in real path. If not, report error. The uid and gid arguments don't take effect on F_OK m

[libvirt] [v2 PATCH] caps: use -device for primary video when qemu >=1.6

2013-07-26 Thread Guannan Ren
https://bugzilla.redhat.com/show_bug.cgi?id=981094 The commit 0ad9025ef introduce qemu flag QEMU_CAPS_DEVICE_VIDEO_PRIMARY for using -device VGA, -device cirrus-vga, -device vmware-svga and -device qxl-vga. In use, for -device qxl-vga, mouse doesn't display in guest window like the desciption in ab

Re: [libvirt] [Qemu-devel] [PATCH 4/7] qemu: Add monitor APIs to fetch CPUID data from QEMU

2013-07-26 Thread Eduardo Habkost
On Fri, Jul 26, 2013 at 02:31:24PM +0200, Andreas Färber wrote: > Am 25.07.2013 20:02, schrieb Eduardo Habkost: > > On Thu, Jul 25, 2013 at 04:09:18PM +0200, Andreas Färber wrote: > >> Am 25.07.2013 16:00, schrieb Eduardo Habkost: > >>> libvirt > >>> needs a way to find out how exactly "-machine fo

Re: [libvirt] [PATCH v2 0/2] Split driver StateAutoStart from StateInitialization

2013-07-26 Thread John Ferlan
On 07/26/2013 07:50 AM, John Ferlan wrote: > This is an update to change the 'int' AutoStart function to 'void' as > was discussed in the initial review: > > https://www.redhat.com/archives/libvir-list/2013-July/msg01674.html > > John Ferlan (2): > Separate out StateAutoStart from StateInitiali

Re: [libvirt] [v2 PATCH] caps: use -device for primary video when qemu >=1.6

2013-07-26 Thread Eric Blake
On 07/26/2013 06:53 AM, Guannan Ren wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=981094 > The commit 0ad9025ef introduce qemu flag QEMU_CAPS_DEVICE_VIDEO_PRIMARY > for using -device VGA, -device cirrus-vga, -device vmware-svga and > -device qxl-vga. In use, for -device qxl-vga, mouse doesn'

[libvirt] memory leak in snapshot and since at least 1.0.2?

2013-07-26 Thread Serge Hallyn
Hi, https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1201938 documents a memory leak we're seeing in libvirt. I've reproduced it in 1.0.2, 1.0.6, and an hourly snapshot from yesterday morning (which is built at https://launchpad.net/~serge-hallyn/+archive/libvirt-mav) To reproduce it, I de

[libvirt] [PATCH] Set default partition in libvirtd instead of libvirt_lxc

2013-07-26 Thread Daniel P. Berrange
From: "Daniel P. Berrange" By setting the default partition in libvirt_lxc it is not visible when querying the live XML. Move setting of the default partition into libvirtd virLXCProcessStart Signed-off-by: Daniel P. Berrange --- src/lxc/lxc_cgroup.c | 14 -- src/lxc/lxc_process.c

[libvirt] [PATCH 4/4] Enable support for systemd-machined in cgroups creation

2013-07-26 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Make the virCgroupNewMachine method try to use systemd-machined first. If that fails, then fallback to using the traditional cgroup setup code path. Signed-off-by: Daniel P. Berrange --- src/lxc/lxc_process.c | 10 +-- src/qemu/qemu_cgroup.c | 1 + src/util/vircg

[libvirt] [PATCH 0/4] Support for integrating cgroups with systemd

2013-07-26 Thread Daniel P. Berrange
From: "Daniel P. Berrange" This is a much changed / expanded version of my previous work to create cgroups via systemd. The difference is that this time it actually works :-) I'm not proposing this for merge until after the 1.1.1 release. Daniel P. Berrange (4): Add APIs for formatting system

[libvirt] [PATCH 1/4] Add APIs for formatting systemd slice/scope names

2013-07-26 Thread Daniel P. Berrange
From: "Daniel P. Berrange" There are some interesting escaping rules to consider when dealing with systemd slice/scope names. Thus it is helpful to have APIs for formatting names Signed-off-by: Daniel P. Berrange --- src/libvirt_private.syms | 2 ++ src/util/virsystemd.c| 91 +

[libvirt] [PATCH 3/4] Cope with races while killing processes

2013-07-26 Thread Daniel P. Berrange
From: "Daniel P. Berrange" When systemd is involved in managing processes, it may start killing off & tearing down croups associated with the process while we're still doing virCgroupKillPainfully. We must explicitly check for ENOENT and treat it as if we had finished killing processes Signed-of

[libvirt] [PATCH 2/4] Add support for systemd cgroup mount

2013-07-26 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Systemd uses a named cgroup mount for tracking processes. Add it as another type of controller, albeit one which we have to special case in a number of places. In particular we must never create/delete directories there, nor add tasks. Essentially the systemd mount is t

Re: [libvirt] [PATCH] Set default partition in libvirtd instead of libvirt_lxc

2013-07-26 Thread Eric Blake
On 07/26/2013 09:47 AM, Daniel P. Berrange wrote: > From: "Daniel P. Berrange" > > By setting the default partition in libvirt_lxc it is not > visible when querying the live XML. Move setting of the > default partition into libvirtd virLXCProcessStart > > Signed-off-by: Daniel P. Berrange > ---

Re: [libvirt] memory leak in snapshot and since at least 1.0.2?

2013-07-26 Thread Serge Hallyn
Quoting Serge Hallyn (serge.hal...@ubuntu.com): > Hi, > > https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1201938 documents > a memory leak we're seeing in libvirt. I've reproduced it in 1.0.2, > 1.0.6, and an hourly snapshot from yesterday morning (which is built > at https://launchpad.ne

Re: [libvirt] [v2 PATCH] caps: use -device for primary video when qemu >=1.6

2013-07-26 Thread Doug Goldstein
On Fri, Jul 26, 2013 at 10:17 AM, Eric Blake wrote: > On 07/26/2013 06:53 AM, Guannan Ren wrote: >> https://bugzilla.redhat.com/show_bug.cgi?id=981094 >> The commit 0ad9025ef introduce qemu flag QEMU_CAPS_DEVICE_VIDEO_PRIMARY >> for using -device VGA, -device cirrus-vga, -device vmware-svga and >>

Re: [libvirt] Use flock() instead of fcntl()

2013-07-26 Thread Jim Fehlig
Daniel P. Berrange wrote: > On Thu, Jul 25, 2013 at 12:07:44PM +0200, David Weber wrote: > >> SUSE advises to use indirect leases which we also want to avoid: >> https://www.suse.com/documentation//sled11/book_kvm/?page=/documentation//sled11/book_kvm/data/sec_libvirt_storage_locking.html >> >>

Re: [libvirt] [PATCH] virt-login-shell joins users into lxc container.

2013-07-26 Thread Daniel J Walsh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 07/26/2013 07:40 AM, Daniel P. Berrange wrote: > On Fri, Jul 26, 2013 at 07:38:31AM -0400, Daniel J Walsh wrote: >> -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 >> >> I can't seem to get the error reporting to turn on, what am I doing >> wrong., >

Re: [libvirt] [PATCH V5] add console support in libxl

2013-07-26 Thread Jim Fehlig
Bamvor Jian Zhang wrote: > this patch introduce the console api in libxl driver for both pv and > hvm guest. and import and update the libxlMakeChrdevStr function > which was deleted in commit dfa1e1dd. > ACK, looks good to me now. Unless there are other review comments, I'll commit this once

[libvirt] [PATCH] Fix probing of legacy Xen driver to not leave URI set

2013-07-26 Thread Daniel P. Berrange
From: "Daniel P. Berrange" When the legacy Xen driver probes with a NULL URI, and finds itself running on Xen, it will set conn->uri. A little bit later though it checks to see if libxl support exists, and if so declines the driver. This leaves the conn->uri set to 'xen:///', so if libxl also dec

[libvirt] [PATCH 1/3] qemu: handle new 'setup' migration state

2013-07-26 Thread mrhines
From: "Michael R. Hines" Previously, QEMU's 'setup' state was no a formal state in their state machine, but it is now. This state is used by RDMA to optionally perform memory pinning. This state is now exposed over the monitor and also measured in the migration info status. This patch consumes b

[libvirt] [PATCH 0/3] qemu: libvirt RDMA live migration support

2013-07-26 Thread mrhines
From: "Michael R. Hines" QEMU has in tree now planned for 1.6 support for RDMA-based live migration. Changes to libvirt: 1. QEMU has a new 'setup' phase in their state machine. 2. Expose the 'x-rdma' migration protocol URI. 3. Expose the 'x-rdma-pin-all' capability for pre-registration of memory

[libvirt] [PATCH 3/3] qemu: memory pre-pinning support for RDMA migration

2013-07-26 Thread mrhines
From: "Michael R. Hines" RDMA Live migration requires registering memory with the hardware, and thus QEMU offers a new 'capability' which supports the ability to pre-register / mlock() the guest memory in advance for higher RDMA performance before the migration begins. This patch exposes this ca

[libvirt] [PATCH 2/3] qemu: RDMA migration support using 'x-rdma' URI

2013-07-26 Thread mrhines
From: "Michael R. Hines" QEMU has in tree now for version 1.6 support for RDMA Live migration. Full documenation of the feature: http://wiki.qemu.org/Features/RDMALiveMigration This patch includes mainly making all the locations in libvirt where the 'tcp' string was hard-coded to be more flexib

Re: [libvirt] [PATCH 0/3] qemu: libvirt RDMA live migration support

2013-07-26 Thread Eric Blake
On 07/26/2013 11:47 AM, mrhi...@linux.vnet.ibm.com wrote: > From: "Michael R. Hines" > > QEMU has in tree now planned for 1.6 support for RDMA-based live migration. > > Changes to libvirt: > 1. QEMU has a new 'setup' phase in their state machine. > 2. Expose the 'x-rdma' migration protocol URI.

Re: [libvirt] [PATCH 1/3] qemu: handle new 'setup' migration state

2013-07-26 Thread Jiri Denemark
On Fri, Jul 26, 2013 at 13:47:43 -0400, mrhi...@linux.vnet.ibm.com wrote: > From: "Michael R. Hines" > > Previously, QEMU's 'setup' state was no a formal state in their > state machine, but it is now. This state is used by RDMA to optionally > perform memory pinning. This state is now exposed ove

Re: [libvirt] [PATCH 0/3] qemu: libvirt RDMA live migration support

2013-07-26 Thread Michael R. Hines
On 07/26/2013 02:16 PM, Eric Blake wrote: On 07/26/2013 11:47 AM, mrhi...@linux.vnet.ibm.com wrote: From: "Michael R. Hines" QEMU has in tree now planned for 1.6 support for RDMA-based live migration. Changes to libvirt: 1. QEMU has a new 'setup' phase in their state machine. 2. Expose the 'x

Re: [libvirt] [PATCH 2/3] qemu: RDMA migration support using 'x-rdma' URI

2013-07-26 Thread Jiri Denemark
On Fri, Jul 26, 2013 at 13:47:44 -0400, mrhi...@linux.vnet.ibm.com wrote: > From: "Michael R. Hines" > > QEMU has in tree now for version 1.6 support for RDMA Live migration. > Full documenation of the feature: > http://wiki.qemu.org/Features/RDMALiveMigration > > This patch includes mainly mak

Re: [libvirt] [PATCH 1/3] qemu: handle new 'setup' migration state

2013-07-26 Thread Eric Blake
On 07/26/2013 11:47 AM, mrhi...@linux.vnet.ibm.com wrote: > From: "Michael R. Hines" > > Previously, QEMU's 'setup' state was no a formal state in their > state machine, but it is now. This state is used by RDMA to optionally > perform memory pinning. This state is now exposed over the monitor >

Re: [libvirt] [PATCH 1/3] qemu: handle new 'setup' migration state

2013-07-26 Thread Michael R. Hines
On 07/26/2013 02:17 PM, Jiri Denemark wrote: On Fri, Jul 26, 2013 at 13:47:43 -0400, mrhi...@linux.vnet.ibm.com wrote: From: "Michael R. Hines" Previously, QEMU's 'setup' state was no a formal state in their state machine, but it is now. This state is used by RDMA to optionally perform memory

Re: [libvirt] [PATCH 2/3] qemu: RDMA migration support using 'x-rdma' URI

2013-07-26 Thread Michael R. Hines
On 07/26/2013 02:27 PM, Jiri Denemark wrote: On Fri, Jul 26, 2013 at 13:47:44 -0400, mrhi...@linux.vnet.ibm.com wrote: From: "Michael R. Hines" QEMU has in tree now for version 1.6 support for RDMA Live migration. Full documenation of the feature: http://wiki.qemu.org/Features/RDMALiveMigrati

Re: [libvirt] [PATCH 1/3] qemu: handle new 'setup' migration state

2013-07-26 Thread Michael R. Hines
On 07/26/2013 02:32 PM, Eric Blake wrote: On 07/26/2013 11:47 AM, mrhi...@linux.vnet.ibm.com wrote: From: "Michael R. Hines" Previously, QEMU's 'setup' state was no a formal state in their state machine, but it is now. This state is used by RDMA to optionally perform memory pinning. This state

Re: [libvirt] [PATCH 2/3] qemu: RDMA migration support using 'x-rdma' URI

2013-07-26 Thread Eric Blake
On 07/26/2013 12:48 PM, Michael R. Hines wrote: >>> int ret = -1; >>> +if (qemuCaps->version >= MIN_X_RDMA_VERSION) { >>> +virQEMUCapsSet(qemuCaps, QEMU_CAPS_MIGRATE_QEMU_X_RDMA); >>> +} >>> + >>> if (!(archstr = qemuMonitorGetTargetArch(mon))) >>> return -1

Re: [libvirt] [PATCH] Fix probing of legacy Xen driver to not leave URI set

2013-07-26 Thread Eric Blake
On 07/26/2013 10:30 AM, Daniel P. Berrange wrote: > From: "Daniel P. Berrange" > > When the legacy Xen driver probes with a NULL URI, and > finds itself running on Xen, it will set conn->uri. A > little bit later though it checks to see if libxl support > exists, and if so declines the driver. Th

Re: [libvirt] [PATCH 2/3] qemu: RDMA migration support using 'x-rdma' URI

2013-07-26 Thread Michael R. Hines
On 07/26/2013 02:56 PM, Eric Blake wrote: On 07/26/2013 12:48 PM, Michael R. Hines wrote: int ret = -1; +if (qemuCaps->version >= MIN_X_RDMA_VERSION) { +virQEMUCapsSet(qemuCaps, QEMU_CAPS_MIGRATE_QEMU_X_RDMA); +} + if (!(archstr = qemuMonitorGetTargetArch(mon)))

[libvirt] [PATCHv2] build: avoid -lgcrypt with newer gnutls

2013-07-26 Thread Eric Blake
https://bugzilla.redhat.com/show_bug.cgi?id=951637 Newer gnutls uses nettle, rather than gcrypt, which is a lot nicer regarding initialization. Yet we were unconditionally initializing gcrypt even when gnutls wouldn't be using it, and having two crypto libraries linked into libvirt.so is pointles

Re: [libvirt] [PATCH v2] RPC: Don't accept client if it would overcommit max_clients

2013-07-26 Thread Eric Blake
On 07/26/2013 01:13 AM, Michal Privoznik wrote: > Currently, even if max_client limit is hit, we accept() incoming > connection request, but close it immediately. This has disadvantage of > not using listen() queue. We should accept() only those clients we > know we can serve and let all other wait

[libvirt] [PATCH] build: avoid uninitialized use warning

2013-07-26 Thread Eric Blake
Otherwise, with new enough gcc compiling at -O2, the build fails with: ../../src/conf/domain_conf.c: In function ‘virDomainDeviceDefPostParse’: ../../src/conf/domain_conf.c:2821:29: error: ‘cnt’ may be used uninitialized in this function [-Werror=maybe-uninitialized] for (i = 0; i < *

Re: [libvirt] [PATCHv2] build: avoid -lgcrypt with newer gnutls

2013-07-26 Thread Doug Goldstein
On Fri, Jul 26, 2013 at 5:04 PM, Eric Blake wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=951637 > > Newer gnutls uses nettle, rather than gcrypt, which is a lot nicer > regarding initialization. Yet we were unconditionally initializing > gcrypt even when gnutls wouldn't be using it, and h

Re: [libvirt] [PATCHv2] build: avoid -lgcrypt with newer gnutls

2013-07-26 Thread Eric Blake
On 07/26/2013 07:22 PM, Doug Goldstein wrote: > It appears it was an optional cutover and I guess Gentoo made the > plunge. Another idea, that you might hate would be to use pkg-config > directly and pass --static so we can get the private libraries. I'm > not running Fedora 19 yet so the best I ca