[libvirt] [PATCH] Properly check the return value of CCWAddressAsString

2014-06-23 Thread Ján Tomko
It returns NULL on failure. Checking if the negation of it is less than zero makes no sense. (Found by coverity after moving the code) In another case, the return value wasn't checked at all. --- src/conf/domain_addr.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git

Re: [libvirt] [PATCH] Properly check the return value of CCWAddressAsString

2014-06-23 Thread Peter Krempa
On 06/23/14 08:36, Ján Tomko wrote: It returns NULL on failure. Checking if the negation of it is less than zero makes no sense. (Found by coverity after moving the code) In another case, the return value wasn't checked at all. --- src/conf/domain_addr.c | 5 +++-- 1 file changed, 3

Re: [libvirt] [PATCH] domain_addr: Resolve Coverity warning

2014-06-23 Thread Peter Krempa
On 06/21/14 13:54, John Ferlan wrote: Recent changes in the module : http://www.redhat.com/archives/libvir-list/2014-June/msg00978.html seem to have caused Coverity to take a look... The virDomainCCWAddressAsString() API returns either a NULL or a string and the comparison of the

Re: [libvirt] [PATCH] lxc: don't update memUsage when failing to get memory usage

2014-06-23 Thread chenhanx...@cn.fujitsu.com
ping -Original Message- From: libvir-list-boun...@redhat.com [mailto:libvir-list-boun...@redhat.com] On Behalf Of Chen Hanxiao Sent: Friday, June 20, 2014 2:21 PM To: libvir-list@redhat.com Subject: [libvirt] [PATCH] lxc: don't update memUsage when failing to get memory usage

Re: [libvirt] [PATCH] Fix closedir usage in virNumaGetPages

2014-06-23 Thread Ján Tomko
On 06/21/2014 05:29 PM, Roman Bogorodskiy wrote: virNumaGetPages calls closedir(dir) in cleanup and dir could be NULL if we jump there from the failed opendir() call. While it's not harmful on Linux, FreeBSD libc crashes [1], so make sure that dir is not NULL before calling closedir. 1:

Re: [libvirt] [PATCH] Properly check the return value of CCWAddressAsString

2014-06-23 Thread Ján Tomko
On 06/23/2014 08:42 AM, Peter Krempa wrote: On 06/23/14 08:36, Ján Tomko wrote: It returns NULL on failure. Checking if the negation of it is less than zero makes no sense. (Found by coverity after moving the code) In another case, the return value wasn't checked at all. ---

[libvirt] [PATCH] Do not call closedir with NULL argument

2014-06-23 Thread Ján Tomko
Only three other callers possibly call closedir on a NULL argument. Even though these probably won't be used on FreeBSD where this crashes, let's be nice and only call closedir on an actual directory stream. --- src/parallels/parallels_storage.c | 2 +- src/util/virscsi.c| 6

[libvirt] [PATCH] LXC: trivially support flag VIR_DRV_FEATURE_TYPED_PARAM_STRING

2014-06-23 Thread Chen Hanxiao
fix: virsh -c lxc:/// memtune DOMAIN error: Unable to get number of memory parameters error: unsupported flags (0x4) in function lxcDomainGetMemoryParameters Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- src/lxc/lxc_driver.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-)

[libvirt] [PATCH 0/2] util: numa: Fix few issues with hugepage code

2014-06-23 Thread Peter Krempa
Peter Krempa (2): util: numa: Catch readdir errors in virNumaGetPages util: numa: Stub out hugepage code on non-Linux platforms src/util/virnuma.c | 52 +++- 1 file changed, 43 insertions(+), 9 deletions(-) -- 1.9.3 -- libvir-list mailing

[libvirt] [PATCH 1/2] util: numa: Catch readdir errors in virNumaGetPages

2014-06-23 Thread Peter Krempa
Don't return possibly incomplete result if virDirRead fails. --- src/util/virnuma.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/util/virnuma.c b/src/util/virnuma.c index c8e7f40..9cf5a75 100644 --- a/src/util/virnuma.c +++ b/src/util/virnuma.c @@ -728,6 +728,7 @@

[libvirt] [PATCH 2/2] util: numa: Stub out hugepage code on non-Linux platforms

