[libvirt] [PATCH 8/9] qemu: Reduce need to call qemuDomainGetSCSIControllerModel

2018-01-30 Thread John Ferlan
Now that post parse processing handles setting the SCSI controller model, there's no need to call qemuDomainGetSCSIControllerModel to get the "default controller" when building the command line controller string or when assigning the spaprvio address since the controller model value will already

[libvirt] [PATCH 9/9] qemu: Update qemuDomainFindSCSIControllerModel return

2018-01-30 Thread John Ferlan
Now that the controller model is updated during post parse callback, this code no longer needs to fetch the model based on the capabilities and can just return the model directly if the controller is found. Removal of @qemuCaps cascades through various callers which are now updated to not pass

[libvirt] [PATCH 7/9] conf: Allow configuration of implicit controller model

2018-01-30 Thread John Ferlan
When an implicit controller is added, the model is defined as -1 (IOW: undefined). So, if an implicit SCSI controller was added, can set the model to the default value if the underlying hypervisor supports it. Signed-off-by: John Ferlan --- src/conf/domain_conf.c

[libvirt] [PATCH 4/9] qemu: Introduce qemuDomainGetSCSIControllerModel

2018-01-30 Thread John Ferlan
Rename and rework qemuDomainSetSCSIControllerModel since we're really not setting the SCSI controller model. Instead the code is either returning the existing SCSI controller model value, the default value based on the capabilities, or -1 with the error set. Signed-off-by: John Ferlan

[libvirt] [PATCH 0/9] Set the SCSI controller model during post parse

2018-01-30 Thread John Ferlan
Fallout or a pile yak shavings from the series to move the controller validation from command line building into domain xml validation: https://www.redhat.com/archives/libvir-list/2018-January/msg00188.html This series grabs the first patch from the other series that was essentially already

[libvirt] [PATCH 3/9] qemu: Introduce qemuDomainFindSCSIControllerModel

2018-01-30 Thread John Ferlan
Rather than repeat multiple steps in order to find the SCSI controller model, let's combine them into one helper that will return either the model from the definition or the default model based on the capabilities. This patch adds an extra check/error that the controller that's being found

[libvirt] [PATCH 2/9] conf: Rework and rename virDomainDeviceFindControllerModel

2018-01-30 Thread John Ferlan
As it turns out virDomainDeviceFindControllerModel was only ever called for SCSI controllers using VIR_DOMAIN_CONTROLLER_TYPE_SCSI as a parameter. So rename to virDomainDeviceFindSCSIController and rather than return a model, let's return a virDomainControllerDefPtr to let the caller reference

[libvirt] [PATCH 6/9] qemu: Introduce qemuDomainSetSCSIControllerModel

2018-01-30 Thread John Ferlan
During post parse processing, let's force setting the controller model to default value if not already set for defined controllers (e.g. the non implicit ones). Signed-off-by: John Ferlan --- src/qemu/qemu_domain.c | 8 +++

[libvirt] [PATCH 1/9] qemu: Split qemuDomainSetSCSIControllerModel

2018-01-30 Thread John Ferlan
Rather than one function serving two purposes, let's split out the else condition which is checking whether the model can be used during command line building based on the capabilities. Signed-off-by: John Ferlan --- src/qemu/qemu_command.c| 65

[libvirt] [PATCH 5/9] qemu: Fetch/save the default SCSI controller model during hotplug

2018-01-30 Thread John Ferlan
If we're going to add a controller to the domain, let's set the default SCSI model value if we cannot find another SCSI controller already present. NB: Requires updating the live output test data since the model will now be formatted. Signed-off-by: John Ferlan ---

Re: [libvirt] [PATCH] qemu: Add USB and memory balloon by default for aarch64/virt guests

2018-01-30 Thread Marcin Juszkiewicz
W dniu 29.01.2018 o 13:04, Andrea Bolognani pisze: >> This doesn't really help nova in practice, because it needs to operate >> correctly with pre-existing libbvirt releases, and even on x86 it should >> not be relying on the default USB1 controller, but rather adding a USB2 >> or USB3 controller.

[libvirt] [PATCH] tests: Remove caps from DO_TEST_PARSE_ERROR() calls

