[libvirt] [PATCH v2]lxc: don't mount dir if ownership couldn't be known

2013-11-13 Thread Chen Hanxiao
From: Chen Hanxiao chenhanx...@cn.fujitsu.com If we enable userns, we could bind mount some dirs from host to guest, which don't belong to the target mapped uid/gid. Such as we could bind mount root's dirs to guest. What is worse, we could even modify root's files in that bind dir inside

Re: [libvirt] [PATCH v2]lxc: don't mount dir if ownership couldn't be known

2013-11-13 Thread Gao feng
On 11/13/2013 04:51 PM, Chen Hanxiao wrote: From: Chen Hanxiao chenhanx...@cn.fujitsu.com If we enable userns, we could bind mount some dirs from host to guest, which don't belong to the target mapped uid/gid. Such as we could bind mount root's dirs to guest. What is worse, we could even

Re: [libvirt] [PATCH] LXC: make sure fuse thread start to run before we do clone

2013-11-13 Thread Gao feng
On 11/08/2013 01:30 PM, Daniel P. Berrange wrote: On Thu, Nov 07, 2013 at 09:15:43PM +0800, Gao feng wrote: I met a problem that container blocked by seteuid/setegid which is call in lxcContainerSetID on UP system and libvirt compiled with --with-fuse=yes. I looked into the glibc's codes,

Re: [libvirt] [PATCH v2]virsh: track alias option and improve error message when option duplicates its alias

2013-11-13 Thread Peter Krempa
On 10/31/13 01:18, Chen Hanxiao wrote: From: Chen Hanxiao chenhanx...@cn.fujitsu.com commit 2b172a8effa712aee97a21a64d2d02060958f9b2 allow alias to expand to opt=value pair. That means alias may not look alike since then. With this patch we will also track alias. If we type command with

Re: [libvirt] [PATCH] storage: fix RNG validation of gluster via netfs

2013-11-13 Thread Peter Krempa
On 11/13/13 00:45, Eric Blake wrote: While trying to compare netfs against my new gluster pool, I discovered two things: virt-xml-validate chokes on valid xml produced by 'virsh pool-dumpxml' [yet another reason that ALL patches that add new xml should be adding corresponding tests] When

Re: [libvirt] [PATCHv3] Disable nwfilter driver when running unprivileged

2013-11-13 Thread Ján Tomko
On 11/12/2013 03:36 PM, Daniel P. Berrange wrote: On Tue, Nov 12, 2013 at 01:52:10PM +0100, Ján Tomko wrote: When opening a new connection to the driver, nwfilterOpen only succeeds if the driverState has been allocated. Move the privilege check in driver initialization before the state

Re: [libvirt] [PATCH] spec: fix libvirt-docs subpackage on RHEL

2013-11-13 Thread Daniel P. Berrange
On Wed, Nov 13, 2013 at 12:02:08PM +1100, Michael Chapman wrote: RHEL's rpmbuild wipes the docdir for a (sub-)package if any %doc directives are present, prior to copying in the marked documentation. This means we can't prepopulate this directory with the HTML documentation during the %install

Re: [libvirt] [PATCH v2]lxc: don't mount dir if ownership couldn't be known

2013-11-13 Thread Daniel P. Berrange
On Wed, Nov 13, 2013 at 04:51:43PM +0800, Chen Hanxiao wrote: From: Chen Hanxiao chenhanx...@cn.fujitsu.com If we enable userns, we could bind mount some dirs from host to guest, which don't belong to the target mapped uid/gid. Such as we could bind mount root's dirs to guest. What is

[libvirt] [PATCH] snapshot: conf: Fix NULL dereference when driver element is empty

2013-11-13 Thread Peter Krempa
Consider the following valid snapshot XML as the driver element is allowed to be empty in the domainsnapshot.rng schema: $ cat snap.xml domainsnapshot disks disk name='vda' snapshot='external' source file='/tmp/foo'/ driver/ /disk /disks /domainsnapshot produces the

Re: [libvirt] [PATCH] spec: fix libvirt-docs subpackage on RHEL