2014-06-23 Thread Peter Krempa
The hugepage sizing and counting code gathers the information from sysfs and thus isn't portable. Stub it out for non-Linux so that we can report a better error. This patch also avoids calling sysinfo() on Mingw where it isn't supported. --- src/util/virnuma.c | 46

Re: [libvirt] [PATCH 03/10] util: storagefile: Introduce helper to free storage source perms

2014-06-23 Thread Peter Krempa
On 06/20/14 12:09, John Ferlan wrote: On 06/20/2014 02:53 AM, Peter Krempa wrote: On 06/19/14 20:57, John Ferlan wrote: On 06/19/2014 09:46 AM, Peter Krempa wrote: It will also be reused later. --- src/util/virstoragefile.c | 16 1 file changed, 12 insertions(+), 4

Re: [libvirt] [PATCHv5 02/19] util: storagefile: Introduce universal function to canonicalize paths

2014-06-23 Thread Peter Krempa
On 06/20/14 16:35, Eric Blake wrote: On 06/19/2014 07:59 AM, Peter Krempa wrote: Introduce a common function that will take a callback to resolve links that will be used to canonicalize paths on various storage systems and add extensive tests. --- src/libvirt_private.syms | 1 +

Re: [libvirt] [PATCH 3/3] Add pkg-config files to allow deps to build against source tree

2014-06-23 Thread Daniel P. Berrange
On Fri, Jun 20, 2014 at 01:02:46PM -0600, Eric Blake wrote: On 06/20/2014 10:51 AM, Daniel P. Berrange wrote: When testing language bindings it is useful to be able to build them against an uninstalled libvirt source tree. Add a dummy set of pkg-config files to allow for this. This can be

Re: [libvirt] [PATCH 0/2] util: numa: Fix few issues with hugepage code

2014-06-23 Thread Pavel Hrdina
On 23.6.2014 09:29, Peter Krempa wrote: Peter Krempa (2): util: numa: Catch readdir errors in virNumaGetPages util: numa: Stub out hugepage code on non-Linux platforms src/util/virnuma.c | 52 +++- 1 file changed, 43 insertions(+), 9

[libvirt] [PATCH] Fix invalid write in virNumaGetDistances

2014-06-23 Thread Ján Tomko
Invalid write of size 4 at 0x52E678C: virNumaGetDistances (virnuma.c:479) by 0x5396890: nodeCapsInitNUMA (nodeinfo.c:1796) by 0x203C2B: virQEMUCapsInit (qemu_capabilities.c:960) Address 0xe10a1e0 is 0 bytes after a block of size 0 alloc'd at 0x4C2A6D0:

[libvirt] [PATCH] test: Skip storage test when filesystem storage backend isn't compiled in

2014-06-23 Thread Peter Krempa
'virstoragetest' accesses backing chains of files on local storage with the help of the storage driver. Disable the test on builds without the storage driver as the test is crashing otherwise. --- tests/virstoragetest.c | 6 ++ 1 file changed, 6 insertions(+) diff --git

Re: [libvirt] [libvirt-glib] gobject: Fix GEnum generation through glib-mkenums

2014-06-23 Thread Christophe Fergeau
Ping? On Tue, Jun 03, 2014 at 11:16:14AM +0200, Christophe Fergeau wrote: We were only passing libvirt-gobject-domain.h and libvirt-gobject-connection.h through glib-mkenums, which causes it to only generate GEnum information for enums found in these headers. We want to do that for all enums

Re: [libvirt] [PATCH] test: Skip storage test when filesystem storage backend isn't compiled in

2014-06-23 Thread Jiri Denemark
On Mon, Jun 23, 2014 at 12:04:28 +0200, Peter Krempa wrote: 'virstoragetest' accesses backing chains of files on local storage with the help of the storage driver. Disable the test on builds without the storage driver as the test is crashing otherwise. --- tests/virstoragetest.c | 6 ++

Re: [libvirt] [PATCH] Do not call closedir with NULL argument

2014-06-23 Thread Nehal J Wani
On Mon, Jun 23, 2014 at 12:36 PM, Ján Tomko jto...@redhat.com wrote: Only three other callers possibly call closedir on a NULL argument. Even though these probably won't be used on FreeBSD where this crashes, let's be nice and only call closedir on an actual directory stream. ---

[libvirt] [PATCHv2] test: Disable storage test when FS backend isn't compiled in

