Re: [libvirt] [PATCH] libxl: don't break the build on Xen>=4.5 because of libxl_vcpu_setaffinity()

2014-06-30 Thread Dario Faggioli
On lun, 2014-06-30 at 15:32 -0600, Jim Fehlig wrote: > Eric Blake wrote: > > >> Thanks, looks good. I was about to push, but wanted to check with other > >> libvirt devs first since we are in 1.2.6 freeze. Would it be fine to > >> push this? It fixes a libxl driver build failure against

Re: [libvirt] odd message from latest libvirt.git

2014-06-30 Thread Peter Krempa
[added Michal] On 07/01/14 06:29, Eric Blake wrote: > # ./run daemon/libvirtd > 2014-07-01 04:27:19.913+: 1160: info : libvirt version: 1.2.6 > 2014-07-01 04:27:19.913+: 1160: error : virFileReadAll:1297 : Failed > to read file '/sys/class/net/wlp3s0/speed': Invalid argument > > This is p

Re: [libvirt] RFC: 'old' event for leaseshelper.c when lease renews

2014-06-30 Thread Peter Krempa
On 06/30/14 22:49, Nehal J Wani wrote: >> I'd prefer (i) since that lets libvirt work properly with existing >> dnsmasq versions which are deployed. >> >> Regards, >> Daniel > > I cleared some more queries regarding leasesfile-ro option. Once can > read the conversation at > http://lists.thekelley

[libvirt] odd message from latest libvirt.git

2014-06-30 Thread Eric Blake
# ./run daemon/libvirtd 2014-07-01 04:27:19.913+: 1160: info : libvirt version: 1.2.6 2014-07-01 04:27:19.913+: 1160: error : virFileReadAll:1297 : Failed to read file '/sys/class/net/wlp3s0/speed': Invalid argument This is probably a kernel bug in Fedora 20; but we shouldn't be polluting

[libvirt] Jenkins build is back to normal : libvirt-syntax-check #2435

2014-06-30 Thread Jenkins CI
See -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH] libxl: add PV console if not explicitly specified

2014-06-30 Thread Jim Fehlig
Eric Blake wrote: > On 06/30/2014 10:29 AM, Jim Fehlig wrote: > >> Xen PV domains always have a PV console, so add one to the domain >> config via post-parse callback if not explicitly specified in >> the XML. The legacy Xen driver behaves similarly, causing a >> regression when switching to th

Re: [libvirt] Build failed in Jenkins: libvirt-syntax-check #2434

2014-06-30 Thread Jim Fehlig
Jenkins CI wrote: > prohibit_long_lines > src/Makefile.am:1146:libvirt_driver_vbox_impl_la_LIBADD = $(DLOPEN_LIBS) > $(MSCOM_LIBS) $(LIBXML_LIBS) > maint.mk: Wrap long lines in Makefiles > Heh, doesn't take long for the alarms to sound :-). Fix has been pushed. Regards, Jim -- libvir-list

[libvirt] [PATCH] build: fix 'make syntax-check' after commit c6cf5df3

2014-06-30 Thread Jim Fehlig
The commit caused prohibit_long_lines to fail in src/Makefile.am. Signed-off-by: Jim Fehlig --- Pushing under the build-breaker rule. src/Makefile.am | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Makefile.am b/src/Makefile.am index 10c35d7..35720be 100644 --- a/src

[libvirt] Build failed in Jenkins: libvirt-syntax-check #2434

2014-06-30 Thread Jenkins CI
See -- Started by upstream project "libvirt-build" build number 2747 Building on master in workspace [workspace] $ /bin/sh -xe /tmp/hud

Re: [libvirt] [PATCH] vbox: fix linker error

2014-06-30 Thread Jim Fehlig
Jim Fehlig wrote: > Eric Blake wrote: > >> On 06/30/2014 04:42 PM, Jim Fehlig wrote: >> >> >>> Noticed the following error when building the vbox driver >>> in the openSUSE build service >>> >>> CCLD vboxsnapshotxmltest >>> /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse

Re: [libvirt] [PATCH] vbox: fix linker error

2014-06-30 Thread Jim Fehlig
Eric Blake wrote: > On 06/30/2014 04:42 PM, Jim Fehlig wrote: > >> Noticed the following error when building the vbox driver >> in the openSUSE build service >> >> CCLD vboxsnapshotxmltest >> /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: >> ../src/.libs/libvirt_d

Re: [libvirt] [PATCH] libxl: add PV console if not explicitly specified

2014-06-30 Thread Eric Blake
On 06/30/2014 10:29 AM, Jim Fehlig wrote: > Xen PV domains always have a PV console, so add one to the domain > config via post-parse callback if not explicitly specified in > the XML. The legacy Xen driver behaves similarly, causing a > regression when switching to the new Xen toolstack. I.e. >

