[libvirt] [libvirt-sandbox PATCH] Only set SELinux seclabel if supported by the host.

2014-06-05 Thread Cédric Bosdonnat
This code depends on new API in libvirt-gconfig to extract the secmodels handled by the host. --- libvirt-sandbox/libvirt-sandbox-builder.c | 68 --- 1 file changed, 45 insertions(+), 23 deletions(-) diff --git a/libvirt-sandbox/libvirt-sandbox-builder.c b/libvirt-san

[libvirt] [libvirt-glib PATCH] Add API to get security models from host capabilities

2014-06-05 Thread Cédric Bosdonnat
--- libvirt-gconfig/Makefile.am| 2 + .../libvirt-gconfig-capabilities-host.c| 51 + .../libvirt-gconfig-capabilities-host.h| 3 + .../libvirt-gconfig-capabilities-secmodel.c| 55 ++ .../libvirt-gconfig-capab

Re: [libvirt] [libvirt-glib PATCH] Add API to get security models from host capabilities

2014-06-05 Thread Christophe Fergeau
Hey, Looks good to me. There's a 'Nuernberg' typo in the copyright lines I'm wondering if GVirConfigCapabilitiesSecmodel should be GVirConfigCapabilitiesHostSecmodel as this is only available under the host node. Also, libvirt uses the spelling SecModel/secmodel, might be nice to follow that (or S

Re: [libvirt] [libvirt-glib PATCH] Add API to get security models from host capabilities

2014-06-05 Thread Daniel P. Berrange
On Thu, Jun 05, 2014 at 11:32:22AM +0200, Christophe Fergeau wrote: > Hey, > > Looks good to me. > There's a 'Nuernberg' typo in the copyright lines > I'm wondering if GVirConfigCapabilitiesSecmodel should be > GVirConfigCapabilitiesHostSecmodel as this is only available under the > host node. Ye

Re: [libvirt] [PATCH 1/2] vircapstest: Introduce basic testing

2014-06-05 Thread Daniel P. Berrange
On Wed, Jun 04, 2014 at 05:34:13PM +0200, Michal Privoznik wrote: > For now only one test is introduced. It's purpose in life > is to check we don't break NUMA host distances XML format. > > Signed-off-by: Michal Privoznik > --- > tests/vircapsdata/vircaps-basic.xml | 66

Re: [libvirt] [PATCH v2] maint: prohibit empty first lines

2014-06-05 Thread Martin Kletzander
On Wed, Jun 04, 2014 at 10:14:24AM -0600, Eric Blake wrote: On 06/04/2014 07:01 AM, Martin Kletzander wrote: Based on discussion with Eric: https://www.redhat.com/archives/libvir-list/2014-March/msg01001.html Signed-off-by: Martin Kletzander --- v2: - rebase on current master and s/FILENAME:

Re: [libvirt] [PATCH 2/2] formatcaps: Rework and add stubs to document

2014-06-05 Thread Daniel P. Berrange
On Wed, Jun 04, 2014 at 10:04:44AM -0600, Eric Blake wrote: > On 06/04/2014 09:34 AM, Michal Privoznik wrote: > > At the moment we are missing even basic documentation on our > > capabilities XML. Without demand on completeness, I'm > > reorganizing the document structure and adding very basic > >

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

2014-06-05 Thread Daniel P. Berrange
On Mon, Jun 02, 2014 at 02:44:16PM +0100, George Dunlap wrote: > == Libvirt's interface == > > I've had a brief look at libvirt's USB interface, and learned a bit > about libvirt's general approach to things at the Xen Hackathon last > week. One of the goals of libvirt is to be able to specify th

Re: [libvirt] [libvirt-glib PATCH] Add API to get security models from host capabilities

2014-06-05 Thread Cedric Bosdonnat
On Thu, 2014-06-05 at 10:37 +0100, Daniel P. Berrange wrote: > On Thu, Jun 05, 2014 at 11:32:22AM +0200, Christophe Fergeau wrote: > > Hey, > > > > Looks good to me. > > There's a 'Nuernberg' typo in the copyright lines > > I'm wondering if GVirConfigCapabilitiesSecmodel should be > > GVirConfigCa

[libvirt] [PATCH 6/6] Implement pretty flag for vcpuinfo and nodecpumap

2014-06-05 Thread Ján Tomko
Report CPU affinities / online CPUs in human-readable form (0-2,4) instead of yy-y when this flag is present. https://bugzilla.redhat.com/show_bug.cgi?id=985980 --- tools/virsh-domain.c | 21 +++-- tools/virsh-host.c | 25 ++--- 2 files changed, 41 insertions

[libvirt] [PATCH 0/6] Print cpu maps in human readable form

2014-06-05 Thread Ján Tomko
Consistently report errors in virBitmapFormat and introduce a flag for vcpuinfo and nodecpumap for more readable cpu map outputs. Ján Tomko (6): Invert logic in cmdVcpuinfo Separate API calls and result printing in cmdVcpuinfo Format NULL bitmap as an empty string Always report an error if

[libvirt] [PATCH 5/6] Introudce virBitmapDataToString

2014-06-05 Thread Ján Tomko
For converting bitmap data to human-readable strings. --- src/libvirt_private.syms | 1 + src/util/virbitmap.c | 25 + src/util/virbitmap.h | 4 src/util/virstring.h | 1 - tests/virbitmaptest.c| 14 +- 5 files changed, 43 insertions(+),

[libvirt] [PATCH 3/6] Format NULL bitmap as an empty string

2014-06-05 Thread Ján Tomko
This simplifies the usage in {libxl,qemu}DomainGetNumaParameters and it's needed for consistent error reporting in virBitmapFormat. Also remove the forgotten ATTRIBUTE_NONNULL marker. --- src/libxl/libxl_driver.c | 3 +-- src/qemu/qemu_driver.c | 2 +- src/util/virbitmap.c | 6 +- src/u

[libvirt] [PATCH 1/6] Invert logic in cmdVcpuinfo

2014-06-05 Thread Ján Tomko
Initialize 'ret' to false and introduce a cleanup label. --- tools/virsh-domain.c | 23 +++ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 84a6706..4d21704 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-dom

[libvirt] [PATCH 2/6] Separate API calls and result printing in cmdVcpuinfo

2014-06-05 Thread Ján Tomko
This allows reuse of the result printing code. --- tools/virsh-domain.c | 61 +--- 1 file changed, 25 insertions(+), 36 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 4d21704..e85c906 100644 --- a/tools/virsh-domain.c ++

[libvirt] [PATCH 4/6] Always report an error if virBitmapFormat fails

2014-06-05 Thread Ján Tomko
It already reports an error if STRDUP fails. --- src/conf/capabilities.c | 4 +--- src/conf/domain_conf.c | 19 --- src/conf/network_conf.c | 2 +- src/lxc/lxc_cgroup.c| 11 ++- src/qemu/qemu_cgroup.c | 16 +++- src/qemu/qemu_driver.c | 10 ++ s

Re: [libvirt] [PATCH 1/2] vircapstest: Introduce basic testing

2014-06-05 Thread Michal Privoznik
On 05.06.2014 11:58, Daniel P. Berrange wrote: On Wed, Jun 04, 2014 at 05:34:13PM +0200, Michal Privoznik wrote: For now only one test is introduced. It's purpose in life is to check we don't break NUMA host distances XML format. Signed-off-by: Michal Privoznik --- tests/vircapsdata/vircaps-

[libvirt] [RFC][PATCH]QEMU: Parse -device vfio-pci commandline

2014-06-05 Thread Olivia Yin
Signed-off-by: Olivia Yin --- src/qemu/qemu_command.c | 67 tests/qemuargv2xmltest.c | 2 +- 2 files changed, 68 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index e6acced..4db4a1d 100644 --- a/src/

Re: [libvirt] [RFC][PATCH]QEMU: Parse -device vfio-pci commandline

2014-06-05 Thread hong-hua....@freescale.com
The test case failed with the patch. tests]$ VIR_TEST_DEBUG=1 ./qemuargv2xmltest ... 78) QEMU ARGV-2-XML hostdev-vfio ... FAILED ... tests]$ ../tools/virsh domxml-from-native qemu-argv qemuxml2argvdata/qemuxml2argv-hostdev-vfio.args unnamed 4f190a56-f64b

