Re: [libvirt] [PATCH] build: link virstoragetest with libxml

2014-06-25 Thread Martin Kletzander
On Mon, Jun 23, 2014 at 04:08:42PM +0200, Martin Kletzander wrote: Signed-off-by: Martin Kletzander --- Notes: To be honest, I have no idea why this fails for me in one situation, but it prevents the following error during compilation: /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.0/../../../

Re: [libvirt] [PATCH 0/6] Support for per-guest-node binding

2014-06-25 Thread chen.fan.f...@cn.fujitsu.com
On Thu, 2014-06-26 at 07:35 +0200, Martin Kletzander wrote: > On Thu, Jun 26, 2014 at 01:50:22AM +, chen.fan.f...@cn.fujitsu.com wrote: > >On Wed, 2014-06-04 at 16:56 +0200, Martin Kletzander wrote: > >> Currently we are only able to bind the whole domain to some host nodes > >> using the /dom

Re: [libvirt] [PATCH 0/6] Support for per-guest-node binding

2014-06-25 Thread Martin Kletzander
On Thu, Jun 26, 2014 at 01:50:22AM +, chen.fan.f...@cn.fujitsu.com wrote: On Wed, 2014-06-04 at 16:56 +0200, Martin Kletzander wrote: Currently we are only able to bind the whole domain to some host nodes using the /domain/numatune/memory element. Numerous requests were made to support host

Re: [libvirt] [PATCHv3 26/26] qemu: blockcopy: Don't remove existing disk mirror info

2014-06-25 Thread Eric Blake
On 06/25/2014 10:55 AM, Peter Krempa wrote: > When creating a new disk mirror the new struct is stored in a separate > variable until everything went well. The removed hunk would actually > remove existing mirror information for example when the api would be run > if a mirror still exists. > --- >

[libvirt] [PATCH v2] nwfilter: enum cleanups in "src/nwfilter/*"

2014-06-25 Thread Julio Faracco
As we are doing with the enum structures, a cleanup in "src/nwfilter/" directory was done now. All the enums that were defined in the header files were converted to typedefs in this directory. This patch includes all the adjustments to remove conflicts when you do this kind of change. "Enum-to-type

Re: [libvirt] [PATCHv3 22/26] util: storage: Add helper to determine whether storage is local

2014-06-25 Thread Eric Blake
On 06/25/2014 10:55 AM, Peter Krempa wrote: > There's a lot of places where we skip doing actions based on the > locality of given storage type. The usual pattern is to skip it if: > > virStorageSourceGetActualType(src) == VIR_STORAGE_TYPE_NETWORK > > Add a simple helper to simplify the pattern t

Re: [libvirt] broken api.xml file

2014-06-25 Thread Daniel Veillard
On Wed, Jun 25, 2014 at 07:36:41PM -0600, Eric Blake wrote: > On 06/25/2014 02:46 PM, Eric Blake wrote: > > Nehal discovered by accident that our libvirt-api.xml file is broken, > > which in turn leads to broken python bindings. > > > > > fix the root cause. It's not my area of expertise, so I'd

Re: [libvirt] [PATCHv3 14/26] locking: Add APIs to lock individual image files

2014-06-25 Thread Eric Blake
On 06/25/2014 10:54 AM, Peter Krempa wrote: > Add helper APIs to manage individual image files rather than disks. To > simplify the addition some parts of the code were refactored in this > patch. > --- > src/libvirt_private.syms | 2 ++ > src/locking/domain_lock.c | 65 > ++

[libvirt] Entering freeze for libvirt-1.2.6

2014-06-25 Thread Daniel Veillard
As stated yesterday, we just entered freeze for libvirt-1.2.6, I have pushed a first release candidate tarball and signed rpms at the usual place: ftp://libvirt.org/libvirt/ I gave it a try and with my limited testing it looks okay, but please have a look and test. The goal is to make the r

Re: [libvirt] [PATCHv3 13/26] qemu: cgroup: Setup only the top level disk image for read-write access

2014-06-25 Thread Eric Blake
On 06/25/2014 10:54 AM, Peter Krempa wrote: > Only the top level gets writes, so the rest of the backing chain > requires only read-only access. > --- > src/qemu/qemu_cgroup.c | 26 -- > 1 file changed, 20 insertions(+), 6 deletions(-) > ACK -- Eric Blake eblake redha

Re: [libvirt] [PATCHv3 12/26] qemu: cgroup: Add functions to set cgroup image stuff on individual imgs

2014-06-25 Thread Eric Blake
On 06/25/2014 10:54 AM, Peter Krempa wrote: > Add functions that will allow to set all the required cgroup stuff on > individual images taking a virStorageSourcePtr. Also convert functions > designed to setup whole backing chain to take advantage of the chagne. s/chagne/change/ > --- > src/qemu/

Re: [libvirt] [PATCH 0/6] Support for per-guest-node binding

2014-06-25 Thread chen.fan.f...@cn.fujitsu.com
On Wed, 2014-06-04 at 16:56 +0200, Martin Kletzander wrote: > Currently we are only able to bind the whole domain to some host nodes > using the /domain/numatune/memory element. Numerous requests were > made to support host<->guest numa node bindings, so this series tries > to pinch an idea on ho

Re: [libvirt] broken api.xml file