Re: [libvirt] [PATCH] vbox: fix linker error

2014-06-30 Thread Eric Blake
On 06/30/2014 04:42 PM, Jim Fehlig wrote: > Noticed the following error when building the vbox driver > in the openSUSE build service > > CCLD vboxsnapshotxmltest > /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: > ../src/.libs/libvirt_driver_vbox_impl.a > (libvirt_d

[libvirt] [PATCH] vbox: fix linker error

2014-06-30 Thread Jim Fehlig
Noticed the following error when building the vbox driver in the openSUSE build service CCLD vboxsnapshotxmltest /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: ../src/.libs/libvirt_driver_vbox_impl.a (libvirt_driver_vbox_impl_la-vbox_snapshot_conf.o): undefined refe

Re: [libvirt] [PATCH] libxl: don't break the build on Xen>=4.5 because of libxl_vcpu_setaffinity()

2014-06-30 Thread Jim Fehlig
Eric Blake wrote: > On 06/30/2014 03:11 PM, Jim Fehlig wrote: > >> Dario Faggioli wrote: >> >>> libxl interface for vcpu pinning is changing in Xen 4.5. Basically, >>> libxl_set_vcpuaffinity() now wants one more parameter. That is >>> representative of 'VCPU soft affinity', which libvirt do

[libvirt] libnuma build failure [was: securityselinuxlabeltest test fails on v1.2.5]

2014-06-30 Thread Eric Blake
On 06/30/2014 01:46 PM, Scott Sullivan wrote: > I've tested the v1.2.6-rc2 git tag, im getting this build error: > > CC util/libvirt_util_la-virnuma.lo > util/virnuma.c: In function 'virNumaNodeIsAvailable': > util/virnuma.c:428: error: 'numa_nodes_ptr' undeclared (first use in > this functi

Re: [libvirt] [PATCH] libxl: don't break the build on Xen>=4.5 because of libxl_vcpu_setaffinity()

2014-06-30 Thread Eric Blake
On 06/30/2014 03:11 PM, Jim Fehlig wrote: > Dario Faggioli wrote: >> libxl interface for vcpu pinning is changing in Xen 4.5. Basically, >> libxl_set_vcpuaffinity() now wants one more parameter. That is >> representative of 'VCPU soft affinity', which libvirt does not use. >> >> To mark such change

Re: [libvirt] [PATCH] libxl: don't break the build on Xen>=4.5 because of libxl_vcpu_setaffinity()

2014-06-30 Thread Jim Fehlig
Dario Faggioli wrote: > libxl interface for vcpu pinning is changing in Xen 4.5. Basically, > libxl_set_vcpuaffinity() now wants one more parameter. That is > representative of 'VCPU soft affinity', which libvirt does not use. > > To mark such change, the macro LIBXL_HAVE_VCPUINFO_SOFT_AFFINITY is

Re: [libvirt] RFC: 'old' event for leaseshelper.c when lease renews

2014-06-30 Thread Nehal J Wani
> I'd prefer (i) since that lets libvirt work properly with existing > dnsmasq versions which are deployed. > > Regards, > Daniel I cleared some more queries regarding leasesfile-ro option. Once can read the conversation at http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/2014q2/008656.htm

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

2014-06-30 Thread Scott Sullivan
On 06/26/2014 05:36 PM, Eric Blake wrote: On 06/26/2014 09:38 AM, Scott Sullivan wrote: On 06/26/2014 10:09 AM, Ján Tomko wrote: On 06/26/2014 03:56 PM, Scott Sullivan wrote: 1) Labelling "disks" ... internal error: File /home/rpmbuild/package

[libvirt] [libvirt-glib] [PATCH v4 3/3] GVirDomain: Add async version of _fetch_snapshots

2014-06-30 Thread Timm Bäder
--- libvirt-gobject/libvirt-gobject-domain.c | 60 libvirt-gobject/libvirt-gobject-domain.h | 10 ++ libvirt-gobject/libvirt-gobject.sym | 2 ++ 3 files changed, 72 insertions(+) diff --git a/libvirt-gobject/libvirt-gobject-domain.c b/libvirt-gobject/li

[libvirt] [libvirt-glib] [PATCH v4 1/3] libvirt-gobject-domain: Add _fetch_snapshots

2014-06-30 Thread Timm Bäder
This function can be used to fetch the snapshots of a domain (according to the given GVirDomainSnapshotListFlags) and save them in a domain-internal GHashTable. A function to access them from outside will be added in a later patch. --- libvirt-gobject/libvirt-gobject-domain.c | 83

[libvirt] [libvirt-glib] [PATCH v4 0/3] Add API to fetch snapshots