[libvirt] [PATCH 2/2] storage: volume: Rework lookup of volume objects

2014-06-05 Thread Peter Krempa
Add a helper to do all the lookup steps and remove a ton of duplicated code. --- src/storage/storage_driver.c | 292 ++- 1 file changed, 69 insertions(+), 223 deletions(-) diff --git a/src/storage/storage_driver.c b/src/storage/storage_driver.c index c9916f

[libvirt] [PATCH 1/2] storage: pool: Fix handling of errors on pool lookup failure

2014-06-05 Thread Peter Krempa
Rework internal pool lookup code to avoid printing the raw UUID buffer in the case a storage pool can't be found: $ virsh pool-name e012ace0-0460-5810-39ef-1bce5fa5a4dd error: failed to get pool 'e012ace0-0460-5810-39ef-1bce5fa5a4dd' error: Storage pool not found: no storage pool with matching

[libvirt] [PATCH v2 1/2] vircaps2xmltest: Introduce basic testing

2014-06-05 Thread Michal Privoznik
For now only one test is introduced. It's purpose in life is to check we don't break NUMA host distances XML format. Signed-off-by: Michal Privoznik --- tests/Makefile.am | 6 + tests/vircaps2xmldata/vircaps-basic-4-4-2G.xml | 74 +++ tests/vircaps2xmltest

