Re: [libvirt] [PATCH v2 1/3] storage: Adjust qemu-img switches check

2016-06-06 Thread Peter Krempa
On Mon, Jun 06, 2016 at 13:24:50 -0400, John Ferlan wrote: > Since we support QEMU 0.12 and later, checking for support of specific flags > added prior to that isn't necessary. > > Thus start with the base of having the "-o options" available for the > qemu-img create option and then determine whe

Re: [libvirt] [PATCH v2] systemd: directly notify systemd instead of using sd_notify

2016-06-06 Thread Peter Krempa
On Mon, Jun 06, 2016 at 16:21:30 +0100, Daniel Berrange wrote: > The sd_notify method is used to tell systemd when libvirtd > has finished starting up. All it does is send a datagram > containing the string parameter to systemd on a UNIX socket > named in the NOTIFY_SOCKET environment variable. Rat

Re: [libvirt] [PATCH 2/3] vz: fix crash when parsing unexpected disk configuration

2016-06-06 Thread Nikolay Shirokovskiy
On 06.06.2016 20:59, Maxim Nestratov wrote: > As it turned out PrlVmDev_GetStackIndex can return negative values > without reporting an error, which is incorrect but nevertheless. > After that we feed this negative index to virIndexToDiskName, > which in turn returns NULL and we set it to virDoma

Re: [libvirt] [PATCH] Updated to deal with specifying user IDs to that do not map to usernames

2016-06-06 Thread Peter Krempa
On Mon, Jun 06, 2016 at 14:25:23 -0500, Roy Keene wrote: > Patch to libvirt master to avoid failing when a user ID is specified, > e.g. for , that does not map to a user name. > > This is useful if you want to run each VM as a separate user and not > bother creating an /etc/passwd entry for each

Re: [libvirt] [PATCH] apparmor: Don't scrub environment of virtlogd process

2016-06-06 Thread Jim Fehlig
On 06/05/2016 05:06 AM, Guido Günther wrote: > otherwise we drop variables like XDG_RUNTIME_DIR with qemu:///session > and libvirtd faild to find virtlogd's socket. > --- > examples/apparmor/usr.sbin.libvirtd | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/examples/apparmor/usr.sbin.libvi

[libvirt] [PATCH v2 5/6] target-i386: Use "-" instead of "_" on all feature names

2016-06-06 Thread Eduardo Habkost
This makes the feature name tables in feature_word_info all match the actual QOM property names we use. This will make the command-line interface more consistent, allowing the QOM property names to be used as "-cpu" arguments directly. Add extra feat2prop() calls to x86_cpu_parse_featurestr() to

[libvirt] [PATCH v2 2/6] target-i386: Move warning code outside x86_cpu_filter_features()

2016-06-06 Thread Eduardo Habkost
x86_cpu_filter_features() will be reused by code that shouldn't print any warning. Move the warning code to a new x86_cpu_report_filtered_features() function, and call it from x86_cpu_realizefn(). Signed-off-by: Eduardo Habkost --- target-i386/cpu.c | 28 +++- 1 file chan

[libvirt] [PATCH v2 4/6] qmp: Add runnability information to query-cpu-definitions

2016-06-06 Thread Eduardo Habkost
Extend query-cpu-definitions schema to allow it to return two new optional fields: "runnable" and "unavailable-features". "runnable" will tell if the CPU model can be run in the current host. "unavailable-features" will contain a list of CPU properties that are preventing the CPU model from running

[libvirt] [PATCH v2 6/6] target-i386: Return runnability information on query-cpu-definitions

2016-06-06 Thread Eduardo Habkost
Fill the "unavailable-features" field on the x86 implementation of query-cpu-definitions. Cc: Jiri Denemark Cc: libvir-list@redhat.com Signed-off-by: Eduardo Habkost --- Changes v1 -> v2: * Updated to the new schema: no @runnable field, and always report @unavailable-features as present --- t

[libvirt] [PATCH v2 1/6] target-i386: List CPU models using subclass list

2016-06-06 Thread Eduardo Habkost
Instead of using the builtin_x86_defs array, use the QOM subclass list to list CPU models on "-cpu ?" and "query-cpu-definitions". Signed-off-by: Andreas Färber [ehabkost: copied code from a patch by Andreas: "target-i386: QOM'ify CPU", from March 2012] Signed-off-by: Eduardo Habkost --- targe

[libvirt] [PATCH v2 0/6] Add runnability info to query-cpu-definitions

2016-06-06 Thread Eduardo Habkost
This series extends query-cpu-definitions to include an extra field: "unavailable-features". The new field can be used to find out reasons that prevent the CPU model from running in the current host. This will return information based on the current machine and accelerator only. In the future we m

[libvirt] [PATCH v2 3/6] target-i386: Define CPUID filtering functions before x86_cpu_list()

2016-06-06 Thread Eduardo Habkost
Just move code to another place so the it can be reused by the query-cpu-definitions code. Signed-off-by: Eduardo Habkost --- target-i386/cpu.c | 68 +++ 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/target-i386/cpu.c b/target

[libvirt] [PATCH] Updated to deal with specifying user IDs to that do not map to usernames

2016-06-06 Thread Roy Keene
Patch to libvirt master to avoid failing when a user ID is specified, e.g. for , that does not map to a user name. This is useful if you want to run each VM as a separate user and not bother creating an /etc/passwd entry for each UID. It compiles but is as yet untested. --- src/util/virutil

Re: [libvirt] [PATCH v2] systemd: directly notify systemd instead of using sd_notify

