Re: [libvirt] [PATCH 1/3] tests: Don't crash when creating the config object fails

2014-04-07 Thread Guido Günther
On Mon, Apr 07, 2014 at 04:34:57PM -0600, Eric Blake wrote: > On 04/07/2014 02:02 AM, Guido Günther wrote: > > As observed when building in a chroot and QEMU_USER doesn't exist > > --- > > tests/qemuargv2xmltest.c | 3 +++ > > tests/qemuxml2argvtest.c | 3 +++ > > 2 files changed, 6 insertions(+)

Re: [libvirt] [PATCHv2 2/3] bhyve: create capabilities submodule

2014-04-07 Thread Wojciech Macek
Oh, sorry. I will definitely run this check with all further patches. Thanks for pushing! Wojtek 2014-04-07 15:42 GMT+02:00 Michal Privoznik : > On 07.04.2014 07:06, Wojciech Macek wrote: > >> - Move all capabilities functions to separate file >> - Add initCPU >> --- >> src/Makefile.am

[libvirt] [PATCH 2/2] bhyve: domainCreateXML

2014-04-07 Thread Wojciech Macek
Implement bhyveDomainCreteXML function. --- src/bhyve/bhyve_driver.c | 81 +++- 1 file changed, 80 insertions(+), 1 deletion(-) diff --git a/src/bhyve/bhyve_driver.c b/src/bhyve/bhyve_driver.c index f7a8912..2ea2d22 100644 --- a/src/bhyve/bhyve_driver.c

[libvirt] [PATCH 0/2] byve: domain management

2014-04-07 Thread Wojciech Macek
Some enhancements and fixes with domain management. 1. Create stub for domainResume. Since bhyve does not support suspending, this one works a little different. If domain is already running, it reports success, but fails in all other cases. 2. add domainCreateXML routine 3. Fix persistency: w

[libvirt] [PATCH 1/2] bhyve: stub for domainResume

2014-04-07 Thread Wojciech Macek
bhyve does not support suspend nor resume. To enable OpenStack procedure (create -> resume) use stub for domainResume function. If domain is running then report success; return failure in all other cases. --- src/bhyve/bhyve_driver.c | 34 ++ 1 file changed, 34 inse

[libvirt] [PATCH] virnetdev: Fix Memory Leak in virNetDevReplaceMacAddress() and virNetDevRestoreMacAddress()

2014-04-07 Thread Wangrui (K)
function virNetDevRestoreMacAddress() and virNetDevRestoreMacAddress() alloc memory for variable 'path' using virAsprintf(), but they havn't free that memory before returning out. Signed-off-by: Zhang bo --- src/util/virnetdev.c | 22 ++ 1 file changed, 14 insertions(+), 8

[libvirt] [PATCHv2 2/5] conf: fix detection of infinite backing loop

2014-04-07 Thread Eric Blake
While trying to refactor the backing file chain, I noticed that if you have a self-referential qcow2 file via a relative name: qemu-img create -f qcow2 loop 10M qemu-img rebase -u -f qcow2 -F qcow2 -b loop loop then libvirt was creating a chain 2 deep before realizing it had hit a loop; furthermo

Re: [libvirt] [PATCH 2/3] tests: Only use privileged mode if Qemu user and group exists

2014-04-07 Thread Eric Blake
On 04/07/2014 02:02 AM, Guido Günther wrote: > When building packages in a clean chroot the QEMU_USER and QEMU_GROUP > don't exist making VirQemuDriverConfigNew fail with privileged=true. > > Avoid that by not requiring priviliged mode and skipping tests that need s/priviliged/privileged/ > it.

Re: [libvirt] [PATCH 3/3] tests: link agains libxml2

2014-04-07 Thread Eric Blake
On 04/07/2014 02:02 AM, Guido Günther wrote: > to avoid > > CCLD storagevolxml2argvtest > /usr/bin/ld: > ../src/.libs/libvirt_driver_storage_impl.a(libvirt_driver_storage_impl_la-storage_backend.o): > undefined reference to symbol 'xmlFreeDoc@@LIBXML2_2.4.30' > //usr/lib/x86_64-linux-gnu/lib