[libvirt] [PATCH v2 0/2] Couple of virCaps improvements

2014-06-05 Thread Michal Privoznik
diff to v1: -rename the test -drop even more from the original documentation Michal Privoznik (2): vircaps2xmltest: Introduce basic testing formatcaps: Rework and add stubs to document docs/formatcaps.html.in| 139 +++-- tests/Makefile.am

[libvirt] [PATCH v2 2/2] formatcaps: Rework and add stubs to document

2014-06-05 Thread Michal Privoznik
At the moment we are missing even basic documentation on our capabilities XML. Without demand on completeness, I'm reorganizing the document structure and adding very basic documentation to two major components of the capabilities XML. These stubs are intended to be enhanced in the future. Signed-

[libvirt] [PATCH 0/2] storage: Fix error messages containing UUIDs

2014-06-05 Thread Peter Krempa
Peter Krempa (2): storage: pool: Fix handling of errors on pool lookup failure storage: volume: Rework lookup of volume objects src/storage/storage_driver.c | 555 +-- 1 file changed, 159 insertions(+), 396 deletions(-) -- 1.9.3 -- libvir-list mailin

Re: [libvirt] [PATCH 1/2] vircapstest: Introduce basic testing

2014-06-05 Thread Daniel P. Berrange
On Thu, Jun 05, 2014 at 01:42:32PM +0200, Michal Privoznik wrote: > On 05.06.2014 11:58, Daniel P. Berrange wrote: > >On Wed, Jun 04, 2014 at 05:34:13PM +0200, Michal Privoznik wrote: > >>For now only one test is introduced. It's purpose in life > >>is to check we don't break NUMA host distances XM

Re: [libvirt] [libvirt-glib PATCH] Add API to get security models from host capabilities

2014-06-05 Thread Christophe Fergeau
On Thu, Jun 05, 2014 at 01:03:47PM +0200, Cedric Bosdonnat wrote: > On Thu, 2014-06-05 at 10:37 +0100, Daniel P. Berrange wrote: > > On Thu, Jun 05, 2014 at 11:32:22AM +0200, Christophe Fergeau wrote: > > > Hey, > > > > > > Looks good to me. > > > There's a 'Nuernberg' typo in the copyright lines

Re: [libvirt] [PATCH v2 2/2] formatcaps: Rework and add stubs to document

2014-06-05 Thread Daniel P. Berrange
On Thu, Jun 05, 2014 at 01:53:17PM +0200, Michal Privoznik wrote: > At the moment we are missing even basic documentation on our > capabilities XML. Without demand on completeness, I'm > reorganizing the document structure and adding very basic > documentation to two major components of the capabil

Re: [libvirt] [PATCH v2 1/2] vircaps2xmltest: Introduce basic testing

2014-06-05 Thread Daniel P. Berrange
On Thu, Jun 05, 2014 at 01:53:16PM +0200, Michal Privoznik wrote: > For now only one test is introduced. It's purpose in life > is to check we don't break NUMA host distances XML format. > > Signed-off-by: Michal Privoznik > --- > tests/Makefile.am | 6 + > tests/v

