Re: [libvirt] [PATCH 3/3] scsi: Adjust return status from getBlockDevice

2015-06-16 Thread John Ferlan
On 06/15/2015 07:24 AM, Michal Privoznik wrote: From: John Ferlan jfer...@redhat.com https://bugzilla.redhat.com/show_bug.cgi?id=1224233 Currently it's not possible to determine the difference between a fatal memory allocation or failure to open/read the directory error with a perhaps

Re: [libvirt] [CFT][PATCH 00/10] Making new mounts of proc and sysfs as safe as bind mounts (take 2)

2015-06-16 Thread Richard Weinberger
Am 16.06.2015 um 14:31 schrieb Daniel P. Berrange: Thanks Richard / Eric for the suggested patches. I'll apply Eric's simplified patch to libvirt now, and backport it to our stable libvirt branches. Thank you Daniel! -- libvir-list mailing list libvir-list@redhat.com

Re: [libvirt] Socket files in virt-aa-helper

2015-06-16 Thread Michał Dubiel
Hi all, May I kindly ask someone for some advice on this topic? Regards, Michal On 21 May 2015 at 20:23, Michał Dubiel m...@semihalf.com wrote: Hi guys, I have got a question. I need to add apparmor support for vhost-user socket files used to communicate with the vhost-user server app.

Re: [libvirt] [PATCH v2 0/3] Fix and tweak 'uknown cause' error in virDirCreate

2015-06-16 Thread Erik Skultety
On 06/16/2015 04:23 PM, Ján Tomko wrote: On Tue, Jun 16, 2015 at 02:28:52PM +0200, Erik Skultety wrote: Erik Skultety (3): util: virfile: Fix 'unknown cause' error if NFS mount point creation fails util: virDirCreate: Child now exits with positive errno-code virfile:

[libvirt] [libvirt-python PATCH] Change livbirt version to 1.3.0 for the next release

2015-06-16 Thread Martin Kletzander
Since the background for Admin API is merged upstream, we are bumping the minor release version as discussed previously Signed-off-by: Martin Kletzander mklet...@redhat.com --- Pushed as trivial setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py

Re: [libvirt] [PATCH v2 0/3] Fix and tweak 'uknown cause' error in virDirCreate

2015-06-16 Thread Ján Tomko
On Tue, Jun 16, 2015 at 02:28:52PM +0200, Erik Skultety wrote: Erik Skultety (3): util: virfile: Fix 'unknown cause' error if NFS mount point creation fails util: virDirCreate: Child now exits with positive errno-code virfile: virDirCreate: Insert blank lines to assure slightly

[libvirt] [PATCH v2 1/3] util: virfile: Fix 'unknown cause' error if NFS mount point creation fails

2015-06-16 Thread Erik Skultety
This happens if user requires creation of a directory with specified UID/GID permissions. To accomplish this, we use fork approach and set particular UID/GID permissions in child process. However, child process doesn't have a valid descriptor to a logfile (this is prohibited explicitly) and since

[libvirt] [PATCH] util: Fix Coverity RESOURCE_LEAK

2015-06-16 Thread John Ferlan
Commit id 'e44b0269c9' in advertently checked !dir before calling closedir Signed-off-by: John Ferlan jfer...@redhat.com --- Pushed as trivial src/util/virprocess.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/virprocess.c b/src/util/virprocess.c index

[libvirt] nodedev-dumpxml doesn't refresh supported offload NIC capabilities

2015-06-16 Thread Moshe Levi
Hi, I was playing with the nodedev-dumpxml to see the supported offload NIC capabilities, and It seem that if I disable one of offloading capabilities using ethtool command nodedev-dumpxml it still return the feature as enabled. To get the correct offloading capabilities I have to restart

Re: [libvirt] [glib v2 3/4] Add loop and nbd filesystem types

2015-06-16 Thread Christophe Fergeau
On Tue, Jun 16, 2015 at 10:58:13AM +0200, Cédric Bosdonnat wrote: --- libvirt-gconfig/libvirt-gconfig-domain-filesys.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libvirt-gconfig/libvirt-gconfig-domain-filesys.h b/libvirt-gconfig/libvirt-gconfig-domain-filesys.h index

[libvirt] [PATCH] lxc: Rename daemon to dmn

2015-06-16 Thread Martin Kletzander
On older systems it shadows global declaration of daemon() function. Signed-off-by: Martin Kletzander mklet...@redhat.com --- Pushed as a build-breaker src/lxc/lxc_controller.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lxc/lxc_controller.c

[libvirt] [PATCH] Change livbirt version to 1.3.0 for the next release

2015-06-16 Thread Martin Kletzander
Since the background for Admin API is merged upstream, we are bumping the minor release version as discussed previously Signed-off-by: Martin Kletzander mklet...@redhat.com --- Pushed as trivial configure.ac | 2 +- docs/formatdomain.html.in| 2 +-

Re: [libvirt] [CFT][PATCH 00/10] Making new mounts of proc and sysfs as safe as bind mounts (take 2)