2013-11-13 Thread Michael Chapman
On Wed, 13 Nov 2013, Daniel P. Berrange wrote: On Wed, Nov 13, 2013 at 12:02:08PM +1100, Michael Chapman wrote: RHEL's rpmbuild wipes the docdir for a (sub-)package if any %doc directives are present, prior to copying in the marked documentation. This means we can't prepopulate this directory

Re: [libvirt] [PATCH] snapshot: conf: Fix NULL dereference when driver element is empty

2013-11-13 Thread Daniel P. Berrange
On Wed, Nov 13, 2013 at 12:07:43PM +0100, Peter Krempa wrote: Consider the following valid snapshot XML as the driver element is allowed to be empty in the domainsnapshot.rng schema: $ cat snap.xml domainsnapshot disks disk name='vda' snapshot='external' source

Re: [libvirt] [PATCH 0/4] Fix up rest of the list APIs to correct format

2013-11-13 Thread Laine Stump
On 11/12/2013 06:48 PM, Peter Krempa wrote: Peter Krempa (4): virsh-pool: Unify spacing of listing function virsh-nwfilter: Unify list command column alignment virsh-interface: Unify list column alignment virsh-secret: Unify list column alignment tools/virsh-interface.c | 6 +++---

Re: [libvirt] [PATCH] snapshot: conf: Fix NULL dereference when driver element is empty

2013-11-13 Thread Peter Krempa
On 11/13/13 12:18, Daniel P. Berrange wrote: On Wed, Nov 13, 2013 at 12:07:43PM +0100, Peter Krempa wrote: Consider the following valid snapshot XML as the driver element is allowed to be empty in the domainsnapshot.rng schema: $ cat snap.xml domainsnapshot disks disk name='vda'

Re: [libvirt] [PATCH] snapshot: conf: Fix NULL dereference when driver element is empty

2013-11-13 Thread Daniel P. Berrange
On Wed, Nov 13, 2013 at 11:18:01AM +, Daniel P. Berrange wrote: On Wed, Nov 13, 2013 at 12:07:43PM +0100, Peter Krempa wrote: Consider the following valid snapshot XML as the driver element is allowed to be empty in the domainsnapshot.rng schema: $ cat snap.xml domainsnapshot

Re: [libvirt] [PATCH 0/4] Fix up rest of the list APIs to correct format

2013-11-13 Thread Peter Krempa
On 11/13/13 12:22, Laine Stump wrote: On 11/12/2013 06:48 PM, Peter Krempa wrote: Peter Krempa (4): virsh-pool: Unify spacing of listing function virsh-nwfilter: Unify list command column alignment virsh-interface: Unify list column alignment virsh-secret: Unify list column alignment

Re: [libvirt] [PATCH] RFC: Support QEMU live uprgade

2013-11-13 Thread Eric Blake
On 11/13/2013 12:42 AM, Zheng Sheng ZS Zhou wrote: As I wrote in previous mails. I find domian UUID very important in libvirt. It causes a lot of troubles if we start the destination domain with the same UUID. Actually I did try to hack libvirt to do this but wasn't successful. Unfortunately,

Re: [libvirt] [PATCH] RFC: Support QEMU live uprgade

2013-11-13 Thread Daniel P. Berrange
On Wed, Nov 13, 2013 at 05:56:44AM -0700, Eric Blake wrote: On 11/13/2013 12:42 AM, Zheng Sheng ZS Zhou wrote: As I wrote in previous mails. I find domian UUID very important in libvirt. It causes a lot of troubles if we start the destination domain with the same UUID. Actually I did try to

Re: [libvirt] [PATCH] RFC: Support QEMU live uprgade

2013-11-13 Thread Daniel P. Berrange
On Wed, Nov 13, 2013 at 12:15:30PM +0800, Zheng Sheng ZS Zhou wrote: Hi Daniel, on 2013/11/12/ 20:23, Daniel P. Berrange wrote: On Tue, Nov 12, 2013 at 08:14:11PM +0800, Zheng Sheng ZS Zhou wrote: Hi all, Recently QEMU developers are working on a feature to allow upgrading a live

Re: [libvirt] [PATCH] RFC: Support QEMU live uprgade

