Re: [libvirt] [PATCH] qemu: cleanup error checking on agent replies

2014-04-01 Thread Martin Kletzander
On Tue, Apr 01, 2014 at 08:26:57AM -0600, Eric Blake wrote: On 04/01/2014 07:22 AM, Martin Kletzander wrote: On all the places where qemuAgentComand() was called, we did a check for errors in the reply. Unfortunately, some of the places called qemuAgentCheckError() without checking for non-null

[libvirt] [RFC 9/7] rfc: add fields to virStorageSource

2014-04-01 Thread Eric Blake
--- ...continuing my thoughts from 8/7. These are the additional fields required in virStorageSource to copy all fields directly listed in virStorageFileMetadata that are not already rendered redundant, as mentioned in those comments. By populating these fields directly in virStorageSource, I ca

[libvirt] [RFC 8/7] rfc: prepare to merge virStorageFileMetadata

2014-04-01 Thread Eric Blake
--- It's late for me, but I wanted to throw this out there to make sure I'm on the right track. My premise here is that the current virStorageFileMetadata is awkward to work with, because you have to ask the parent for details about the child, instead of directly storing those details in the chil

[libvirt] [PATCHv2 5/7] conf: track sizes directly in source struct

2014-04-01 Thread Eric Blake
One of the features of qcow2 is that a wrapper file can have more capacity than its backing file from the guest's perspective; what's more, sparse files make tracking allocation of both the active and backing file worthwhile. As such, it makes more sense to show allocation numbers for each file in

[libvirt] [PATCHv2 3/7] conf: move volume structs to util/

2014-04-01 Thread Eric Blake
Another step towards unification of structures. While we might not expose everything in XML via domain disk as we do for storage volume pointer, both places want to deal with (at least part of) the backing chain; therefore, moving towards a single struct usable from both contexts will make the bac

[libvirt] [PATCHv2 0/7] more of round 2 of virstoragefile refactoring

2014-04-01 Thread Eric Blake
compared to v1, this is rebased on top of Cole's changes, treats disk partition types slightly differently, and adds a couple patches. 1/7: was 16/n, unreviewed so far 2/7: was 13/n with weak ack 3-4/7: was 14-15/n; commit messages improved to justify it further 5-7: all new patches I'm still wor

[libvirt] [PATCHv2 1/7] conf: manage disk source by struct instead of pieces

