Re: [libvirt] [PATCH v4 1/2] src/Makefile: move the new xen_xl_disk parser code at the correct place

2015-01-08 Thread Jim Fehlig
Eric Blake wrote: On 01/08/2015 06:20 AM, Pavel Hrdina wrote: Signed-off-by: Pavel Hrdina phrd...@redhat.com --- src/Makefile.am | 34 +- 1 file changed, 17 insertions(+), 17 deletions(-) if WITH_XENCONFIG +AM_LFLAGS = -Pxl_disk_

Re: [libvirt] [PATCH] lxc: Stop mouning /proc and /sys read only

2015-01-08 Thread Chen, Hanxiao
-Original Message- From: Daniel P. Berrange [mailto:berra...@redhat.com] Sent: Thursday, January 08, 2015 9:03 PM To: libvir-list@redhat.com Cc: Richard Weinberger; Chen, Hanxiao/陈 晗霄; Daniel P. Berrange Subject: [PATCH] lxc: Stop mouning /proc and /sys read only Mounting parts

Re: [libvirt] [PATCH] maint: in makefiles, $(top_srcdir)/src is verbose

2015-01-08 Thread Eric Blake
On 01/08/2015 02:25 AM, Michal Privoznik wrote: On 08.01.2015 01:07, Eric Blake wrote: I noticed this while working on the previous commit. Why should we be calling out '../src/' when it is sufficient to refer to just './'? Blind copy-and-paste runs rampant in this file :) *

Re: [libvirt] [PATCH v4 2/2] src/Makefile: Fix parallel build after xen_xl_disk parser introduction

2015-01-08 Thread Eric Blake
On 01/08/2015 06:46 AM, Pavel Hrdina wrote: On 01/08/2015 02:31 PM, Daniel P. Berrange wrote: On Thu, Jan 08, 2015 at 02:20:25PM +0100, Pavel Hrdina wrote: Well, the parallel build doesn't work as there are not dependencies set correctly. When running 'make -j' I see this error: make[2]:

Re: [libvirt] [PATCH v4 1/2] src/Makefile: move the new xen_xl_disk parser code at the correct place

2015-01-08 Thread Eric Blake
On 01/08/2015 06:20 AM, Pavel Hrdina wrote: Signed-off-by: Pavel Hrdina phrd...@redhat.com --- src/Makefile.am | 34 +- 1 file changed, 17 insertions(+), 17 deletions(-) if WITH_XENCONFIG +AM_LFLAGS = -Pxl_disk_ --header-file=../$*.h Uggh. Not your

[libvirt] [PATCH] lxc: Cleaning up mount setup

2015-01-08 Thread Daniel P. Berrange
We have historically done a number of things with LXC that are somewhat questionable in retrospect 1. Mounted /proc/sys read-only, but then mounted /proc/sys/net/ipv* read-write again 2. Mounted /sys read only 3. Mount /sys/fs/cgroup/NNN/the/guest/dir to /sys/fs/cgroup/NNN 4. FUSE mount

[libvirt] [PATCH] lxc: Stop mouning /proc and /sys read only

2015-01-08 Thread Daniel P. Berrange
Mounting parts of /proc and /sys read only provides no security without user namespaces, since root has privilege to remount them writable again. When user namepaces are enable, if offers no security benefit, since the UID remapping already prevents write access to the correct areas. ---

Re: [libvirt] [PATCH] maint: in makefiles, $(top_srcdir)/src is verbose

2015-01-08 Thread Michal Privoznik
On 08.01.2015 01:07, Eric Blake wrote: I noticed this while working on the previous commit. Why should we be calling out '../src/' when it is sufficient to refer to just './'? Blind copy-and-paste runs rampant in this file :) * src/Makefile.am (INCLUDES, *_CFLAGS): Shorten to $(srcdir).

Re: [libvirt] Error starting domain: internal error: missing IFLA_VF_INFO in netlink response

2015-01-08 Thread hong-hua....@freescale.com
Hi Laine, Sorry to disturb you. It seemed this issue had been fixed in libvirt-1.2.2/libnl-3.2.22/linux-3.12. But we still got the error on PowerPC platform. I'll appreciate if you could give any suggestion. We are not sure if any netlink implementation in kernel space is missed. The scenario