2014-06-25 Thread Eric Blake
On 06/25/2014 02:46 PM, Eric Blake wrote: > Nehal discovered by accident that our libvirt-api.xml file is broken, > which in turn leads to broken python bindings. > > fix the root cause. It's not my area of expertise, so I'd appreciate a > hand in finding the problem spot, although I'm still try

Re: [libvirt] [PATCHv3 11/26] util: cgroup: Add helper to convert device mode to string

2014-06-25 Thread Eric Blake
On 06/25/2014 10:54 AM, Peter Krempa wrote: > Cgroups code uses VIR_CGROUP_DEVICE_* flags to specify the mode but in > the end it needs to be converted to a string. Add a helper to do it and > use it in the cgroup code before introducing it into the rest of the > code. > --- > src/libvirt_private.

Re: [libvirt] [PATCH] domain conf: Fix whitespace around judgement operation when parsing 'managed' attribute.

2014-06-25 Thread chen.fan.f...@cn.fujitsu.com
On Wed, 2014-06-25 at 12:43 -0600, Eric Blake wrote: > On 06/25/2014 02:45 AM, Chen Fan wrote: > > Long subject line. Please try to fit subjects in 60 characters or less > (look at 'git shortlog -30' for a good example). > > > Signed-off-by: Chen Fan > > --- > > src/conf/domain_conf.c | 2 +-

Re: [libvirt] [PATCH V2] libxl: detect support for save and restore

2014-06-25 Thread Eric Blake
On 06/25/2014 06:09 PM, Jim Fehlig wrote: > libxl does not support save, restore, or migrate on all architectures, > notably ARM. Detect whether libxl supports these operations using > LIBXL_HAVE_NO_SUSPEND_RESUME. If not supported, drop advertisement of > . > > Found by Ian Campbell while impro

Re: [libvirt] [Xen-devel] [PATCH] libxl: detect support for save and restore

2014-06-25 Thread Jim Fehlig
Eric Blake wrote: > On 06/25/2014 12:13 PM, Jim Fehlig wrote: > >> libxl does not support save, restore, or migrate on all architectures, >> notably ARM. Detect whether libxl supports these operations using >> LIBXL_HAVE_NO_SUSPEND_RESUME. If not supported, drop advertisement of >> . >> >> Fou

[libvirt] [PATCH V2] libxl: detect support for save and restore

2014-06-25 Thread Jim Fehlig
libxl does not support save, restore, or migrate on all architectures, notably ARM. Detect whether libxl supports these operations using LIBXL_HAVE_NO_SUSPEND_RESUME. If not supported, drop advertisement of . Found by Ian Campbell while improving Xen's OSSTEST infrastructure http://lists.xen.or

Re: [libvirt] [PATCH] docs: publish correct enum values

2014-06-25 Thread Eric Blake
On 06/25/2014 03:09 PM, Eric Blake wrote: > We publish libvirt-api.xml for others to use, and in fact, the > libvirt-python bindings use it to generate enum values. However, > we had an off-by-one bug that any enum that relied on C's rules > for implicit initialization of the first enum member to

Re: [libvirt] [PATCHv3 10/26] util: storagefile: Add deep copy for struct virStorageSource

2014-06-25 Thread Eric Blake
On 06/25/2014 10:54 AM, Peter Krempa wrote: > Now that we have pointers to store disk source information and thus can > easily exchange the structs behind we need a function to copy all the > data. > --- > src/libvirt_private.syms | 1 + > src/util/virstoragefile.c | 143 >

Re: [libvirt] [PATCHv3 09/26] util: storagesource: Add helper to copy and free storage source seclabels

2014-06-25 Thread Eric Blake
On 06/25/2014 10:54 AM, Peter Krempa wrote: > They will be reused to transfer disk labels from snapshotted disks to > the new disk definitions. > --- > src/libvirt_private.syms | 1 + > src/util/virstoragefile.c | 45 ++--- > src/util/virstoragefile.h | 3

Re: [libvirt] [PATCH 0/2] Add support for reporting failure on incompatible CPUs

2014-06-25 Thread Jiri Denemark
On Wed, Jun 25, 2014 at 14:34:42 +0200, Jiri Denemark wrote: > When CPU virConnectCompareCPU returns VIR_CPU_COMPARE_INCOMPATIBLE, the > caller has no clue why the CPU is considered incompatible with host CPU. > And in some cases, it would be nice to be able to get such info in a > client rather th

[libvirt] [python PATCH] Implement new virNetworkGetDHCPLeases{ForMAC} APIs