Re: [libvirt] [PATCH 1/3] tests: Don't crash when creating the config object fails

2014-04-07 Thread Eric Blake
On 04/07/2014 02:02 AM, Guido Günther wrote: > As observed when building in a chroot and QEMU_USER doesn't exist > --- > tests/qemuargv2xmltest.c | 3 +++ > tests/qemuxml2argvtest.c | 3 +++ > 2 files changed, 6 insertions(+) > > diff --git a/tests/qemuargv2xmltest.c b/tests/qemuargv2xmltest.c >

Re: [libvirt] [PATCH 1/5] conf: avoid memleak on NULL path

2014-04-07 Thread Eric Blake
On 04/07/2014 02:22 AM, Peter Krempa wrote: > On 04/06/14 05:32, Eric Blake wrote: >> I noticed that the apparmor code could request metadata even >> for a cdrom with no media, which would cause a memory leak of >> the hash table used to look for loops in the backing chain. >> But even before that,

Re: [libvirt] [PATCH] lxc conf2xml: don't let current vcpus at 0: define won't like it

2014-04-07 Thread Eric Blake
On 04/07/2014 07:57 AM, Michal Privoznik wrote: > On 07.04.2014 09:22, Cédric Bosdonnat wrote: >> --- >> src/lxc/lxc_native.c | 1 + >> tests/lxcconf2xmldata/lxcconf2xml-blkiotune.xml | 2 +- >> tests/lxcconf2xmldata/lxcconf2xml-cpusettune.xml | 2 +- >>

Re: [libvirt] [PATCH 0/3] Couple of bhyve driver cleanups

2014-04-07 Thread Roman Bogorodskiy
Michal Privoznik wrote: > Michal Privoznik (3): > bhyve_capabilities: Add Semihalf to Copyright > Simplify bhyveDriverGetCapabilities() > bhyveConnectGetCapabilities: Fix double caps unref > > src/bhyve/bhyve_capabilities.c | 1 + > src/bhyve/bhyve_driver.c | 25 +++---

[libvirt] [PATCH 3/3] bhyveConnectGetCapabilities: Fix double caps unref

2014-04-07 Thread Michal Privoznik
At the beginning of the function we gain a reference to the driver capabilities. Then, we call format function (*) which if failed, unref over caps is called. Then, at the end another unref occurs. * - Moreover, the format was not called over gained caps, but over privconn->caps directly which is

[libvirt] [PATCH 0/3] Couple of bhyve driver cleanups

2014-04-07 Thread Michal Privoznik
*** BLURB HERE *** Michal Privoznik (3): bhyve_capabilities: Add Semihalf to Copyright Simplify bhyveDriverGetCapabilities() bhyveConnectGetCapabilities: Fix double caps unref src/bhyve/bhyve_capabilities.c | 1 + src/bhyve/bhyve_driver.c | 25 +++-- 2 files chan

[libvirt] [PATCH 1/3] bhyve_capabilities: Add Semihalf to Copyright

2014-04-07 Thread Michal Privoznik
Since b15a2bbd we have the new bhyve_capabilities.[ch] files. However, the copyright is held by both Roman and Semihalf. Signed-off-by: Michal Privoznik --- src/bhyve/bhyve_capabilities.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/bhyve/bhyve_capabilities.c b/src/bhyve/bhyve_capabil

[libvirt] [PATCH 2/3] Simplify bhyveDriverGetCapabilities()

2014-04-07 Thread Michal Privoznik
The driver passed as the only argument to the function should never be NULL so there's no need to check it. After removing it, the whole function collapses to a single line doing ref over driver capabilities. Signed-off-by: Michal Privoznik --- src/bhyve/bhyve_driver.c | 11 +++ 1 file c

Re: [libvirt] [PATCH 1/3] bhyve: add domain metadata support

2014-04-07 Thread Michal Privoznik
On 06.04.2014 11:52, Roman Bogorodskiy wrote: Implement domainSetMetadata and domainGetMetadata driver calls. --- src/bhyve/bhyve_driver.c | 55 1 file changed, 55 insertions(+) diff --git a/src/bhyve/bhyve_driver.c b/src/bhyve/bhyve_driver.c i