2014-06-30 Thread Timm Bäder
Argh, sorry about the earlier version, die last mail didn't get through the smtp server. This patchset replaces the old one and includes gvir_domain_fetch_snapshots_async as well as a version of gvir_domain_fetch_snapshots that works with it. Timm Bäder (3): libvirt-gobject-domain: Add _fetch

[libvirt] [libvirt-glib] [PATCH v4 2/3] libvirt-gobject-domain: Add _get_snapshots

2014-06-30 Thread Timm Bäder
... which returns a GList of GVirDomainSnapshots, i.e. without any tree structure or other relationship between the snapshots. --- libvirt-gobject/libvirt-gobject-domain.c | 21 + libvirt-gobject/libvirt-gobject-domain.h | 4 libvirt-gobject/libvirt-gobject.sym | 1

[libvirt] [libvirt-glib] [PATCH v3 2/3] libvirt-gobject-domain: Add _get_snapshots

2014-06-30 Thread Timm Bäder
... which returns a GList of GVirDomainSnapshots, i.e. without any tree structure or other relationship between the snapshots. --- libvirt-gobject/libvirt-gobject-domain.c | 21 + libvirt-gobject/libvirt-gobject-domain.h | 4 libvirt-gobject/libvirt-gobject.sym | 1

[libvirt] [libvirt-glib] [PATCH v3 1/3] libvirt-gobject-domain: Add _fetch_snapshots

2014-06-30 Thread Timm Bäder
This function can be used to fetch the snapshots of a domain (according to the given GVirDomainSnapshotListFlags) and save them in a domain-internal GHashTable. A function to access them from outside will be added in a later patch. --- libvirt-gobject/libvirt-gobject-domain.c | 83

[libvirt] [libvirt-glib] [PATCH v3 0/3] Add API to fetch snapshots

2014-06-30 Thread Timm Bäder
This patchset replaces the old one and includes gvir_domain_fetch_snapshtos_async as well as a version of gvir_domain_fetch_snapshots that works with it. Timm Bäder (3): libvirt-gobject-domain: Add _fetch_snapshots libvirt-gobject-domain: Add _get_snapshots GVirDomain: Add async version of

Re: [libvirt] [Xen-devel] [xen-unstable bisection] complete build-i386-libvirt

2014-06-30 Thread Dario Faggioli
On lun, 2014-06-30 at 11:14 -0600, Jim Fehlig wrote: > Dario Faggioli wrote: > > > > I like patch1 better, but I think it can cause "unused variable" like > > warnings if, at some point in future, we will actually use the new soft > > affinity parameter, when compiling on a version of libxl that d

[libvirt] [PATCH] libxl: don't break the build on Xen>=4.5 because of libxl_vcpu_setaffinity()

2014-06-30 Thread Dario Faggioli
libxl interface for vcpu pinning is changing in Xen 4.5. Basically, libxl_set_vcpuaffinity() now wants one more parameter. That is representative of 'VCPU soft affinity', which libvirt does not use. To mark such change, the macro LIBXL_HAVE_VCPUINFO_SOFT_AFFINITY is defined. Use it as a gate and,

Re: [libvirt] [Xen-devel] [xen-unstable bisection] complete build-i386-libvirt

2014-06-30 Thread Jim Fehlig
Dario Faggioli wrote: > On lun, 2014-06-30 at 08:11 +0100, Ian Campbell wrote: > >> On Sun, 2014-06-29 at 18:35 +0100, xen.org wrote: >> >>> branch xen-unstable >>> xen branch xen-unstable >>> job build-i386-libvirt >>> test libvirt-build >>> >>> Tree: gnulib_libvirt >>> git://drall.uk.xen

[libvirt] [PATCH] libxl: add PV console if not explicitly specified

2014-06-30 Thread Jim Fehlig
Xen PV domains always have a PV console, so add one to the domain config via post-parse callback if not explicitly specified in the XML. The legacy Xen driver behaves similarly, causing a regression when switching to the new Xen toolstack. I.e. virsh console pv-domain will no longer work afte

[libvirt] [PATCH for 1.2.7 5/8] qemu_capabilities: Introduce virQEMUCapsCacheLookupByArch

2014-06-30 Thread Michal Privoznik
The API may come handy if somebody has an architecture and wants to look through available qemus if the architecture is supported or not. Signed-off-by: Michal Privoznik --- src/qemu/qemu_capabilities.c | 33 + src/qemu/qemu_capabilities.h | 2 ++ 2 files changed

[libvirt] [PATCH for 1.2.7 4/8] tests: Move qemu caps XML parsing into shared unit

2014-06-30 Thread Michal Privoznik
Later on, we the qemu capabilities XML parsing code may come handy so instead of duplicating the code make the already existing one shared. By the same time, make the function accept file name instead of XML document stored already in memory. Signed-off-by: Michal Privoznik --- tests/qemucapabil