2016-06-06 Thread Cole Robinson
On 06/06/2016 11:21 AM, Daniel P. Berrange wrote: > The sd_notify method is used to tell systemd when libvirtd > has finished starting up. All it does is send a datagram > containing the string parameter to systemd on a UNIX socket > named in the NOTIFY_SOCKET environment variable. Rather than > pu

[libvirt] [PATCH 2/3] vz: fix crash when parsing unexpected disk configuration

2016-06-06 Thread Maxim Nestratov
As it turned out PrlVmDev_GetStackIndex can return negative values without reporting an error, which is incorrect but nevertheless. After that we feed this negative index to virIndexToDiskName, which in turn returns NULL and we set it to virDomainDiskDef.dst. Using virDiskNameToBusDeviceIndex with

[libvirt] [PATCH 0/3] vz: util: some crash fixes

2016-06-06 Thread Maxim Nestratov
Maxim Nestratov (3): util: fix crash in virClassIsDerivedFrom for CloseCallbacks objects vz: fix crash when parsing unexpected disk configuration util: fix potential crash in virDiskNameParse src/util/virclosecallbacks.c | 2 ++ src/util/virutil.c | 3 +++ src/vz/vz_sdk.c

[libvirt] [PATCH 1/3] util: fix crash in virClassIsDerivedFrom for CloseCallbacks objects

2016-06-06 Thread Maxim Nestratov
There is a possibility that qemu driver frees by unreferencing its closeCallbacks pointer as it has the only reference to the object, while in fact not all users of CloseCallbacks called thier virCloseCallbacksUnset. Backtrace is the following: Thread #1: 0 in pthread_cond_wait@@GLIBC_2.3.2 () fr

[libvirt] [PATCH 3/3] util: fix potential crash in virDiskNameParse

2016-06-06 Thread Maxim Nestratov
As far as virDiskNameToIndex calls virDiskNameParse and doesn't check parameters and in most cases is used with disk->dst as a parameter and disk->dst is by virIndexToDiskName, which can return NULL, virDiskNameParse can crash in such cases. Let's be paranoic and sustain even such incorrect usage.

[libvirt] [PATCH REPOST 2/4] storage: Use virRandomBytes for virStorageGenerateQcowPassphrase

2016-06-06 Thread John Ferlan
Use the common API Signed-off-by: John Ferlan --- src/storage/storage_backend.c | 10 +++--- src/util/virstorageencryption.c | 42 +++-- src/util/virstorageencryption.h | 4 ++-- 3 files changed, 24 insertions(+), 32 deletions(-) diff --git a/src/stora

[libvirt] [PATCH REPOST 1/4] util: Add range parameters to virRandomBytes

2016-06-06 Thread John Ferlan
Add a minval and maxval range for acceptible values from /dev/urandom Signed-off-by: John Ferlan --- src/util/vircrypto.c | 2 +- src/util/virrandom.c | 13 ++--- src/util/virrandom.h | 3 ++- src/util/viruuid.c | 2 +- tests/qemuxml2argvmock.c | 2 +- tests/vircryp

[libvirt] [PATCH REPOST 4/4] util: Adjust virCryptoEncryptData code to use macros

2016-06-06 Thread John Ferlan
Will make it easier to add new key lengths Signed-off-by: John Ferlan --- src/util/vircrypto.c | 50 +++--- 1 file changed, 27 insertions(+), 23 deletions(-) diff --git a/src/util/vircrypto.c b/src/util/vircrypto.c index 27a3d1d..f50ac6a 100644 --- a/

[libvirt] [PATCH REPOST 0/4] Couple of random and crypto adjustments

2016-06-06 Thread John Ferlan
Originally posted : http://www.redhat.com/archives/libvir-list/2016-May/msg01650.html Updated to current head and reposted. John Ferlan (4): util: Add range parameters to virRandomBytes storage: Use virRandomBytes for virStorageGenerateQcowPassphrase util: Alter virCryptoEncryptData for no

[libvirt] [PATCH REPOST 3/4] util: Alter virCryptoEncryptData for non GNUTLS builds

2016-06-06 Thread John Ferlan
Rather than intermixing the ATTRIBUTE_UNUSED - use HAVE_GNUTLS_CIPHER_ENCRYPT for the whole function instead. Signed-off-by: John Ferlan --- src/util/vircrypto.c | 36 +--- 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/src/util/vircrypto.c b/src/

[libvirt] [PATCH v2 0/3] Adjust qemu-img switches and checks

2016-06-06 Thread John Ferlan
v1:http://www.redhat.com/archives/libvir-list/2016-June/msg00081.html (patches 4, 6, and 7) Patch 4 is now patch 1 Patch 6 was reviewed, but this patch alters it not need backingType Patch 7 reworked to accommodate patch 1 changes John Ferlan (3): storage: Adjust qemu-img switches check stora

[libvirt] [PATCH v2 1/3] storage: Adjust qemu-img switches check

2016-06-06 Thread John Ferlan
Since we support QEMU 0.12 and later, checking for support of specific flags added prior to that isn't necessary. Thus start with the base of having the "-o options" available for the qemu-img create option and then determine whether we have the compat option for qcow2 files (which would be necess

[libvirt] [PATCH v2 3/3] storage: Create helper to set options for CreateQemuImg code

2016-06-06 Thread John Ferlan
Create a helper virStorageBackendCreateQemuImgSetOptions to set either the qemu-img -o options or the previous mechanism using -F Signed-off-by: John Ferlan --- src/storage/storage_backend.c | 30 +- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/src/s