Re: [libvirt] [PATCH 2/3] tests: add testutilsbhyve

2014-04-07 Thread Michal Privoznik
On 06.04.2014 11:52, Roman Bogorodskiy wrote: In preparation of adding more tests for bhyve, move common bhyve utils to testutilsbhyve --- tests/Makefile.am | 6 -- tests/bhyvexml2argvtest.c | 28 +--- tests/testutilsbhyve.c| 34 +++

Re: [libvirt] [PATCH 3/3] tests: add bhyve xml2xml test

2014-04-07 Thread Michal Privoznik
On 06.04.2014 11:52, Roman Bogorodskiy wrote: The only implemented test for now is domain metadata test. --- tests/Makefile.am | 11 +- tests/bhyvexml2argvdata/bhyvexml2argv-metadata.xml | 26 + .../bhyvexml2xmlout-metadata.xml | 33 ++

Re: [libvirt] [PATCH v5 1/5] Introduce virDomainFSFreeze() and virDomainFSThaw() public API

2014-04-07 Thread Tomoki Sekiyama
On 4/4/14 8:15 , "Eric Blake" wrote: >On 04/04/2014 02:51 AM, Daniel P. Berrange wrote: >> On Thu, Apr 03, 2014 at 11:39:29AM -0400, Tomoki Sekiyama wrote: >>> These will freeze and thaw filesystems within guest. The APIs take >>>@disks >>> and @ndisks parameters to specify disks to be frozen or

Re: [libvirt] [PATCHv2 0/3] bhyve: capabilities and CPU-capabilities support

2014-04-07 Thread Roman Bogorodskiy
Michal Privoznik wrote: > On 07.04.2014 07:06, Wojciech Macek wrote: > > Rebased onto master > > > > Add following changes: > > - support for connectBaselineCPU (required by OpenStack) > > - move capabilites functions to separate file + API change > > - implement connectCompareCPU > > > > Wojcie

Re: [libvirt] [PATCH] lxc conf2xml: don't let current vcpus at 0: define won't like it

2014-04-07 Thread Michal Privoznik
On 07.04.2014 09:22, Cédric Bosdonnat wrote: --- src/lxc/lxc_native.c | 1 + tests/lxcconf2xmldata/lxcconf2xml-blkiotune.xml | 2 +- tests/lxcconf2xmldata/lxcconf2xml-cpusettune.xml | 2 +- tests/lxcconf2xmldata/lxcconf2xml-cputune.xml| 2 +-

[libvirt] ANNOUNCE: Perl binding Sys-Virt release 1.2.3

2014-04-07 Thread Daniel P. Berrange
I am pleased to announce that release 1.2.3 of Sys-Virt, the libvirt Perl API binding, is now available for download: http://search.cpan.org/CPAN/authors/id/D/DA/DANBERR/Sys-Virt-1.2.3.tar.gz Changed in the 1.2.3 release: - Add VIR_FROM_CRYPTO error constant - Add VIR_MIGRATE_AUTO_CONVERGE m

Re: [libvirt] [PATCHv2 2/3] bhyve: create capabilities submodule

2014-04-07 Thread Michal Privoznik
On 07.04.2014 07:06, Wojciech Macek wrote: - Move all capabilities functions to separate file - Add initCPU --- src/Makefile.am| 2 + src/bhyve/bhyve_capabilities.c | 105 + src/bhyve/bhyve_capabilities.h | 30 src/bhyve

Re: [libvirt] [PATCHv2 0/3] bhyve: capabilities and CPU-capabilities support

2014-04-07 Thread Michal Privoznik
On 07.04.2014 07:06, Wojciech Macek wrote: Rebased onto master Add following changes: - support for connectBaselineCPU (required by OpenStack) - move capabilites functions to separate file + API change - implement connectCompareCPU Wojciech Macek (3): bhyve: support for connectBaselineCPU

Re: [libvirt] [PATCH] hash: add common utility functions