[libvirt] [PATCH for 1.2.7 0/8] Expose Expose IOMMU and VFIO host capabilities

2014-06-30 Thread Michal Privoznik
After my RFC round, here are the actual patches. Michal Privoznik (8): Introduce domain_capabilities Introduce virConnectGetDomainCapabilities virsh: expose virConnectGetDomainCapabilities tests: Move qemu caps XML parsing into shared unit qemu_capabilities: Introduce virQEMUCapsCacheLoo

[libvirt] [PATCH for 1.2.7 8/8] qemu: Implement virConnectGetDomainCapabilities

2014-06-30 Thread Michal Privoznik
So far only information on disks and host devices are exposed in the capabilities XML. Well, at least something. Even a new test is introduced. The qemu capabilities are stolen from already existing qemucapabilities test. There's one tricky point though. Functions that checks host's KVM and VFIO ca

[libvirt] [PATCH for 1.2.7 6/8] qemu_capabilities: Introduce virQEMUCapsIsMachineSupported

2014-06-30 Thread Michal Privoznik
This internal API is meant to answer the question 'Is this machine type supported by given qemu?'. Signed-off-by: Michal Privoznik --- src/qemu/qemu_capabilities.c | 14 ++ src/qemu/qemu_capabilities.h | 3 +++ 2 files changed, 17 insertions(+) diff --git a/src/qemu/qemu_capabiliti

[libvirt] [PATCH for 1.2.7 7/8] qemu_capabilities: Introduce virQEMUCapsGetDefaultMachine

2014-06-30 Thread Michal Privoznik
Sometimes it may be useful to get a default machine for given qemu binary. Fortunately, the default machine is stored always on the first position in the supported machines array. Signed-off-by: Michal Privoznik --- src/qemu/qemu_capabilities.c | 9 + src/qemu/qemu_capabilities.h | 2 ++

[libvirt] [PATCH for 1.2.7 1/8] Introduce domain_capabilities

2014-06-30 Thread Michal Privoznik
This new module holds and formats capabilities for emulator. If you are about to create a new domain, you may want to know what is the host or hypervisor capable of. To make sure we don't regress on the XML, the formatting is not something left for each driver to implement, rather there's general f

[libvirt] [PATCH for 1.2.7 2/8] Introduce virConnectGetDomainCapabilities

2014-06-30 Thread Michal Privoznik
The API should expose the information contained in virDomainCapsPtr. Signed-off-by: Michal Privoznik --- include/libvirt/libvirt.h.in | 7 ++ src/driver.h | 9 src/libvirt.c| 52 src/libvirt_public.syms

[libvirt] [PATCH for 1.2.7 3/8] virsh: expose virConnectGetDomainCapabilities

2014-06-30 Thread Michal Privoznik
The API is exposed under 'domcapabilities' command. Currently, with the variety of drivers that libvirt supports, none of the command arguments is obligatory, but all are optional instead. Signed-off-by: Michal Privoznik --- tools/virsh-host.c | 84 +++

[libvirt] [PATCHv4 02/29] qemu: Don't propagate whole disk definition into qemuDomainGetImageIds

2014-06-30 Thread Peter Krempa
It will help re-using the function. --- src/qemu/qemu_domain.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 9e38d02..37b28ab 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -2400,7 +2400,7 @@ qem

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

2014-06-30 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 c84a251..00b405b 100644

[libvirt] [PATCHv4 19/29] security: DAC: Implement per-image seclabel set

2014-06-30 Thread Peter Krempa
Refactor the code and reuse it to implement the functionality. --- src/security/security_dac.c | 52 ++--- 1 file changed, 25 insertions(+), 27 deletions(-) diff --git a/src/security/security_dac.c b/src/security/security_dac.c index f86d532..715f68b 100644

[libvirt] [PATCHv4 16/29] security: selinux: Implement per-image seclabel restore

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

[libvirt] [PATCHv4 28/29] qemu: snapshot: Refactor image labelling of new snapshot files

2014-06-30 Thread Peter Krempa
Now that cgroups/security driver/locking driver support labelling of individual images and tolerate network storage we don't have to refrain from passing all image files to it. This allows to remove checking code as we already make sure that the snapshot function won't be called with unsupported op

[libvirt] [PATCHv4 21/29] security: AppArmor: Implement per-image seclabel set

2014-06-30 Thread Peter Krempa
Refactor the code and reuse it to implement the functionality. --- src/security/security_apparmor.c | 37 ++--- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/src/security/security_apparmor.c b/src/security/security_apparmor.c index 391bf60..1e2a38b

[libvirt] [PATCHv4 14/29] locking: Add APIs to lock individual image files