[libvirt] [PATCH v2 2/3] storage: Create helper to set backing for CreateQemuImg code

2016-06-06 Thread John Ferlan
Create a helper virStorageBackendCreateQemuImgSetBacking to perform the backing store set Signed-off-by: John Ferlan --- src/storage/storage_backend.c | 116 +++--- 1 file changed, 64 insertions(+), 52 deletions(-) diff --git a/src/storage/storage_backend.c b

Re: [libvirt] [PATCH 0/7] Cleanup with storageencryption/qemu-img

2016-06-06 Thread John Ferlan
On 06/03/2016 06:42 AM, John Ferlan wrote: > The first 4 patches were already posted: > > http://www.redhat.com/archives/libvir-list/2016-May/msg01984.htm > > http://www.redhat.com/archives/libvir-list/2016-May/msg02147.html > > There was only one small change in a comment to any of those

Re: [libvirt] [PATCH 6/7] storage: Create helper to set backing for CreateQemuImg code

2016-06-06 Thread John Ferlan
On 06/06/2016 09:49 AM, Peter Krempa wrote: > On Fri, Jun 03, 2016 at 06:42:11 -0400, John Ferlan wrote: >> Create a helper virStorageBackendCreateQemuImgSetBacking to perform the >> backing store set >> >> Signed-off-by: John Ferlan >> --- >> src/storage/storage_backend.c | 118 >> +++

Re: [libvirt] [PATCH] systemd: directly notify systemd instead of using sd_notify

2016-06-06 Thread Daniel P. Berrange
On Mon, Jun 06, 2016 at 04:46:50PM +0200, Peter Krempa wrote: > On Mon, Jun 06, 2016 at 15:16:50 +0100, Daniel Berrange wrote: > > The sd_notify method is used to tell systemd when libvirtd > > has finished starting up. All it does is send a datagram > > containing the string parameter to systemd o

[libvirt] [PATCH v2] systemd: directly notify systemd instead of using sd_notify

2016-06-06 Thread Daniel P. Berrange
The sd_notify method is used to tell systemd when libvirtd has finished starting up. All it does is send a datagram containing the string parameter to systemd on a UNIX socket named in the NOTIFY_SOCKET environment variable. Rather than pulling in the systemd libraries for this, just code the notif

[libvirt] [PATCH 4/9] rpc: allow priority string to be passed to TLS context

2016-06-06 Thread Daniel P. Berrange
Extend the virNetTLSContextNew* constructors to allow the TLS priority string to be passed in, overriding the compile time default. Signed-off-by: Daniel P. Berrange --- daemon/libvirtd.c| 2 ++ src/remote/remote_driver.c | 1 + src/rpc/virnettlscontext.c | 27 +

[libvirt] [PATCH 9/9] Use @SYSTEM priority for TLS on Fedora >= 21

2016-06-06 Thread Daniel P. Berrange
In Fedora >= 21, there is a new crypto priority framework that sets TLS policies globally for all apps. To activate this with GNUTLS we must request "@SYSTEM" instead of the traditional "NORMAL" string. The '@' causes gnutls todo a lookup in its config file for the 'SYSTEM' keyword entry. Signed-o

[libvirt] [PATCH 6/9] remote: allow TLS protocol/cipher priority override in URI

2016-06-06 Thread Daniel P. Berrange
Add support for a "tls_priority" URI parameter in remote driver URIs. eg qemu+tls://localhost/session?tls_priority=NORMAL:-VERS-SSL3.0 Signed-off-by: Daniel P. Berrange --- docs/remote.html.in| 13 + src/remote/remote_driver.c | 5 - 2 files changed, 17 insertions(+),

[libvirt] [PATCH 1/9] tls: remove support for gnutls 1.x.x, require 2.2.0

2016-06-06 Thread Daniel P. Berrange
We need to use the gnutls_priority_set_direct method which was not introduced until 2.1.7, so bump version to 2.2.0 which is the first stable release with it included. This release dates from Dec 2007 so it is reasonable to ditch support for the 1.x.x series for gnutls releases entirely. Signed-of

[libvirt] [PATCH 5/9] libvirtd: add config option for TLS priority

2016-06-06 Thread Daniel P. Berrange
Add a "tls_priority" config option to /etc/libvirt/libvirtd.conf to allow the administrator to override the built-in default setting. This only affects the server side configuration. Signed-off-by: Daniel P. Berrange --- daemon/libvirtd-config.c| 2 ++ daemon/libvirtd-config.h| 1 + daem

Re: [libvirt] [PATCH] systemd: directly notify systemd instead of using sd_notify

2016-06-06 Thread Daniel P. Berrange
On Mon, Jun 06, 2016 at 04:59:24PM +0200, Peter Krempa wrote: > On Mon, Jun 06, 2016 at 15:50:46 +0100, Daniel Berrange wrote: > > On Mon, Jun 06, 2016 at 04:46:50PM +0200, Peter Krempa wrote: > > > On Mon, Jun 06, 2016 at 15:16:50 +0100, Daniel Berrange wrote: > > > > The sd_notify method is used

[libvirt] [PATCH 2/9] rpc: set gnutls log function at global init time

2016-06-06 Thread Daniel P. Berrange
Currently we set the gnutls log function when creating a TLS context, however, the setting is in fact global, not per context. So we should be setting it when we first call gnutls_global_init() instead. Signed-off-by: Daniel P. Berrange --- src/rpc/virnettlscontext.c | 21 ++---

[libvirt] [PATCH 3/9] configure: allow setting default TLS priority string