2014-04-07 Thread Eric Blake
On 04/07/2014 03:23 AM, Peter Krempa wrote: > On 04/05/14 01:49, Eric Blake wrote: >> I almost wrote a hash value free function that just called >> VIR_FREE, then realized I couldn't be the first person to >> do that. Sure enough, it was worth factoring into a common >> helper routine. >> > > AC

Re: [libvirt] [PATCH] interface: dumpx inactive xml when interface isn't active

2014-04-07 Thread Michal Privoznik
On 07.04.2014 14:32, Laine Stump wrote: Other drivers in libvirt (e.g. network, qemu) will automatically return the "inactive" (persistent configuration) XML of an object when that object is inactive. The netcf backend of the interface driver would always try to return the live status XML of the

Re: [libvirt] [PATCH] tests: build viridentitytest only WITH_ATTR.

2014-04-07 Thread Michal Privoznik
On 04.04.2014 15:27, Jincheng Miao wrote: Commit d7c4e0036 assumed all SELinux tests depended upon securityselinuxhelper need xattr support, but forgot to move viridentitytest under WITH_ATTR. Reported-by: Nehal J Wani Signed-off-by: Jincheng Miao --- tests/Makefile.am | 4 ++-- 1 file chan

[libvirt] [PATCH] interface: dumpx inactive xml when interface isn't active

2014-04-07 Thread Laine Stump
Other drivers in libvirt (e.g. network, qemu) will automatically return the "inactive" (persistent configuration) XML of an object when that object is inactive. The netcf backend of the interface driver would always try to return the live status XML of the interface, even when it was down. Although

Re: [libvirt] [PATCH libvirt-python 1/2] build: add BuildRequires for python-lxml and python3-lxml

2014-04-07 Thread Daniel P. Berrange
On Mon, Apr 07, 2014 at 02:30:51PM +0300, Laine Stump wrote: > python-lxml is likely always already present anyway (due to so many > packages being dependent on it), but at least on my F20 system, > python3-lxml wasn't installed, leading to a failure of "python > setup.py rpm" without an informativ

Re: [libvirt] [PATCH libvirt-python 2/2] increment version post-release

2014-04-07 Thread Daniel P. Berrange
On Mon, Apr 07, 2014 at 02:30:52PM +0300, Laine Stump wrote: > As is now done with libvirt. git head will always have the version > number of the expected *next* release. > --- > setup.py | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/setup.py b/setup.py > index 44ebcf7.

[libvirt] [PATCH libvirt-python 0/2] fix build dependency & increment version

2014-04-07 Thread Laine Stump
Although they're trivial and one is a build breaker, I haven't pushed either in case I've made incorrect assumptions about something. Laine Stump (2): build: add BuildRequires for python-lxml and python3-lxml increment version post-release libvirt-python.spec.in | 2 ++ setup.py

[libvirt] [PATCH libvirt-python 1/2] build: add BuildRequires for python-lxml and python3-lxml

2014-04-07 Thread Laine Stump
python-lxml is likely always already present anyway (due to so many packages being dependent on it), but at least on my F20 system, python3-lxml wasn't installed, leading to a failure of "python setup.py rpm" without an informative error message. --- libvirt-python.spec.in | 2 ++ 1 file changed,

[libvirt] [PATCH libvirt-python 2/2] increment version post-release

2014-04-07 Thread Laine Stump
As is now done with libvirt. git head will always have the version number of the expected *next* release. --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 44ebcf7..f4c05ca 100755 --- a/setup.py +++ b/setup.py @@ -309,7 +309,7 @@ class my_cl

Re: [libvirt] [PATCHv2] maint: Correctly detect wether "gluster" cli tool is accessible

2014-04-07 Thread Peter Krempa
On 04/07/14 13:14, Ján Tomko wrote: > On 04/07/2014 11:40 AM, Peter Krempa wrote: >> The configure definition previously always defined the GLUSTER_CLI macro >> and thus the code needing it wasn't compiled out if the tool wasn't >> accessible. >> --- >> >> Notes: >> Version 2: >> Simplify c

Re: [libvirt] [PATCHv2] maint: Correctly detect wether "gluster" cli tool is accessible