Re: [libvirt] [PATCH 2/4] interface_backend_udev: Implement link speed & state

2014-06-05 Thread Michal Privoznik
On 04.06.2014 23:40, Daniel P. Berrange wrote: On Tue, Jun 03, 2014 at 02:22:10PM +0200, Michal Privoznik wrote: In previous commit the interface XML is prepared for exporting information on NIC link speed and state. This commit implement actual logic for getting such info and writing it into XM

Re: [libvirt] [RFC][PATCH]QEMU: Parse -device vfio-pci commandline

2014-06-05 Thread Eric Blake
On 06/05/2014 05:51 AM, hong-hua@freescale.com wrote: > The test case failed with the patch. > > tests]$ VIR_TEST_DEBUG=1 ./qemuargv2xmltest > ... > 78) QEMU ARGV-2-XML hostdev-vfio ... > FAILED > ... > It seemed that section is correct as expected. > Wh

Re: [libvirt] [PATCH] qemu: Add cmd_per_lun, max_sectors to virtio-scsi

2014-06-05 Thread Ján Tomko
On 05/23/2014 12:06 AM, Eric Blake wrote: > On 05/22/2014 12:22 PM, Mike Perez wrote: >> This introduces two new attributes "cmd_per_lun" and "max_sectors" same >> with the names QEMU uses for virtio-scsi. An example of the XML: >> >> > max_sectors='512'/> > > I'm not a fan of underscore (why type

Re: [libvirt] [PATCH 2/3] Parallels: add connectBaselineCPU().

2014-06-05 Thread Daniel P. Berrange
On Thu, Jun 05, 2014 at 09:50:05AM +0400, Alexander Burluka wrote: > From: A.Burluka > > Openstack Nova (starting at Icehouse release) requires this function > to start VM. > --- > src/parallels/parallels_driver.c | 14 ++ > 1 files changed, 14 insertions(+), 0 deletions(-) ACK

Re: [libvirt] [PATCH 3/3] Parallels: Include CPU info in the capabilities XML

2014-06-05 Thread Daniel P. Berrange
On Thu, Jun 05, 2014 at 09:50:06AM +0400, Alexander Burluka wrote: > From: A.Burluka > > Openstack uses (or will start to using) CPU info from the > capabilities XML. So this section is expanded, added CPU info > about arch, type and info about number of cores, sockets and threads. > --- > src/p

Re: [libvirt] [PATCH 1/3] Parallels: add domainGetVcpus().

2014-06-05 Thread Daniel P. Berrange
On Thu, Jun 05, 2014 at 09:50:04AM +0400, Alexander Burluka wrote: > From: A.Burluka > > OpenStack Nova requires this function > to start VM instance. Cpumask info is obtained via prlctl utility. > Unlike KVM, Parallels Cloud Server is unable to set cpu affinity > mask for every VCpu. Mask is uni

Re: [libvirt] [PATCH RFC] Add support for QEMU vhost-user feature

2014-06-05 Thread Laine Stump
On 05/28/2014 11:46 AM, Luke Gorrie wrote: > vhost-user is a networking backend based on unix domain sockets > instead of tap devices and ioctl(). This makes it possible for > userspace networking stacks (vswitches) to provide vhost-networking to > guests. > > Signed-off-by: Luke Gorrie > --- > d

Re: [libvirt] [PATCH 1/6] Invert logic in cmdVcpuinfo

2014-06-05 Thread Peter Krempa
On 06/05/14 13:25, Ján Tomko wrote: > Initialize 'ret' to false and introduce a cleanup label. > --- > tools/virsh-domain.c | 23 +++ > 1 file changed, 11 insertions(+), 12 deletions(-) > ACK, Peter signature.asc Description: OpenPGP digital signature -- libvir-list mail

Re: [libvirt] [PATCH RFC] Add support for QEMU vhost-user feature

2014-06-05 Thread Daniel P. Berrange
On Thu, Jun 05, 2014 at 05:09:02PM +0300, Laine Stump wrote: > Daniel pointed out that qemu actually accepts any generic character > device to connect to, and it makes sense to support this by using > virDomainChrSourceDefPtr. However, the parse function for > virDomainChrSourceDef requires that th

Re: [libvirt] [PATCH 1/6] Invert logic in cmdVcpuinfo