2013-11-13 Thread Daniel P. Berrange
On Tue, Nov 12, 2013 at 09:54:44PM -0700, Eric Blake wrote: On 11/12/2013 05:14 AM, Zheng Sheng ZS Zhou wrote: From 2b659584f2cbe676c843ddeaf198c9a8368ff0ff Mon Sep 17 00:00:00 2001 From: Zhou Zheng Sheng zhshz...@linux.vnet.ibm.com Date: Wed, 30 Oct 2013 15:36:49 +0800 Subject: [PATCH]

Re: [libvirt] [PATCH v2]virsh: track alias option and improve error message when option duplicates its alias

2013-11-13 Thread Eric Blake
On 10/30/2013 06:18 PM, Chen Hanxiao wrote: From: Chen Hanxiao chenhanx...@cn.fujitsu.com commit 2b172a8effa712aee97a21a64d2d02060958f9b2 allow alias to expand to opt=value pair. That means alias may not look alike since then. With this patch we will also track alias. If we type command

[libvirt] libvirt-python on windows

2013-11-13 Thread yao xu
Hello guys! These days I have met a problem . As you know , libvirt-python on windows can compiled with cygwin environment . But in my environment, I want to make it possible to run libvirt-python in native windows environment . Is it possible ? Anyone tried it ? --

Re: [libvirt] [PATCH] LXC: make sure fuse thread start to run before we do clone

2013-11-13 Thread Daniel P. Berrange
On Fri, Nov 08, 2013 at 02:42:26PM -0500, Rich Felker wrote: On Fri, Nov 08, 2013 at 01:30:09PM +0800, Daniel P. Berrange wrote: On Thu, Nov 07, 2013 at 09:15:43PM +0800, Gao feng wrote: I met a problem that container blocked by seteuid/setegid which is call in lxcContainerSetID on UP

Re: [libvirt] [PATCH v2 0/2] Report an error in virPortAllocatorAcquire if all ports are used

2013-11-13 Thread Ján Tomko
On 10/31/2013 01:07 PM, Ján Tomko wrote: v1: Properly check the return value of virPortAllocatorAcquire https://www.redhat.com/archives/libvir-list/2013-October/msg01239.html v2: Moves the error reporting inside virPortAllocatorAcquire Ján Tomko (2): Add a name to virPortAllocator

Re: [libvirt] [PATCH 2/2] Return -1 in virPortAllocatorAcquire if all ports are used

2013-11-13 Thread Daniel P. Berrange
On Thu, Oct 31, 2013 at 01:07:27PM +0100, Ján Tomko wrote: Report the error in virPortAllocatorAcquire instead of doing it in every caller. The error contains the port range name instead of the intended use for the port, e.g.: Unable to find an unused port in range 'display' (65534-65535)

Re: [libvirt] [PATCH libvirt-python 00/14] Split the python binding out

2013-11-13 Thread Doug Goldstein
On Tue, Nov 12, 2013 at 9:09 PM, Daniel Veillard veill...@redhat.com wrote: On Tue, Nov 12, 2013 at 06:21:43PM +, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com This patch series is a followup to

Re: [libvirt] [PATCH 1/2] Add a name to virPortAllocator

2013-11-13 Thread Daniel P. Berrange
On Thu, Oct 31, 2013 at 01:07:26PM +0100, Ján Tomko wrote: This allows its error messages to be more specific. --- src/libxl/libxl_driver.c | 3 ++- src/qemu/qemu_driver.c | 9 ++--- src/util/virportallocator.c | 9 +++-- src/util/virportallocator.h | 3 ++-

Re: [libvirt] [PATCH 2/2] Return -1 in virPortAllocatorAcquire if all ports are used

2013-11-13 Thread Ján Tomko
On 11/13/2013 05:39 PM, Daniel P. Berrange wrote: On Thu, Oct 31, 2013 at 01:07:27PM +0100, Ján Tomko wrote: Report the error in virPortAllocatorAcquire instead of doing it in every caller. The error contains the port range name instead of the intended use for the port, e.g.: Unable to find