2014-06-23 Thread Peter Krempa
'virstoragetest' accesses backing chains of files on local storage with the help of the storage driver. Disable the test on builds without the storage driver as the test is crashing otherwise. Reported by: Roman Bogorodskiy --- Notes: Version 2: - Don't run the test from the makefile

Re: [libvirt] [PATCHv2] test: Disable storage test when FS backend isn't compiled in

2014-06-23 Thread Jiri Denemark
On Mon, Jun 23, 2014 at 13:21:49 +0200, Peter Krempa wrote: 'virstoragetest' accesses backing chains of files on local storage with the help of the storage driver. Disable the test on builds without the storage driver as the test is crashing otherwise. Reported by: Roman Bogorodskiy ---

Re: [libvirt] [PATCHv2] test: Disable storage test when FS backend isn't compiled in

2014-06-23 Thread Peter Krempa
On 06/23/14 13:31, Jiri Denemark wrote: On Mon, Jun 23, 2014 at 13:21:49 +0200, Peter Krempa wrote: 'virstoragetest' accesses backing chains of files on local storage with the help of the storage driver. Disable the test on builds without the storage driver as the test is crashing otherwise.

Re: [libvirt] [PATCH] Do not call closedir with NULL argument

2014-06-23 Thread Michal Privoznik
On 23.06.2014 09:06, Ján Tomko wrote: Only three other callers possibly call closedir on a NULL argument. Even though these probably won't be used on FreeBSD where this crashes, let's be nice and only call closedir on an actual directory stream. --- src/parallels/parallels_storage.c | 2 +-

Re: [libvirt] [PATCH] Fix closedir usage in virNumaGetPages

2014-06-23 Thread Michal Privoznik
On 21.06.2014 17:29, Roman Bogorodskiy wrote: virNumaGetPages calls closedir(dir) in cleanup and dir could be NULL if we jump there from the failed opendir() call. While it's not harmful on Linux, FreeBSD libc crashes [1], so make sure that dir is not NULL before calling closedir. 1:

Re: [libvirt] [PATCH 2/2] util: numa: Stub out hugepage code on non-Linux platforms

2014-06-23 Thread Michal Privoznik
On 23.06.2014 09:29, Peter Krempa wrote: The hugepage sizing and counting code gathers the information from sysfs and thus isn't portable. Stub it out for non-Linux so that we can report a better error. This patch also avoids calling sysinfo() on Mingw where it isn't supported. ---

Re: [libvirt] [PATCH] Fix invalid write in virNumaGetDistances

2014-06-23 Thread Michal Privoznik
On 23.06.2014 11:53, Ján Tomko wrote: Invalid write of size 4 at 0x52E678C: virNumaGetDistances (virnuma.c:479) by 0x5396890: nodeCapsInitNUMA (nodeinfo.c:1796) by 0x203C2B: virQEMUCapsInit (qemu_capabilities.c:960) Address 0xe10a1e0 is 0 bytes after a block of

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

2014-06-23 Thread Jenkins CI
See http://honk.sigxcpu.org:8001/job/libvirt-syntax-check/2398/ -- Started by upstream project libvirt-build build number 2706 Building on master in workspace http://honk.sigxcpu.org:8001/job/libvirt-syntax-check/ws/ [workspace] $ /bin/sh -xe

[libvirt] [PATCH] Report correct error in virNetDevTapCreate

2014-06-23 Thread Ján Tomko
ioctl returns -1, not the errno value --- src/util/virnetdevtap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/virnetdevtap.c b/src/util/virnetdevtap.c index 0b444fa..d64e64f 100644 --- a/src/util/virnetdevtap.c +++ b/src/util/virnetdevtap.c @@ -294,7 +294,7 @@ int

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

2014-06-23 Thread Peter Krempa
On 06/23/14 13:51, Jenkins CI wrote: See http://honk.sigxcpu.org:8001/job/libvirt-syntax-check/2398/ -- Started by upstream project libvirt-build build number 2706 Building on master in workspace

[libvirt] [PATCH] tests: Fix syntax-check after cdd11151791bc9e61538988438980f41c0185681

2014-06-23 Thread Peter Krempa
makefile_conditionals tests/Makefile.am:293:endif maint.mk: match if FOO with endif FOO in Makefiles make: *** [sc_makefile_conditionals] Error 1 --- Notes: Pushing under the build breaker rule and putting on the brown paper box of shame :/ tests/Makefile.am | 2 +- 1 file changed, 1