2016-06-06 Thread Daniel P. Berrange
Currently libvirt calls gnutls_set_default_priority() which on old systems resolves to "NORMAL" while new systems it resolves to "@SYSTEM". Either way, this is a global default that is identical across all apps. We want to allow distros to flexibility to define a custom default string for libvirt

[libvirt] [PATCH 0/9] Make TLS priority choice configurable

2016-06-06 Thread Daniel P. Berrange
Historically libvirt has used gnutls_set_default_priority() to tell GNUTLS to use its standard protocol/cipher config settings. Since Fedora >= 21, this has caused gnutls to lookup the conf in /etc/crypto-policies/back-end/gnutls.conf, while previously it was hardcoded at gnutls build time. Using

[libvirt] [PATCH 7/9] Pass config file object through to driver open methods

2016-06-06 Thread Daniel P. Berrange
The virConnectOpenInternal method opens the libvirt client config file and uses it to resolve things like URI aliases. There may be driver specific things that are useful to store in the config file too, so rather than have them re-parse the same file, pass the virConfPtr down to the drivers. Sig

[libvirt] [PATCH 8/9] remote: allow TLS priority to be customized

2016-06-06 Thread Daniel P. Berrange
Support reading the TLS priority from the client configuration file via the "tls_priority" config option, eg $ cat $HOME/.config/libvirt/libvirt.conf tls_priority="NORMAL:-VERS-SSL3.0" Signed-off-by: Daniel P. Berrange --- src/remote/remote_driver.c | 17 +++-- 1 file changed, 15

Re: [libvirt] [PATCH] systemd: directly notify systemd instead of using sd_notify

2016-06-06 Thread Peter Krempa
On Mon, Jun 06, 2016 at 15:50:46 +0100, Daniel Berrange wrote: > On Mon, Jun 06, 2016 at 04:46:50PM +0200, Peter Krempa wrote: > > On Mon, Jun 06, 2016 at 15:16:50 +0100, Daniel Berrange wrote: > > > The sd_notify method is used to tell systemd when libvirtd > > > has finished starting up. All it d

Re: [libvirt] [PATCH 4/7] storage: Adjust qemu-img switches check

2016-06-06 Thread Peter Krempa
On Mon, Jun 06, 2016 at 09:46:22 -0400, John Ferlan wrote: > On 06/06/2016 09:37 AM, Peter Krempa wrote: > > On Fri, Jun 03, 2016 at 06:42:09 -0400, John Ferlan wrote: > >> Since we support QEMU 0.12 and later, checking for support of specific > >> flags > >> added prior to that isn't necessary. >

Re: [libvirt] [PATCH 1/5] Move struct elem out of virNetDevGetFeatures

2016-06-06 Thread Peter Krempa
On Mon, Jun 06, 2016 at 16:37:15 +0200, Ján Tomko wrote: > On Mon, Jun 06, 2016 at 04:25:02PM +0200, Peter Krempa wrote: > > On Mon, Jun 06, 2016 at 09:39:24 +0200, Ján Tomko wrote: > > > Rename struct elem to ethtool_to_virnetdev_feature and move it > > > out of the function to allow reusing it. >

Re: [libvirt] [PATCH] systemd: directly notify systemd instead of using sd_notify

2016-06-06 Thread Peter Krempa
On Mon, Jun 06, 2016 at 15:16:50 +0100, Daniel Berrange wrote: > The sd_notify method is used to tell systemd when libvirtd > has finished starting up. All it does is send a datagram > containing the string parameter to systemd on a UNIX socket > named in the NOTIFY_SOCKET environment variable. Rat

Re: [libvirt] [PATCH 1/5] Move struct elem out of virNetDevGetFeatures

2016-06-06 Thread Ján Tomko
On Mon, Jun 06, 2016 at 04:25:02PM +0200, Peter Krempa wrote: > On Mon, Jun 06, 2016 at 09:39:24 +0200, Ján Tomko wrote: > > Rename struct elem to ethtool_to_virnetdev_feature and move it > > out of the function to allow reusing it. > > --- > > src/util/virnetdev.c | 13 +++-- > > 1 file c

Re: [libvirt] [PATCH 1/5] Move struct elem out of virNetDevGetFeatures

2016-06-06 Thread Peter Krempa
On Mon, Jun 06, 2016 at 09:39:24 +0200, Ján Tomko wrote: > Rename struct elem to ethtool_to_virnetdev_feature and move it > out of the function to allow reusing it. > --- > src/util/virnetdev.c | 13 +++-- > 1 file changed, 7 insertions(+), 6 deletions(-) > > diff --git a/src/util/virnetd

[libvirt] [PATCH] systemd: directly notify systemd instead of using sd_notify

2016-06-06 Thread Daniel P. Berrange
The sd_notify method is used to tell systemd when libvirtd has finished starting up. All it does is send a datagram containing the string parameter to systemd on a UNIX socket named in the NOTIFY_SOCKET environment variable. Rather than pulling in the systemd libraries for this, just code the notif

Re: [libvirt] [PATCH] docs: Document our event loop

2016-06-06 Thread Peter Krempa
On Sun, Jun 05, 2016 at 12:19:47 +0200, Michal Privoznik wrote: > I was asked the other day what's event loop and how libvirt uses > it. Well, I haven't found any good sources on the Internet so I > thought of writing the documentation on my own. > > Signed-off-by: Michal Privoznik > --- > > NB,

Re: [libvirt] [PATCH 6/7] storage: Create helper to set backing for CreateQemuImg code