2015-06-16 Thread Daniel P. Berrange
On Sat, Jun 06, 2015 at 01:56:54PM -0500, Eric W. Biederman wrote: Richard Weinberger rich...@nod.at writes: [CC'ing libvirt-lxc folks] Am 28.05.2015 um 23:32 schrieb Eric W. Biederman: Richard Weinberger rich...@nod.at writes: Am 28.05.2015 um 21:57 schrieb Eric W. Biederman:

Re: [libvirt] [PATCH] network: add an option to make dns public

2015-06-16 Thread Cedric Bosdonnat
Hi Laine, On Thu, 2015-06-11 at 13:37 -0400, Laine Stump wrote: On 06/10/2015 03:56 PM, John Ferlan wrote: On 06/01/2015 07:54 AM, Cédric Bosdonnat wrote: In some use cases we don't want the virtual network's DNS to only listen to the vnet interface. Adding a publiclyAccessible attribute

[libvirt] [PATCH v2] qemu: implement address for isa-serial

2015-06-16 Thread James Cowgill
I needed to specify the iobase address for certain exotic mips configurations. Signed-off-by: James Cowgill james...@cowgill.org.uk --- src/qemu/qemu_command.c| 12 ++-- .../qemuxml2argv-serial-dev-chardev-iobase.args| 7 +

Re: [libvirt] [PATCH v2 1/2] Add virProcessGetPids to get all tasks of a process

2015-06-16 Thread John Ferlan
On 06/16/2015 05:18 AM, Cédric Bosdonnat wrote: This function gets all the PIDs listed in /proc/PID/task. This will be needed at least to move all qmeu-nbd tasks to the container cgroup. --- src/libvirt_private.syms | 1 + src/util/virprocess.c| 47

Re: [libvirt] [glib v2 3/4] Add loop and nbd filesystem types

2015-06-16 Thread Cedric Bosdonnat
On Tue, 2015-06-16 at 14:43 +0200, Christophe Fergeau wrote: On Tue, Jun 16, 2015 at 10:58:13AM +0200, Cédric Bosdonnat wrote: --- libvirt-gconfig/libvirt-gconfig-domain-filesys.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libvirt-gconfig/libvirt-gconfig-domain-filesys.h

[libvirt] [PATCH v2 2/3] util: virDirCreate: Child now exits with positive errno-code

2015-06-16 Thread Erik Skultety
Previous patch of this series proposed a fix to virDirCreate, so that parent process reports an error if child process failed its task. However our logic still permits the child to exit with negative errno followed by a check of the status on the parent side using WEXITSTATUS which, being POSIX

[libvirt] [PATCH v2 0/3] Fix and tweak 'uknown cause' error in virDirCreate

2015-06-16 Thread Erik Skultety
Erik Skultety (3): util: virfile: Fix 'unknown cause' error if NFS mount point creation fails util: virDirCreate: Child now exits with positive errno-code virfile: virDirCreate: Insert blank lines to assure slightly better readability src/util/virfile.c | 44

[libvirt] [PATCH v2 3/3] virfile: virDirCreate: Insert blank lines to assure slightly better readability

2015-06-16 Thread Erik Skultety
--- This could easily be pushed under trivial rule, right? src/util/virfile.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/util/virfile.c b/src/util/virfile.c index 91e460f..61f6e4d 100644 --- a/src/util/virfile.c +++ b/src/util/virfile.c @@ -2376,6 +2376,7 @@ virDirCreate(const

Re: [libvirt] [glib v2 0/4] Filesystem config improvements

2015-06-16 Thread Christophe Fergeau
Hey, Thanks for adding the test! ACK to patches 1, 3 and 4, one comment in 2. Christophe On Tue, Jun 16, 2015 at 10:58:10AM +0200, Cédric Bosdonnat wrote: Hi all, Here is the previous patch split into a series. The difference with v1 are: * it adds test-gconfig test for file systems *

[libvirt] [PATCH] netserver: Remove duplicate forward declaration

2015-06-16 Thread Martin Kletzander
Commit fa14207368820b264123ba8429927b62258f996e added forward declaration of virNetServerPtr into virnetserver.h even though we are keeping these in virnetserverprogram.h due to older compilers having problems with duplicate ones. Signed-off-by: Martin Kletzander mklet...@redhat.com --- Pushed as

Re: [libvirt] [PATCH] network: add an option to make dns public

2015-06-16 Thread Laine Stump
On 06/16/2015 09:08 AM, Cedric Bosdonnat wrote: Hi Laine, On Thu, 2015-06-11 at 13:37 -0400, Laine Stump wrote: On 06/10/2015 03:56 PM, John Ferlan wrote: On 06/01/2015 07:54 AM, Cédric Bosdonnat wrote: In some use cases we don't want the virtual network's DNS to only listen to the vnet

Re: [libvirt] [PATCH sandbox 3/3] Add LIBVIRT_SANDBOX_INIT_DEBUG env variable

2015-06-16 Thread Cedric Bosdonnat
On Tue, 2015-06-16 at 12:25 +0100, Daniel P. Berrange wrote: Allow debugging of the init process separately from debugging of libvirt sandbox infrastructure, by using the new env var LIBVIRT_SANDBOX_INIT_DEBUG=1. --- libvirt-sandbox/libvirt-sandbox-builder-container.c | 3 +--

Re: [libvirt] [PATCH v4 8/9] qemu: migration: selective block device migration

2015-06-16 Thread Michal Privoznik
On 16.06.2015 00:42, Pavel Boldin wrote: Implement a `migrate_disks' parameters for the QEMU driver. This multi- value parameter can be used to explicitly specify what block devices are to be migrated using the NBD server. Tunnelled migration using NBD is to be done. Signed-off-by: Pavel

Re: [libvirt] [PATCH v4 0/9] Selective block device migration implementation

2015-06-16 Thread Michal Privoznik
On 16.06.2015 00:42, Pavel Boldin wrote: Behold of the fourth re-roll of the selective block device migration patch. In this patch we don't only fix the issue with NBD migration format auto- detection but also introduce the patches that do enhance the NBD migration triggered by `drive-mirror`

Re: [libvirt] [PATCH v4 4/9] util: multi-value virTypedParameter

2015-06-16 Thread Michal Privoznik
On 16.06.2015 00:42, Pavel Boldin wrote: The `virTypedParamsValidate' function now can be instructed to allow multiple entries for some of the keys. For this flag the type with the `VIR_TYPED_PARAM_MULTIPLE' flag. Add unit tests for this new behaviour. Signed-off-by: Pavel Boldin

Re: [libvirt] nodedev-dumpxml doesn't refresh supported offload NIC capabilities

2015-06-16 Thread Laine Stump
On 06/16/2015 10:12 AM, Moshe Levi wrote: Hi, I was playing with the nodedev-dumpxml to see the supported offload NIC capabilities, and It seem that if I disable one of offloading capabilities using ethtool command nodedev-dumpxml it still return the feature as enabled. To get the

[libvirt] Continuation of Admin APIs

2015-06-16 Thread Martin Kletzander
So now that we have the Admin API backend merged in, the code is prepared to have new APIs added in. There are many things to be added, but we should start out slowly with the most desired ones. I'll try to outline what I have in my mind so the discussion can sprout into existence. As Erik

[libvirt] ANNOUNCE: libvirt-glib version 0.2.1 released

2015-06-16 Thread Daniel P. Berrange
I am pleased to announce that a new release of the libvirt-glib package, version 0.2.1, is now available from ftp://libvirt.org/libvirt/glib/ The packages are GPG signed with Key fingerprint: DAF3 A6FD B26B 6291 2D0E 8E3F BE86 EBB4 1510 4FDF (4096R) Changes in this release: - Fix

Re: [libvirt] [PATCH v4 6/9] util: virTypedParams{Filter, GetAllStrings}

2015-06-16 Thread Michal Privoznik
On 16.06.2015 00:42, Pavel Boldin wrote: Add multikey API: * virTypedParamsFilter that filters all the parameters with specified name. * virTypedParamsGetAllStrings that returns a list with all the values for specified name and string type. Signed-off-by: Pavel Boldin

Re: [libvirt] [PATCH sandbox 1/3] Support lzma and gzip compressed kernel modules

2015-06-16 Thread Cedric Bosdonnat
On Tue, 2015-06-16 at 12:25 +0100, Daniel P. Berrange wrote: Modern distros like Fedora have started to compress their kernel module files, so we can't simply read the file contents and load the module. We have to first do a decompression step, as the kernel won't do that itself. While Fedora

Re: [libvirt] [PATCH sandbox 2/3] Explicitly check for supported URIs when starting guests

2015-06-16 Thread Cedric Bosdonnat
On Tue, 2015-06-16 at 12:25 +0100, Daniel P. Berrange wrote: While the sandbox API is designed to be hypervisor agnostic, the internal implementation needs work for each hypervisor target. To avoid user errors at runtime, do an upfront check to see if the URI they supply is suitable. Since we

Re: [libvirt] Socket files in virt-aa-helper

2015-06-16 Thread Jamie Strandboge
On 06/16/2015 08:40 AM, Michał Dubiel wrote: Hi all, May I kindly ask someone for some advice on this topic? Regards, Michal On 21 May 2015 at 20:23, Michał Dubiel m...@semihalf.com mailto:m...@semihalf.com wrote: Hi guys, I have got a question. I need to add apparmor

[libvirt] [PATCH] nodedev: update netdev feature bits before each dumpxml

2015-06-16 Thread Laine Stump
As with several other attributes of devices (link status, sriov VF list, IOMMU group list), the detdev feature bits aren't automatically updated in the nodedev driver's cache when they change. In order to get a properly up-to-date list when getting the XML of a device, we must reget them in

[libvirt] [PATCH] daemon/Makefile: Add forgotten dependency

2015-06-16 Thread Michal Privoznik
In latest patches we added Admin API. However, the Makefile in daemon was missing one dependency: admin_server.c is including generated file admin_dispatch.h. However, this dependency was not explicitly marked in the Makefile therefore the build happened to fail on some occasions. Signed-off-by:

Re: [libvirt] [PATCH] network: add an option to make dns public

2015-06-16 Thread Cedric Bosdonnat
On Tue, 2015-06-16 at 11:21 -0400, Laine Stump wrote: On 06/16/2015 09:08 AM, Cedric Bosdonnat wrote: Hi Laine, On Thu, 2015-06-11 at 13:37 -0400, Laine Stump wrote: On 06/10/2015 03:56 PM, John Ferlan wrote: On 06/01/2015 07:54 AM, Cédric Bosdonnat wrote: In some use cases we don't

Re: [libvirt] [PATCH 0/4] parallels: rename parallels to vz

2015-06-16 Thread Dmitry Guryanov
On 06/10/2015 10:50 AM, Maxim Nestratov wrote: This change is made in the scope of 'Parallel Cloud Server' pruduct renaming to 'Virtuozzo' to prevent future confusion and make things actual. Previously we introduced a new driver name 'vz' as a synonym to 'parallels'. This patch set finalizes

[libvirt] [PATCH 7/8] test: Refactor testDomainSetVcpusFlags

2015-06-16 Thread Peter Krempa
Remove the bogous flag check and refactor the code by using virDomainObjGetDefs instead of virDomainObjGetPersistentDef. --- src/test/test_driver.c | 68 +- 1 file changed, 23 insertions(+), 45 deletions(-) diff --git a/src/test/test_driver.c

[libvirt] [PATCH 6/8] lib: setvcpus: Remove bogous flag check

2015-06-16 Thread Peter Krempa
Since VIR_DOMAIN_AFFECT_CURRENT is 0 the flag check does not make sense as masking @flags with 0 will always equal to false. --- src/libvirt-domain.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index 7e6d749..4d7b88a 100644 ---

[libvirt] [PATCH 2/8] test: Switch to reference counting with testDomObjFromDomain

2015-06-16 Thread Peter Krempa
Retrieve domain objects with reference and release them with virDomainObjEndAPI. --- src/test/test_driver.c | 89 -- 1 file changed, 35 insertions(+), 54 deletions(-) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index

[libvirt] [PATCH 0/8] Test driver refactors and fixes

2015-06-16 Thread Peter Krempa
Note that patch 1/8 of this series depends on patch 2/13 of the vCPU pinning and related refactors - Part 1.5 series: http://www.redhat.com/archives/libvir-list/2015-June/msg00678.html Peter Krempa (8): test: Reuse virDomainObjGetOneDef in testDomainGetVcpusFlags test: Switch to reference

[libvirt] [PATCH 1/8] test: Reuse virDomainObjGetOneDef in testDomainGetVcpusFlags

2015-06-16 Thread Peter Krempa
The test driver copies the domain definition correctly so we can reuse the helper. --- src/test/test_driver.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index d1f0af3..c0ef459 100644 --- a/src/test/test_driver.c +++

[libvirt] [PATCH 8/8] test: Fix lock ordering in testDomainRevertToSnapshot

2015-06-16 Thread Peter Krempa
The test driver lock should not be acquired while a domain object lock is held. Tweak the lock ordering to avoid possible deadlock. --- src/test/test_driver.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index

[libvirt] [PATCH 3/8] test: Refactor test driver domain object retrieval

2015-06-16 Thread Peter Krempa
Add testDomObjFromDomainLocked and reuse it together with testDomObjFromDomain to retrieve domain objects in the qemu driver instead of open-coding it in every API. --- src/test/test_driver.c | 409 +++-- 1 file changed, 92 insertions(+), 317

[libvirt] [PATCH 5/8] test: group domain APIs together

2015-06-16 Thread Peter Krempa
The test driver groups the API groups together, but some domain APIs were scattered around. --- src/test/test_driver.c | 225 + 1 file changed, 113 insertions(+), 112 deletions(-) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index

[libvirt] [PATCH 4/8] test: Refactor test driver event sending

2015-06-16 Thread Peter Krempa
Make testObjectEventQueue tolerant to NULL @event and move it so that it does not require a prototype. Additionally add testObjectEventQueueUnlocked that will lock @driver before sending the event. Refactor the rest of the codebase to make use of the above features --- src/test/test_driver.c |

[libvirt] [[libvirt-php][PATCH v1] qemu-agent-command] fixes for installation and add another libvirt function

2015-06-16 Thread Vasiliy Tolstov
* add libvirt_domain_qemu_agent_command * fix install target, because before this all stuff goes to /usr/usr dir Signed-off-by: Vasiliy Tolstov v.tols...@selfip.ru --- configure.ac | 3 +++ src/Makefile.am | 19 ++- src/libvirt-php.c | 28

[libvirt] [PATCH 7/7] qemu: Add check for unpriv sgio for SCSI generic host device

2015-06-16 Thread John Ferlan
https://bugzilla.redhat.com/show_bug.cgi?id=1072736 Check if the hostdev has set the sgio filtered/unfiltered and handle appropriately. This restores functionality removed by commit id 'ce346623' to remove sgio support the SCSI generic host device. Note that this patch fixes a bug where if the

[libvirt] [PATCH 2/7] qemu: Introduce qemuGetHostdevPath

2015-06-16 Thread John Ferlan
Introduce a convenience function to handle formulating the hostdev path Signed-off-by: John Ferlan jfer...@redhat.com --- src/qemu/qemu_conf.c | 21 - 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c index

[libvirt] [PATCH 1/7] qemu: Introduce qemuIsSharedHostdev

2015-06-16 Thread John Ferlan
Add a single boolean function to handle whether the hostdev is shared or not Signed-off-by: John Ferlan jfer...@redhat.com --- src/qemu/qemu_conf.c | 23 +++ 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c index

[libvirt] [PATCH 6/7] qemu: Add ability to set sgio values for hostdev

2015-06-16 Thread John Ferlan
Add necessary checks in order to allow setting sgio values for a scsi host device Signed-off-by: John Ferlan jfer...@redhat.com --- src/qemu/qemu_conf.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c index

[libvirt] [PATCH 5/7] qemu: Extract qemuGetHostdevPath from qemuGetSharedHostdevKey

2015-06-16 Thread John Ferlan
The device path will be necessary for upcoming patch to allow sgio settings on a hostdev Signed-off-by: John Ferlan jfer...@redhat.com --- src/qemu/qemu_conf.c | 22 +- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c

[libvirt] [PATCH 4/7] qemu: Refactor qemuAddSharedHostdev and qemuRemoveSharedHostdev

2015-06-16 Thread John Ferlan
Refactor the functions to follow logic from qemuAddSharedDisk and qemuRemoveSharedDisk with respect to locking driver. Signed-off-by: John Ferlan jfer...@redhat.com --- src/qemu/qemu_conf.c | 27 ++- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git

[libvirt] [PATCH 3/7] qemu: Refactor qemuCheckSharedDisk to create virCheckUnprivSGIO

2015-06-16 Thread John Ferlan
Split out the SGIO check for sharing with hostdev in future patches Signed-off-by: John Ferlan jfer...@redhat.com --- src/qemu/qemu_conf.c | 88 ++-- 1 file changed, 57 insertions(+), 31 deletions(-) diff --git a/src/qemu/qemu_conf.c

[libvirt] [PATCH 0/7] Restore code to allow unpriv_sgio for hostdev SCSI generic

2015-06-16 Thread John Ferlan
https://bugzilla.redhat.com/show_bug.cgi?id=1072736 This series of patches unreverts the functionality from commit id 'ce346623' which reverted the original functionality. Since pure revert caused too many conflicts and because the code has undergone a few changes since the prior reversion, I

[libvirt] [RFC] libvirt hugepage hooks

2015-06-16 Thread Alex Williamson
Hi, This is very rough and early, but I wanted to get some feedback, possibly advice, and see if there's some interest in at least creating infrastructure for user contributed libvirt hooks, if not some default ones that are no-ops unless configured. The impetus for this is that I started trying

[libvirt] [PATCH 04/10] conf: use virDomainChrSourceDef to save the path

2015-06-16 Thread Luyao Huang
As the backend of shmem server is a unix type chr device, save it in virDomainChrSourceDef can reuse the exist code for chr device. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/conf/domain_conf.c | 8 +--- src/conf/domain_conf.h | 2 +- src/qemu/qemu_command.c | 16

[libvirt] [PATCH 2/5] Print SCSI logical unit as unsigned integer

2015-06-16 Thread Eric Farman
The logical unit field is an unsigned integer, we should use the appropriate substitution when printing it. Signed-off-by: Eric Farman far...@linux.vnet.ibm.com --- src/conf/domain_audit.c | 2 +- src/conf/domain_conf.c | 2 +- src/qemu/qemu_hotplug.c | 4 ++-- src/util/virhostdev.c | 6

[libvirt] [PATCH 0/5 v2] Corrections to SCSI logical unit handling

2015-06-16 Thread Eric Farman
While working with the hostdev tag and SCSI LUNs, a problem was discovered with the XML schema (see commit message in patch 4). This spawned some further corrections to the handling of the logical unit field throughout libvirt. This series was split from a single patch, from this feedback:

[libvirt] [PATCH 1/5] Print SCSI logical unit as a positive integer

2015-06-16 Thread Eric Farman
A logical unit address is a positive integer, so it would be wise to reject any negative inputs. Signed-off-by: Eric Farman far...@linux.vnet.ibm.com --- src/conf/domain_conf.c | 2 +- tools/virsh-domain.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git

[libvirt] [PATCH 4/5] docs: Fix XML schema handling of LUN address in hostdev tag

2015-06-16 Thread Eric Farman
Defining a domain with a SCSI disk attached via a hostdev tag and a source address unit value longer than two digits causes an error when editing the domain with virsh edit, even if no changes are made to the domain definition. The error suggests invalid XML, somewhere: # virsh edit lmb_guest

[libvirt] [PATCH 5/5] docs: Correct typos in scsi hostdev and address elements

2015-06-16 Thread Eric Farman
The type='scsi' parameter of an address element is ignored if placed within a hostdev section, and rejected by the XML schema used by virt-xml-validate. Remove it from the doc, and correct a typo in the remaining address arguments. Signed-off-by: Eric Farman far...@linux.vnet.ibm.com Reviewed-by:

[libvirt] [PATCH 3/5] Convert SCSI logical unit from int to long long

2015-06-16 Thread Eric Farman
The SCSI Architecture Model defines a logical unit address as 64-bits in length, so change the field accordingly so that the entire value could be stored. Signed-off-by: Eric Farman far...@linux.vnet.ibm.com --- src/conf/domain_audit.c | 2 +- src/conf/domain_conf.c | 4 ++--

[libvirt] [PATCH 09/10] qemu: Implement shared memory device hot-unplug

2015-06-16 Thread Luyao Huang
Signed-off-by: Luyao Huang lhu...@redhat.com --- src/qemu/qemu_driver.c | 6 ++-- src/qemu/qemu_hotplug.c | 96 - src/qemu/qemu_hotplug.h | 3 ++ 3 files changed, 102 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_driver.c

[libvirt] [PATCH 06/10] conf: Add helpers to insert/remove/find shmem devices in domain def

2015-06-16 Thread Luyao Huang
The helpers will be useful when implementing hotplug and coldplug of shared memory devices. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/conf/domain_conf.c | 61 src/conf/domain_conf.h | 7 ++ src/libvirt_private.syms | 3 +++ 3

[libvirt] [PATCH 02/10] qemu: always build id when generate shared memory device CLI

2015-06-16 Thread Luyao Huang
When hot-unplug the device, qmp command device_del require a device id. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/qemu/qemu_command.c| 4 ++-- tests/qemuxml2argvdata/qemuxml2argv-shmem.args | 16 2 files changed, 10 insertions(+), 10

[libvirt] [PATCH 07/10] qemu: Implement shared memory device cold (un)plug

2015-06-16 Thread Luyao Huang
Add support for using the attach/detach device APIs on the inactive configuration to add/del shared memory devices. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/libvirt_private.syms | 1 + src/qemu/qemu_driver.c | 21 +++-- 2 files changed, 20 insertions(+), 2

[libvirt] [PATCH 01/10] qemu: auto assign pci address for shared memory device

2015-06-16 Thread Luyao Huang
Shared memory device is base on PCI address, even we do not pass the pci address to qemu, qemu will auto assign a pci address for it. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/qemu/qemu_command.c| 11 +++ tests/qemuxml2argvdata/qemuxml2argv-shmem.args |

[libvirt] [PATCH 03/10] qemu: Refactor creation of shared memory device commandline

2015-06-16 Thread Luyao Huang
Rename qemuBuildShmemDevCmd to qemuBuildShmemDevStr and change the return type so that it can be reused in the device hotplug code later. And split the chardev creation part in a new function qemuBuildShmemBackendStr for reused in the device hotplug code later. Signed-off-by: Luyao Huang

[libvirt] [PATCH 08/10] qemu: Implement share memory device hot-plug

2015-06-16 Thread Luyao Huang
Signed-off-by: Luyao Huang lhu...@redhat.com --- src/qemu/qemu_driver.c | 10 - src/qemu/qemu_hotplug.c | 60 + src/qemu/qemu_hotplug.h | 3 +++ 3 files changed, 72 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_driver.c

[libvirt] [PATCH 05/10] conf:audit: introduce audit function for shared memory device

2015-06-16 Thread Luyao Huang
Signed-off-by: Luyao Huang lhu...@redhat.com --- docs/auditlog.html.in| 16 src/conf/domain_audit.c | 16 src/conf/domain_audit.h | 6 ++ src/libvirt_private.syms | 1 + 4 files changed, 39 insertions(+) diff --git a/docs/auditlog.html.in

[libvirt] [PATCH 10/10] qemu: report error when shmem have a invalid address

2015-06-16 Thread Luyao Huang
If user pass a invalid address shared memory device to qemu, qemu won't report the error, but will auto assign a pci address to the shared memory device. Signed-off-by: Luyao Huang lhu...@redhat.com --- src/qemu/qemu_command.c | 7 +++ 1 file changed, 7 insertions(+) diff --git

[libvirt] [PATCH 00/10] Implement shared memory device - Part 1

2015-06-16 Thread Luyao Huang
This part contains some small fix and Implement the hot-plug/hot-unplug and cold-plug/cold-unplug for Inter-VM Shared Memory PCI device. Luyao Huang (10): qemu: auto assign pci address for shared memory device qemu: always build id when generate shared memory device CLI qemu: Refactor

Re: [libvirt] [RFC PATCHv2 1/8] threshold: new API virDomainBlockSetWriteThreshold

2015-06-16 Thread Francesco Romani
- Original Message - From: Eric Blake ebl...@redhat.com To: Peter Krempa pkre...@redhat.com Cc: libvir-list@redhat.com, from...@redhat.com Sent: Monday, June 15, 2015 6:21:13 PM Subject: Re: [libvirt] [RFC PATCHv2 1/8] threshold: new API virDomainBlockSetWriteThreshold On

Re: [libvirt] [PATCH v2 1/3] storage: Fix the schema and add tests for cifs pool

2015-06-16 Thread Peter Krempa
On Mon, Jun 15, 2015 at 17:30:35 -0400, John Ferlan wrote: Commit id '887dd362' added support for a netfs pool format type 'cifs' and 'gluster' in order to add rng support for Samba and glusterfs netfs pools. Originally, the CIFS type support was added as part of commit id '61fb6979'.

Re: [libvirt] [PATCH v2 3/3] storage: Generate correct parameters for CIFS

2015-06-16 Thread Peter Krempa
On Mon, Jun 15, 2015 at 17:30:37 -0400, John Ferlan wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1186969 When generating the path to the dir for a CIFS/Samba driver, the code would generate a source path for the mount using %s:%s while the mount.cifs expects to see //%s/%s. So check

Re: [libvirt] [PATCH v2 2/3] storage: Adjust command arglist for gluster

2015-06-16 Thread Peter Krempa
On Mon, Jun 15, 2015 at 17:30:36 -0400, John Ferlan wrote: In order for the glusterfs boolean to be set, the pool-def-type must be VIR_STORAGE_POOL_NETFS, thus the check within virCommandNewArgList whether pool-def-type is VIR_STORAGE_POOL_FS will never be true, so remove it Signed-off-by:

Re: [libvirt] Publishing a Python libvirt Howto/Reference Guide

2015-06-16 Thread Michal Privoznik
On 15.06.2015 17:48, David Ashley wrote: All - I represent the Fedora Docs Team. We are interested in publishing a Python libvirt HowTo/Reference Guide for users. We feel that there is a gap with using virtualization from a scripting environment. While virsh fills this gap for simple

[libvirt] [glib v2 0/4] Filesystem config improvements

2015-06-16 Thread Cédric Bosdonnat
Hi all, Here is the previous patch split into a series. The difference with v1 are: * it adds test-gconfig test for file systems * the gvir_config_domain_filesys_set_driver_type fix has been moved to its own commit * the gvir_config_domain_filesys_set_driver_format doesn't set the type,

[libvirt] [glib v2 3/4] Add loop and nbd filesystem types

2015-06-16 Thread Cédric Bosdonnat
--- libvirt-gconfig/libvirt-gconfig-domain-filesys.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libvirt-gconfig/libvirt-gconfig-domain-filesys.h b/libvirt-gconfig/libvirt-gconfig-domain-filesys.h index 4f3973e..4144976 100644 --- a/libvirt-gconfig/libvirt-gconfig-domain-filesys.h +++

[libvirt] [glib v2 1/4] test-gconfig: add filesystem test

2015-06-16 Thread Cédric Bosdonnat
--- tests/test-gconfig.c| 35 + tests/xml/gconfig-domain-device-filesys.xml | 15 + 2 files changed, 50 insertions(+) create mode 100644 tests/xml/gconfig-domain-device-filesys.xml diff --git a/tests/test-gconfig.c

[libvirt] [glib v2 4/4] domain config: add API to set the filesystem image format

2015-06-16 Thread Cédric Bosdonnat
Add the gvir_config_domain_filesys_set_driver_format function to allow setting nbd driver type + image format for containers filesystems. --- libvirt-gconfig/libvirt-gconfig-domain-filesys.c | 16 libvirt-gconfig/libvirt-gconfig-domain-filesys.h | 2 ++

[libvirt] [sandbox v2 4/4] Add host-image format parameter

2015-06-16 Thread Cédric Bosdonnat
Let the user specify the format of the source disk image in host-image mounts. This will allow us to mount other image types than raw ones. --- .../libvirt-sandbox-builder-container.c| 10 +++ libvirt-sandbox/libvirt-sandbox-builder-machine.c | 9 +++

[libvirt] [sandbox v2 1/4] Make sure the sandbox state dir and config can be accessed

2015-06-16 Thread Cédric Bosdonnat
When running a KVM sandbox as root, the qemu process will run as another user (likely qemu). We need to make sure this user can access the vmlinux and initrd.img, sandbox.cfg and mounts.cfg files. --- libvirt-sandbox/libvirt-sandbox-config.c | 2 +-

Re: [libvirt] Publishing a Python libvirt Howto/Reference Guide

2015-06-16 Thread Daniel P. Berrange
On Mon, Jun 15, 2015 at 10:48:29AM -0500, David Ashley wrote: All - I represent the Fedora Docs Team. We are interested in publishing a Python libvirt HowTo/Reference Guide for users. We feel that there is a gap with using virtualization from a scripting environment. While virsh fills this

Re: [libvirt] [PATCH v2 0/2] lxc: properly clean up qemu-nbd

2015-06-16 Thread Daniel P. Berrange
On Thu, Jun 11, 2015 at 03:04:33PM +0100, Daniel P. Berrange wrote: On Wed, Jun 10, 2015 at 04:08:41PM -0400, John Ferlan wrote: On 06/01/2015 09:01 AM, Cédric Bosdonnat wrote: Hi all, Here is the very same patch, but split in two patches. Well, I also moved two comments

[libvirt] [sandbox v2 0/4] Getting qemu sandboxes run as root + host-image format

2015-06-16 Thread Cédric Bosdonnat
Hi all, Here are a few patches to make sandboxes run with qemu:///system connection. The last one is just a new feature to allow using somethings else than RAW images in host-image mounts. This feature will later be needed to run docker container using Eren's work. Diff to v1: * Adapted the

[libvirt] [sandbox v2 3/4] qemu: mount all host-images as ext4

2015-06-16 Thread Cédric Bosdonnat
To avoid troubles when mounting ext4 images, hard-code ext4 as mount format instead of ext3. --- libvirt-sandbox/libvirt-sandbox-builder-machine.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libvirt-sandbox/libvirt-sandbox-builder-machine.c

[libvirt] [PATCH v2 2/2] lxc: properly clean up qemu-nbd

2015-06-16 Thread Cédric Bosdonnat
Add the qemu-nbd tasks to the container cgroup to make sure those will be killed when the container is stopped. In order to reliably get the qemu-nbd tasks PIDs, we use /sys/devices/virtual/block/DEV/pid as qemu-nbd is daemonizing itself. --- src/lxc/lxc_controller.c | 56

[libvirt] [PATCH v2 1/2] Add virProcessGetPids to get all tasks of a process

2015-06-16 Thread Cédric Bosdonnat
This function gets all the PIDs listed in /proc/PID/task. This will be needed at least to move all qmeu-nbd tasks to the container cgroup. --- src/libvirt_private.syms | 1 + src/util/virprocess.c| 47 +++ src/util/virprocess.h| 2 ++ 3 files

[libvirt] [PATCH v2 0/2] lxc: properly clean up qemu-nbd (resent)

2015-06-16 Thread Cédric Bosdonnat
Just resending the initial patch series as it went into a black hole. Hi all, Here is the very same patch, but split in two patches. Well, I also moved two comments around between v1 and v2. Cédric Bosdonnat (2): Add virProcessGetPids to get all tasks of a process lxc: properly clean up

Re: [libvirt] [PATCH 07/13] Add libvirt-admin library

2015-06-16 Thread Daniel P. Berrange
On Tue, Jun 16, 2015 at 11:58:24AM +0200, Martin Kletzander wrote: Initial scratch of the admin library. It has its own virAdmConnectPtr that inherits from virAbstractConnectPtr and thus trivially supports error reporting. There's pkg-config file added and spec-file adjusted as well.

[libvirt] [PATCH] qemu: add value range check of option granularity

2015-06-16 Thread Shanzhi Yu
The default value of the granularity is the image cluster size clamped between 4096 and 65536. Libvirt should add a check for this otherwise qemu will report error like below: $ virsh blockcopy r7 vda /var/lib/libvirt/images/r7.s1 --granularity 32 error: internal error: unable to execute QEMU

Re: [libvirt] [PATCH 00/13] Admin API

2015-06-16 Thread Daniel P. Berrange
On Tue, Jun 16, 2015 at 11:58:17AM +0200, Martin Kletzander wrote: This is a real post for an Admin API to get in. Everything discussed in previous posts should be a addressed. I'll start a discussion later on today about the ideas for the APIs to be added and the general near-future desing

[libvirt] [EXAMPLE PATCH 11/13] rpc: Add virNetServerGetNClients

2015-06-16 Thread Martin Kletzander
This function accesses the number of connected clients while properly locking the server it returns the data about. Signed-off-by: Martin Kletzander mklet...@redhat.com --- src/libvirt_remote.syms | 1 + src/rpc/virnetserver.c | 10 ++ src/rpc/virnetserver.h | 2 ++ 3 files changed,

[libvirt] PING: [PATCH v2 0/2] Allow PCI virtio on ARM virt machine

2015-06-16 Thread Pavel Fedin
Hello ? Kind regards, Pavel Fedin Expert Engineer Samsung Electronics Research center Russia -Original Message- From: libvir-list-boun...@redhat.com [mailto:libvir-list-boun...@redhat.com] On Behalf Of Pavel Fedin Sent: Thursday, June 11, 2015 9:41 AM To: libvir-list@redhat.com

[libvirt] [glib v2 2/4] gvir_config_domain_filesys_set_driver_type: replace the driver node

2015-06-16 Thread Cédric Bosdonnat
Replace the driver node in case the user calls the function more than one time. --- libvirt-gconfig/libvirt-gconfig-domain-filesys.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libvirt-gconfig/libvirt-gconfig-domain-filesys.c

[libvirt] [sandbox v2 2/4] Write /dev/vd* instead of vd* in mounts.cfg

2015-06-16 Thread Cédric Bosdonnat
Fixes a regression introduced by d74b4350: the init-qemu tool expects /dev/vd* sources to create the block device, while we were just having vd*. Write again /dev/vd* to mounts.cfg. --- libvirt-sandbox/libvirt-sandbox-builder-machine.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[libvirt] [PATCH v2] nodeinfo: fix to parse present cpus rather than possible cpus

2015-06-16 Thread Kothapally Madhu Pavan
Currently we are parsing all the possible cpus to get the nodeinfo. This fix will perform a check for present cpus before parsing. Signed-off-by: Kothapally Madhu Pavan k...@linux.vnet.ibm.com --- src/nodeinfo.c | 13 + 1 file changed, 13 insertions(+) diff --git a/src/nodeinfo.c

  1   2   >