2014-06-25 Thread Nehal J Wani
These APIs return a list of dhcp leases for all network interfaces connected to the given virtual network or limited output just for one interface if mac is specified. Example Output: [{'iface': 'virbr3', 'ipaddr': '192.168.150.181', 'hostname': 'ubuntu14', 'expirytime': 1403737495L, 'prefix':

Re: [libvirt] [PATCH] cpu: Cleanup coding style in generic CPU driver

2014-06-25 Thread Jiri Denemark
On Wed, Jun 25, 2014 at 14:21:18 +0200, Peter Krempa wrote: > On 06/25/14 14:15, Jiri Denemark wrote: > > Signed-off-by: Jiri Denemark > > --- > > src/cpu/cpu_generic.c | 19 --- > > 1 file changed, 8 insertions(+), 11 deletions(-) > > > > ACK, Thanks, pushed. Jirka -- libvir

Re: [libvirt] [PATCH] virsh: Remove bogus stat on log file

2014-06-25 Thread Jiri Denemark
On Wed, Jun 25, 2014 at 14:25:27 +0200, Peter Krempa wrote: > On 06/25/14 14:14, Jiri Denemark wrote: > > Let's just open the file right away and deal with errors. Moreover, > > there's no reason to forbid logging to, e.g., a pipe. > > > > Signed-off-by: Jiri Denemark > > --- > > tools/virsh.c |

Re: [libvirt] [PATCH] Remove redundant docs from libvirt.h

2014-06-25 Thread Jiri Denemark
On Wed, Jun 25, 2014 at 14:19:19 +0200, Peter Krempa wrote: > On 06/25/14 14:15, Jiri Denemark wrote: > > Only types and macros are documented in libvirt.h, APIs are documented > > in the *.c file they are implemented in. > > > > Signed-off-by: Jiri Denemark > > --- > > include/libvirt/libvirt.h

Re: [libvirt] [PATCHv3 08/26] storage: Move readonly and shared flags to disk source from disk def

2014-06-25 Thread Eric Blake
On 06/25/2014 10:54 AM, Peter Krempa wrote: > In the future we might need to track state of individual images. Move > the readonly and shared flags to the virStorageSource struct so that we > can keep them in a per-image basis. > --- My immediate reaction is that all backing files are generally re

Re: [libvirt] [PATCHv3 07/26] security: nop: Avoid very long lines

2014-06-25 Thread Eric Blake
On 06/25/2014 10:54 AM, Peter Krempa wrote: > The function headers contain type on the same line as the name. When > combined with usage of ATTRIBUTE_UNUSED, the function headers were very > long. Shorten them by breaking the line after the type. > --- > src/security/security_nop.c | 147 > ++

Re: [libvirt] [PATCHv3 06/26] security: Fix header formatting of a few functions

2014-06-25 Thread Eric Blake
On 06/25/2014 10:54 AM, Peter Krempa wrote: > Some of the functions in the storage driver had their headers formatted > incorrectly. > --- > src/security/security_driver.h | 6 +++--- > src/security/security_manager.h | 9 - > src/security/security_stack.c | 4 ++-- > 3 files changed, 9

Re: [libvirt] [PATCHv3 05/26] security: manager: Document behavior of disk label manipulation funcs

2014-06-25 Thread Eric Blake
On 06/25/2014 10:54 AM, Peter Krempa wrote: > virSecurityManagerSetDiskLabel and virSecurityManagerRestoreDiskLabel > don't have complementary semantics. Document the semantics to avoid > possible problems. > --- > src/security/security_manager.c | 22 ++ > 1 file changed, 22 i

Re: [libvirt] [PATCHv3 04/26] security: manager: Unify function header format

2014-06-25 Thread Eric Blake
On 06/25/2014 10:54 AM, Peter Krempa wrote: > --- > src/security/security_manager.c | 248 > +--- > 1 file changed, 157 insertions(+), 91 deletions(-) > ACK -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.o

Re: [libvirt] [PATCHv3 03/26] security: manager: Avoid forward decl of virSecurityManagerDispose

2014-06-25 Thread Eric Blake
On 06/25/2014 10:54 AM, Peter Krempa wrote: > --- > src/security/security_manager.c | 21 +++-- > 1 file changed, 11 insertions(+), 10 deletions(-) > ACK. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Des

[libvirt] [PATCH] docs: publish correct enum values

2014-06-25 Thread Eric Blake
We publish libvirt-api.xml for others to use, and in fact, the libvirt-python bindings use it to generate enum values. However, we had an off-by-one bug that any enum that relied on C's rules for implicit initialization of the first enum member to 0 got listed in the xml as having a value of 1 (an

[libvirt] broken api.xml file

2014-06-25 Thread Eric Blake
Nehal discovered by accident that our libvirt-api.xml file is broken, which in turn leads to broken python bindings. Right now, if you look at docs/libvirt-api.xml, you'll find: but if you look at the libvirt.h.in file, you see: typedef enum { VIR_IP_ADDR_TYPE_IPV4, VIR_IP_ADDR_TYP

Re: [libvirt] [PATCHv3 02/26] security: Rename virSecurityManagerRestoreImageLabel to *Disk*

2014-06-25 Thread Eric Blake
On 06/25/2014 10:54 AM, Peter Krempa wrote: > I'm going to add functions that will deal with individual image files > rather than whole disks. Rename the security function to make room for > the new one. > --- > src/libvirt_private.syms | 2 +- > src/qemu/qemu_driver.c | 4 ++--

Re: [libvirt] [PATCH] libxl: detect support for save and restore

2014-06-25 Thread Ian Campbell
On Wed, 2014-06-25 at 13:10 -0600, Eric Blake wrote: > On 06/25/2014 12:13 PM, Jim Fehlig wrote: > > libxl does not support save, restore, or migrate on all architectures, > > notably ARM. Detect whether libxl supports these operations using > > LIBXL_HAVE_NO_SUSPEND_RESUME. If not supported, dro

Re: [libvirt] [PATCHv5 18/19] qemu: Add support for networked disks for block commit

2014-06-25 Thread Eric Blake
On 06/25/2014 12:13 PM, Adam Litke wrote: > On 25/06/14 10:27 -0600, Eric Blake wrote: >> On 06/19/2014 07:59 AM, Peter Krempa wrote: >>> Now that we are able to select images from the backing chain via indexed >>> access we should also convert possible network sources to >>> qemu-compatible string

Re: [libvirt] [PATCH] libxl: detect support for save and restore

2014-06-25 Thread Eric Blake
On 06/25/2014 12:13 PM, Jim Fehlig wrote: > libxl does not support save, restore, or migrate on all architectures, > notably ARM. Detect whether libxl supports these operations using > LIBXL_HAVE_NO_SUSPEND_RESUME. If not supported, drop advertisement of > . > > Found by Ian Campbell while impro

Re: [libvirt] [PATCHv3 01/26] utils: s/virStorageSourceClearBackingStore/virStorageSourceBackingStoreClear

2014-06-25 Thread Eric Blake
On 06/25/2014 10:54 AM, Peter Krempa wrote: > Rename them to comply with the naming policy. > --- > src/libvirt_private.syms | 2 +- > src/qemu/qemu_domain.c| 2 +- > src/qemu/qemu_driver.c| 2 +- > src/util/virstoragefile.c | 6 +++--- > src/util/virstoragefile.h | 2 +- > 5 files change

Re: [libvirt] [PATCH 2/2] virConnectCompareCPU: Introduce FAIL_INCOMPATIBLE flag

2014-06-25 Thread Eric Blake
On 06/25/2014 06:34 AM, Jiri Denemark wrote: > The new VIR_CONNECT_COMPARE_CPU_FAIL_INCOMPATIBLE flag for > virConnectCompareCPU can be used to get an error > (VIR_ERR_CPU_INCOMPATIBLE) describing the incompatibility instead of the > usual VIR_CPU_COMPARE_INCOMPATIBLE return code. > > Signed-off-b

Re: [libvirt] [PATCH] cpu: Add new Broadwell CPU model

2014-06-25 Thread Eric Blake
On 06/25/2014 06:41 AM, Jiri Denemark wrote: > Signed-off-by: Jiri Denemark > --- > > Notes: > The corresponding patch [1] for QEMU is not usptream yet but nobody > seems to be complaining about that model. And chances are the patch gets > in before QEMU enters hard freeze for 2.1. So

Re: [libvirt] [PATCH 2/5] conf: Introduce viremulator_capabilities

2014-06-25 Thread Eric Blake
On 06/25/2014 12:42 AM, Michal Privoznik wrote: > On 24.06.2014 21:34, Eric Blake wrote: >> On 06/24/2014 03:39 AM, Daniel P. Berrange wrote: >> We also have a subelement of in the XML which is used for a similar thing although it doesn't support a per-machine-type output, on

Re: [libvirt] [PATCH] domain conf: Fix whitespace around judgement operation when parsing 'managed' attribute.

2014-06-25 Thread Eric Blake
On 06/25/2014 02:45 AM, Chen Fan wrote: Long subject line. Please try to fit subjects in 60 characters or less (look at 'git shortlog -30' for a good example). > Signed-off-by: Chen Fan > --- > src/conf/domain_conf.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) ACK and pushed, afte

Re: [libvirt] [Xen-devel] [PATCH RFC OSSTEST 7/9] Toolstack: Abstract away migration support check.

2014-06-25 Thread Jim Fehlig
Ian Campbell wrote: > On Wed, 2014-06-25 at 09:25 -0600, Jim Fehlig wrote: > >> With the fixup, does this work for you? Is omitted >> from the capabilities? >> > > Yes, it is omitted. On ARM: > > # virsh capabilities > > > > >

Re: [libvirt] [PATCHv5 19/19] qemu: Add support for networked disks for block pull/block rebase

2014-06-25 Thread Adam Litke
On 25/06/14 10:34 -0600, Eric Blake wrote: On 06/19/2014 07:59 AM, Peter Krempa wrote: Now that we are able to select images from the backing chain via indexed access we should also convert possible network sources to qemu-compatible strings before passing them to qemu. --- src/qemu/qemu_driver

Re: [libvirt] [PATCHv5 18/19] qemu: Add support for networked disks for block commit

2014-06-25 Thread Adam Litke
On 25/06/14 10:27 -0600, Eric Blake wrote: On 06/19/2014 07:59 AM, Peter Krempa wrote: Now that we are able to select images from the backing chain via indexed access we should also convert possible network sources to qemu-compatible strings before passing them to qemu. Eventually, we'll want

[libvirt] [PATCH] libxl: detect support for save and restore

2014-06-25 Thread Jim Fehlig
libxl does not support save, restore, or migrate on all architectures, notably ARM. Detect whether libxl supports these operations using LIBXL_HAVE_NO_SUSPEND_RESUME. If not supported, drop advertisement of . Found by Ian Campbell while improving Xen's OSSTEST infrastructure http://lists.xen.or

[libvirt] [PATCH 0/2] virtio serial address allocation

2014-06-25 Thread Ján Tomko
Ján Tomko (2): Add test for virtio serial port assignment Implement virtio serial address allocation src/conf/domain_addr.c | 426 + src/conf/domain_addr.h | 49 +++ src/conf/domain_conf.c

[libvirt] [PATCH 1/2] Add test for virtio serial port assignment

2014-06-25 Thread Ján Tomko
Add a test to demonstrate the effect of the next patch. --- .../qemuxml2argv-channel-virtio-autoassign.args| 20 + .../qemuxml2argv-channel-virtio-autoassign.xml | 50 ++ tests/qemuxml2argvtest.c | 2 + 3 files changed, 72 insertions(+

[libvirt] [RFC PATCH 2/2] Implement virtio serial address allocation

2014-06-25 Thread Ján Tomko
Over-engineered to allow non-contiguous indexes. Free ports of a controller are stored in a virBitmap. These bitmaps are stored in a hash table, indexed by the controller index formatted as a string. Buses are ignored for now, QEMU doesn't seem to support anything else than .0 For virtconsoles, a

Re: [libvirt] securityselinuxlabeltest test fails on v1.2.5

2014-06-25 Thread Eric Blake
On 06/25/2014 11:08 AM, Scott Sullivan wrote: > I am trying to build v1.2.5-maint, however I have one test failing > causing the build to fail: > > > TEST: securityselinuxlabeltest > !!!. 4 FAIL > Can you rerun this to give more details on the failure

Re: [libvirt] [python PATCH] maint: document development against uninstalled libvirt

2014-06-25 Thread Eric Blake
On 06/25/2014 10:59 AM, Peter Krempa wrote: > On 06/25/14 18:53, Eric Blake wrote: >> Thanks to Dan's recent work in libvirt.git, it is much easier to >> develop against uninstalled libvirt. Mention how. >> >> * README: More details. >> >> Signed-off-by: Eric Blake >> --- >> README | 15

[libvirt] securityselinuxlabeltest test fails on v1.2.5

2014-06-25 Thread Scott Sullivan
I am trying to build v1.2.5-maint, however I have one test failing causing the build to fail: TEST: securityselinuxlabeltest !!!. 4 FAIL PASS: virsh-undefine === 1 of 112 tests failed Please report to libvir-list@

Re: [libvirt] [PATCH V4] enhance hostdev mode 'capabilities' process

2014-06-25 Thread Pavel Hrdina
On 25.6.2014 08:45, Jincheng Miao wrote: > Currently, only LXC has hostdev mode 'capabilities' support, > so the other drivers should forbid to define it in XML. > The hostdev mode check is added to devicesPostParseCallback() > for each hypervisor driver. > > But there are some drivers lack functi

Re: [libvirt] [python PATCH] maint: document development against uninstalled libvirt

2014-06-25 Thread Peter Krempa
On 06/25/14 18:53, Eric Blake wrote: > Thanks to Dan's recent work in libvirt.git, it is much easier to > develop against uninstalled libvirt. Mention how. > > * README: More details. > > Signed-off-by: Eric Blake > --- > README | 15 +++ > 1 file changed, 15 insertions(+) > ACK,

[libvirt] [PATCHv3 25/26] qemu: blockcopy: Use the mirror disk source to label the files

2014-06-25 Thread Peter Krempa
Use the source struct and the corresponding function so that we can avoid using the path separately. Now that qemuDomainPrepareDiskChainElementPath isn't use anywhere, we can safely remove it. Additionally, the removal fixes a misaligned comment as the removed function was added under a comment fo

[libvirt] [PATCHv3 20/26] security: AppArmor: Implement per-image seclabel restore

2014-06-25 Thread Peter Krempa
Refactor the existing code to allow re-using it for the per-image label restore too. --- src/security/security_apparmor.c | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/security/security_apparmor.c b/src/security/security_apparmor.c index b4cbc61..72d1e

[libvirt] [PATCHv3 24/26] util: storage: Return complete parent info from virStorageFileChainLookup

2014-06-25 Thread Peter Krempa
Instead of just returning the parent path, return the complete parent source structure. --- src/qemu/qemu_driver.c| 16 - src/util/virstoragefile.c | 17 -- src/util/virstoragefile.h | 2 +- tests/virstoragetest.c| 86 ++- 4 file

[libvirt] [PATCHv3 21/26] security: AppArmor: Implement per-image seclabel set

2014-06-25 Thread Peter Krempa
Refactor the code and reuse it to implement the functionality. --- src/security/security_apparmor.c | 38 +++--- 1 file changed, 23 insertions(+), 15 deletions(-) diff --git a/src/security/security_apparmor.c b/src/security/security_apparmor.c index 72d1e16..fb41c5

[libvirt] [PATCHv3 15/26] security: Introduce APIs to label single images

2014-06-25 Thread Peter Krempa
Add security driver functions to label separate storage images using the virStorageSource definition. This will help to avoid the need to do ugly changes to the disk struct and use the source directly. --- src/libvirt_private.syms| 2 ++ src/security/security_driver.h | 10 src/

[libvirt] [PATCHv3 07/26] security: nop: Avoid very long lines

2014-06-25 Thread Peter Krempa
The function headers contain type on the same line as the name. When combined with usage of ATTRIBUTE_UNUSED, the function headers were very long. Shorten them by breaking the line after the type. --- src/security/security_nop.c | 147 ++-- 1 file changed, 8

[libvirt] [PATCHv3 14/26] locking: Add APIs to lock individual image files

2014-06-25 Thread Peter Krempa
Add helper APIs to manage individual image files rather than disks. To simplify the addition some parts of the code were refactored in this patch. --- src/libvirt_private.syms | 2 ++ src/locking/domain_lock.c | 65 ++- src/locking/domain_lock.h | 8 +

[libvirt] [PATCHv3 09/26] util: storagesource: Add helper to copy and free storage source seclabels

2014-06-25 Thread Peter Krempa
They will be reused to transfer disk labels from snapshotted disks to the new disk definitions. --- src/libvirt_private.syms | 1 + src/util/virstoragefile.c | 45 ++--- src/util/virstoragefile.h | 3 +++ 3 files changed, 42 insertions(+), 7 deletions(-)

[libvirt] [PATCHv3 05/26] security: manager: Document behavior of disk label manipulation funcs

2014-06-25 Thread Peter Krempa
virSecurityManagerSetDiskLabel and virSecurityManagerRestoreDiskLabel don't have complementary semantics. Document the semantics to avoid possible problems. --- src/security/security_manager.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/src/security/security_manager

[libvirt] [PATCHv3 08/26] storage: Move readonly and shared flags to disk source from disk def

2014-06-25 Thread Peter Krempa
In the future we might need to track state of individual images. Move the readonly and shared flags to the virStorageSource struct so that we can keep them in a per-image basis. --- src/conf/domain_conf.c | 18 ++ src/conf/domain_conf.h | 2 -- src/libxl/libxl_co

[libvirt] [PATCHv3 26/26] qemu: blockcopy: Don't remove existing disk mirror info

2014-06-25 Thread Peter Krempa
When creating a new disk mirror the new struct is stored in a separate variable until everything went well. The removed hunk would actually remove existing mirror information for example when the api would be run if a mirror still exists. --- src/qemu/qemu_driver.c | 4 1 file changed, 4 dele

[libvirt] [PATCHv3 22/26] util: storage: Add helper to determine whether storage is local

2014-06-25 Thread Peter Krempa
There's a lot of places where we skip doing actions based on the locality of given storage type. The usual pattern is to skip it if: virStorageSourceGetActualType(src) == VIR_STORAGE_TYPE_NETWORK Add a simple helper to simplify the pattern to virStorageSourceIsLocalStorage(src) --- src/libvirt_p

[libvirt] [PATCHv3 18/26] security: DAC: Implement per-image seclabel restore

2014-06-25 Thread Peter Krempa
Refactor the existing code to allow re-using it for the per-image label restore too. --- src/security/security_dac.c | 60 - 1 file changed, 32 insertions(+), 28 deletions(-) diff --git a/src/security/security_dac.c b/src/security/security_dac.c index 3

[libvirt] [PATCHv3 23/26] util: storage: Make virStorageFileChainLookup more network storage aware

2014-06-25 Thread Peter Krempa
Add a few checks and avoid resolving relative links on networked storage. --- src/util/virstoragefile.c | 27 +++ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c index 965c3ea..e154f92 100644 --- a/src/ut

[libvirt] [PATCHv3 03/26] security: manager: Avoid forward decl of virSecurityManagerDispose

2014-06-25 Thread Peter Krempa
--- src/security/security_manager.c | 21 +++-- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/security/security_manager.c b/src/security/security_manager.c index d57bab9..84d90ac 100644 --- a/src/security/security_manager.c +++ b/src/security/security_manager.

[libvirt] [PATCHv3 16/26] security: selinux: Implement per-image seclabel restore

2014-06-25 Thread Peter Krempa
Refactor the existing code to allow re-using it for the per-image label restore too. --- src/security/security_selinux.c | 60 - 1 file changed, 35 insertions(+), 25 deletions(-) diff --git a/src/security/security_selinux.c b/src/security/security_selinux.c

[libvirt] [PATCHv3 13/26] qemu: cgroup: Setup only the top level disk image for read-write access

2014-06-25 Thread Peter Krempa
Only the top level gets writes, so the rest of the backing chain requires only read-only access. --- src/qemu/qemu_cgroup.c | 26 -- 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_cgroup.c b/src/qemu/qemu_cgroup.c index 1deafb7..97229c4 100644

[libvirt] [PATCHv3 06/26] security: Fix header formatting of a few functions

2014-06-25 Thread Peter Krempa
Some of the functions in the storage driver had their headers formatted incorrectly. --- src/security/security_driver.h | 6 +++--- src/security/security_manager.h | 9 - src/security/security_stack.c | 4 ++-- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/security

[libvirt] [PATCHv3 19/26] security: DAC: Implement per-image seclabel set

2014-06-25 Thread Peter Krempa
Refactor the code and reuse it to implement the functionality. --- src/security/security_dac.c | 53 ++--- 1 file changed, 26 insertions(+), 27 deletions(-) diff --git a/src/security/security_dac.c b/src/security/security_dac.c index 69b51c1..3ff7817 100644

[libvirt] [PATCHv3 00/26] Work In Progress: Refactor handling of disk image metadata

2014-06-25 Thread Peter Krempa
In my quest to fix various issues with image chain handling I've set out to fix labelling of the image files. While I'm not far enough yet, the series has grown rather large and contains a few fixes of other stuff. I'm posting it incomplete to star review on the trivial parts. Peter Krempa (26):

[libvirt] [PATCHv3 12/26] qemu: cgroup: Add functions to set cgroup image stuff on individual imgs

2014-06-25 Thread Peter Krempa
Add functions that will allow to set all the required cgroup stuff on individual images taking a virStorageSourcePtr. Also convert functions designed to setup whole backing chain to take advantage of the chagne. --- src/qemu/qemu_cgroup.c | 104 - sr

[libvirt] [PATCHv3 02/26] security: Rename virSecurityManagerRestoreImageLabel to *Disk*

2014-06-25 Thread Peter Krempa
I'm going to add functions that will deal with individual image files rather than whole disks. Rename the security function to make room for the new one. --- src/libvirt_private.syms | 2 +- src/qemu/qemu_driver.c | 4 ++-- src/qemu/qemu_hotplug.c | 24

[libvirt] [PATCHv3 10/26] util: storagefile: Add deep copy for struct virStorageSource

2014-06-25 Thread Peter Krempa
Now that we have pointers to store disk source information and thus can easily exchange the structs behind we need a function to copy all the data. --- src/libvirt_private.syms | 1 + src/util/virstoragefile.c | 143 ++ src/util/virstoragefile.h | 3

[libvirt] [PATCHv3 01/26] utils: s/virStorageSourceClearBackingStore/virStorageSourceBackingStoreClear

2014-06-25 Thread Peter Krempa
Rename them to comply with the naming policy. --- src/libvirt_private.syms | 2 +- src/qemu/qemu_domain.c| 2 +- src/qemu/qemu_driver.c| 2 +- src/util/virstoragefile.c | 6 +++--- src/util/virstoragefile.h | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/libvirt

[libvirt] [PATCHv3 04/26] security: manager: Unify function header format

2014-06-25 Thread Peter Krempa
--- src/security/security_manager.c | 248 +--- 1 file changed, 157 insertions(+), 91 deletions(-) diff --git a/src/security/security_manager.c b/src/security/security_manager.c index 84d90ac..bb12e8e 100644 --- a/src/security/security_manager.c +++ b/src/secur

[libvirt] [PATCHv3 11/26] util: cgroup: Add helper to convert device mode to string

2014-06-25 Thread Peter Krempa
Cgroups code uses VIR_CGROUP_DEVICE_* flags to specify the mode but in the end it needs to be converted to a string. Add a helper to do it and use it in the cgroup code before introducing it into the rest of the code. --- src/libvirt_private.syms | 1 + src/util/vircgroup.c | 62 +

[libvirt] [PATCHv3 17/26] security: selinux: Implement per-image seclabel set

2014-06-25 Thread Peter Krempa
Refactor the code and reuse it to implement the functionality. --- src/security/security_selinux.c | 92 - 1 file changed, 54 insertions(+), 38 deletions(-) diff --git a/src/security/security_selinux.c b/src/security/security_selinux.c index 7b534b2..97f91f

[libvirt] [python PATCH] maint: document development against uninstalled libvirt

2014-06-25 Thread Eric Blake
Thanks to Dan's recent work in libvirt.git, it is much easier to develop against uninstalled libvirt. Mention how. * README: More details. Signed-off-by: Eric Blake --- README | 15 +++ 1 file changed, 15 insertions(+) diff --git a/README b/README index ad50828..df1de59 100644 ---

Re: [libvirt] [PATCH] Fix compiler warning while un-wraping python object to uint in libvirt_virNodeGetFreePages

2014-06-25 Thread Eric Blake
On 06/25/2014 10:18 AM, Nehal J Wani wrote: Long subject line, and a typo. Better is: build: use correct int conversion in GetFreePages then exposing the longer details in the commit body. > Introduced by commit c8ba859bc78f5e3b0ed2590f4e8a7fa6c26ac08f > > On compiling libvirt-python against

Re: [libvirt] [Xen-devel] [PATCH RFC OSSTEST 7/9] Toolstack: Abstract away migration support check.

2014-06-25 Thread Ian Campbell
On Wed, 2014-06-25 at 09:25 -0600, Jim Fehlig wrote: > Ian Campbell wrote: > > On Tue, 2014-06-24 at 21:18 -0600, Jim Fehlig wrote: > > > > > >> Something like the attached patch (compile-tested only). You'll need an > >> updated libvirt.git master to apply cleanly. > >> > > > > Thanks. Bu

Re: [libvirt] [PATCHv5 19/19] qemu: Add support for networked disks for block pull/block rebase

2014-06-25 Thread Eric Blake
On 06/19/2014 07:59 AM, Peter Krempa wrote: > Now that we are able to select images from the backing chain via indexed > access we should also convert possible network sources to > qemu-compatible strings before passing them to qemu. > --- > src/qemu/qemu_driver.c | 45

Re: [libvirt] [PATCHv5 18/19] qemu: Add support for networked disks for block commit

2014-06-25 Thread Eric Blake
On 06/19/2014 07:59 AM, Peter Krempa wrote: > Now that we are able to select images from the backing chain via indexed > access we should also convert possible network sources to > qemu-compatible strings before passing them to qemu. Eventually, we'll want to use qemu's node-name functionality, al

[libvirt] [PATCH] Fix compiler warning while un-wraping python object to uint in libvirt_virNodeGetFreePages

2014-06-25 Thread Nehal J Wani
Introduced by commit c8ba859bc78f5e3b0ed2590f4e8a7fa6c26ac08f On compiling libvirt-python against libvirt 1.2.6, we get: libvirt-override.c: In function ‘libvirt_virNodeGetFreePages’: libvirt-override.c:7811:9: warning: pointer targets in passing argument 2 of ‘libvirt_intUnwrap’ differ in signe

Re: [libvirt] [PATCHv5 17/19] lib: Introduce flag VIR_DOMAIN_BLOCK_REBASE_RELATIVE

2014-06-25 Thread Eric Blake
On 06/19/2014 07:59 AM, Peter Krempa wrote: > Introduce flag for the block rebase API to allow the rebase operation to > leave the chain relatively addressed. Also adds a virsh switch to enable > this behavior. > --- > include/libvirt/libvirt.h.in | 2 ++ > src/libvirt.c| 5 +

Re: [libvirt] [PATCHv5 15/19] qemu: monitor: Add support for backing name specification for block-stream

2014-06-25 Thread Eric Blake
On 06/19/2014 07:59 AM, Peter Krempa wrote: > To allow changing the name that is recorded in the top of the current > image chain used in a block pull/rebase operation, we need to specify > the backing name to qemu. This is done via the "backing-file" attribute > to the block-stream commad. s/comm

Re: [libvirt] [PATCHv5 16/19] lib: Introduce flag VIR_DOMAIN_BLOCK_COMMIT_RELATIVE

2014-06-25 Thread Eric Blake
On 06/19/2014 07:59 AM, Peter Krempa wrote: > Introduce flag for the block commit API to allow the commit operation to > leave the chain relatively addressed. Also adds a virsh switch to enable > this behavior. > --- > include/libvirt/libvirt.h.in | 4 > src/libvirt.c| 5 +

Re: [libvirt] [Xen-devel] [PATCH RFC OSSTEST 7/9] Toolstack: Abstract away migration support check.

2014-06-25 Thread Jim Fehlig
Ian Campbell wrote: > On Tue, 2014-06-24 at 21:18 -0600, Jim Fehlig wrote: > > >> Something like the attached patch (compile-tested only). You'll need an >> updated libvirt.git master to apply cleanly. >> > > Thanks. Building on ARM I get: > > libxl/libxl_driver.c:4346:1: error: 'libxlDoma

Re: [libvirt] [PATCH 1/2] cpuCompare*: Add support for reporting failure on incompatible CPUs

2014-06-25 Thread Peter Krempa
On 06/25/14 14:34, Jiri Denemark wrote: > When CPU comparison APIs return VIR_CPU_COMPARE_INCOMPATIBLE, the caller > has no clue why the CPU is considered incompatible with host CPU. And in > some cases, it would be nice to be able to get such info in a client > rather than having to look in logs.

[libvirt] [PATCHv2 1/3] lxc: allow to keep or drop capabilities

2014-06-25 Thread Cédric Bosdonnat
Added in the section of LXC domains configuration. This section can contain elements named after the capabilities like: , keep CAP_MKNOD capability drop CAP_SYS_CHROOT capability Users can restrict or give more capabilities than the default using this mechanism. --- docs/schemas/domaincom

[libvirt] [PATCHv2 0/3] LXC drop/keep capabilities feature

2014-06-25 Thread Cédric Bosdonnat
Changes since the previous version are: * add 'b *:* m' and 'c *:* m' to the device white list is CAP_MKNOD is requested instead of setting 'a *:* rwm'. * Add a policy='default|allow|deny' for the features/capabilities element. Cédric Bosdonnat (3): lxc: allow to keep or drop capabil

[libvirt] [PATCHv2 3/3] lxc: update doc to mention features/capabilities/* domain configuration

2014-06-25 Thread Cédric Bosdonnat
--- docs/drvlxc.html.in | 47 +++ 1 file changed, 47 insertions(+) diff --git a/docs/drvlxc.html.in b/docs/drvlxc.html.in index fc4bc20..403ce24 100644 --- a/docs/drvlxc.html.in +++ b/docs/drvlxc.html.in @@ -540,6 +540,53 @@ debootstrap, whatever) under

[libvirt] [PATCHv2 2/3] lxc domain from xml: convert lxc.cap.drop

2014-06-25 Thread Cédric Bosdonnat
--- src/lxc/lxc_native.c | 25 ++ tests/lxcconf2xmldata/lxcconf2xml-blkiotune.xml| 2 ++ tests/lxcconf2xmldata/lxcconf2xml-cpusettune.xml | 2 ++ tests/lxcconf2xmldata/lxcconf2xml-cputune.xml | 2 ++ tests/lxcconf2xmldata/lxcconf2xml-

Re: [libvirt] [PATCH 2/2] virConnectCompareCPU: Introduce FAIL_INCOMPATIBLE flag

2014-06-25 Thread Peter Krempa
On 06/25/14 14:34, Jiri Denemark wrote: > The new VIR_CONNECT_COMPARE_CPU_FAIL_INCOMPATIBLE flag for > virConnectCompareCPU can be used to get an error > (VIR_ERR_CPU_INCOMPATIBLE) describing the incompatibility instead of the > usual VIR_CPU_COMPARE_INCOMPATIBLE return code. > > Signed-off-by: Ji

[libvirt] [PATCH] cpu: Add new Broadwell CPU model

2014-06-25 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- Notes: The corresponding patch [1] for QEMU is not usptream yet but nobody seems to be complaining about that model. And chances are the patch gets in before QEMU enters hard freeze for 2.1. So please review this patch but I won't push it until the

Re: [libvirt] [Xen-devel] [PATCH RFC OSSTEST 7/9] Toolstack: Abstract away migration support check.

2014-06-25 Thread Ian Campbell
On Tue, 2014-06-24 at 21:18 -0600, Jim Fehlig wrote: > Something like the attached patch (compile-tested only). You'll need an > updated libvirt.git master to apply cleanly. Thanks. Building on ARM I get: libxl/libxl_driver.c:4346:1: error: 'libxlDomainMigrateBegin3Params' defined but not use

  1   2   >