2014-06-05 Thread Peter Krempa
In subject: "virsh:" prefix is missing. On 06/05/14 16:39, Peter Krempa wrote: > On 06/05/14 13:25, Ján Tomko wrote: >> Initialize 'ret' to false and introduce a cleanup label. >> --- >> tools/virsh-domain.c | 23 +++ >> 1 file changed, 11 insertions(+), 12 deletions(-) >> >

Re: [libvirt] [PATCH 2/6] Separate API calls and result printing in cmdVcpuinfo

2014-06-05 Thread Peter Krempa
"virsh: " tag missing in subject On 06/05/14 13:25, Ján Tomko wrote: > This allows reuse of the result printing code. > --- > tools/virsh-domain.c | 61 > +--- > 1 file changed, 25 insertions(+), 36 deletions(-) > ACK, Peter signature.asc Des

Re: [libvirt] [PATCH 4/6] Always report an error if virBitmapFormat fails

2014-06-05 Thread Peter Krempa
On 06/05/14 13:25, Ján Tomko wrote: > It already reports an error if STRDUP fails. > --- > src/conf/capabilities.c | 4 +--- > src/conf/domain_conf.c | 19 --- > src/conf/network_conf.c | 2 +- > src/lxc/lxc_cgroup.c| 11 ++- > src/qemu/qemu_cgroup.c | 16 +++---

Re: [libvirt] [PATCH 6/6] Implement pretty flag for vcpuinfo and nodecpumap

2014-06-05 Thread Ján Tomko
On 06/05/2014 05:09 PM, Eric Blake wrote: > On 06/05/2014 05:25 AM, Ján Tomko wrote: >> Report CPU affinities / online CPUs in human-readable form (0-2,4) >> instead of yy-y when this flag is present. > > Nit on the commit message: Wouldn't 0-2,4 map to yyy-y ? And it's > unusual to pick 5 vcpus,

Re: [libvirt] [PATCH 6/6] Implement pretty flag for vcpuinfo and nodecpumap

2014-06-05 Thread Eric Blake
On 06/05/2014 09:32 AM, Ján Tomko wrote: > On 06/05/2014 05:09 PM, Eric Blake wrote: >> On 06/05/2014 05:25 AM, Ján Tomko wrote: >>> Report CPU affinities / online CPUs in human-readable form (0-2,4) >>> instead of yy-y when this flag is present. >> >> Nit on the commit message: Wouldn't 0-2,4 map

[libvirt] [PATCH v2 1/4] virInterface: Expose link state & speed

2014-06-05 Thread Michal Privoznik
Currently it is not possible to determine the speed of an interface and whether a link is actually detected from the API. Orchestrating platforms want to be able to determine when the link has failed and where multiple speeds may be available which one the interface is actually connected at. This c

[libvirt] [PATCH v2 2/4] virnetdev: Introduce virNetDevGetLinkInfo

2014-06-05 Thread Michal Privoznik
The purpose of this function is to fetch link state and link speed for given NIC name from the SYSFS. Signed-off-by: Michal Privoznik --- src/libvirt_private.syms | 1 + src/util/virnetdev.c | 104 +++ src/util/virnetdev.h | 6 +++ 3 files

[libvirt] [PATCH v2 3/4] interface_backend_udev: Implement link speed & state

2014-06-05 Thread Michal Privoznik
In the previous commit the helper function was prepared, so now we can wire it up and benefit from it. The Makefile change is required because we're including virnedev,h which includes virnetlink.h which tries to include netlink/msg.h. However this file is not under /usr/include directly but is dep

[libvirt] [PATCH v2 0/4] Expose link state & speed

2014-06-05 Thread Michal Privoznik
While the 1/4 was ACKed, I'm sending int for completeness. And I've made a tiny change: the link speed is no longer unsigned long but unsigned int instead. That'll do too and it consumes less memory. Michal Privoznik (4): virInterface: Expose link state & speed virnetdev: Introduce virNetDevGe

[libvirt] [PATCH v2 4/4] node_device: Expose link state & speed

2014-06-05 Thread Michal Privoznik
While exposing the info under in previous patch works, it may work only in cases where interface is configured on the host. However, orchestrating application may want to know the link state and speed even in that case. That's why we ought to expose this in nodedev XML too: virsh # nodedev-dumpxm