2016-06-06 Thread Peter Krempa
On Fri, Jun 03, 2016 at 06:42:11 -0400, John Ferlan wrote: > Create a helper virStorageBackendCreateQemuImgSetBacking to perform the > backing store set > > Signed-off-by: John Ferlan > --- > src/storage/storage_backend.c | 118 > -- > 1 file changed, 67

Re: [libvirt] [PATCH 7/7] storage: Create helper to set options for CreateQemuImg code

2016-06-06 Thread Peter Krempa
On Fri, Jun 03, 2016 at 06:42:12 -0400, John Ferlan wrote: > Create a helper virStorageBackendCreateQemuImgSetOptions to set either > the qemu-img -o options or the previous mechanism using -F > > Signed-off-by: John Ferlan > --- > src/storage/storage_backend.c | 58 > ++

Re: [libvirt] [PATCH 4/7] storage: Adjust qemu-img switches check

2016-06-06 Thread John Ferlan
On 06/06/2016 09:37 AM, Peter Krempa wrote: > On Fri, Jun 03, 2016 at 06:42:09 -0400, John Ferlan wrote: >> Since we support QEMU 0.12 and later, checking for support of specific flags >> added prior to that isn't necessary. >> >> Thus start with the base of having the "-o options" available for

Re: [libvirt] [PATCH 5/7] storage: Create helper to set input for CreateQemuImg code

2016-06-06 Thread Peter Krempa
On Fri, Jun 03, 2016 at 06:42:10 -0400, John Ferlan wrote: > Create helper virStorageBackendCreateQemuImgSetInput to set the input > > Signed-off-by: John Ferlan > --- > src/storage/storage_backend.c | 50 > +++ > 1 file changed, 31 insertions(+), 19 dele

Re: [libvirt] [PATCH 4/7] storage: Adjust qemu-img switches check

2016-06-06 Thread Peter Krempa
On Fri, Jun 03, 2016 at 06:42:09 -0400, John Ferlan wrote: > Since we support QEMU 0.12 and later, checking for support of specific flags > added prior to that isn't necessary. > > Thus start with the base of having the "-o options" available for the > qemu-img create option and then determine whe

Re: [libvirt] [PATCH v6 2/2] qemu: Add support to QXL's max_outputs parameter

2016-06-06 Thread Pavel Hrdina
On Sun, Jun 05, 2016 at 02:36:04AM +0200, Martin Kletzander wrote: > Historically, we added heads=1 to videos, but for example for qxl, we > did not reflect that on the command line. Implementing that now could > mean that if user were to migrate from older to newer libvirt, the > command-line for

Re: [libvirt] [PATCH 3/7] storage: Split out a helper for encryption checks

2016-06-06 Thread Peter Krempa
On Fri, Jun 03, 2016 at 06:42:08 -0400, John Ferlan wrote: > Split out a helper from virStorageBackendCreateQemuImgCmdFromVol > to check the encryption - soon a new encryption sheriff will be > patroling and that'll mean all sorts of new checks. > > Signed-off-by: John Ferlan > --- > src/storage

Re: [libvirt] [PATCH 2/7] storage: Split out setting default secret for encryption

2016-06-06 Thread Peter Krempa
On Fri, Jun 03, 2016 at 06:42:07 -0400, John Ferlan wrote: > Split the qcow setting of encryption secrets into a helper > > Signed-off-by: John Ferlan > --- > src/storage/storage_backend_fs.c | 79 > +--- > 1 file changed, 49 insertions(+), 30 deletions(-) >

Re: [libvirt] [PATCH v6 1/2] qemu: Check for qxl's max_outputs parameter

2016-06-06 Thread Pavel Hrdina
On Sun, Jun 05, 2016 at 02:36:03AM +0200, Martin Kletzander wrote: > There is max_outputs parameter for both qxl and qxl-vga and there is no > easy way of saying that we want the capability enabled only if both are > supported. So let's have two of them and only use them together. I would rephras

Re: [libvirt] [PATCH 1/7] util: Clean up code formatting in virstorageencryption

2016-06-06 Thread Peter Krempa
On Fri, Jun 03, 2016 at 06:42:06 -0400, John Ferlan wrote: > Bring style more in line with more recent code. > > Signed-off-by: John Ferlan > --- > src/util/virstorageencryption.c | 58 > +++-- > 1 file changed, 27 insertions(+), 31 deletions(-) ACK -- libv

Re: [libvirt] [PATCH RFC 32/32] Add nomatch filters when enumerating udev devices

2016-06-06 Thread Peter Krempa
On Mon, Jun 06, 2016 at 11:02:09 +0200, Ján Tomko wrote: > Filter out some subsystems we are not interested in. > --- > After the netdev cleanups, this speeds up the driver initialization from 18 > ms to 13 ms, > which is percentually a lot, but neligible in absolute times. > > This patch uses a

Re: [libvirt] [PATCH 24/32] Remove PROPERTY_* constants

2016-06-06 Thread Peter Krempa
On Mon, Jun 06, 2016 at 11:02:01 +0200, Ján Tomko wrote: > They are no longer used. > --- > src/node_device/node_device_udev.c | 41 > -- > src/node_device/node_device_udev.h | 3 --- > 2 files changed, 13 insertions(+), 31 deletions(-) ACK -- libvir-list ma

Re: [libvirt] [PATCH 23/32] Only return two values in udevGetUintSysfsAttr

2016-06-06 Thread Peter Krempa
On Mon, Jun 06, 2016 at 11:02:00 +0200, Ján Tomko wrote: > Open code the call to udev_device_get_sysattr_value > in the one place where it's needed. > --- > src/node_device/node_device_udev.c | 65 > +++--- > 1 file changed, 18 insertions(+), 47 deletions(-) ACK