2014-06-30 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] [PATCHv4 27/29] qemu: Refactor qemuDomainPrepareDiskChainElement

2014-06-30 Thread Peter Krempa
Now that security, cgroup and locking APIs support working on individual images and we track the backing chain security info on a per-image basis we can finally kill swapping the disk source in virDomainDiskDef and use the virStorageSource directly. --- src/qemu/qemu_driver.c | 85

[libvirt] [PATCHv4 15/29] security: Introduce APIs to label single images

2014-06-30 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] [PATCHv4 12/29] qemu: cgroup: Add functions to set cgroup image stuff on individual imgs

2014-06-30 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 change. --- src/qemu/qemu_cgroup.c | 103 - sr

[libvirt] [PATCHv4 07/29] util: storagefile: Add deep copy for struct virStorageSource

2014-06-30 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 | 207 -- src/util/virstoragefile.h | 3

[libvirt] [PATCHv4 24/29] qemu: blockcopy: Use the mirror disk source to label the files

2014-06-30 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] [PATCHv4 29/29] qemu: snapshot: Use storage driver to pre-create snapshot file

2014-06-30 Thread Peter Krempa
Move the last operation done on local files to the storage driver API. --- src/qemu/qemu_driver.c | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 281c648..79970f2 100644 --- a/src/qemu/qemu_driver.c +++ b/sr

[libvirt] [PATCHv4 22/29] util: storage: Make virStorageFileChainLookup more network storage aware

2014-06-30 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 deb5126..b7ae570 100644 --- a/src/ut

[libvirt] [PATCHv4 23/29] util: storage: Return complete parent info from virStorageFileChainLookup

2014-06-30 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] [PATCHv4 26/29] qemu: snapshot: Improve approach to deal with snapshot metadata

2014-06-30 Thread Peter Krempa
Until now we were changing information about the disk source via multiple steps of copying data. Now that we changed to a pointer to store the disk source we might use it to change the approach to track the data. Additionally this will allow proper tracking of the backing chain. --- src/qemu/qemu

[libvirt] [PATCHv4 20/29] security: AppArmor: Implement per-image seclabel restore

2014-06-30 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..391bf

[libvirt] [PATCHv4 10/29] util: storage: Copy parent's disk metadata to backing chain elements

2014-06-30 Thread Peter Krempa
When discovering a disk backing chain the parent disk's metadata need to be populated into the guest images so that each piece of the backing chain contains a copy of those. This will allow us to refactor the security driver so that it will not need to carry around the original disk definition. ---

[libvirt] [PATCHv4 18/29] security: DAC: Implement per-image seclabel restore

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

[libvirt] [PATCHv4 11/29] util: cgroup: Add helper to convert device mode to string

2014-06-30 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] [PATCHv4 08/29] util: storage: Add helper to determine whether storage is local

2014-06-30 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] [PATCHv4 09/29] util: storage: Add function to transfer config parts to new chain element

2014-06-30 Thread Peter Krempa
We are going to modify storage source chains in place. Add a helper that will copy relevant information such as security labels to the new element if that doesn't contain it. --- src/libvirt_private.syms | 1 + src/util/virstoragefile.c | 40 src/util/vir

[libvirt] [PATCHv4 25/29] qemu: block: Properly track disk source while pivotting to new image

2014-06-30 Thread Peter Krempa
When pivotting to a new disk source after a block commit (and possibly after a soon-to-be-added active block commit) we changed just a few fields to the new target. In case we'd copy a network disk to a local file we'd not change the type properly. To avoid such problems, switch to tracking of the

[libvirt] [PATCHv4 06/29] storage: Move readonly and shared flags to disk source from disk def

2014-06-30 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] [PATCHv4 05/29] conf: Don't output seclabels for backingStore elements

2014-06-30 Thread Peter Krempa
Some of the further changes will propagate seclabels from a disk source element into the backing store elements. This would change the XML output of the backing store as the seclabels would be formatted for each backing store element. Skip the seclabels formatting until we decide that it's necessar

[libvirt] [PATCHv4 04/29] storage: file: Tolerate NULL src when uninitializing the backend

2014-06-30 Thread Peter Krempa
Allow de-init of null storage sources. --- src/storage/storage_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/storage/storage_driver.c b/src/storage/storage_driver.c index 8c0c5d6..ae86c69 100644 --- a/src/storage/storage_driver.c +++ b/src/storage/storage_driver.

[libvirt] [PATCHv4 17/29] security: selinux: Implement per-image seclabel set

2014-06-30 Thread Peter Krempa
Refactor the code and reuse it to implement the functionality. --- src/security/security_selinux.c | 91 - 1 file changed, 53 insertions(+), 38 deletions(-) diff --git a/src/security/security_selinux.c b/src/security/security_selinux.c index 87077ac..4d2e1d