2014-04-07 Thread Ján Tomko
On 04/07/2014 11:40 AM, Peter Krempa wrote: > The configure definition previously always defined the GLUSTER_CLI macro > and thus the code needing it wasn't compiled out if the tool wasn't > accessible. > --- > > Notes: > Version 2: > Simplify check. > > configure.ac | 6 -- > 1 file

Re: [libvirt] [PATCH] libvirt-guests: avoid bashism

2014-04-07 Thread Guido Günther
On Mon, Apr 07, 2014 at 11:25:07AM +0200, Peter Krempa wrote: > On 04/07/14 11:20, Guido Günther wrote: > > At least Debian uses dash to run the init scripts > > --- > > tools/libvirt-guests.sh.in | 4 +++- > > 1 file changed, 3 insertions(+), 1 deletion(-) > > > > diff --git a/tools/libvirt-gues

Re: [libvirt] [PATCH] QoS: make tc filters match all traffic

2014-04-07 Thread Michal Privoznik
On 04.04.2014 15:39, Antoni S. Puimedon wrote: > Up until now the traffic control filters for the vNIC QoS were > matching only ip traffic. For egress traffic that was unnoticed > because the unmatched traffic would just go to the default htb class > and be shaped anyway. For ingress, though, since

[libvirt] [PATCHv2] maint: Correctly detect wether "gluster" cli tool is accessible

2014-04-07 Thread Peter Krempa
The configure definition previously always defined the GLUSTER_CLI macro and thus the code needing it wasn't compiled out if the tool wasn't accessible. --- Notes: Version 2: Simplify check. configure.ac | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/configure.

Re: [libvirt] [PATCH] libvirt-guests: avoid bashism

2014-04-07 Thread Peter Krempa
On 04/07/14 11:20, Guido Günther wrote: > At least Debian uses dash to run the init scripts > --- > tools/libvirt-guests.sh.in | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/tools/libvirt-guests.sh.in b/tools/libvirt-guests.sh.in > index 4bbd4e4..a158b62 100644 > ---

Re: [libvirt] [PATCH] hash: add common utility functions

2014-04-07 Thread Peter Krempa
On 04/05/14 01:49, Eric Blake wrote: > I almost wrote a hash value free function that just called > VIR_FREE, then realized I couldn't be the first person to > do that. Sure enough, it was worth factoring into a common > helper routine. > > Furthermore, in a few places we were passing raw free()

[libvirt] [PATCH] libvirt-guests: avoid bashism

2014-04-07 Thread Guido Günther
At least Debian uses dash to run the init scripts --- tools/libvirt-guests.sh.in | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/libvirt-guests.sh.in b/tools/libvirt-guests.sh.in index 4bbd4e4..a158b62 100644 --- a/tools/libvirt-guests.sh.in +++ b/tools/libvirt-guests.

Re: [libvirt] [PATCH 5/5] conf: another refactor of virstoragetest

2014-04-07 Thread Peter Krempa
On 04/06/14 05:32, Eric Blake wrote: > Another reduction in the number of structs I have to modify > when I start tracking new fields in virStorageFileMetadata. > > * tests/virstoragetest.c (_testFileData): Add fields. > (testStorageChain): Select between fields based on flag. > (mymain): Record b

Re: [libvirt] [PATCH 4/5] conf: interleave virstoragetest structs

2014-04-07 Thread Peter Krempa
On 04/06/14 05:32, Eric Blake wrote: > As I add more tests, it's getting harder to follow the split between > a struct in one place and a test using the struct in another. > Interleaving the tests makes changes more localized, and also makes > debugging easier when a test goes wrong during my refac

Re: [libvirt] [PATCH 3/5] conf: test for more scenarios

2014-04-07 Thread Peter Krempa
On 04/06/14 05:32, Eric Blake wrote: > Part of the upcoming refactoring will change how broken chains > are detected; it makes sense to test that this works. In > particular, test the just-fixed infinite loop detection bug. > Also, make sure that detection of directories is sane. > > * tests/virs