[libvirt] [PATCH python] Correct virDomainMigrateToURI3 definition

2014-06-05 Thread Jason Andryuk
dconnuri is a string, so update the definition to match. Without this, the generated python would fail when passed a string. --- libvirt-override-api.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libvirt-override-api.xml b/libvirt-override-api.xml index d5b25b5..935e04d

Re: [libvirt] [PATCH 5/6] Introudce virBitmapDataToString

2014-06-05 Thread Peter Krempa
On 06/05/14 13:25, Ján Tomko wrote: > For converting bitmap data to human-readable strings. > --- > src/libvirt_private.syms | 1 + > src/util/virbitmap.c | 25 + > src/util/virbitmap.h | 4 > src/util/virstring.h | 1 - > tests/virbitmaptest.c| 14 +

Re: [libvirt] [PATCH 6/6] Implement pretty flag for vcpuinfo and nodecpumap

2014-06-05 Thread Peter Krempa
On 06/05/14 13:25, Ján Tomko wrote: > Report CPU affinities / online CPUs in human-readable form (0-2,4) > instead of yy-y when this flag is present. > > https://bugzilla.redhat.com/show_bug.cgi?id=985980 > --- > tools/virsh-domain.c | 21 +++-- > tools/virsh-host.c | 25 +++

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

2014-06-05 Thread George Dunlap
On Thu, Jun 5, 2014 at 11:14 AM, Daniel P. Berrange wrote: > On Mon, Jun 02, 2014 at 02:44:16PM +0100, George Dunlap wrote: >> == Libvirt's interface == >> >> I've had a brief look at libvirt's USB interface, and learned a bit >> about libvirt's general approach to things at the Xen Hackathon last

Re: [libvirt] [PATCH 6/6] Implement pretty flag for vcpuinfo and nodecpumap

2014-06-05 Thread Eric Blake
On 06/05/2014 05:25 AM, Ján Tomko wrote: > Report CPU affinities / online CPUs in human-readable form (0-2,4) > instead of yy-y when this flag is present. Nit on the commit message: Wouldn't 0-2,4 map to yyy-y ? And it's unusual to pick 5 vcpus, 4 or 8 is more common... -- Eric Blake eblake re

Re: [libvirt] [PATCH 3/6] Format NULL bitmap as an empty string

2014-06-05 Thread Peter Krempa
On 06/05/14 13:25, Ján Tomko wrote: > This simplifies the usage in {libxl,qemu}DomainGetNumaParameters > and it's needed for consistent error reporting in virBitmapFormat. > > Also remove the forgotten ATTRIBUTE_NONNULL marker. > --- > src/libxl/libxl_driver.c | 3 +-- > src/qemu/qemu_driver.c

Re: [libvirt] [PATCH 3/3] Parallels: Include CPU info in the capabilities XML

2014-06-05 Thread Eric Blake
On 06/05/2014 07:58 AM, Daniel P. Berrange wrote: > On Thu, Jun 05, 2014 at 09:50:06AM +0400, Alexander Burluka wrote: >> From: A.Burluka >> >> Openstack uses (or will start to using) CPU info from the >> capabilities XML. So this section is expanded, added CPU info >> about arch, type and info ab

[libvirt] [PATCH 0/3] Fix storage format probing

2014-06-05 Thread Ján Tomko
https://bugzilla.redhat.com/show_bug.cgi?id=1104908 Ján Tomko (3): Don't reuse 'ret' variable in virStorageBackendProbeTarget Simplify conditions in virStorageBackendProbeTarget Fix storage format probing src/storage/storage_backend_fs.c | 69 --- src/s

[libvirt] [PATCH 1/3] Don't reuse 'ret' variable in virStorageBackendProbeTarget

2014-06-05 Thread Ján Tomko
To match the convention: ret - current function's return value rc - other function's return values --- src/storage/storage_backend_fs.c | 25 +++-- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/src/storage/storage_backend_fs.c b/src/storage/storage_backend_fs.

[libvirt] [PATCH 2/3] Simplify conditions in virStorageBackendProbeTarget

2014-06-05 Thread Ján Tomko
Jump out early if no metadata was detected (for directories). Join the error and cleanup labels. --- src/storage/storage_backend_fs.c | 42 +--- 1 file changed, 18 insertions(+), 24 deletions(-) diff --git a/src/storage/storage_backend_fs.c b/src/storage/storag