Re: [libvirt] [PATCH 2/2] Return -1 in virPortAllocatorAcquire if all ports are used

2013-11-13 Thread Daniel P. Berrange
On Wed, Nov 13, 2013 at 05:48:28PM +0100, Ján Tomko wrote: On 11/13/2013 05:39 PM, Daniel P. Berrange wrote: On Thu, Oct 31, 2013 at 01:07:27PM +0100, Ján Tomko wrote: Report the error in virPortAllocatorAcquire instead of doing it in every caller. The error contains the port range name

Re: [libvirt] [PATCH libvirt-python 00/14] Split the python binding out

2013-11-13 Thread Daniel P. Berrange
On Wed, Nov 13, 2013 at 10:45:01AM -0600, Doug Goldstein wrote: On Tue, Nov 12, 2013 at 9:09 PM, Daniel Veillard veill...@redhat.com wrote: On Tue, Nov 12, 2013 at 06:21:43PM +, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com This patch series is a followup to

[libvirt] [PATCH] Macro for testing the version you are compiling with

2013-11-13 Thread Doug Goldstein
Added a macro similar to the Linux kernel's KERNEL_VERSION so that you can simply do something like: #if LIBVIR_VERSION(1,1,3) = LIBVIR_VERSION_NUMBER /* Call function here that appeared in 1.1.3 and newer */ virSomeNewFunction(); #endif --- include/libvirt/libvirt.h.in | 10 ++

Re: [libvirt] [PATCH] Macro for testing the version you are compiling with

2013-11-13 Thread Daniel P. Berrange
On Wed, Nov 13, 2013 at 10:59:14AM -0600, Doug Goldstein wrote: Added a macro similar to the Linux kernel's KERNEL_VERSION so that you can simply do something like: #if LIBVIR_VERSION(1,1,3) = LIBVIR_VERSION_NUMBER /* Call function here that appeared in 1.1.3 and newer */

Re: [libvirt] [PATCH libvirt-python 00/14] Split the python binding out

2013-11-13 Thread Guido Günther
On Tue, Nov 12, 2013 at 06:21:43PM +, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com This patch series is a followup to https://www.redhat.com/archives/libvir-list/2013-September/msg00413.html I do like this much more than the version from September since it

[libvirt] [PATCHv3 1/3] Don't release spice port twice when no TLS port is available

2013-11-13 Thread Ján Tomko
Introduced by 7b4a630. --- src/qemu/qemu_process.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index e34f542..1365b59 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -3431,7 +3431,6 @@

Re: [libvirt] [PATCH libvirt-python 04/14] Import STREQ macro from libvirt

2013-11-13 Thread Eric Blake
On 11/12/2013 11:21 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Signed-off-by: Daniel P. Berrange berra...@redhat.com --- libvirt-override.c | 1 + libvirt-utils.h| 27 +++ 2 files changed, 28 insertions(+) create mode 100644

[libvirt] [PATCHv3 2/3] Add a name to virPortAllocator

2013-11-13 Thread Ján Tomko
This allows its error messages to be more specific. --- src/libxl/libxl_driver.c | 3 ++- src/qemu/qemu_driver.c | 9 ++--- src/util/virportallocator.c | 9 +++-- src/util/virportallocator.h | 3 ++- tests/virportallocatortest.c | 4 ++-- 5 files changed, 19 insertions(+), 9

[libvirt] [PATCHv3 3/3] Return -1 in virPortAllocatorAcquire if all ports are used

2013-11-13 Thread Ján Tomko
Report the error in virPortAllocatorAcquire instead of doing it in every caller. The error contains the port range name instead of the intended use for the port, e.g.: Unable to find an unused port in range 'display' (65534-65535) instead of: Unable to find an unused port for SPICE This also

[libvirt] [PATCHv3 0/3] Report an error in virPortAllocatorAcquire if all ports are used

2013-11-13 Thread Ján Tomko
v1: Properly check the return value of virPortAllocatorAcquire https://www.redhat.com/archives/libvir-list/2013-October/msg01239.html v2: Moves the error reporting inside virPortAllocatorAcquire https://www.redhat.com/archives/libvir-list/2013-October/msg01289.html v3: Make the names