[libvirt] [PATCH v4 1/2] src/Makefile: move the new xen_xl_disk parser code at the correct place

2015-01-08 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina phrd...@redhat.com --- src/Makefile.am | 34 +- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index f970d60..97253e0 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1000,23

[libvirt] [PATCH v4 2/2] src/Makefile: Fix parallel build after xen_xl_disk parser introduction

2015-01-08 Thread Pavel Hrdina
Well, the parallel build doesn't work as there are not dependencies set correctly. When running 'make -j' I see this error: make[2]: Entering directory '/home/zippy/work/libvirt/libvirt.git/src' GEN util/virkeymaps.h GEN locking/lock_protocol.h make[2]: *** No rule to make target

[libvirt] [PATCH v4 0/2] fix parallel build broken by the new xen_xl_disk parser

2015-01-08 Thread Pavel Hrdina
Pavel Hrdina (2): src/Makefile: move the new xen_xl_disk parser code at the correct place src/Makefile: Fix parallel build after xen_xl_disk parser introduction src/Makefile.am | 45 - 1 file changed, 28 insertions(+), 17 deletions(-) --

Re: [libvirt] [PATCH v4 1/2] src/Makefile: move the new xen_xl_disk parser code at the correct place

2015-01-08 Thread Daniel P. Berrange
On Thu, Jan 08, 2015 at 02:20:24PM +0100, Pavel Hrdina wrote: Signed-off-by: Pavel Hrdina phrd...@redhat.com --- src/Makefile.am | 34 +- 1 file changed, 17 insertions(+), 17 deletions(-) ACK, trivial Regards, Daniel -- |: http://berrange.com -o-

Re: [libvirt] [PATCH v4 2/2] src/Makefile: Fix parallel build after xen_xl_disk parser introduction

2015-01-08 Thread Daniel P. Berrange
On Thu, Jan 08, 2015 at 02:20:25PM +0100, Pavel Hrdina wrote: Well, the parallel build doesn't work as there are not dependencies set correctly. When running 'make -j' I see this error: make[2]: Entering directory '/home/zippy/work/libvirt/libvirt.git/src' GEN util/virkeymaps.h GEN

Re: [libvirt] [PATCH] lxc: Cleaning up mount setup

2015-01-08 Thread Richard Weinberger
Am 08.01.2015 um 14:02 schrieb Daniel P. Berrange: We have historically done a number of things with LXC that are somewhat questionable in retrospect 1. Mounted /proc/sys read-only, but then mounted /proc/sys/net/ipv* read-write again 2. Mounted /sys read only 3. Mount

Re: [libvirt] [PATCH v4 0/2] fix parallel build broken by the new xen_xl_disk parser

2015-01-08 Thread Pavel Hrdina
On 01/08/2015 02:20 PM, Pavel Hrdina wrote: Pavel Hrdina (2): src/Makefile: move the new xen_xl_disk parser code at the correct place src/Makefile: Fix parallel build after xen_xl_disk parser introduction src/Makefile.am | 45 - 1 file

Re: [libvirt] [PATCH] lxc: Cleaning up mount setup

2015-01-08 Thread Daniel P. Berrange
On Thu, Jan 08, 2015 at 02:36:36PM +0100, Richard Weinberger wrote: Am 08.01.2015 um 14:02 schrieb Daniel P. Berrange: We have historically done a number of things with LXC that are somewhat questionable in retrospect 1. Mounted /proc/sys read-only, but then mounted

Re: [libvirt] [PATCH v4 2/2] src/Makefile: Fix parallel build after xen_xl_disk parser introduction

2015-01-08 Thread Pavel Hrdina
On 01/08/2015 02:31 PM, Daniel P. Berrange wrote: On Thu, Jan 08, 2015 at 02:20:25PM +0100, Pavel Hrdina wrote: Well, the parallel build doesn't work as there are not dependencies set correctly. When running 'make -j' I see this error: make[2]: Entering directory

Re: [libvirt] [PATCH] lxc: Cleaning up mount setup