Re: [libvirt] [PATCH] Report correct error in virNetDevTapCreate

2014-06-23 Thread Michal Privoznik
On 23.06.2014 13:53, Ján Tomko wrote: ioctl returns -1, not the errno value --- src/util/virnetdevtap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/virnetdevtap.c b/src/util/virnetdevtap.c index 0b444fa..d64e64f 100644 --- a/src/util/virnetdevtap.c +++

Re: [libvirt] [PATCH 2/2] util: numa: Stub out hugepage code on non-Linux platforms

2014-06-23 Thread Peter Krempa
On 06/23/14 13:49, Michal Privoznik wrote: On 23.06.2014 09:29, Peter Krempa wrote: The hugepage sizing and counting code gathers the information from sysfs and thus isn't portable. Stub it out for non-Linux so that we can report a better error. This patch also avoids calling sysinfo() on

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

2014-06-23 Thread Jenkins CI
See http://honk.sigxcpu.org:8001/job/libvirt-syntax-check/2399/ -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH v3 0/5] Next round of active commit support

2014-06-23 Thread Kashyap Chamarthy
On Sat, Jun 21, 2014 at 04:04:45PM +0530, Kashyap Chamarthy wrote: I just tried to test this series built from Eric's libvirt git repo, and QEMU built from its git. On a live (or offline guest) I see the below: $ virsh blockcommit f20vm1 vda --shallow --wait \ --verbose

Re: [libvirt] [PATCH] LXC: trivially support flag VIR_DRV_FEATURE_TYPED_PARAM_STRING

2014-06-23 Thread Ján Tomko
On 06/23/2014 09:28 AM, Chen Hanxiao wrote: fix: virsh -c lxc:/// memtune DOMAIN error: Unable to get number of memory parameters error: unsupported flags (0x4) in function lxcDomainGetMemoryParameters Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com --- src/lxc/lxc_driver.c | 6

[libvirt] [PATCH 1/3] virNumaGetPageInfo: Take huge pages into account

2014-06-23 Thread Michal Privoznik
On the Linux kernel, if huge pages are allocated the size they cut off from memory is accounted under the 'MemUsed' in the meminfo file. However, we want the sum to be subtracted from 'MemTotal'. This patch implements this feature. After this change, we can enable reporting of the ordinary system

[libvirt] [PATCH 0/3] Couple of huge pages improvements

2014-06-23 Thread Michal Privoznik
*** BLURB HERE *** Michal Privoznik (3): virNumaGetPageInfo: Take huge pages into account virNumaGetPages: Don't fail on huge page-less systems virnuma: Actually build huge page code src/nodeinfo.c | 2 +- src/util/virnuma.c | 87 +++---

[libvirt] [PATCH 3/3] virnuma: Actually build huge page code

2014-06-23 Thread Michal Privoznik
One of previous commits (e6258a33) tried to build the huge page code only on Linux since it's Linux centric indeed. But it failed miserably as it used 'WITH_LINUX' which is an automake conditional not a gcc one. In the sources we need to use __linux__. Signed-off-by: Michal Privoznik

[libvirt] [PATCH 2/3] virNumaGetPages: Don't fail on huge page-less systems

2014-06-23 Thread Michal Privoznik
If we are running on a system that is not capable of huge pages (e.g. because the kernel is not configured that way) we still try to open /sys/kernel/mm/hugepages/ which however does not exist. We should be tolerant to this specific use case. Signed-off-by: Michal Privoznik mpriv...@redhat.com

Re: [libvirt] [PATCH 3/3] virnuma: Actually build huge page code

2014-06-23 Thread Peter Krempa
On 06/23/14 15:59, Michal Privoznik wrote: One of previous commits (e6258a33) tried to build the huge page code only on Linux since it's Linux centric indeed. But it failed miserably as it used 'WITH_LINUX' which is an automake conditional not a gcc one. In the sources we need to use

Re: [libvirt] [PATCH 1/5] virhostdev: Move IOMMU and VFIO funcs from qemu

2014-06-23 Thread Daniel P. Berrange
On Fri, Jun 20, 2014 at 04:19:06PM +0200, Michal Privoznik wrote: The functions in question are qemuHostdevHostSupportsPassthroughLegacy and qemuHostdevHostSupportsPassthroughVFIO. At the same time the functions are renamed to match 'vir' prefix instead of 'qemu' one. I'm not sure I see the

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