[libvirt] [PATCH 3/3] Fix storage format probing

2014-06-05 Thread Ján Tomko
Commit fff74b2 moved the probing into virStorageFileGetMetadataFromBuf but didn't update the format in volume definition. https://bugzilla.redhat.com/show_bug.cgi?id=1104908 --- src/storage/storage_backend_fs.c | 2 ++ src/storage/storage_backend_gluster.c | 1 + 2 files changed, 3 insertion

[libvirt] [PATCH v2] Implement pretty flag for vcpuinfo and nodecpumap

2014-06-05 Thread Ján Tomko
Report CPU affinities / online CPUs in human-readable form when this flag is present: Before: CPU Affinity: y-yy After: CPU Affinity: 0,2-3 (out of 4) https://bugzilla.redhat.com/show_bug.cgi?id=985980 --- v2: man page additions, added total cpu count to vcpuinfo output fixed example

[libvirt] [PATCH 3/3] Add USB serials to node device driver

2014-06-05 Thread Ján Tomko
Also extend the XML schema and add a test for XML parsing. --- docs/schemas/nodedev.rng| 9 + src/conf/node_device_conf.c | 4 src/conf/node_device_conf.h | 1 + src/node_device/node_device_hal.c | 1 + src/node_device/node_device_udev

[libvirt] [PATCH 0/3] Attach USB hostdevs using serial id

2014-06-05 Thread Ján Tomko
Originally posted a year ago: https://www.redhat.com/archives/libvir-list/2013-June/msg00624.html Rebased, with tests and nodedev 'implementation' and some nits fixed. David Waring (2): Add serials to USB hostdevs in domain XML Add ability to attach host USB devices using serial id Ján Tomko

[libvirt] [PATCH 1/3] Add serials to USB hostdevs in domain XML

2014-06-05 Thread Ján Tomko
From: David Waring This patch adds the ability to include a serial element in a hostdev/source to select a device with a particular serial number. Signed-off-by: Ján Tomko --- docs/formatdomain.html.in | 22 +++- docs/schemas/domaincommon.rng

[libvirt] [PATCH 2/3] Add ability to attach host USB devices using serial id

2014-06-05 Thread Ján Tomko
From: David Waring This allows specific USB devices to attached to guests when there may be more than one of the same USB device attached to a host. The serial number is optional so that without it existing behaviour is maintained. https://bugzilla.redhat.com/show_bug.cgi?id=914883 Signed-off-

[libvirt] [PATCH v2 01/10] conf: store snapshot source as pointer, for easier manipulation

2014-06-05 Thread Eric Blake
As part of the work on backing chains, I'm finding that it would be easier to directly manipulate chains of pointers (adding a snapshot merely adjusts pointers to form the correct list) rather than copy data from one struct to another. This patch converts snapshot source to be a pointer. In this p

[libvirt] [PATCH v2 00/10] active commit to backing file

