[libvirt] [PATCH] esx: Fetch snapshot info directly for filtering

2016-07-11 Thread Tomáš Golembiovský
When fetching domains with virConnectListAllDomains() and when filtering by snapshot existence is requested the ESX driver first lists all the domains and then check one-by-one for snapshot existence. This process takes unnecessarily long time. To significantly improve the time necessary to

[libvirt] [PATCH 2/2] build: drop hack for old mingw ssize_t

2016-07-11 Thread Eric Blake
The old 32-bit-only mingw project had a mismatch in its that omitted ssize_t, but where size_t was a different rank than int. But now that mingw64 (both 32- and 64-bit) is the more popular platform (Fedora has dropped mingw in favor of mingw64), we no longer need to carry a hack to gnulib to

[libvirt] [PATCH 1/2] build: virrandommock.c not needed on mingw

2016-07-11 Thread Eric Blake
We can't mock tests on Mingw, which lacks dlopen() and friends; follow the paradigms used in other mock files of conditionally compiling nothing when not building for Linux. Signed-off-by: Eric Blake --- tests/virrandommock.c | 19 --- 1 file changed, 12

[libvirt] [PATCH 0/2] mingw build fixes

2016-07-11 Thread Eric Blake
If I don't get a review in a couple of days, I can probably justify them under the build-breaker rule; on the other hand, since mingw doesn't get as much testing, I'm not in a rush to push right away. Eric Blake (2): build: virrandommock.c not needed on mingw build: drop hack for old mingw

Re: [libvirt] Status of gnulib/local/m4/ssize_t.m4.diff ?

2016-07-11 Thread Eric Blake
On 07/04/2016 08:17 AM, Daniel P. Berrange wrote: > Way back in 2012, we added the ssize_t.m4.diff file because we didn't > want to risk pulling in a gnulib update at time of release. > > ommit 1012dc2933378640ac0ab1025a4fec2fc8c6f84c > Author: Eric Blake > Date: Fri Mar 30

[libvirt] [PATCH] systemd: fix ready notification on abstract socket