2014-06-23 Thread Martin Kletzander
Signed-off-by: Martin Kletzander mklet...@redhat.com --- 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/../../../../x86_64-pc-linux-gnu/bin/ld:

Re: [libvirt] [PATCH 1/5] virhostdev: Move IOMMU and VFIO funcs from qemu

2014-06-23 Thread Michal Privoznik
On 23.06.2014 16:05, Daniel P. Berrange wrote: On Fri, Jun 20, 2014 at 04:19:06PM +0200, Michal Privoznik wrote: The functions in question are qemuHostdevHostSupportsPassthroughLegacy and qemuHostdevHostSupportsPassthroughVFIO. At the same time the functions are renamed to match 'vir' prefix

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

2014-06-23 Thread Daniel P. Berrange
On Fri, Jun 20, 2014 at 04:19:07PM +0200, Michal Privoznik wrote: --- docs/formatemulatorcaps.html.in| 52 docs/schemas/Makefile.am | 1 + docs/schemas/emulatorcapability.rng| 26 docs/sitemap.html.in

Re: [libvirt] [PATCH 3/5] Introduce virConnectGetEmulatorCapabilities

2014-06-23 Thread Daniel P. Berrange
On Fri, Jun 20, 2014 at 04:19:08PM +0200, Michal Privoznik wrote: The API is supposed to fetch virEmulatorCapabilities once implemented in the hypervisor drivers. Signed-off-by: Michal Privoznik mpriv...@redhat.com --- include/libvirt/libvirt.h.in | 6 + src/driver.h

Re: [libvirt] [PATCH 5/5] qemu: Implement virConnectGetEmulatorCapabilities

2014-06-23 Thread Daniel P. Berrange
On Fri, Jun 20, 2014 at 04:19:10PM +0200, Michal Privoznik wrote: The commit produces this nice output: virsh # emulatorcaps /usr/bin/qemu-system-x86_64 kvm pc-1.3 emulatorCapabilities path/usr/bin/qemu-system-x86_64/path domainkvm/domain machinepc-1.3/machine archx86_64/arch

Re: [libvirt] [PATCHv5 02/19] util: storagefile: Introduce universal function to canonicalize paths

2014-06-23 Thread Eric Blake
On 06/23/2014 02:28 AM, Peter Krempa wrote: On 06/20/14 16:35, Eric Blake wrote: On 06/19/2014 07:59 AM, Peter Krempa wrote: Introduce a common function that will take a callback to resolve links that will be used to canonicalize paths on various storage systems and add extensive tests. ---

Re: [libvirt] [PATCH 3/3] Add pkg-config files to allow deps to build against source tree

2014-06-23 Thread Eric Blake
On 06/23/2014 02:52 AM, Daniel P. Berrange wrote: On Fri, Jun 20, 2014 at 01:02:46PM -0600, Eric Blake wrote: On 06/20/2014 10:51 AM, Daniel P. Berrange wrote: When testing language bindings it is useful to be able to build them against an uninstalled libvirt source tree. Add a dummy set of

Re: [libvirt] [PATCH 3/3] Add pkg-config files to allow deps to build against source tree

2014-06-23 Thread Daniel P. Berrange
On Mon, Jun 23, 2014 at 09:15:19AM -0600, Eric Blake wrote: On 06/23/2014 02:52 AM, Daniel P. Berrange wrote: On Fri, Jun 20, 2014 at 01:02:46PM -0600, Eric Blake wrote: On 06/20/2014 10:51 AM, Daniel P. Berrange wrote: When testing language bindings it is useful to be able to build them

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

2014-06-23 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 1/2] libvirt-gobject-domain: Add _fetch_snapshots

2014-06-23 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 | 59

[libvirt] [libvirt-glib] [PATCH 0/2] Add API to fetch the snapshots of a GVirDomain

2014-06-23 Thread Timm Bäder
The following two patches add gvir_domain_fetch_snapshots which uses virDomainListAllSnapshots to fetch snapshots from the virDomain (using the given GVirDomainSnapshotListFlags) and gvir_domain_get_snapshots which returns a GList of containing all of the snapshots last fetched. Timm Bäder (2):