Re: [libvirt] [PATCH 27/32] Reformat udevProcessRemoveableMedia

2016-06-06 Thread Peter Krempa
On Mon, Jun 06, 2016 at 11:02:04 +0200, Ján Tomko wrote: > Remove unnecessary ret variable and return early if we have no media > to save on indentation. > --- > src/node_device/node_device_udev.c | 45 > +++--- > 1 file changed, 22 insertions(+), 23 deletions(-)

Re: [libvirt] [PATCH 25/32] node_device_udev: switch to using virReportError

2016-06-06 Thread Peter Krempa
On Mon, Jun 06, 2016 at 11:02:02 +0200, Ján Tomko wrote: > Also use the more common "Unable to initialize mutex" string > and virReportSystemError instead of virStrerror. > --- > src/node_device/node_device_udev.c | 47 > +++--- > 1 file changed, 28 insertions(+),

Re: [libvirt] [PATCH 31/32] node_device_udev: rename labels to cleanup

2016-06-06 Thread Peter Krempa
On Mon, Jun 06, 2016 at 11:02:08 +0200, Ján Tomko wrote: > Instead of the custom out and out_unlock. > --- > src/node_device/node_device_udev.c | 154 > ++--- > 1 file changed, 77 insertions(+), 77 deletions(-) ACK -- libvir-list mailing list libvir-list@redhat.c

Re: [libvirt] [PATCH 26/32] udevProcessStorage: trim all whitespace from model and vendor

2016-06-06 Thread Peter Krempa
On Mon, Jun 06, 2016 at 11:02:03 +0200, Ján Tomko wrote: > Use virTrimSpaces instead of a custom implementation. > --- > src/node_device/node_device_udev.c | 21 + > 1 file changed, 5 insertions(+), 16 deletions(-) ACK -- libvir-list mailing list libvir-list@redhat.com https:

Re: [libvirt] [PATCH 30/32] node_device_udev: remove unnecessary ret variables

2016-06-06 Thread Peter Krempa
On Mon, Jun 06, 2016 at 11:02:07 +0200, Ján Tomko wrote: > Remove ret variables and labels from functions where there is no cleanup > to be done. > --- > src/node_device/node_device_udev.c | 108 > ++--- > 1 file changed, 39 insertions(+), 69 deletions(-) > > diff

Re: [libvirt] [PATCH 30/32] node_device_udev: remove unnecessary ret variables

2016-06-06 Thread Peter Krempa
On Mon, Jun 06, 2016 at 11:02:07 +0200, Ján Tomko wrote: > Remove ret variables and labels from functions where there is no cleanup > to be done. > --- > src/node_device/node_device_udev.c | 108 > ++--- > 1 file changed, 39 insertions(+), 69 deletions(-) ACK --

Re: [libvirt] [PATCH 29/32] node_device_udev: remove yoda condition

2016-06-06 Thread Peter Krempa
On Mon, Jun 06, 2016 at 11:02:06 +0200, Ján Tomko wrote: > --- > src/node_device/node_device_udev.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) ACK -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 28/32] udevSetupSystemDev: return if allocation fails

2016-06-06 Thread Peter Krempa
On Mon, Jun 06, 2016 at 11:02:05 +0200, Ján Tomko wrote: > There is no cleanup to be done. > --- > src/node_device/node_device_udev.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) ACK -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-

Re: [libvirt] [PATCH 22/32] Only return two values in udevGetIntSysfsAttr

2016-06-06 Thread Peter Krempa
On Mon, Jun 06, 2016 at 11:01:59 +0200, Ján Tomko wrote: > Callers only check for an error or a specific integer value. > --- > src/node_device/node_device_udev.c | 28 +++- > 1 file changed, 11 insertions(+), 17 deletions(-) ACK -- libvir-list mailing list libvir-list@re

Re: [libvirt] [PATCH 21/32] Only return two values in udevGetStringSysfsAttr

2016-06-06 Thread Peter Krempa
On Mon, Jun 06, 2016 at 11:01:58 +0200, Ján Tomko wrote: > The callers only care for an error, and a missing attribute > is simply NULL. > --- > src/node_device/node_device_udev.c | 78 > -- > 1 file changed, 24 insertions(+), 54 deletions(-) > > diff --git a/

Re: [libvirt] [PATCH 20/32] Remove extra allocation in udevGetDeviceSysfsAttr

2016-06-06 Thread Peter Krempa
On Mon, Jun 06, 2016 at 11:01:57 +0200, Ján Tomko wrote: > Most of the code paths free it right after converting it to > an integer. > --- > src/node_device/node_device_udev.c | 98 > +++--- > 1 file changed, 29 insertions(+), 69 deletions(-) I guess it makes sens

Re: [libvirt] [PATCH 1/3] maint: Use libsystemd instead of libsystemd-daemon

2016-06-06 Thread Daniel P. Berrange
On Fri, May 27, 2016 at 02:55:06PM +0200, Andrea Bolognani wrote: > The libsystemd-daemon library had been deprecated upstream > just a few days before we started using it. Talk about bad > timing :) > > With systemd 230, now in Debian sid and Fedora rawhide, it > has finally been dropped. We shou

Re: [libvirt] [PATCH 18/32] Only return two values in udevGetStringProperty