2016-07-11 Thread Jim Fehlig
At least with systemd v210, NOTIFY_SOCKET is abstact, e.g. @/org/freedesktop/systemd1/notify. sendmsg() fails on such a socket with "Connection refused". The unix(7) man page contains the following details wrt abstract socket addresses abstract: an abstract socket address is distinguished (from a

Re: [libvirt] [PATCH 1/2] Add qemu hotplug test files

2016-07-11 Thread Tomasz Flendrich
The file tests/qemuhotplugtestdevices/qemuhotplug-ccw-virtio-2-explicit.xml should have an endline at the end to pass the syntax-check. Should I post the patch again with that fixed, or it’s okay? I don’t know how such minor changes should be handled and I don’t want to spam the mailing list.

Re: [libvirt] question about PCI new_id sysfs interface

2016-07-11 Thread Jim Fehlig
On 06/28/2016 12:39 PM, Laine Stump wrote: > On 06/28/2016 01:39 PM, Jim Fehlig wrote: >> After updating the dom0 kernel on one of my Xen test hosts, I noticed >> problems with PCI hostdev management. E.g >> >> # virsh nodedev-detach pci__07_10_1 >> error: Failed to detach device

Re: [libvirt] [PATCH RFC] virhook: adding virHookCheck() inside virHookCall().

2016-07-11 Thread Julio Faracco
Hi guys, I sent this patch because we are having some troubles to introduce/remove a new hook. We are creating a package here (RPM, DEB, etc) that configures a VDI and introduces a hook for customization. When the package is removed, the hook is too. After that, all VMs stop to working saying

[libvirt] [PATCH 0/2] virpci: support driver_override sysfs interface

2016-07-11 Thread Jim Fehlig
This series fixes a regression using Xen's pciback with kernels >= 3.16 containing https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/drivers/pci/pci-driver.c?h=v3.16=8895d3bcb8ba960b1b83f95d772b641352ea8e51 It makes use of the driver_override sysfs interface introduced in

[libvirt] [PATCH 2/2] virpci: support driver_override sysfs interface

2016-07-11 Thread Jim Fehlig
Currently, libvirt uses the new_id PCI sysfs interface to bind a PCI stub driver to a PCI device. The new_id interface is known to be buggy and racey, hence a more deterministic interface was introduced in the 3.12 kernel - driver_override. For more details see

[libvirt] [PATCH 1/2] virpci: simplify virPCIDeviceBindToStub

2016-07-11 Thread Jim Fehlig
Early in virPCIDeviceBindToStub, there is a check to see if the stub is already bound to the device, returning success with no further actions if that is the case. The same condition is unnecessarily checked later in the function. Remove the unneeded checks to simplify the logic a bit.

[libvirt] [PATCH RFC] virhook: adding virHookCheck() inside virHookCall().

2016-07-11 Thread Julio Faracco
This commit introduces the virHookCheck() before running the command (hook). The virHookCheck() before virCommandRun() will avoid errors with changes (removal and other permissions changes) in the hook file, while the libvirt daemon is running. Now, when you remove the hook file while libvirtd is

[libvirt] [PATCH v4 7/7] qemu: Add luks support for domain disk

2016-07-11 Thread John Ferlan
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1301021 Generate the luks command line using the AES secret key to encrypt the luks secret. A luks secret object will be in addition to a an AES secret. For hotplug, check if the encinfo exists and if so, add the AES secret for the passphrase

[libvirt] [PATCH v4 2/7] docs: Update docs to reflect LUKS secret changes

2016-07-11 Thread John Ferlan
Commit id's 'c8438010', '9bbf0d7e', and '2552fec24' altered the documentation to describe adding a 'passphrase' type secret usage model in order to reference the secret for a luks volume. After commit, it was deemed that a 'volume' usage model should be used, so adjust the various documents in

[libvirt] [PATCH v4 6/7] qemu: Alter the qemuDomainGetSecretAESAlias to add new arg

2016-07-11 Thread John Ferlan
Soon we will be adding luks encryption support. Since a volume could require both a luks secret and a secret to give to the server to use of the device, alter the alias generation to create a slightly different alias so that we don't have two objects with the same alias. Signed-off-by: John

[libvirt] [PATCH v4 5/7] qemu: Add secinfo for hotplug virtio disk

2016-07-11 Thread John Ferlan
Commit id 'a1344f70a' added AES secret processing for RBD when starting up a guest. As such, when the hotplug code calls qemuDomainSecretDiskPrepare an AES secret could be added to the disk about to be hotplugged. If an AES secret was added, then the hotplug code would need to generate the secret

[libvirt] [PATCH v4 3/7] Repurpose the 'passphrase' secret to 'tls'

2016-07-11 Thread John Ferlan
Commit id 'c84380106' added support for a secret usage type 'passphrase' that was designed to be used for both LUKS encryption and TLS credentials since both used a 'simple' passphrase in order to handle the authentication. However, a post commit review deemed that usage model to be invalid. This

[libvirt] [PATCH v4 4/7] storage: Add support to create a luks volume

2016-07-11 Thread John Ferlan
Partially resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1301021 If the volume xml was looking to create a luks volume take the necessary steps in order to make that happen. The processing will be: 1. create a temporary file (virStorageBackendCreateQemuImgSecretPath) 1a. use the

[libvirt] [PATCH v4 1/7] tests: Adjust LUKS tests to use 'volume' secret type

2016-07-11 Thread John Ferlan
Commit id's '9bbf0d7e6' and '2552fec24' added some XML parsing tests for a LUKS volume to use a 'passphrase' secret format. After commit, this was deemed to be incorrect, so covert the various tests to use the volume usage format where the 'usage' is the path to the volume rather than a user

[libvirt] [PATCH v4 0/7] Add support for LUKS encrypted devices

2016-07-11 Thread John Ferlan
According to Dan's post commit response: http://www.redhat.com/archives/libvir-list/2016-July/msg00088.html to the v3 series: http://www.redhat.com/archives/libvir-list/2016-June/msg01935.html using a 'passphrase' usage is not desired, rather a 'volume' usage model should be used for LUKS.

[libvirt] [PATCH v2] virCommandExec: Report error if execve fails

2016-07-11 Thread Michal Privoznik
In an unlikely event of execve() failing, the virCommandExec() function does not report any error, even though checks that are at the beginning of the function are verbose when failing. Signed-off-by: Michal Privoznik --- diff to v1: - Fixed the test (used virFork() instead

Re: [libvirt] [PATCH] virCommandExec: Report error if execve fails

2016-07-11 Thread Martin Kletzander
On Mon, Jul 11, 2016 at 05:42:41PM +0200, Martin Kletzander wrote: On Mon, Jul 11, 2016 at 04:11:22PM +0200, Michal Privoznik wrote: In an unlikely event of execve() failing, the virCommandExec() function does not report any error, even though checks that are at the beginning of the function

Re: [libvirt] [PATCH 0/5] test-rewrap-args improvements

2016-07-11 Thread Martin Kletzander
On Mon, Jul 11, 2016 at 04:40:23PM +0200, Ján Tomko wrote: Ján Tomko (5): qemuxml2argvtest: drop empty pseries-vio-address-clash.args testutils: find perl early testutils: only rewrap args files test-wrap-argv: print diff instead of the incorrectly wrapped file test-wrap-argv: set cutoff at

Re: [libvirt] [PATCHv2 0/3] qemu: add support for intel-iommu

2016-07-11 Thread Martin Kletzander
On Mon, Jul 11, 2016 at 02:25:44PM +0200, Ján Tomko wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1235581 v2: * removed '-iommu' suffix from the model name * mentioned the device in formatdomain.html * added the device to ABI stability check and the hot/coldplug parser (where both

Re: [libvirt] [PATCH] virCommandExec: Report error if execve fails

2016-07-11 Thread Martin Kletzander
On Mon, Jul 11, 2016 at 04:11:22PM +0200, Michal Privoznik wrote: In an unlikely event of execve() failing, the virCommandExec() function does not report any error, even though checks that are at the beginning of the function are verbose when failing. Signed-off-by: Michal Privoznik

Re: [libvirt] [PATCH 5/5] test-wrap-argv: set cutoff at 78 characters

2016-07-11 Thread Martin Kletzander
On Mon, Jul 11, 2016 at 04:40:28PM +0200, Ján Tomko wrote: For every but the last argument, we also need space for a space and a backslash. Rewrap everything longer than 78 characters. --- [...] diff --git a/tests/test-wrap-argv.pl b/tests/test-wrap-argv.pl index 6adaef9..3d94df6 100755 ---

Re: [libvirt] [PATCH 00/16] Add typedef accessors for virConf

2016-07-11 Thread Michal Privoznik
On 11.07.2016 11:45, Daniel P. Berrange wrote: > Every caller of virConfGetValue is doing the same kind of > dance to ensure the returned value is set and has the > right kind of type. This is a clear sign we should have > typesafe APIs for accessor virConf values. > > This series introduces such

Re: [libvirt] [PATCH 06/16] libvirt: convert to typesafe virConf accessors

2016-07-11 Thread Michal Privoznik
On 11.07.2016 11:45, Daniel P. Berrange wrote: > Signed-off-by: Daniel P. Berrange > --- > src/libvirt-admin.c | 66 -- > src/libvirt.c | 70 > + > 2 files changed, 76

Re: [libvirt] [PATCH 0/3] Clean up qemuhotplugtest xml files

2016-07-11 Thread Martin Kletzander
On Fri, Jul 08, 2016 at 12:52:07AM +0200, Tomasz Flendrich wrote: I plan on doing bigger changes to qemuhotplugtest.c. It's going to test device attachment/detachment to both live (like now) and persistent (something that is missing now) domains. More files will be added, so I decided to clean

[libvirt] [PATCH 5/5] test-wrap-argv: set cutoff at 78 characters

2016-07-11 Thread Ján Tomko
For every but the last argument, we also need space for a space and a backslash. Rewrap everything longer than 78 characters. --- .../qemuargv2xml-disk-drive-cache-unsafe.args| 3 ++- .../qemuargv2xml-disk-drive-network-rbd-ipv6.args| 4 ++--

[libvirt] [PATCH 4/5] test-wrap-argv: print diff instead of the incorrectly wrapped file

2016-07-11 Thread Ján Tomko
Commit c9c03ea stopped creating an intermediate file during syntax-check to save on execution time. It also switched to outputting the whole incorrectly wrapped file instead of a diff needed to fix it. Feed the newly wrapped file to diff via a pipe. Note that fixing it by running

[libvirt] [PATCH 3/5] testutils: only rewrap args files

2016-07-11 Thread Ján Tomko
test-wrap-argv.pl does not know how to rewrap other files. --- tests/testutils.c | 4 1 file changed, 4 insertions(+) diff --git a/tests/testutils.c b/tests/testutils.c index d699e1f..8af8707 100644 --- a/tests/testutils.c +++ b/tests/testutils.c @@ -442,6 +442,10 @@ virTestRewrapFile(const

[libvirt] [PATCH 2/5] testutils: find perl early

2016-07-11 Thread Ján Tomko
Commit 843a70a changed test-wrap-argv.pl to use /usr/bin/env perl instead of /usr/bin/perl However when called from qemuxml2argvtest with VIR_TEST_REGENERATE_OUTPUT, PATH is set to '/bin'. Find the path to perl early in virTestMain, in case we are going to need it later after we've overridden

[libvirt] [PATCH 0/5] test-rewrap-args improvements

2016-07-11 Thread Ján Tomko
Ján Tomko (5): qemuxml2argvtest: drop empty pseries-vio-address-clash.args testutils: find perl early testutils: only rewrap args files test-wrap-argv: print diff instead of the incorrectly wrapped file test-wrap-argv: set cutoff at 78 characters

[libvirt] [PATCH 1/5] qemuxml2argvtest: drop empty pseries-vio-address-clash.args

2016-07-11 Thread Ján Tomko
Unused since its introduction in commit 4b942fe. --- tests/qemuxml2argvdata/qemuxml2argv-pseries-vio-address-clash.args | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 tests/qemuxml2argvdata/qemuxml2argv-pseries-vio-address-clash.args diff --git

[libvirt] [PATCH] virCommandExec: Report error if execve fails

2016-07-11 Thread Michal Privoznik
In an unlikely event of execve() failing, the virCommandExec() function does not report any error, even though checks that are at the beginning of the function are verbose when failing. Signed-off-by: Michal Privoznik --- src/util/vircommand.c | 7 +-

Re: [libvirt] Status of gnulib/local/m4/ssize_t.m4.diff ?

2016-07-11 Thread Eric Blake
On 07/04/2016 08:17 AM, Daniel P. Berrange wrote: > Way back in 2012, we added the ssize_t.m4.diff file because we didn't > want to risk pulling in a gnulib update at time of release. > > > There is still an upstream bug where gnulib uses the wrong type > for ssize_t on mingw; we

Re: [libvirt] [PATCH 2/5] qemuBuildCpuCommandLine: Don't leak @buf

2016-07-11 Thread Peter Krempa
On Sat, Jul 09, 2016 at 10:19:02 +0200, Michal Privoznik wrote: > Just like every other qemuBuild*CommandLine() function, this uses > a buffer to hold partial cmd line strings too. However, if > there's an error, the control jumps to 'cleanup' label leaving > the buffer behind and thus leaking it.

Re: [libvirt] [PATCH 5/5] qemuxml2argvmock: Don't leak @netdef->ifname

2016-07-11 Thread Peter Krempa
On Sat, Jul 09, 2016 at 10:19:05 +0200, Michal Privoznik wrote: [...] > --- > tests/qemuxml2argvmock.c | 1 + > 1 file changed, 1 insertion(+) ACK -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 4/5] qemuxml2argvtest: Don't leak dummy monitor

2016-07-11 Thread Peter Krempa
On Sat, Jul 09, 2016 at 10:19:04 +0200, Michal Privoznik wrote: > It's just test, but why leak it? I guess the only good reason would be to make leak analyzers happy. > ==26971== 20 bytes in 1 blocks are definitely lost in loss record 623 of 704 > ==26971==at 0x4C29F80: malloc

Re: [libvirt] [PATCH 1/5] virStorageEncryptionSecretFree: Don't leak secret lookup definition

2016-07-11 Thread Peter Krempa
On Sat, Jul 09, 2016 at 10:19:01 +0200, Michal Privoznik wrote: > When storage secret is parsed in virStorageEncryptionSecretParse(), > virSecretLookupParseSecret() which allocates some memory. This is > however never freed. > > ==21711== 134 bytes in 6 blocks are definitely lost in loss record

Re: [libvirt] [PATCH 3/5] qemuDomainObjPrivateFree: Free @masterKey too

2016-07-11 Thread Peter Krempa
On Sat, Jul 09, 2016 at 10:19:03 +0200, Michal Privoznik wrote: > This one's a bit more complicated. In qemuProcessPrepareDomain() > a master key for encrypting secret for ciphered disks is created. > This object lives within qemuDomainObjPrivate object. It is freed > in qemuProcessStop(), but if

[libvirt] [PATCHv2 3/3] qemu: format intel-iommu on the command line

2016-07-11 Thread Ján Tomko
results in: -device intel-iommu https://bugzilla.redhat.com/show_bug.cgi?id=1235580 --- src/qemu/qemu_command.c| 35 ++ .../qemuxml2argvdata/qemuxml2argv-intel-iommu.args | 22 ++ tests/qemuxml2argvtest.c

[libvirt] [PATCHv2 2/3] Add QEMU_CAPS_DEVICE_INTEL_IOMMU

2016-07-11 Thread Ján Tomko
Check whether QEMU supports -device intel-iommu Note that the presence of this option does not mean that it's usable because of a bug in earlier QEMU versions, but it's better than nothing. https://bugzilla.redhat.com/show_bug.cgi?id=1235580 --- src/qemu/qemu_capabilities.c

[libvirt] [PATCHv2 0/3] qemu: add support for intel-iommu

2016-07-11 Thread Ján Tomko
https://bugzilla.redhat.com/show_bug.cgi?id=1235581 v2: * removed '-iommu' suffix from the model name * mentioned the device in formatdomain.html * added the device to ABI stability check and the hot/coldplug parser (where both operations are rejected) * error out on non-q35 machines *

[libvirt] [PATCHv2 1/3] Introduce device

2016-07-11 Thread Ján Tomko
A device with an attribute 'model', with just one model so far: ... https://bugzilla.redhat.com/show_bug.cgi?id=1235580 --- docs/formatdomain.html.in | 26 +++ docs/schemas/domaincommon.rng | 11 +++ src/conf/domain_conf.c

Re: [libvirt] [PATCH v3] virsh: allow both --uuid and --name at same time

2016-07-11 Thread Michal Privoznik
On 09.07.2016 12:06, Chen Hanxiao wrote: > From: Chen Hanxiao > > #virsh list --uuid --name > 49c765a0-25e7-40d0-964f-dac99724b32c c7 > 918f1dd6-b19f-412b-ba17-d113bad89af8 f23 > > Signed-off-by: Chen Hanxiao > --- > v3: add virsh.pod sections

Re: [libvirt] [PATCH RFC 2/5] libxl: describe host cpu features based on hwcaps

2016-07-11 Thread Joao Martins
On 07/11/2016 09:46 AM, Cedric Bosdonnat wrote: > On Fri, 2016-07-08 at 17:16 +0100, Joao Martins wrote: >> Parse libxl_hwcaps accounting for versions for Xen 4.4. >> libxl_hwcaps is a set of cpuid leaves output that is described in [0] or >> [1] in Xen 4.7. This is a collection of CPUID leaves

Re: [libvirt] [PATCH] libvirt.spec.in: soft-static allocation of qemu and kvm groups

2016-07-11 Thread Jaroslav Suchanek
On Fri, Jul 08, 2016 at 07:08:05PM +0200, Andrea Bolognani wrote: > On Thu, 2016-07-07 at 17:41 +0200, Jaroslav Suchanek wrote: > > Follow the same logic for adding qemu user also for kvm and qemu groups. As > > is described in https://fedoraproject.org/wiki/Packaging:UsersAndGroups > > document

Re: [libvirt] [Qemu-devel] [RFC 00/28] s390x CPU models: exposing features

2016-07-11 Thread David Hildenbrand
> Are there any further comments, especially on patches 23-25, introducing new > QOM interfaces? Ping, can somebody please have a look, especially on patches 23-25? We really want to know if we can proceed with this CPU model approach. David > > Also, if anybody is planning to look into this,

Re: [libvirt] [PATCH 4/4] vz: support filesystem type volume

2016-07-11 Thread Nikolay Shirokovskiy
On 06.07.2016 17:02, Olga Krishtal wrote: > Vz containers are able to use ploop volumes from storage pools > to work upon. > > To use filesystem type volume, pool name and volume name should be > specifaed in : > > > > > > > The information about pool and volume

[libvirt] [PATCH 14/16] lockd: convert to typesafe virConf accessors

2016-07-11 Thread Daniel P. Berrange
Signed-off-by: Daniel P. Berrange --- src/locking/lock_driver_lockd.c | 61 ++--- 1 file changed, 15 insertions(+), 46 deletions(-) diff --git a/src/locking/lock_driver_lockd.c b/src/locking/lock_driver_lockd.c index 1812611..41e7bcb

[libvirt] [PATCH 03/16] virconf: add typed value accessor methods

2016-07-11 Thread Daniel P. Berrange
Currently many users of virConf APIs are defining the same macros for calling virConfValue() and then doing type checking. To remove this repeated code, add a set of typesafe accessor methods. Signed-off-by: Daniel P. Berrange --- src/libvirt_private.syms | 10 +

[libvirt] [PATCH 09/16] lxc: convert to typesafe virConf accessors

2016-07-11 Thread Daniel P. Berrange
Signed-off-by: Daniel P. Berrange --- src/lxc/lxc_conf.c | 49 +++-- src/lxc/lxc_conf.h | 2 +- 2 files changed, 16 insertions(+), 35 deletions(-) diff --git a/src/lxc/lxc_conf.c b/src/lxc/lxc_conf.c index 96a0f47..538bbbe 100644

[libvirt] [PATCH 12/16] virt-login-shell: convert to typesafe virConf accessors

2016-07-11 Thread Daniel P. Berrange
Signed-off-by: Daniel P. Berrange --- tools/virt-login-shell.c | 141 +-- 1 file changed, 38 insertions(+), 103 deletions(-) diff --git a/tools/virt-login-shell.c b/tools/virt-login-shell.c index e8474a4..632d493 100644 ---

[libvirt] [PATCH 08/16] virtlogd: convert to typedef virConf accessors

2016-07-11 Thread Daniel P. Berrange
Signed-off-by: Daniel P. Berrange --- po/POTFILES.in | 1 - src/logging/log_daemon_config.c | 96 ++--- src/logging/log_daemon_config.h | 7 +-- 3 files changed, 15 insertions(+), 89 deletions(-) diff --git

[libvirt] [PATCH 06/16] libvirt: convert to typesafe virConf accessors

2016-07-11 Thread Daniel P. Berrange
Signed-off-by: Daniel P. Berrange --- src/libvirt-admin.c | 66 -- src/libvirt.c | 70 + 2 files changed, 76 insertions(+), 60 deletions(-) diff --git

[libvirt] [PATCH 07/16] virtlockd: convert to typesafe virConf accessors

2016-07-11 Thread Daniel P. Berrange
Signed-off-by: Daniel P. Berrange --- po/POTFILES.in | 1 - src/locking/lock_daemon_config.c | 90 src/locking/lock_daemon_config.h | 9 ++-- 3 files changed, 12 insertions(+), 88 deletions(-) diff --git

[libvirt] [PATCH 13/16] selinux: convert to typesafe virConf accessors

2016-07-11 Thread Daniel P. Berrange
Signed-off-by: Daniel P. Berrange --- src/security/security_selinux.c | 42 - 1 file changed, 20 insertions(+), 22 deletions(-) diff --git a/src/security/security_selinux.c b/src/security/security_selinux.c index aa61767..4be946d

[libvirt] [PATCH 05/16] qemu: convert to typesafe virConf accessors

2016-07-11 Thread Daniel P. Berrange
Signed-off-by: Daniel P. Berrange --- src/qemu/qemu_conf.c | 395 --- src/qemu/qemu_conf.h | 20 +-- 2 files changed, 165 insertions(+), 250 deletions(-) diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c index

[libvirt] [PATCH 15/16] sanlock: convert to typesafe virConf accessors

2016-07-11 Thread Daniel P. Berrange
Signed-off-by: Daniel P. Berrange --- src/locking/lock_driver_sanlock.c | 97 +-- 1 file changed, 31 insertions(+), 66 deletions(-) diff --git a/src/locking/lock_driver_sanlock.c b/src/locking/lock_driver_sanlock.c index 3069b82..579f696

[libvirt] [PATCH 11/16] uri: convert to typesafe virConf accessors

2016-07-11 Thread Daniel P. Berrange
Signed-off-by: Daniel P. Berrange --- src/util/viruri.c | 48 +++- 1 file changed, 19 insertions(+), 29 deletions(-) diff --git a/src/util/viruri.c b/src/util/viruri.c index a491e34..2f252ac 100644 --- a/src/util/viruri.c +++

[libvirt] [PATCH 16/16] remote: convert to typesafe virConf accessors

2016-07-11 Thread Daniel P. Berrange
Signed-off-by: Daniel P. Berrange --- src/remote/remote_driver.c | 15 +++ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c index e9904f8..29552aa 100644 --- a/src/remote/remote_driver.c +++

[libvirt] [PATCH 10/16] libxl: convert to typesafe virConf accessors

2016-07-11 Thread Daniel P. Berrange
Signed-off-by: Daniel P. Berrange --- src/libxl/libxl_conf.c | 53 -- 1 file changed, 8 insertions(+), 45 deletions(-) diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c index 584eb8f..146e08a 100644 ---

[libvirt] [PATCH 01/16] tests: remove pointless virconftest.sh wrapper

2016-07-11 Thread Daniel P. Berrange
The virconftest is different from all our other tests in that the C program only tests a single in/out config file pair. It relies on a shell wrapper to invoke it once for each test file. This gets rid of the shell wrapper and makes the C program actually run over each test file using the normal

[libvirt] [PATCH 04/16] libvirtd: convert to typesafe virConf accessors

2016-07-11 Thread Daniel P. Berrange
The libvirtdconftest was previously used to test data type handling of the libvirtd config file. Now we're using the typedef APIs, this test case has little value, and is pretty hard to fixup with deal with the new APIs. Signed-off-by: Daniel P. Berrange ---

[libvirt] [PATCH 00/16] Add typedef accessors for virConf

2016-07-11 Thread Daniel P. Berrange
Every caller of virConfGetValue is doing the same kind of dance to ensure the returned value is set and has the right kind of type. This is a clear sign we should have typesafe APIs for accessor virConf values. This series introduces such APIs and converts much of the code. What is not converted

[libvirt] [PATCH 02/16] virconf: fix off-by-1 when appending \n to config file

2016-07-11 Thread Daniel P. Berrange
If the config file does not end with a \n, the parser will append one. When re-allocating the array though, it is mistakenly assuming that 'len' is the length including the trailing NUL, but it does not. So we must add 2 to len, when reallocating, not 1. Signed-off-by: Daniel P. Berrange

[libvirt] [PATCH] Fix logic in qemuDomainObjPrivateXMLParseVcpu

2016-07-11 Thread Daniel P. Berrange
The code in qemuDomainObjPrivateXMLParseVcpu for parsing the 'idstr' string was comparing the overall boolean result against 0 which was always true qemu/qemu_domain.c: In function 'qemuDomainObjPrivateXMLParseVcpu': qemu/qemu_domain.c:1482:59: error: comparison of constant '0' with boolean

Re: [libvirt] [PATCH REPOST 0/3] Small cleanups and improvements

2016-07-11 Thread Andrea Bolognani
On Sat, 2016-07-09 at 10:33 +0200, Michal Privoznik wrote: > On 08.07.2016 18:04, Andrea Bolognani wrote: > > Rebased on top of current master. > >  > > Previous attempt: > >  > >   https://www.redhat.com/archives/libvir-list/2016-June/msg02037.html > >  > >  > > Andrea Bolognani (3): > >   util:

Re: [libvirt] [PATCH REPOST 2/3] util: hostcpu: Drop obsolete compatibility code

2016-07-11 Thread Andrea Bolognani
On Sat, 2016-07-09 at 10:33 +0200, Michal Privoznik wrote: > On 08.07.2016 18:04, Andrea Bolognani wrote: > > All Linux releases we support (RHEL6 era) include these > > definitions. > > --- > >  src/util/virhostcpu.c | 11 --- > >  1 file changed, 11 deletions(-) > >  > > diff --git

[libvirt] [PATCH 7/7] virsh: filesystem pools commands

2016-07-11 Thread Nikolay Shirokovskiy
From: Olga Krishtal Signed-off-by: Nikolay Shirokovskiy --- po/POTFILES.in |2 + tools/Makefile.am|4 + tools/virsh-fspool.c | 1728 ++ tools/virsh-fspool.h | 36 ++

[libvirt] [PATCH 6/7] fspool: default implementation of filesystem pools

2016-07-11 Thread Nikolay Shirokovskiy
From: Olga Krishtal Implementation is backend base as in case of storage pools. This patch adds directory backend which is nothing more than managing directories inside another one as starting point. Signed-off-by: Nikolay Shirokovskiy ---

[libvirt] [PATCH 2/7] fspool: usual driver based implementation of filesystem pools API

2016-07-11 Thread Nikolay Shirokovskiy
From: Olga Krishtal Signed-off-by: Nikolay Shirokovskiy --- include/libvirt/virterror.h |8 + po/POTFILES.in |1 + src/Makefile.am |3 + src/datatypes.c | 154 src/datatypes.h

[libvirt] [PATCH 0/7]

2016-07-11 Thread Nikolay Shirokovskiy
filesystem pools inception Filesystem pools is a facility to manage filesystems resources similar to how storage pools manages volume resources. Furthermore new API follows storage API closely where it makes sense. Uploading/downloading operations are not defined yet as it is not obvious how to

[libvirt] [PATCH 3/7] fspools: configuration and internal representation

2016-07-11 Thread Nikolay Shirokovskiy
From: Olga Krishtal Signed-off-by: Nikolay Shirokovskiy --- po/POTFILES.in |1 + src/Makefile.am |5 + src/conf/fs_conf.c | 1624 ++ src/conf/fs_conf.h |

[libvirt] [PATCH 5/7] remote: filesystem pools driver implementation

2016-07-11 Thread Nikolay Shirokovskiy
From: Olga Krishtal Signed-off-by: Nikolay Shirokovskiy --- daemon/libvirtd.c| 10 + daemon/remote.c | 35 +++ src/driver.h | 1 + src/remote/remote_driver.c | 72 +-

[libvirt] [PATCH 4/7] fspools: acl support for filesystem pools

2016-07-11 Thread Nikolay Shirokovskiy
From: Olga Krishtal Signed-off-by: Nikolay Shirokovskiy --- src/access/viraccessdriver.h | 12 src/access/viraccessdrivernop.c| 19 ++ src/access/viraccessdriverpolkit.c | 47 ++

[libvirt] [PATCH 1/7] fspool: introduce filesystem pools API

2016-07-11 Thread Nikolay Shirokovskiy
From: Olga Krishtal API follows the API of storage pools closely in parts which do not differ for filesystems. Signed-off-by: Nikolay Shirokovskiy --- include/libvirt/libvirt-fs.h | 273 +++

Re: [libvirt] [PATCH REPOST 1/3] util: hostcpu: Add virHostCPUGetKVMMaxVCPUs() stub

2016-07-11 Thread Andrea Bolognani
On Sat, 2016-07-09 at 10:33 +0200, Michal Privoznik wrote: > > +virHostCPUGetKVMMaxVCPUs(void) > > +{ > > +virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", > > +   _("KVM is not supported on this platform")); >  > Don't mean to bikeshed, but I'd  prefer if this were: >  >

Re: [libvirt] [PATCH 3/4] vz: refactoring of prlsdkCreateCt

2016-07-11 Thread Nikolay Shirokovskiy
On 06.07.2016 17:02, Olga Krishtal wrote: > We do not need to check domainf fs type there, > because it is done in prlsdkCheckUnsupportedParams. > > Signed-off-by: Olga Krishtal > --- > src/vz/vz_sdk.c | 21 ++--- > 1 file changed, 2 insertions(+), 19

Re: [libvirt] [PATCH RFC 2/5] libxl: describe host cpu features based on hwcaps

2016-07-11 Thread Cedric Bosdonnat
On Fri, 2016-07-08 at 17:16 +0100, Joao Martins wrote: > Parse libxl_hwcaps accounting for versions for Xen 4.4. > libxl_hwcaps is a set of cpuid leaves output that is described in [0] or > [1] in Xen 4.7. This is a collection of CPUID leaves that are we version > in libvirt whenever leaves are

Re: [libvirt] cpu_map data access for libxl driver

2016-07-11 Thread Cedric Bosdonnat
Hey Joao, On Fri, 2016-07-08 at 16:22 +0100, Joao Martins wrote: > Indeed, libxl hw_caps changes from Xen 4.4-4.6 to Xen 4.7 - and it wasn't > somewhat > stabilized until the latter, although field is provided from even earlier xen > versions. So the quirk there is to handle that, other than

Re: [libvirt] [PATCH 0/4] virsh: Provide better auto-completion

2016-07-11 Thread Michal Privoznik
On 08.07.2016 14:56, Nishith Shah wrote: > This series of patches are meant to improve existing auto-complete > functionality in virsh. > > The first patch breaks vshCmddefOptParse into two smaller functions, for > use later in the third patch. > > The second patch simply changes the types of

Re: [libvirt] [PATCH 2/2] qemu: Drop default channel path during migration

2016-07-11 Thread Michal Privoznik
On 08.07.2016 17:40, Jiri Denemark wrote: > Migration to an older libvirt (pre v1.3.0-175-g7140807) is broken > because older versions of libvirt generated different channel paths and > they didn't drop the default paths when parsing domain XMLs. We'd get > such a nice error message: > >

Re: [libvirt] [PATCH 1/2] qemu: Copy complete domain def in qemuDomainDefFormatBuf

2016-07-11 Thread Michal Privoznik
On 08.07.2016 17:40, Jiri Denemark wrote: > Playing directly with our live definition, updating it, and reverting it > back once we are done is very nice and it's quite dangerous too. Let's > just make a copy of the domain definition if needed and do all tricks on > the copy. > >