Re: [libvirt] [PATCH libvirt-python 09/14] Import VIR_ALLOC / VIR_ALLOC_N / VIR_REALLOC_N functions

2013-11-13 Thread Eric Blake
On 11/12/2013 11:21 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Import the libvirt memory allocation functions, stripping the OOM testing and error reporting pieces. Signed-off-by: Daniel P. Berrange berra...@redhat.com --- -if

Re: [libvirt] [PATCH libvirt-python 13/14] Add execute permission for sanitytest.py

2013-11-13 Thread Eric Blake
On 11/12/2013 11:21 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Signed-off-by: Daniel P. Berrange berra...@redhat.com --- sanitytest.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 = 100755 sanitytest.py So trivial; is it worth

Re: [libvirt] [PATCH libvirt-python 14/14] Setup distutils buld system

2013-11-13 Thread Eric Blake
On 11/12/2013 11:21 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Create a setup.py for building libvirt python code and add supporting files Signed-off-by: Daniel P. Berrange berra...@redhat.com --- +++ b/NEWS @@ -0,0 +1,9 @@ + Libvirt Python News +

Re: [libvirt] [PATCH] Macro for testing the version you are compiling with

2013-11-13 Thread Doug Goldstein
On Wed, Nov 13, 2013 at 11:03 AM, Daniel P. Berrange berra...@redhat.com wrote: On Wed, Nov 13, 2013 at 10:59:14AM -0600, Doug Goldstein wrote: Added a macro similar to the Linux kernel's KERNEL_VERSION so that you can simply do something like: #if LIBVIR_VERSION(1,1,3) =

[libvirt] [PATCHv2] Macro for testing the version you are compiling with

2013-11-13 Thread Doug Goldstein
Added a macro similar to the GLib's GLIB_CHECK_VERSION so that one can simplydo something like: #if LIBVIRT_CHECK_VERSION(1,1,3) /* Call function here that appeared in 1.1.3 and newer */ virSomeNewFunction(); #endif --- include/libvirt/libvirt.h.in | 14 ++ 1 file changed, 14

Re: [libvirt] [PATCH] LXC: make sure fuse thread start to run before we do clone

2013-11-13 Thread Rich Felker
On Wed, Nov 13, 2013 at 02:53:05PM +, Daniel P. Berrange wrote: On Fri, Nov 08, 2013 at 02:42:26PM -0500, Rich Felker wrote: On Fri, Nov 08, 2013 at 01:30:09PM +0800, Daniel P. Berrange wrote: On Thu, Nov 07, 2013 at 09:15:43PM +0800, Gao feng wrote: I met a problem that container

Re: [libvirt] [PATCHv2] Macro for testing the version you are compiling with

2013-11-13 Thread Eric Blake
On 11/13/2013 11:02 AM, Doug Goldstein wrote: Added a macro similar to the GLib's GLIB_CHECK_VERSION so that one can simplydo something like: s/simplydo/simply do/ #if LIBVIRT_CHECK_VERSION(1,1,3) /* Call function here that appeared in 1.1.3 and newer */ virSomeNewFunction();

Re: [libvirt] [PATCH] LXC: make sure fuse thread start to run before we do clone

2013-11-13 Thread Eric Blake
On 11/13/2013 11:16 AM, Rich Felker wrote: We are not using clone() in a manner that is strictly equivalent to fork(). Libvirt is using clone() to create Linux containers with new namespaces. eg we do

Re: [libvirt] [PATCH] storage: fix RNG validation of gluster via netfs

2013-11-13 Thread Eric Blake
On 11/13/2013 03:21 AM, Peter Krempa wrote: * docs/storage.html.in: Improve documentation. * docs/schemas/storagepool.rng (sourcefmtnetfs): Allow all formats, and drop redundant info-vendor. * tests/storagepoolxml2xmltest.c (mymain): New test. *

Re: [libvirt] [PATCHv2] Macro for testing the version you are compiling with