2018-01-30 Thread Andrea Bolognani
The lack of certain capabilities is going to cause errors pretty much exclusively when building the QEMU command line, because we purposefully leave such checks to the very last moments before starting a guest; so it doesn't make much sense to pass QEMU capabilities to DO_TEST_PARSE_ERROR() call

[libvirt] [PATCH] conf: Use correct attribute name in error message

2018-01-30 Thread Andrea Bolognani
The feature has an attribute named 'policy', but the error message mentioned the non-existing 'state' attribute instead. Signed-off-by: Andrea Bolognani --- Pushed as trivial. src/conf/domain_conf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [libvirt] [PATCH v5 02/16] qemu: Introduce qemuDomainDeviceDefValidateControllerAttributes

2018-01-30 Thread John Ferlan
[...] >>> Ideally a prerequisite. If that's too much yak shaving for you, >>> at least add a comment to the validate function saying picking a default >>> model really does not belong in a validation function. > > Well it really should not be there. I've tried to make sure that at > least the

Re: [libvirt] [PATCH] qemuDomainRemoveMemoryDevice: unlink() memory backing file

2018-01-30 Thread Michal Privoznik
On 01/11/2018 01:24 PM, Michal Privoznik wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1461214 > > Since fec8f9c49af we try to use predictable file names for > 'memory-backend-file' objects. But that made us provide full path > to qemu when hot plugging the object while previously we

Re: [libvirt] [PATCH] storage: util: Properly ignore errors when backing volume is inaccessible

2018-01-30 Thread Jiri Denemark
On Tue, Jan 30, 2018 at 11:50:31 +0100, Peter Krempa wrote: > Commit 000e9504559 tried to fix improper bracketing when refreshing disk > volume stats for a backing volume. Unfortunately the condition is still > wrong as in cases as the backing store being inaccessible >

Re: [libvirt] [PATCH] qemu: Refresh caps cache after booting a different kernel

2018-01-30 Thread Peter Krempa
On Tue, Jan 30, 2018 at 13:26:49 +0300, Nikolay Shirokovskiy wrote: > > > On 22.01.2018 15:36, Daniel P. Berrange wrote: > > On Mon, Jan 22, 2018 at 01:31:21PM +0100, Jiri Denemark wrote: > >> On Mon, Jan 22, 2018 at 10:57:57 +, Daniel P. Berrange wrote: > >>> On Mon, Jan 22, 2018 at

[libvirt] [PATCH] storage: util: Properly ignore errors when backing volume is inaccessible

2018-01-30 Thread Peter Krempa
Commit 000e9504559 tried to fix improper bracketing when refreshing disk volume stats for a backing volume. Unfortunately the condition is still wrong as in cases as the backing store being inaccessible storageBackendUpdateVolTargetInfo returns -2 if instructed to ignore errors. The condition does

Re: [libvirt] [PATCH] qemu: Refresh caps cache after booting a different kernel

2018-01-30 Thread Nikolay Shirokovskiy
On 22.01.2018 15:36, Daniel P. Berrange wrote: > On Mon, Jan 22, 2018 at 01:31:21PM +0100, Jiri Denemark wrote: >> On Mon, Jan 22, 2018 at 10:57:57 +, Daniel P. Berrange wrote: >>> On Mon, Jan 22, 2018 at 11:46:14AM +0100, Jiri Denemark wrote: Whenever a different kernel is booted, some

Re: [libvirt] [PATCH v5 02/16] qemu: Introduce qemuDomainDeviceDefValidateControllerAttributes

2018-01-30 Thread Peter Krempa
On Mon, Jan 29, 2018 at 16:18:46 -0500, John Ferlan wrote: > > > On 01/29/2018 12:53 PM, Ján Tomko wrote: > > On Mon, Jan 29, 2018 at 12:43:14PM -0500, John Ferlan wrote: > >> > >> > >> On 01/29/2018 04:18 AM, Ján Tomko wrote: > >>> On Fri, Jan 05, 2018 at 06:47:25PM -0500, John Ferlan wrote: >

[libvirt] [jenkins-ci] lcitool: Use default python for creating salty passwords

2018-01-30 Thread Martin Kletzander
On my system the crypt module in python2 doesn't have mksalt() function. However python3 does and the code is perfectly fine python3 code as well. So let's make it run in the default python version as that has the highest chance to work. Signed-off-by: Martin Kletzander ---