[libvirt] [PATCHv4 00/29] (for 1.2.7) qemu: Refactor handling of disk image metadata

2014-06-30 Thread Peter Krempa
This is meant for the 1.2.7 release as we are currently in freeze for 1.2.6. This version incorporates feedback from Eric's review and adds a ton of new stuff. Peter Krempa (29): storage: Implement virStorageFileCreate for local and gluster files qemu: Don't propagate whole disk definition i

[libvirt] [PATCHv4 01/29] storage: Implement virStorageFileCreate for local and gluster files

2014-06-30 Thread Peter Krempa
Add backends for this frontend function so that we can use it in the snapshot creation code. --- src/storage/storage_backend_fs.c | 17 + src/storage/storage_backend_gluster.c | 28 2 files changed, 45 insertions(+) diff --git a/src/storage/storag

[libvirt] [PATCHv4 03/29] qemu: Add helper to initialize storage file backend with correct uid/gid

2014-06-30 Thread Peter Krempa
Add a wrapper that determines the correct uid and gid for a certain storage file and domain. --- src/qemu/qemu_domain.c | 23 +++ src/qemu/qemu_domain.h | 4 2 files changed, 27 insertions(+) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 37b28ab..cec

Re: [libvirt] [PATCH v7 RFC 0/2] libxl USB prototype and design discussion

2014-06-30 Thread Simon Cao
okay, I will do my best to test all the three devices. Bo. 2014-06-18 22:04 GMT+08:00 George Dunlap : > On 06/18/2014 01:57 PM, Ian Campbell wrote: > >> * Is it possible to connect a USB 1.1 device to a PVUSB controller >>> which has been specified 2.0, or would there have to be a separate >>>

Re: [libvirt] [Xen-devel] [xen-unstable bisection] complete build-i386-libvirt

2014-06-30 Thread Dario Faggioli
On lun, 2014-06-30 at 08:11 +0100, Ian Campbell wrote: > On Sun, 2014-06-29 at 18:35 +0100, xen.org wrote: > > branch xen-unstable > > xen branch xen-unstable > > job build-i386-libvirt > > test libvirt-build > > > > Tree: gnulib_libvirt > > git://drall.uk.xensource.com:9419/git://git.sv.gnu.org/

Re: [libvirt] new openvz driver (bossonvz)

2014-06-30 Thread Daniel Veillard
On Mon, Jun 30, 2014 at 10:31:26AM +0100, Daniel P. Berrange wrote: > On Fri, Jun 27, 2014 at 03:16:51PM +0200, Bosson VZ wrote: [...] > - What do you see as the long term future of the driver ? I've >already asked whether there's any risk from future OpenVZ releases >potentially breaking

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

2014-06-30 Thread Eric Blake
On 06/30/2014 06:53 AM, Martin Kletzander wrote: >> >> FYI: I'm also using this (but considered it hackish enough to not >> publish as a formal patch): >> >> $ echo /GNUmakefile >> .git/info/exclude >> $ cat GNUmakefile >> # My hidden wrapper to preset things that I like... >> include Makefile >> e

[libvirt] [PATCH 0/4] Report less errors

2014-06-30 Thread Ján Tomko
Some are distracting and not really helpful. Ján Tomko (4): Track privileged state in udev nodedev driver Only detect PCI Express devices as root in udev nodedev driver Introduce virFileReadAllQuiet Report one error less when getting net dev speed src/libvirt_private.syms | 1

Re: [libvirt] [PATCH] LXC: throw an error if we failed to get Idmap elements

2014-06-30 Thread Ján Tomko
On 06/30/2014 05:42 AM, Chen Hanxiao wrote: > Throwing an error is much friendly than just > "error: An error occurred, but the cause is unknown" > > Signed-off-by: Chen Hanxiao > --- > src/conf/domain_conf.c | 2 ++ > 1 file changed, 2 insertions(+) > ACK and pushed. Jan signature.asc De

Re: [libvirt] [PATCH] qemu: raise an error when trying to use readonly ide disks

2014-06-30 Thread Martin Kletzander
On Mon, Jun 30, 2014 at 02:28:54PM +0100, Daniel P. Berrange wrote: On Mon, Jun 30, 2014 at 03:23:40PM +0200, Giuseppe Scrivano wrote: Martin Kletzander writes: Q> On Mon, Jun 30, 2014 at 12:05:06PM +0200, Giuseppe Scrivano wrote: >>The IDE bus doesn't support readonly disks, so inform the use

[libvirt] [PATCH 1/4] Track privileged state in udev nodedev driver

2014-06-30 Thread Ján Tomko
Remember if libvirtd is running as root or not. --- src/node_device/node_device_udev.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_device_udev.c index bb6a0b9..50bb952 100644 --- a/src/node_device/node_device_ude