Re: [libvirt] [PATCH 2/5] conf: fix detection of infinite backing loop

2014-04-07 Thread Peter Krempa
On 04/06/14 05:32, Eric Blake wrote: > While trying to refactor the backing file chain, I noticed that > if you have a self-referential qcow2 file via a relative name: > > qemu-img create -f qcow2 loop 10M > qemu-img rebase -u -f qcow2 -F qcow2 -b loop loop > > then libvirt was creating a chain 2

Re: [libvirt] [PATCH 1/5] conf: avoid memleak on NULL path

2014-04-07 Thread Peter Krempa
On 04/06/14 05:32, Eric Blake wrote: > I noticed that the apparmor code could request metadata even > for a cdrom with no media, which would cause a memory leak of > the hash table used to look for loops in the backing chain. > But even before that, we blindly dereferenced the path for > printing a

[libvirt] [PATCH 2/3] tests: Only use privileged mode if Qemu user and group exists

2014-04-07 Thread Guido Günther
When building packages in a clean chroot the QEMU_USER and QEMU_GROUP don't exist making VirQemuDriverConfigNew fail with privileged=true. Avoid that by not requiring priviliged mode and skipping tests that need it. --- tests/qemuxml2argvtest.c | 24 1 file changed, 16 in

[libvirt] [PATCH 1/3] tests: Don't crash when creating the config object fails

2014-04-07 Thread Guido Günther
As observed when building in a chroot and QEMU_USER doesn't exist --- tests/qemuargv2xmltest.c | 3 +++ tests/qemuxml2argvtest.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/tests/qemuargv2xmltest.c b/tests/qemuargv2xmltest.c index 6d7e23e..4cc3749 100644 --- a/tests/qemuargv2xmltest.c

[libvirt] [PATCH 3/3] tests: link agains libxml2

2014-04-07 Thread Guido Günther
to avoid CCLD storagevolxml2argvtest /usr/bin/ld: ../src/.libs/libvirt_driver_storage_impl.a(libvirt_driver_storage_impl_la-storage_backend.o): undefined reference to symbol 'xmlFreeDoc@@LIBXML2_2.4.30' //usr/lib/x86_64-linux-gnu/libxml2.so.2: error adding symbols: DSO missing from command

Re: [libvirt] [PATCH] maint: Correctly detect wether "gluster" cli tool is accessible

2014-04-07 Thread Ján Tomko
On 04/07/2014 09:49 AM, Peter Krempa wrote: > The configure definition previously always defined the GLUSTER_CLI macro > and thus the code needing it wasn't compiled out if the tool wasn't > accessible. > --- > configure.ac | 8 +--- > 1 file changed, 5 insertions(+), 3 deletions(-) > > diff

[libvirt] [PATCH] maint: Correctly detect wether "gluster" cli tool is accessible

2014-04-07 Thread Peter Krempa
The configure definition previously always defined the GLUSTER_CLI macro and thus the code needing it wasn't compiled out if the tool wasn't accessible. --- configure.ac | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index e68f5f6..fa07cfd 1

Re: [libvirt] [PATCH] -Added autocloseable to connect class (set close() return type to void so to adapt it to the autocloseable interface)

2014-04-07 Thread Claudio Bley
At Sat, 5 Apr 2014 21:01:31 +0200, phate...@gmail.com wrote: > > From: pasquale > > -Added the following bindings: > --virDomainGetCpuStats > --virNodeGetCpuStats > --virDomainShutdownFlags > --virDomainDestroyFlags > > -Added following classes > --org/libvirt/CPUStatistic giving cpu stats in

[libvirt] [PATCH] lxc conf2xml: don't let current vcpus at 0: define won't like it

2014-04-07 Thread Cédric Bosdonnat
--- src/lxc/lxc_native.c | 1 + tests/lxcconf2xmldata/lxcconf2xml-blkiotune.xml | 2 +- tests/lxcconf2xmldata/lxcconf2xml-cpusettune.xml | 2 +- tests/lxcconf2xmldata/lxcconf2xml-cputune.xml| 2 +- tests/lxcconf2xmldata/lxcconf2xml-idmap.xml