2013-11-13 Thread Doug Goldstein
On Wed, Nov 13, 2013 at 12:26 PM, Eric Blake ebl...@redhat.com wrote: On 11/13/2013 11:02 AM, Doug Goldstein wrote: Added a macro similar to the GLib's GLIB_CHECK_VERSION so that one can simplydo something like: s/simplydo/simply do/ #if LIBVIRT_CHECK_VERSION(1,1,3) /* Call function

Re: [libvirt] [PATCH libvirt-python 00/14] Split the python binding out

2013-11-13 Thread Eric Blake
On 11/12/2013 11:21 AM, Daniel P. Berrange wrote: I created a simple autobuild.sh to do an end-to-end build, including the RPM generation. Or you can just do python setup.py build ('make' equiv) python setup.py test('make check' equiv) python setup.py rpm ('make rpm'

Re: [libvirt] [PATCH v2] virsh domxml-from-native to treat SCSI as the bus type for pseries by default

2013-11-13 Thread Shivaprasad bhat
Hi Jan, Cole, Could you please reviewing my patch ? Thanks, Shiva On Wed, Oct 30, 2013 at 1:37 PM, Shivaprasad bhat shivaprasadb...@gmail.com wrote: Hi, Could someone please help reviewing the patch ? Thanks and Regards, Shiva On Mon, Oct 28, 2013 at 2:50 PM, Shivaprasad G Bhat

Re: [libvirt] [PATCH v2] virsh domxml-from-native to treat SCSI as the bus type for pseries by default

2013-11-13 Thread Cole Robinson
On 11/13/2013 04:31 PM, Shivaprasad bhat wrote: Hi Jan, Cole, Could you please reviewing my patch ? Thanks, Shiva I'd recommend adding a test case that demonstrates what exactly this is changing. - Cole On Wed, Oct 30, 2013 at 1:37 PM, Shivaprasad bhat shivaprasadb...@gmail.com

Re: [libvirt] [PATCH libvirt-python 00/14] Split the python binding out

2013-11-13 Thread Doug Goldstein
On Tue, Nov 12, 2013 at 12:21 PM, Daniel P. Berrange berra...@redhat.com wrote: From: Daniel P. Berrange berra...@redhat.com This patch series is a followup to https://www.redhat.com/archives/libvir-list/2013-September/msg00413.html to split the python binding out into a separate GIT

Re: [libvirt] [PATCH v2]virsh: track alias option and improve error message when option duplicates its alias

2013-11-13 Thread Chen Hanxiao
-Original Message- From: Peter Krempa [mailto:pkre...@redhat.com] Sent: Wednesday, November 13, 2013 5:49 PM To: Chen Hanxiao; libvir-list@redhat.com Subject: Re: [libvirt] [PATCH v2]virsh: track alias option and improve error message when option duplicates its alias On 10/31/13

Re: [libvirt] [PATCH v2]virsh: track alias option and improve error message when option duplicates its alias

2013-11-13 Thread Chen Hanxiao
-Original Message- From: Eric Blake [mailto:ebl...@redhat.com] Sent: Wednesday, November 13, 2013 9:14 PM To: Chen Hanxiao; libvir-list@redhat.com Subject: Re: [libvirt] [PATCH v2]virsh: track alias option and improve error message when option duplicates its alias In addition to

Re: [libvirt] [PATCH] LXC: make sure fuse thread start to run before we do clone

2013-11-13 Thread Gao feng
On 11/13/2013 10:53 PM, Daniel P. Berrange wrote: On Fri, Nov 08, 2013 at 02:42:26PM -0500, Rich Felker wrote: On Fri, Nov 08, 2013 at 01:30:09PM +0800, Daniel P. Berrange wrote: On Thu, Nov 07, 2013 at 09:15:43PM +0800, Gao feng wrote: I met a problem that container blocked by seteuid/setegid

[libvirt] [PATCH] LXC: do setxid before lxc controller creates fuse thread

2013-11-13 Thread Gao feng
I met a problem that container blocked by seteuid/setegid which is call in lxcContainerSetID on UP system and libvirt compiled with --with-fuse=yes. I looked into the glibc's codes, and found setxid in glibc calls futex() to wait for other threads to change their setxid_futex to 0(see