2014-06-05 Thread Eric Blake
This enables active commit (collapsing a temporary qcow2 wrapper file back into the permanent backing file), when the destination is a regular file or block device. Further plans for this work before 1.2.6 is released: figure out how to add a qemu capability probe (qemu 2.0 supports active commit

[libvirt] [PATCH v2 04/10] conf: store mirroring information in virStorageSource

2014-06-05 Thread Eric Blake
The current implementation of 'virsh blockcopy' (virDomainBlockRebase) is limited to copying to a local file name. But future patches want to extend it to also copy to network disks. This patch converts over to a virStorageSourcePtr, although it should have no semantic change visible to the user,

[libvirt] [PATCH v2 05/10] conf: alter disk mirror xml output

2014-06-05 Thread Eric Blake
Now that we track a disk mirror as a virStorageSource, we might as well update the XML to theoretically allow any type of mirroring destination (not just a local file). A later patch will also be reusing to track the block commit of the top layer of a chain, which is another case where libvirt ne

[libvirt] [PATCH v2 09/10] blockcommit: track job type in xml

2014-06-05 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 element. This patch adds domain XML to track which job was respon

[libvirt] [PATCH v2 02/10] conf: consolidate disk def allocation

2014-06-05 Thread Eric Blake
A future patch wants to create disk definitions with non-zero default contents; to avoid crashes, all callers that allocate a disk definition should go through a common point. I found allocation points by looking for any code that increments ndisks, as well as any matches for ALLOC.*disk. Most pl

[libvirt] [PATCH v2 07/10] virsh: expose new active commit controls

2014-06-05 Thread Eric Blake
Add knobs to virsh to manage a 2-phase active commit of the top layer, similar to knobs already present on blockcopy. While this code will fail until later patches actually implement the new knobs in the qemu driver, doing it now proves that the API is usable and also makes it easier for testing t

[libvirt] [PATCH v2 10/10] blockcommit: turn on active commit

2014-06-05 Thread Eric Blake
With this in place, I can (finally!) now do: virsh blockcommit $dom vda --shallow --wait --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-onl

[libvirt] [PATCH v2 06/10] blockcommit: document semantics of committing active layer

2014-06-05 Thread Eric Blake
Now that qemu 2.0 allows commit of the active layer, people are attempting to use virsh blockcommit and getting into a stuck state, because libvirt is unprepared to handle the two-phase commit required by qemu. Stepping back a bit, there are two valid semantics for a commit operation: 1. Maintain

[libvirt] [PATCH v2 08/10] blockcommit: update error messages related to block jobs

2014-06-05 Thread Eric Blake
A future patch will add two-phase block commit jobs; as the mechanism for managing them is similar to managing a block copy job, existing errors should be made generic enough to occur for either job type. * src/conf/domain_conf.c (virDomainHasDiskMirror): Update comment. * src/qemu/qemu_driver.c (

Re: [libvirt] [PATCH 1/3] Don't reuse 'ret' variable in virStorageBackendProbeTarget

2014-06-05 Thread Eric Blake
On 06/05/2014 11:11 AM, Ján Tomko wrote: > To match the convention: > ret - current function's return value > rc - other function's return values > --- > src/storage/storage_backend_fs.c | 25 +++-- > 1 file changed, 11 insertions(+), 14 deletions(-) > ACK. -- Eric Blake

Re: [libvirt] [RFC][PATCH]QEMU: Parse -device vfio-pci commandline

2014-06-05 Thread hong-hua....@freescale.com
Hi Eric, I've tried bump VIR_TEST_DEBUG=2, but there's not more information. $ VIR_TEST_DEBUG=2 ./qemuargv2xmltest ... 76) QEMU ARGV-2-XML hostdev-usb-address ... OK 77) QEMU ARGV-2-XML hostdev-pci-address ... OK 78) QEMU ARGV-2-XML hostd

Re: [libvirt] [PATCH 2/3] Simplify conditions in virStorageBackendProbeTarget

2014-06-05 Thread Eric Blake
On 06/05/2014 11:11 AM, Ján Tomko wrote: > Jump out early if no metadata was detected (for directories). > Join the error and cleanup labels. > --- > src/storage/storage_backend_fs.c | 42 > +--- > 1 file changed, 18 insertions(+), 24 deletions(-) ACK. May cau

Re: [libvirt] [PATCH 3/3] Fix storage format probing

2014-06-05 Thread Eric Blake
On 06/05/2014 11:11 AM, Ján Tomko wrote: > Commit fff74b2 moved the probing into virStorageFileGetMetadataFromBuf > but didn't update the format in volume definition. > > https://bugzilla.redhat.com/show_bug.cgi?id=1104908 > --- > src/storage/storage_backend_fs.c | 2 ++ > src/storage/storag

Re: [libvirt] [PATCH v2 01/10] conf: store snapshot source as pointer, for easier manipulation

2014-06-05 Thread Peter Krempa
On 06/06/14 00:52, Eric Blake wrote: > As part of the work on backing chains, I'm finding that it would > be easier to directly manipulate chains of pointers (adding a > snapshot merely adjusts pointers to form the correct list) rather > than copy data from one struct to another. This patch convert

Re: [libvirt] [PATCH] manual: Add virsh manual about specified migration host

2014-06-05 Thread Yasunori Goto
Chen-san, > ping... I suppose it seems to be difficult for users to understand... I think following order of description is desirable. - What is migrateuri? - What is benefit? - If it is ommited, what is happen? The case of "migration_host" is specified. The case of nothing specif