Re: [libvirt] [PATCH] Fix closedir usage in virNumaGetPages

2014-06-23 Thread Eric Blake
On 06/23/2014 05:46 AM, Michal Privoznik wrote: -closedir(dir); +if (dir) +closedir(dir); VIR_FREE(path); return ret; } So why is free(NULL) safe on FreeBSD then? I'd call this a libc bug not a libvirt one. But since even we already have such borken design

Re: [libvirt] [PATCH v3 0/5] Next round of active commit support

2014-06-23 Thread Eric Blake
On 06/21/2014 04:34 AM, Kashyap Chamarthy wrote: I just tried to test this series built from Eric's libvirt git repo, and QEMU built from its git. On a live (or offline guest) I see the below: $ virsh blockcommit f20vm1 vda --shallow --wait \ --verbose --pivot --active

Re: [libvirt] [PATCH v6 0/4] Introduce APIs to extract DHCP leases info

2014-06-23 Thread Nehal J Wani
On Mon, Jun 16, 2014 at 3:44 AM, Nehal J Wani nehaljw.k...@gmail.com wrote: This API returns the leases information stored in the DHCP leases file of dnsmasq for a given virtual network. It contacts the bridge network driver, which parses a custom leases file created by libvirt. It supports

Re: [libvirt] [PATCH] Fix closedir usage in virNumaGetPages

2014-06-23 Thread Roman Bogorodskiy
Eric Blake wrote: On 06/23/2014 05:46 AM, Michal Privoznik wrote: -closedir(dir); +if (dir) +closedir(dir); VIR_FREE(path); return ret; } So why is free(NULL) safe on FreeBSD then? I'd call this a libc bug not a libvirt one. But since even

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

2014-06-23 Thread Daniel P. Berrange
On Thu, Jun 12, 2014 at 08:48:25AM +0200, Cédric Bosdonnat wrote: Added capabilities in the features section of LXC domains configuration. This section can contain elements named after the capabilities like: mknod state=on/, keep CAP_MKNOD capability sys_chroot state=off/ drop

Re: [libvirt] [PATCH v6 0/4] Introduce APIs to extract DHCP leases info

2014-06-23 Thread Daniel P. Berrange
Nehal J Wani (4): net-dhcp-leases: Implement the public APIs net-dhcp-leases: Implement the remote protocol net-dhcp-leases: Private implementation inside network net-dhcp-leases: Add virsh support daemon/remote.c | 185 ++

Re: [libvirt] [PATCH v6 1/4] net-dhcp-leases: Implement the public APIs

2014-06-23 Thread Daniel P. Berrange
On Mon, Jun 16, 2014 at 03:44:53AM +0530, Nehal J Wani wrote: diff --git a/src/libvirt_public.syms b/src/libvirt_public.syms index cce6bdf..0ffbfd6 100644 --- a/src/libvirt_public.syms +++ b/src/libvirt_public.syms @@ -658,5 +658,11 @@ LIBVIRT_1.2.5 { virDomainSetTime; }

Re: [libvirt] [PATCH] block/sheepdog: rename management program from collie to dog

2014-06-23 Thread Daniel P. Berrange
On Mon, Jun 23, 2014 at 03:20:11PM +0900, Hitoshi Mitake wrote: The management program of latest sheepdog is named as dog, collie is obsolete. This patch updates the name in the configure script and the sheepdog driver. Signed-off-by: Vasiliy Tolstov v.tols...@selfip.ru Signed-off-by:

[libvirt] [PATCH] block/sheepdog: rename management program from collie to dog

2014-06-23 Thread Hitoshi Mitake
The management program of latest sheepdog is named as dog, collie is obsolete. This patch updates the name in the configure script and the sheepdog driver. Signed-off-by: Vasiliy Tolstov v.tols...@selfip.ru Signed-off-by: Hitoshi Mitake mitake.hito...@lab.ntt.co.jp --- configure.ac

Re: [libvirt] [PATCH] block/sheepdog: rename management program from collie to dog

2014-06-23 Thread Eric Blake
On 06/23/2014 12:20 AM, Hitoshi Mitake wrote: The management program of latest sheepdog is named as dog, collie is obsolete. This patch updates the name in the configure script and the sheepdog driver. Signed-off-by: Vasiliy Tolstov v.tols...@selfip.ru Signed-off-by: Hitoshi Mitake