2015-01-08 Thread Richard Weinberger
Am 08.01.2015 um 14:45 schrieb Daniel P. Berrange: On Thu, Jan 08, 2015 at 02:36:36PM +0100, Richard Weinberger wrote: Am 08.01.2015 um 14:02 schrieb Daniel P. Berrange: We have historically done a number of things with LXC that are somewhat questionable in retrospect 1. Mounted /proc/sys

Re: [libvirt] [PATCH] lxc: Cleaning up mount setup

2015-01-08 Thread Daniel P. Berrange
On Thu, Jan 08, 2015 at 03:02:59PM +0100, Richard Weinberger wrote: Am 08.01.2015 um 14:45 schrieb Daniel P. Berrange: On Thu, Jan 08, 2015 at 02:36:36PM +0100, Richard Weinberger wrote: Am 08.01.2015 um 14:02 schrieb Daniel P. Berrange: We have historically done a number of things with LXC

Re: [libvirt] [PATCH] lxc: Cleaning up mount setup

2015-01-08 Thread Richard Weinberger
Am 08.01.2015 um 15:06 schrieb Daniel P. Berrange: On Thu, Jan 08, 2015 at 03:02:59PM +0100, Richard Weinberger wrote: Am 08.01.2015 um 14:45 schrieb Daniel P. Berrange: On Thu, Jan 08, 2015 at 02:36:36PM +0100, Richard Weinberger wrote: Am 08.01.2015 um 14:02 schrieb Daniel P. Berrange: We

Re: [libvirt] [PATCH] cpu: Bugfix for s390 CPU driver to return a host CPU model