2016-06-06 Thread Peter Krempa
On Mon, Jun 06, 2016 at 11:01:55 +0200, Ján Tomko wrote: > There is no need to differentiate between PROPERTY_FOUND > and PROPERTY_MISSING - we can just look if the string is non-NULL. > --- > src/node_device/node_device_udev.c | 87 > -- > 1 file changed, 36 i

Re: [libvirt] [PATCH v2 01/10] conf: Rename VIR_DOMAIN_DEF_PARSE_VALIDATE to VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA

2016-06-06 Thread Pavel Hrdina
On Fri, May 27, 2016 at 02:21:50PM +0200, Peter Krempa wrote: > Make it obvious that the flag is controlling RNG schema validation. > --- ACK -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 19/32] Only return two values in udevGetUintProperty

2016-06-06 Thread Peter Krempa
On Mon, Jun 06, 2016 at 11:01:56 +0200, Ján Tomko wrote: > We only care about the failure, not a missing property. Well, you made us not care about the missing property in two instances here :). > --- > src/node_device/node_device_udev.c | 60 > -- > 1 file c

Re: [libvirt] [PATCH v3 4/5] qemu: Remove need for qemuBuildSecretInfoProps

2016-06-06 Thread John Ferlan
On 06/06/2016 07:31 AM, Peter Krempa wrote: > On Mon, Jun 06, 2016 at 07:16:29 -0400, John Ferlan wrote: >> >> >> On 06/06/2016 03:26 AM, Peter Krempa wrote: >>> On Fri, Jun 03, 2016 at 06:52:52 -0400, John Ferlan wrote: Just move the code into qemuBuildObjectSecretCommandLine. Sig

Re: [libvirt] [PATCH v2 05/10] qemu: process: Unexport qemuProcessStartValidate

2016-06-06 Thread Pavel Hrdina
On Fri, May 27, 2016 at 02:21:54PM +0200, Peter Krempa wrote: > --- > src/qemu/qemu_process.c | 2 +- > src/qemu/qemu_process.h | 7 --- > 2 files changed, 1 insertion(+), 8 deletions(-) ACK -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-lis

Re: [libvirt] [PATCH 17/32] Rewrite disk type checking in udevProcessStorage

2016-06-06 Thread Peter Krempa
On Mon, Jun 06, 2016 at 11:01:54 +0200, Ján Tomko wrote: > Error out on parsing errors and use a local const char pointer > instead of chained ifs to check whether we found a match. > --- > src/node_device/node_device_udev.c | 32 ++-- > 1 file changed, 18 insertions(+)

Re: [libvirt] [PATCH v3 5/5] secret: Move virStorageSecretType to secret_util and rename

2016-06-06 Thread John Ferlan
On 06/06/2016 03:27 AM, Peter Krempa wrote: > On Fri, Jun 03, 2016 at 06:52:53 -0400, John Ferlan wrote: >> Move the enum into secret_util, rename it to be just virSecretLookupType. >> This includes quite a bit of collateral damage, but the goal is to remove >> the "virStorage*" and replace with

Re: [libvirt] [PATCH 16/32] Fix the return value in udevKludgeStorageType

2016-06-06 Thread Peter Krempa
On Mon, Jun 06, 2016 at 11:01:53 +0200, Ján Tomko wrote: > Since the switch to VIR_STRDUP this function returns 1 on success, > but the caller treats any non-zero value as failure. > --- > src/node_device/node_device_udev.c | 20 +++- > 1 file changed, 7 insertions(+), 13 deletions

Re: [libvirt] [PATCH v3 4/5] qemu: Remove need for qemuBuildSecretInfoProps

2016-06-06 Thread Peter Krempa
On Mon, Jun 06, 2016 at 07:16:29 -0400, John Ferlan wrote: > > > On 06/06/2016 03:26 AM, Peter Krempa wrote: > > On Fri, Jun 03, 2016 at 06:52:52 -0400, John Ferlan wrote: > >> Just move the code into qemuBuildObjectSecretCommandLine. > >> > >> Signed-off-by: John Ferlan > >> --- > >> src/qemu/

Re: [libvirt] [PATCH v3 3/5] qemu: Use virJSONValueObjectCreate for master key

2016-06-06 Thread Peter Krempa
On Mon, Jun 06, 2016 at 07:14:00 -0400, John Ferlan wrote: > > > On 06/06/2016 03:23 AM, Peter Krempa wrote: > > On Fri, Jun 03, 2016 at 06:52:51 -0400, John Ferlan wrote: > >> Rather than open coding, follow the secinfo code and use the common > >> secret object build/generate sequence. > > > >

Re: [libvirt] [PATCH 15/32] udevProcessFloppy; remove unnecessary allocation

2016-06-06 Thread Peter Krempa
On Mon, Jun 06, 2016 at 11:01:52 +0200, Ján Tomko wrote: > Use udevHasDeviceProperty instead of udevGetStringProperty. > We do not need to copy the string since we do not need it. > > Also add braces around the if body, since the change made > syntax check complain. > --- > src/node_device/node_d

Re: [libvirt] [PATCH v3 4/5] qemu: Remove need for qemuBuildSecretInfoProps

2016-06-06 Thread John Ferlan
On 06/06/2016 03:26 AM, Peter Krempa wrote: > On Fri, Jun 03, 2016 at 06:52:52 -0400, John Ferlan wrote: >> Just move the code into qemuBuildObjectSecretCommandLine. >> >> Signed-off-by: John Ferlan >> --- >> src/qemu/qemu_command.c | 57 >> +++-- >>

Re: [libvirt] [PATCH 14/32] Move udevHasDeviceProperty earlier