Re: [libvirt] [PATCH v6 0/4] Introduce APIs to extract DHCP leases info

2014-06-23 Thread Nehal J Wani
On Mon, Jun 23, 2014 at 9:36 PM, Daniel P. Berrange berra...@redhat.com wrote: Nehal J Wani (4): net-dhcp-leases: Implement the public APIs net-dhcp-leases: Implement the remote protocol net-dhcp-leases: Private implementation inside network net-dhcp-leases: Add virsh support

[libvirt] Errors from unprivileged libvirtd at startup

2014-06-23 Thread Daniel P. Berrange
Current libvirt git really spews errors to the console at startup when run unprivileged $ ./daemon/libvirtd 2014-06-23 16:55:27.806+: 5207: info : libvirt version: 1.2.6 2014-06-23 16:55:27.806+: 5207: error : virPCIDeviceConfigOpen:300 : Failed to open config space file

Re: [libvirt] [PATCH v3 0/5] Next round of active commit support

2014-06-23 Thread Kashyap Chamarthy
On Mon, Jun 23, 2014 at 09:39:08AM -0600, Eric Blake wrote: On 06/21/2014 04:34 AM, Kashyap Chamarthy wrote: I just tried to test this series built from Eric's libvirt git repo, and QEMU built from its git. On a live (or offline guest) I see the below: $ virsh blockcommit f20vm1

[libvirt] [PATCH 1/2] virtportallocator: new function virPortAllocatorSetUsed

2014-06-23 Thread Giuseppe Scrivano
virPortAllocatorSetUsed permits to set a port as already used and prevent the port allocator to use it without any attempt to bind it. Signed-off-by: Giuseppe Scrivano gscri...@redhat.com --- src/libvirt_private.syms| 1 + src/util/virportallocator.c | 40

[libvirt] [PATCH 0/2] virtportallocator: remember not auto allocated graphics ports

2014-06-23 Thread Giuseppe Scrivano
Fix a conflict when both autoport graphics and statically configured ports are used, like: graphics type='spice' autoport='yes'/ graphics type='vnc' port='5900' autoport='no'/ More details in 2/2 Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1081881 Giuseppe Scrivano (2):

[libvirt] [PATCH 2/2] graphics: remember graphics not auto allocated ports

2014-06-23 Thread Giuseppe Scrivano
When looking for a port to allocate, the port allocator didn't take in consideration ports that are statically set by the user. Defining these two graphics elements in the XML would cause an error, as the port allocator would try to use the same port for the spice graphics element: graphics

[libvirt] [PATCH] cmdFreepages: initialize @tmp

2014-06-23 Thread Michal Privoznik
In the 404bac14 the @tmp variable was introduced. It's purpose is to avoid typecasting when parsing --pagesize argument. However, if the argument is not presented, tmp may be used uninitialized resulting in bogus virNodeGetFreePages() API call: virsh freepages --cellno 2 error: Failed to open

Re: [libvirt] [PATCH] cmdFreepages: initialize @tmp

2014-06-23 Thread Eric Blake
On 06/23/2014 12:34 PM, Michal Privoznik wrote: In the 404bac14 the @tmp variable was introduced. It's purpose is to avoid typecasting when parsing --pagesize argument. However, if the argument is not presented, tmp may be used uninitialized resulting in bogus virNodeGetFreePages() API call:

[libvirt] [PATCH v7 3/4] net-dhcp-leases: Private implementation inside network

2014-06-23 Thread Nehal J Wani
Query the network driver for the path of the custom leases file for the given virtual network and parse it to retrieve info. src/network/bridge_driver.c: * Implement networkGetDHCPLeases * Implement networkGetDHCPLeasesForMAC * Implement networkGetDHCPLeasesHelper ---

[libvirt] [PATCH v7 0/4] Introduce APIs to extract DHCP leases info

2014-06-23 Thread Nehal J Wani
This API returns the leases information stored in the DHCP leases file of dnsmasq for a given virtual network. It contacts the bridge network driver, which parses a custom leases file created by libvirt. It supports two methods: 1. Return info for all network interfaces connected to a given

[libvirt] [PATCH v7 1/4] net-dhcp-leases: Implement the public APIs