[libvirt] [PATCH 2/4] Only detect PCI Express devices as root in udev nodedev driver

2014-06-30 Thread Ján Tomko
This stops the error message spam when running unprivileged libvirtd: 2014-06-30 12:38:47.990+: 631: error : virPCIDeviceConfigOpen:300 : Failed to open config space file '/sys/bus/pci/devices/:00:00.0/config': Permission denied Reported by Daniel Berrange: https://www.redhat.com/archives/

[libvirt] [PATCH 3/4] Introduce virFileReadAllQuiet

2014-06-30 Thread Ján Tomko
Just like virFileReadAll, but returns -errno instead of reporting errors. Useful for ignoring some errors. --- src/libvirt_private.syms | 1 + src/util/virfile.c | 15 +++ src/util/virfile.h | 2 ++ 3 files changed, 18 insertions(+) diff --git a/src/libvirt_private.syms

[libvirt] [PATCH 4/4] Report one error less when getting net dev speed

2014-06-30 Thread Ján Tomko
virFileReadAll already logs an error. If reading the 'speed' file fails with EINVAL, we log an error even though we ignore it. If it fails with other errors, we log two errors. Use virFileReadAllQuiet - ignore EINVAL and report just one error in other cases. Fixes this error on libvirtd startup:

[libvirt] [sVirt] Question about virSecuritySELinuxSetSecurityAllLabel()

2014-06-30 Thread H Changyao
Hi, I am studying sVirt,i have some questions about virSecuritySELinuxSetSecurityAllLabel() function (below AllLabel() instead)in src/security/security_selinux.c. >From some materials, i have understood how sVirt works. AllLabel() is responsible to label "object",in most materials, "object" repres

Re: [libvirt] [PATCH] qemu: raise an error when trying to use readonly ide disks

2014-06-30 Thread Giuseppe Scrivano
Martin Kletzander writes: Q> On Mon, Jun 30, 2014 at 12:05:06PM +0200, Giuseppe Scrivano wrote: >>The IDE bus doesn't support readonly disks, so inform the user with an >>error message instead of let qemu fail with a more obscure "Device >>'ide-hd' could not be initialized" error message. >> >>Cl

Re: [libvirt] [PATCH] qemu: raise an error when trying to use readonly ide disks

2014-06-30 Thread Daniel P. Berrange
On Mon, Jun 30, 2014 at 03:23:40PM +0200, Giuseppe Scrivano wrote: > Martin Kletzander writes: > > Q> On Mon, Jun 30, 2014 at 12:05:06PM +0200, Giuseppe Scrivano wrote: > >>The IDE bus doesn't support readonly disks, so inform the user with an > >>error message instead of let qemu fail with a mor

Re: [libvirt] [for 1.2.6 PATCH] qemu: snapshot: Save persistent domain config when taking external snapshot

2014-06-30 Thread Peter Krempa
On 06/30/14 14:33, Martin Kletzander wrote: > On Mon, Jun 30, 2014 at 01:54:09PM +0200, Peter Krempa wrote: >> Commit 55bbb011b965c7962933604c70f61cef45e8ec04 introduced a regression >> where we forgot to save the persistent domain configuration after a > > s/after a/after an/ > >> external snaps

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

2014-06-30 Thread Martin Kletzander
On Mon, Jun 30, 2014 at 02:05:39PM +0100, Daniel P. Berrange wrote: On Mon, Jun 30, 2014 at 02:53:04PM +0200, Martin Kletzander wrote: On Wed, Jun 25, 2014 at 11:12:52AM -0600, Eric Blake wrote: >On 06/25/2014 10:59 AM, Peter Krempa wrote: >>On 06/25/14 18:53, Eric Blake wrote: >>>Thanks to Dan'

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

2014-06-30 Thread Daniel P. Berrange
On Mon, Jun 30, 2014 at 02:53:04PM +0200, Martin Kletzander wrote: > On Wed, Jun 25, 2014 at 11:12:52AM -0600, Eric Blake wrote: > >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

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

2014-06-30 Thread Martin Kletzander
On Wed, Jun 25, 2014 at 11:12:52AM -0600, Eric Blake wrote: 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-b

Re: [libvirt] [for 1.2.6 PATCH] qemu: snapshot: Save persistent domain config when taking external snapshot

2014-06-30 Thread Martin Kletzander
On Mon, Jun 30, 2014 at 01:54:09PM +0200, Peter Krempa wrote: Commit 55bbb011b965c7962933604c70f61cef45e8ec04 introduced a regression where we forgot to save the persistent domain configuration after a s/after a/after an/ external snapshot. This would make libvirt forget the snapshots and eff

Re: [libvirt] [PATCH] qemu: raise an error when trying to use readonly ide disks