2016-06-06 Thread Peter Krempa
On Mon, Jun 06, 2016 at 11:01:51 +0200, Ján Tomko wrote: > --- > src/node_device/node_device_udev.c | 22 -- > 1 file changed, 12 insertions(+), 10 deletions(-) ACK -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 13/32] Do not VIR_STRDUP the string in udevGetDeviceProperty

2016-06-06 Thread Peter Krempa
On Mon, Jun 06, 2016 at 11:01:50 +0200, Ján Tomko wrote: > Two out of three callers free it right after converting it to a number. > > Also change the comment at the beginning of the function, because > the comment inside the function told me to. > --- > src/node_device/node_device_udev.c | 72 >

Re: [libvirt] [PATCH v3 3/5] qemu: Use virJSONValueObjectCreate for master key

2016-06-06 Thread John Ferlan
On 06/06/2016 03:23 AM, Peter Krempa wrote: > On Fri, Jun 03, 2016 at 06:52:51 -0400, John Ferlan wrote: >> Rather than open coding, follow the secinfo code and use the common >> secret object build/generate sequence. > > The main reason to do this was to have a single code path that generates >

Re: [libvirt] [PATCH 11/32] Remove udevStrToLong_ui

2016-06-06 Thread Peter Krempa
On Mon, Jun 06, 2016 at 11:01:48 +0200, Ján Tomko wrote: > Remove the debug message, open code the error in the two udevGetUint > callers and use a more specific error in SCSI and PCI processing. > --- > src/node_device/node_device_udev.c | 25 ++--- > 1 file changed, 6 inserti

Re: [libvirt] [PATCH 12/32] Remove udevStrToLong_i

2016-06-06 Thread Peter Krempa
On Mon, Jun 06, 2016 at 11:01:49 +0200, Ján Tomko wrote: > Open code the error message. > --- > src/node_device/node_device_udev.c | 25 ++--- > 1 file changed, 6 insertions(+), 19 deletions(-) ACK -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mail

Re: [libvirt] [PATCH v3 2/5] storage: Use virSecretGetSecretString

2016-06-06 Thread John Ferlan
On 06/06/2016 03:32 AM, Peter Krempa wrote: > On Fri, Jun 03, 2016 at 06:52:50 -0400, John Ferlan wrote: >> Rather than inline code secret lookup for rbd/iscsi, use the common function. >> >> Signed-off-by: John Ferlan >> --- >> src/Makefile.am | 1 + >> src/storage/storage

Re: [libvirt] [PATCH 10/32] Remove udevStrToLong_ull

2016-06-06 Thread Peter Krempa
On Mon, Jun 06, 2016 at 11:01:47 +0200, Ján Tomko wrote: > The wrapper adds an error message or a debug log. > > Since we already log the properties we get from udev as strings, > there is no much use for the debug logs. > > Open code the error message and delete the function. > --- > src/node_d

Re: [libvirt] [PATCH 09/32] Rewrite usage of StrToLong_ui in udevProcess{PCI, SCSI}

2016-06-06 Thread Peter Krempa
On Mon, Jun 06, 2016 at 11:01:46 +0200, Ján Tomko wrote: > Use virStrToLong_ui instead of udevStrToLong_ui, reformat the code > and report a more specific error message. > --- > src/node_device/node_device_udev.c | 80 > ++ > 1 file changed, 21 insertions(+), 5

Re: [libvirt] [PATCH 08/32] udevProcessSCSIHost: use STRSKIP

2016-06-06 Thread Peter Krempa
On Mon, Jun 06, 2016 at 11:01:45 +0200, Ján Tomko wrote: > Instead of separating it into STRPEFIX and str + strlen. > --- > src/node_device/node_device_udev.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) ACK -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.co

Re: [libvirt] [PATCH 07/32] udevGetDMIData: remove unused variable

2016-06-06 Thread Peter Krempa
On Mon, Jun 06, 2016 at 11:01:44 +0200, Ján Tomko wrote: > A variable without use is pointless. > > Remove it, since we have no use for it. > --- > src/node_device/node_device_udev.c | 2 -- > 1 file changed, 2 deletions(-) ACK -- libvir-list mailing list libvir-list@redhat.com https://www.redh

Re: [libvirt] [PATCH 06/32] Assign node device driver private data earlier

2016-06-06 Thread Peter Krempa
On Mon, Jun 06, 2016 at 11:01:43 +0200, Ján Tomko wrote: > We do not need it to track if priv->udev_monitor is non-NULL. I don't quite understand what you meant to say with this. > --- > src/node_device/node_device_udev.c | 23 ++- > 1 file changed, 10 insertions(+), 13 delet

Re: [libvirt] [PATCH 05/32] Do not call nodeStateCleanup on early initialization error

2016-06-06 Thread Peter Krempa
On Mon, Jun 06, 2016 at 11:01:42 +0200, Ján Tomko wrote: > If we have not allocated driver yet, there is nothing to cleanup. > --- > src/node_device/node_device_udev.c | 7 +++ > 1 file changed, 3 insertions(+), 4 deletions(-) ACK -- libvir-list mailing list libvir-list@redhat.com https://ww

Re: [libvirt] [PATCH 04/32] Reformat nodeStateCleanup

2016-06-06 Thread Peter Krempa
On Mon, Jun 06, 2016 at 11:01:41 +0200, Ján Tomko wrote: > Remove the ret variable and return early if there is no driver. > --- > src/node_device/node_device_udev.c | 44 > +- > 1 file changed, 20 insertions(+), 24 deletions(-) ACK -- libvir-list mailing lis

  1   2   >