2015-01-08 Thread Daniel Hansel
Hi Daniel, ... first ... a happy new year 2015 to all of you. I have seen that you have suggested at Openstack review of the s390x cpu model issue (link: https://review.openstack.org/#/c/137424/) to post a link to this Openstack review. Completed now. :-) It would be nice if my intermediate

Re: [libvirt] [PATCH v3] Makefile: Fix parallel build after Xen-xl parser introduction

2015-01-08 Thread Pavel Hrdina
On 01/08/2015 12:56 AM, Eric Blake wrote: On 01/07/2015 02:43 PM, Eric Blake wrote: CC xenconfig/libvirt_xenconfig_la-xen_xl.lo ../../src/xenconfig/xen_xl.c:29:25: fatal error: xen_xl_disk.h: No such file or directory #include xen_xl_disk.h ^ compilation

[libvirt] [libvirt-test-API][PATCH] Rewrite case for listAllInterfaces() API

2015-01-08 Thread jiahu
Using actual python API to validate test case, rather than use virsh iface-* command lines. --- cases/basic_interface.conf| 12 ++ repos/interface/iface_list.py | 299 -- 2 files changed, 99 insertions(+), 212 deletions(-) diff --git

Re: [libvirt] Error starting domain: internal error: missing IFLA_VF_INFO in netlink response

2015-01-08 Thread Laine Stump
On 01/08/2015 04:40 AM, hong-hua@freescale.com wrote: Hi Laine, Sorry to disturb you. It seemed this issue had been fixed in libvirt-1.2.2/libnl-3.2.22/linux-3.12. But we still got the error on PowerPC platform. I'll appreciate if you could give any suggestion. We are not sure if any

[libvirt] [PATCH v2 10/11] Add support for schema validation when passing in XML

2015-01-08 Thread Daniel P. Berrange
The virDomainDefineXMLFlags and virDomainCreateXML APIs both gain new flags allowing them to be told to validate XML. This updates all the drivers to turn on validation in the XML parser when the flags are set --- include/libvirt/libvirt-domain.h | 5 + src/bhyve/bhyve_driver.c | 16

[libvirt] [PATCH v2 11/11] virsh: enable domain XML validation by default

2015-01-08 Thread Daniel P. Berrange
The 'virsh define', 'virsh create' and 'virsh edit' commands get XML validation enabled by default, with a --skip-validate option to disable it. The quality of error reporting from libxml2 varies depending on the type of XML error made. Sometimes it is quite clear and useful, other times it is

[libvirt] [PATCH v2 00/11] Add schema validation for domain XML

2015-01-08 Thread Daniel P. Berrange
A followup to https://www.redhat.com/archives/libvir-list/2014-November/msg00607.html In this posting - Finished virsh integration for define, create edit commands - Support validation in all virt drivers - Fix misc bugs in changes to domain_conf flag handling The situation with libxml

[libvirt] [PATCH v2 08/11] Decouple CPU XML formatting from domain XML public API flags

2015-01-08 Thread Daniel P. Berrange
The virCPUDefFormat* methods were relying on the VIR_DOMAIN_XML_* flag definitions. It is not desirable for low level internal functions to be coupled to flags for the public API, since they may need to be called from several different contexts where the flags would not be appropriate. ---

[libvirt] [PATCH v2 01/11] Add new virDomainDefineXMLFlags public API

2015-01-08 Thread Daniel P. Berrange
The virDomainDefineXML method is one of the few that still lacks an 'unsigned int flags' parameter. This will be needed for adding XML validation to this API. virDomainCreateXML fortunately already has flags. --- include/libvirt/libvirt-domain.h | 4 src/driver-hypervisor.h | 5

[libvirt] [PATCH v2 06/11] Fix flags passed to virDomainDefParseString by XenAPI driver

2015-01-08 Thread Daniel P. Berrange
The XenAPI driver was passing the flags for virDomainCreateXML straight into the virDomainDefParseString method, even though they expect totally different sets of flags. It should have been using VIR_DOMAIN_XML_INACTIVE --- src/xenapi/xenapi_driver.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[libvirt] [PATCH v2 04/11] Don't use VIR_DOMAIN_XML_SECURE when parsing XML

2015-01-08 Thread Daniel P. Berrange
The VIR_DOMAIN_XML_SECURE flag only has effect on the formatting of XML so should not be passed to virDomainDefParseNode --- src/conf/snapshot_conf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/conf/snapshot_conf.c b/src/conf/snapshot_conf.c index 79cf124..d9339c3

[libvirt] [PATCH v2 03/11] Add virXMLValidateAgainstSchema helper method

2015-01-08 Thread Daniel P. Berrange
Add a helper method that can validate an XML document against an RNG schema --- include/libvirt/virterror.h | 1 + src/internal.h | 4 +++ src/libvirt_private.syms| 1 + src/util/virerror.c | 6 src/util/virxml.c | 74

[libvirt] [PATCH v2 05/11] Don't pass VIR_DOMAIN_XML_SECURE to virDomainDefParseString in phyp

2015-01-08 Thread Daniel P. Berrange
The phyp driver is passing the VIR_DOMAIN_XML_SECURE flag to virDomainDefParseString which is wrong, because that flag only has effect when formatting XML. --- src/phyp/phyp_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/phyp/phyp_driver.c

[libvirt] [PATCH v2 02/11] Add stub virDomainDefineXMLFlags impls

2015-01-08 Thread Daniel P. Berrange
Make sure every virt driver implements virDomainDefineXMLFlags by adding a trivial passthrough from the existing impl with no flags set. --- src/bhyve/bhyve_driver.c | 12 ++-- src/esx/esx_driver.c | 10 -- src/libxl/libxl_driver.c | 12 ++--

[libvirt] [PATCH v2 09/11] Give virDomainDef parser formatter their own flags

2015-01-08 Thread Daniel P. Berrange
The virDomainDefParse* and virDomainDefFormat* methods both accept the VIR_DOMAIN_XML_* flags defined in the public API, along with a set of other VIR_DOMAIN_XML_INTERNAL_* flags defined in domain_conf.c. This is seriously confusing error prone for a number of reasons: - VIR_DOMAIN_XML_SECURE,

[libvirt] [PATCH v2 07/11] parallels: don't override error message when XML parsing fails

2015-01-08 Thread Daniel P. Berrange
The virDomainDefParseString method will report a suitable error on parsing fail, so don't replace that. --- src/parallels/parallels_driver.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/parallels/parallels_driver.c b/src/parallels/parallels_driver.c index

[libvirt] [PATCH] bootstrap.conf: add check for flex

2015-01-08 Thread Pavel Hrdina
We need the flex to generate new xen_xl_disk parser. Signed-off-by: Pavel Hrdina phrd...@redhat.com --- Pushed under trivial rule. bootstrap.conf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bootstrap.conf b/bootstrap.conf index c06ee4c..22c1c06 100644 ---