2014-04-01 Thread Eric Blake
Now that we have a dedicated type for representing a disk source, we might as well parse and format directly into that type instead of piecemeal into pointers to members of the type. * src/conf/domain_conf.h (virDomainDiskSourceDefFormatInternal) (virDomainDiskSourceDefParse): Rename... (virDomain

[libvirt] [PATCHv2 2/7] conf: tweak volume target struct details

2014-04-01 Thread Eric Blake
Some preparatory work before consolidating storage volume structs with the rest of virstoragefile. Making these changes allows a volume target to be much closer to (a subset of) the virStorageSource struct. Making perms be a pointer allows it to be optional if we have a storage pool that doesn't

[libvirt] [PATCHv2 4/7] conf: use common struct in storage volumes

2014-04-01 Thread Eric Blake
A fairly smooth transition. And now that domain disks and storage volumes share a common struct, it opens the doors for a future patch to expose more details in the XML for both objects. * src/conf/storage_conf.h (_virStorageVolTarget): Delete. (_virStorageVolDef): Use common type. * src/conf/sto

[libvirt] [PATCHv2 6/7] conf: drop redundant parameters during probe

2014-04-01 Thread Eric Blake
Now that each virStorageSource can track allocation information, and given that we already have the information without extra syscalls, it's easier to just always populate the information directly into the struct than it is to sometimes pass the address of the struct members down the call chain. *

[libvirt] [PATCHv2 7/7] conf: modify tracking of encrypted images

2014-04-01 Thread Eric Blake
A future patch will merge virStorageFileMetadata and virStorageSource, but I found it easier to do if both structs use the same information for tracking whether a source file needs encryption keys. * src/util/virstoragefile.h (_virStorageFileMetadata): Prepare full encryption struct instead of jus

[libvirt] [PATCHv2 4/4] Improve virsh autocompletion (domain completer)

2014-04-01 Thread Solly Ross
This patch introduces a custom completer for domains, and sets it to be used for all of the "domain" arguments. In order to facilitate this, the functions involved in retrieve in a list of domains were moved from virsh-domain-monitor to virsh-completer, where they can be included by any file that

[libvirt] [PATCHv2 3/4] Improve virsh autocompletion (global ctl object)

2014-04-01 Thread Solly Ross
This patch introduces a way for completers to retrieve the current vshControl object by using the vshGetCompleterCtl() macro. When readline is enabled, the main method stores the vshControl pointer in a variable that is file-global to virsh.c. Then, that pointer can be retrieved by the _vshGetComp

[libvirt] [PATCHv2 1/4] Improve virsh autocompletion (extract parser)

2014-04-01 Thread Solly Ross
This commit extracts the parsing logic from vshCommandParse so that it can be used by other methods. The vshCommandParse method is designed to parse full commands and error out on unknown information, so it is not suitable to simply use it for autocompletion. Instead, the logic has been extracted

[libvirt] [PATCHv2 0/4] Another attempt at improving virsh autocompletion

2014-04-01 Thread Solly Ross
Version 2: Electric Boogaloo Version 1: https://www.redhat.com/archives/libvir-list/2014-March/msg01898.html This version of the patch introduces the following new things: - Tests (a whole bunch of them, in fact)! - A new `complete` command to run get newline-separated completion results from

[libvirt] [PATCHv2 2/4] Improve virsh autocompletion (base framework)

2014-04-01 Thread Solly Ross
Previously, virsh was able to complete initial command names, as well as the names of flag options. However, this completion was clunky for a number of reasons: - it would provide a flag as an option for completion even if it had already been used - it did not support completion of positional

[libvirt] [bug?] unix sockets opened via chardev devices not being closed on shutdown

2014-04-01 Thread Chris Friesen
I have a case where I'm creating a virtio channel between the host and guest using something like this: When qemu is started up this gets created as expected, but when qemu is shut down the unix socket is left in the filesystem. It seems to me that libvirt should be delet

[libvirt] [PATCH tck] 210-no-mac-spoofing.t: Catch network is unreachable error

2014-04-01 Thread Mike Latimer
Some environments (openSUSE 13.1) can report the network is unreachable during this test. Trap that condition as well. --- scripts/nwfilter/210-no-mac-spoofing.t | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/nwfilter/210-no-mac-spoofing.t b/scripts/nwfilter/210-

[libvirt] [PATCH] phyp: fix logic error on volume creation

2014-04-01 Thread Eric Blake
The phyp code claims that it wants a non-zero value, but actually enforces a capacity of zero. It has been this way since commit ebc46fe in June 2010. Bummer that it has my name as the committer - I guess I should have been much more stubborn about not blindly taking someone else's 1600-line patc

[libvirt] [PATCH tck] 220-no-ip-spoofing.t: Don't use a static netmask

2014-04-01 Thread Mike Latimer
For environments not using a /24 netmask, this test can end up in a hung state. This patch reads the netmask from the nic and uses it later when ip addresses are changed and restored. --- scripts/nwfilter/220-no-ip-spoofing.t | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --gi

[libvirt] [PATCH] maint: fix spelling errors in disk pools

2014-04-01 Thread Eric Blake
Noticed during my work on storage struct cleanups. * src/storage/storage_backend_disk.c (virStorageBackendDiskPartBoundaries): Fix spelling errors. Signed-off-by: Eric Blake --- Pushing under the trivial rule. Particularly odd that we managed too different ways of mis-spelling partition in the

Re: [libvirt] [PATCHv2 0/6] Utility functions for storing uninstalled location

2014-04-01 Thread Nehal J Wani
On Tue, Mar 25, 2014 at 1:53 PM, Nehal J Wani wrote: > When libvirtd is run from a build directory without being installed, it > should not depend on files from a libvirt package installed in the > system. Currently, APIs defined in src/ don't know whether libvirtd > is being run from the build di

[libvirt] [PATCH tck] 110-static-relabel-yes.t: Only 5 tests in 110-static-relabel

2014-04-01 Thread Mike Latimer
Trivial, but there are only 5 tests in 110-static-relabel-yes.t. --- scripts/selinux/110-static-relabel-yes.t | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/selinux/110-static-relabel-yes.t b/scripts/selinux/110-static-relabel-yes.t index f558cc9..76781ca 100644 ---

[libvirt] [PATCH tck] 300-vsitype.t: Skip after $tck is defined

2014-04-01 Thread Mike Latimer
With $tck added to the skip conditional, the entire codeblock has to be after $tck is defined. Also, $tck->cleanup should be added to the skip conditions. --- scripts/nwfilter/300-vsitype.t | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/scripts/nwfilter/30

Re: [libvirt] [PATCH] maint: ensure src/ directory includes are clean

2014-04-01 Thread Eric Blake
On 03/25/2014 02:14 PM, Eric Blake wrote: > In 'make syntax-check', we have a rule that prevents layering > violations between the various files in src. However, we > forgot to treat conf/ and the more recently-added access/ as > lower-level directories, and were not detecting cases where > they m

Re: [libvirt] [PATCH 12/n] conf: let snapshots share disk source struct

2014-04-01 Thread Eric Blake
On 03/31/2014 09:56 AM, Eric Blake wrote: > On 03/31/2014 02:56 AM, Peter Krempa wrote: >> On 03/29/14 23:20, Eric Blake wrote: >>> Now that we have a common struct, it's time to start using it! >>> Since external snapshots make a longer backing chain, it is >>> only natural to use the same struct

[libvirt] [PATCH 0/2] Clean up errors when net device could not be found on detach

2014-04-01 Thread Ján Tomko
Partially fixes https://bugzilla.redhat.com/show_bug.cgi?id=872028 Does nothing to adress the fact that interface type and other attributes are ignored on device detach Ján Tomko (2): Move error reporting into virDomainNetFindIdx Include PCI address in the error in virDomainNetFindIdx src/c

[libvirt] [PATCH 1/2] Move error reporting into virDomainNetFindIdx

2014-04-01 Thread Ján Tomko
Every caller checked the return value and logged an error - one if no device with the specified MAC was found, other if there were multiple devices matching the MAC address (except for qemuDomainUpdateDeviceConfig which logged the same message in both cases). Move the error reporting into virDoma

[libvirt] [PATCH 2/2] Include PCI address in the error in virDomainNetFindIdx

2014-04-01 Thread Ján Tomko
When looking up a net device by a MAC and PCI address, it is possible that we've got a match on the MAC address but failed to match the PCI address. In that case, outputting just the MAC address can be confusing. Partially resolves: https://bugzilla.redhat.com/show_bug.cgi?id=872028 --- src/conf

Re: [libvirt] [PATCH] qemu: cleanup error checking on agent replies

2014-04-01 Thread Eric Blake
On 04/01/2014 07:22 AM, Martin Kletzander wrote: > On all the places where qemuAgentComand() was called, we did a check > for errors in the reply. Unfortunately, some of the places called > qemuAgentCheckError() without checking for non-null reply which might > have resulted in a crash. > > So th

Re: [libvirt] [PATCH v2] Introduce --without-pm-utils to get rid of pm-is-supported dependency

2014-04-01 Thread Cedric Bosdonnat
Hum... it seems I'll have to fix somethings in that patch, ignore it for the while. -- Cedric On Tue, 2014-04-01 at 15:19 +0200, Cédric Bosdonnat wrote: > This uses the dbus api of systemd to check the power management > capabilities of the node. > --- > > This replaces the previous pm-utils dr

Re: [libvirt] [PATCH v2 4/4] storage: Report error from VolOpen if proper flag is passed

2014-04-01 Thread Eric Blake
On 04/01/2014 02:56 AM, Ján Tomko wrote: > On 03/31/2014 08:50 PM, Cole Robinson wrote: >> VolOpen notifies the user of a potentially non-fatal failure by >> returning -2 and logging a VIR_WARN or VIR_INFO. Unfortunately most >> callers treat -2 as fatal but don't actually report any message with >

Re: [libvirt] [PATCH 15/n] conf: use common struct in storage volumes

2014-04-01 Thread Peter Krempa
On 03/31/14 18:10, Eric Blake wrote: > On 03/31/2014 03:59 AM, Peter Krempa wrote: >> On 03/30/14 05:38, Eric Blake wrote: >>> A fairly smooth transition. And now that domain disks and >>> storage volumes share a common struct, it opens the doors for >>> a future patch to expose more details in th

[libvirt] [PATCH v2] Introduce --without-pm-utils to get rid of pm-is-supported dependency

2014-04-01 Thread Cédric Bosdonnat
This uses the dbus api of systemd to check the power management capabilities of the node. --- This replaces the previous pm-utils dropping patch attempt to implement Cole's idea. configure.ac | 11 libvirt.spec.in | 9 +++ src/libvirt_private.syms | 3 +++

[libvirt] [PATCH] qemu: cleanup error checking on agent replies

2014-04-01 Thread Martin Kletzander
On all the places where qemuAgentComand() was called, we did a check for errors in the reply. Unfortunately, some of the places called qemuAgentCheckError() without checking for non-null reply which might have resulted in a crash. So this patch makes the error-checking part of qemuAgentCommand()

Re: [libvirt] [PATCH 4/6] storage: gluster: Implement storage pool lookup

2014-04-01 Thread Peter Krempa
On 03/28/14 23:22, Eric Blake wrote: > On 03/28/2014 04:01 PM, Peter Krempa wrote: >> Use the previously implemented function to lookup glusterfs source pools >> for the netfs pool to lookup native gluster pools too. >> --- >> src/storage/storage_backend_gluster.c | 50 >>

Re: [libvirt] [PATCH 3/6] storage: netfs: Support lookup of glusterfs pool sources

2014-04-01 Thread Peter Krempa
On 03/28/14 23:57, Ján Tomko wrote: > On 03/28/2014 11:01 PM, Peter Krempa wrote: >> https://bugzilla.redhat.com/show_bug.cgi?id=1072714 >> >> Use the "gluster" command line tool to retrieve information about remote >> volumes on a gluster server to allow storage pool source lookup. >> >> Unfortuna

Re: [libvirt] [PATCH 2/6] storage: netfs: Split up and tidy up NFS storage pool source function

2014-04-01 Thread Peter Krempa
On 03/28/14 23:13, Eric Blake wrote: > On 03/28/2014 04:01 PM, Peter Krempa wrote: >> Extract the NFS related stuff into a separate function and tidy up the >> rest of the code so we can reuse it to add gluster backend detection. >> >> Additionally avoid reporting of errors from "showmount" and ret

[libvirt] Release of libvirt-1.2.3

2014-04-01 Thread Daniel Veillard
So as scheduled, libvirt-1.2.3 release is ready, it is tagged in git and the tarball and rpms are available at the usual place: ftp://libvirt.org/libvirt/ This release is rather large in the number of commits (more than 400) but includes a lot of changes made to clean up the code base. there

Re: [libvirt] [PATCH 00/13] Add multiple trace backend function and add new ftrace backend for libvirt

2014-04-01 Thread yangzy.f...@cn.fujitsu.com
> -Original Message- > From: libvir-list-boun...@redhat.com > [mailto:libvir-list-boun...@redhat.com] On Behalf Of Daniel P. Berrange > Sent: Saturday, March 22, 2014 12:37 AM > To: Yang, Zhiyong/杨 志勇 > Cc: libvir-list@redhat.com; Xinghai Yu > Subject: Re: [libvirt] [PATCH 00/13] Add multi

Re: [libvirt] [PATCH] Introduce virConnectCrashDaemon API

2014-04-01 Thread Martin Kletzander
On Tue, Apr 01, 2014 at 09:44:16AM +0200, Peter Krempa wrote: On 04/01/14 09:34, Ján Tomko wrote: This reduces the affect of an unexpected DoS vulnerablity in libvirtd. --- include/libvirt/libvirt.h.in | 13 + src/driver.h | 5 + src/libvirt.c| 3

Re: [libvirt] [PATCH v2 4/4] storage: Report error from VolOpen if proper flag is passed

2014-04-01 Thread Ján Tomko
On 03/31/2014 08:50 PM, Cole Robinson wrote: > VolOpen notifies the user of a potentially non-fatal failure by > returning -2 and logging a VIR_WARN or VIR_INFO. Unfortunately most > callers treat -2 as fatal but don't actually report any message with > the error APIs. > > Change VolOpen to report

[libvirt] [PATCH] Bump version to 1.2.4 for new dev cycle

2014-04-01 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- Pushed already, just sending a note. configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 73efffa..7b9e38a 100644 --- a/configure.ac +++ b/configure.ac @@ -16,7 +16,7 @@ dnl You should have receive

Re: [libvirt] [PATCH] Introduce virConnectCrashDaemon API

2014-04-01 Thread Peter Krempa
On 04/01/14 09:34, Ján Tomko wrote: > This reduces the affect of an unexpected DoS vulnerablity in libvirtd. > --- > include/libvirt/libvirt.h.in | 13 + > src/driver.h | 5 + > src/libvirt.c| 32 +++ > src/libvirt_privat

[libvirt] [PATCH] Introduce virConnectCrashDaemon API

2014-04-01 Thread Ján Tomko
This reduces the affect of an unexpected DoS vulnerablity in libvirtd. --- include/libvirt/libvirt.h.in | 13 + src/driver.h | 5 + src/libvirt.c| 32 +++ src/libvirt_private.syms | 1 + src/libvirt_public.syms

Re: [libvirt] Fwd: Start contributing with Libvirt (Finding a mentor or helpful tips)

2014-04-01 Thread Michal Privoznik
On 31.03.2014 23:43, Eric Blake wrote: On 03/31/2014 10:00 AM, Julio Faracco wrote: Hi everybody! I sent an e-mail to Daniel asking about contributing to the libvirt community for free. So, I copied the e-mail to the libvirt mailing list as Daniel suggested me. If anyone can help me I'd be plea

Re: [libvirt] RFC: viridentitytest Failure on CentOS 6.5?

2014-04-01 Thread Jincheng Miao
On 04/01/2014 02:46 PM, Jincheng Miao wrote: On 04/01/2014 06:04 AM, Nehal J Wani wrote: On Sun, Mar 16, 2014 at 1:28 PM, Nehal J Wani wrote: I followed the following steps to build a clean development version of libvirt from source. Can't seem to understand what is wrong. (Entire buildLog has