2014-06-23 Thread Nehal J Wani
Introduce 3 new APIs, virNetworkGetDHCPLeases, virNetworkGetDHCPLeasesForMAC and virNetworkDHCPLeaseFree. * virNetworkGetDHCPLeases: returns the dhcp leases information for a given virtual network. For DHCPv4, the information returned: - Network Interface Name - Expiry Time - MAC

[libvirt] [PATCH v7 2/4] net-dhcp-leases: Implement the remote protocol

2014-06-23 Thread Nehal J Wani
Implement RPC calls for virNetworkGetDHCPLeases, virNetworkGetDHCPLeasesForMAC daemon/remote.c * Define remoteSerializeNetworkDHCPLeases, remoteDispatchNetworkGetDHCPLeases * Define remoteDispatchNetworkGetDHCPLeasesForMAC * Define helper function remoteSerializeDHCPLease

[libvirt] [PATCH v7 4/4] net-dhcp-leases: Add virsh support

2014-06-23 Thread Nehal J Wani
Use virNetworkGetDHCPLeases and virNetworkGetDHCPLeasesForMAC in virsh. The new feature supports the follwing methods: 1. Retrieve leases info for a given virtual network 2. Retrieve leases info for given network interface tools/virsh-domain-monitor.c * Introduce new command :

Re: [libvirt] [Xen-devel] [PATCH] libxl: prefer qdisk for driver name='file'

2014-06-23 Thread Jim Fehlig
Stefano Stabellini wrote: On Fri, 20 Jun 2014, Jim Fehlig wrote: The libxl driver currently sets the disk backend to LIBXL_DISK_BACKEND_TAP when driver name='file' is specified in the disk config. qdisk should be prefered with this configuration, otherwise existing configuration such as

[libvirt] [PATCH v4 4/5] blockcommit: track job type in xml

2014-06-23 Thread Eric Blake
A future patch is going to wire up qemu active block commit jobs; but as they have similar events and are canceled/pivoted in the same way as block copy jobs, it is easiest to track all bookkeeping for the commit job by reusing the mirror element. This patch adds domain XML to track which job was

[libvirt] [PATCH v4 3/5] blockjob: expose active commit capability

2014-06-23 Thread Eric Blake
Add an element to QEMU's capability XML, to show if the underlying qemu binary supports active commit. This allows the client to know ahead of time if they can rely on this method, or must fall back to older techniques such as blockpull. Without this information, the only way to check for active

[libvirt] [PATCH v4 0/5] Another version of active commit

2014-06-23 Thread Eric Blake
Rebased to latest libvirt.git, and still waiting on Jeff's qemu patches to go into qemu.git before I can push any of these, https://lists.gnu.org/archive/html/qemu-devel/2014-06/msg04060.html but reposting because of a feature Adam had been requesting: Patch 3/5 is new, and adds a new

[libvirt] [PATCH v4 5/5] blockcommit: turn on active commit

2014-06-23 Thread Eric Blake
With this in place, I can (finally!) now do: virsh blockcommit $dom vda --shallow --verbose --pivot and watch qemu shorten the backing chain by one, followed by libvirt automatically updating the dumpxml output, effectively undoing the work of virsh snapshot-commit --no-metadata --disk-only.

[libvirt] [PATCH v4 1/5] blockjob: allow omitted arguments to QMP block-commit

2014-06-23 Thread Eric Blake
We are about to turn on support for active block commit. Although qemu 2.0 was the first version to mostly support it, that version mis-handles 0-length files, and doesn't have anything available for easy probing. But qemu 2.1 fixed bugs, and made life simpler by letting the 'top' argument be

[libvirt] [PATCH v4 2/5] blockjob: turn on qemu capability bit for active commit

2014-06-23 Thread Eric Blake
Use the probing functionality added in the last patch to turn on a capability bit when active commit is present, and gate active commit on that capability. For my own reference: the difference between BLOCKJOB_SYNC and BLOCKJOB_ASYNC is whether qemu generated an event at the conclusion of

Re: [libvirt] [PATCHv5 03/19] storage: gluster: Add backend to return unique storage file path

2014-06-23 Thread Eric Blake
On 06/19/2014 07:59 AM, Peter Krempa wrote: Use virStorageFileSimplifyPathInternal to canonicalize gluster paths via a callback and use it for the unique volume path retrieval API. --- src/storage/storage_backend_gluster.c | 80 +++ 1 file changed, 80