2014-06-30 Thread Martin Kletzander
On Mon, Jun 30, 2014 at 12:05:06PM +0200, Giuseppe Scrivano wrote: The IDE bus doesn't support readonly disks, so inform the user with an error message instead of let qemu fail with a more obscure "Device 'ide-hd' could not be initialized" error message. Closes: https://bugzilla.redhat.com/show_

Re: [libvirt] Track an error

2014-06-30 Thread David kiarie
Thanks for that debugging tip. On Mon, Jun 30, 2014 at 12:10 PM, Martin Kletzander wrote: > On Sat, Jun 28, 2014 at 08:52:32AM +0300, David kiarie wrote: >> >> Hi there, >> >> Just a silly question, do we have a simpler way of checking where >> exactly a test is failing.The tests are failing afte

[libvirt] [for 1.2.6 PATCH] qemu: snapshot: Save persistent domain config when taking external snapshot

2014-06-30 Thread Peter Krempa
Commit 55bbb011b965c7962933604c70f61cef45e8ec04 introduced a regression where we forgot to save the persistent domain configuration after a external snapshot. This would make libvirt forget the snapshots and effectively revert to the previous state in the following scenario: 1) Start VM 2) Take sn

[libvirt] [PATCH] qemu: raise an error when trying to use readonly ide disks

2014-06-30 Thread Giuseppe Scrivano
The IDE bus doesn't support readonly disks, so inform the user with an error message instead of let qemu fail with a more obscure "Device 'ide-hd' could not be initialized" error message. Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1112939 Signed-off-by: Giuseppe Scrivano --- src/qemu/q

Re: [libvirt] RFC: 'old' event for leaseshelper.c when lease renews

2014-06-30 Thread Nehal J Wani
On Mon, Jun 30, 2014 at 1:52 PM, Daniel P. Berrange wrote: > On Sat, Jun 28, 2014 at 05:06:26AM +0530, Nehal J Wani wrote: >> In the current version of dnsmasq, the leases helper script/program >> specified by --dhcp-script to dnsmasq is invoked on three events, >> 'add', 'old', 'del'. In short, >

Re: [libvirt] new openvz driver (bossonvz)

2014-06-30 Thread Daniel P. Berrange
On Fri, Jun 27, 2014 at 03:16:51PM +0200, Bosson VZ wrote: > Hello, > > in the company I work for, we use openvz and qemu/kvm on our clusters > side-by-side. To manage our domains, we used libvirt/qemu for qemu/kvm > domains and vz tools for openvz domains in the past. This was very > inconvinient

Re: [libvirt] [PATCH 0/2] memdev device: add share argument for type=file

2014-06-30 Thread Daniel P. Berrange
On Mon, Jun 30, 2014 at 10:39:05AM +0200, Martin Kletzander wrote: > On Fri, Jun 27, 2014 at 10:53:10PM +0200, Michele Paolino wrote: > >This patch enables the possibility to run a qemu virtual machine with the > >share option for the memory-backend-file. The xml description looks like: > > > > > >

Re: [libvirt] Track an error

2014-06-30 Thread Martin Kletzander
On Sat, Jun 28, 2014 at 08:52:32AM +0300, David kiarie wrote: Hi there, Just a silly question, do we have a simpler way of checking where exactly a test is failing.The tests are failing after hacking stuff around. I have this error ../build-aux/test-driver: line 95: 20128 Segmentation fault

Re: [libvirt] [PATCH 0/2] memdev device: add share argument for type=file

2014-06-30 Thread Martin Kletzander
On Fri, Jun 27, 2014 at 10:53:10PM +0200, Michele Paolino wrote: This patch enables the possibility to run a qemu virtual machine with the share option for the memory-backend-file. The xml description looks like: ram0 1024 This work is based on the previous work of Chen Fan[1]. We a

Re: [libvirt] RFC: 'old' event for leaseshelper.c when lease renews

2014-06-30 Thread Daniel P. Berrange
On Sat, Jun 28, 2014 at 05:06:26AM +0530, Nehal J Wani wrote: > In the current version of dnsmasq, the leases helper script/program > specified by --dhcp-script to dnsmasq is invoked on three events, > 'add', 'old', 'del'. In short, > add: -> a new lease has to be added to db > del: -> a lease has

Re: [libvirt] [PATCH] qemu: fix domxml-to-native failing when spice_tls is not enabled

2014-06-30 Thread Jincheng Miao
Well, I have some thought about this fix. For xml-to-native operation, user only need a qemu cmd pattern for a specified domain XML, so the qemu cmdline generated should be strained by qemu.conf. The function qemuBuildCommandLine(), called by qemuConnectDomainXMLToNative() and qemuProcessStart(

  1   2   >