Re: [libvirt] [PATCH php v2] Fix crash in VIRT_HASH_CURRENT_KEY_INFO macro

2017-12-06 Thread Michal Privoznik
On 12/06/2017 05:54 PM, Dawid Zamirski wrote: > The PHP7 variant of the macro wasn't safe if the hash key was not a > string type. This was found when running php script with just > libvirt_connect call under xdebug session which segfaulted. This patch > makes the following changes: > > * make sur

Re: [libvirt] [PATCH] nwfilter: fix deadlock on firewalld restart/reload

2017-12-06 Thread Nikolay Shirokovskiy
On 06.12.2017 20:49, John Ferlan wrote: > > > On 10/30/2017 07:49 AM, Nikolay Shirokovskiy wrote: >> Deadlock scenario: >> >> 1. domain is being started and domain driver takes read lock >> for nwfilter update lock thru virNWFilterReadLockFilterUpdates. >> >> 2. firewalld restarted and event lo

[libvirt] [PATCH v2 1/3] libxl: add support for multiple IP addresses

2017-12-06 Thread Marek Marczykowski-Górecki
vif-* scripts support it for a long time, and expect addresses to be separated by spaces. Add appropriate support to libxl driver. --- changed in v2: - moved libxlMakeIPList function to xenconfig/xen_common.c and renamed to xenMakeIPList --- src/libxl/libxl_conf.c | 5 +++-- src/libxl/libx

[libvirt] [PATCH v2 3/3] tests: add test for multiple IPs for libxl and xenconfig driver

2017-12-06 Thread Marek Marczykowski-Górecki
--- changed in v2: - add tests for xenconfig driver too --- tests/libxlxml2domconfigdata/multiple-ip.json | 37 +++- tests/libxlxml2domconfigdata/multiple-ip.xml | 22 +- tests/libxlxml2domconfigtest.c| 1 +- tests/xlconfigdata/test-vif-multi-ip.cfg | 25

[libvirt] [PATCH v2 2/3] xenconfig: add support for multiple IP addresses

2017-12-06 Thread Marek Marczykowski-Górecki
--- new patch in v2 --- src/xenconfig/xen_common.c | 32 +--- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/src/xenconfig/xen_common.c b/src/xenconfig/xen_common.c index 7f838b6..40b1483 100644 --- a/src/xenconfig/xen_common.c +++ b/src/xenconfig/xen_c

[libvirt] [PATCH] virerror: mark VIR_ERR_AGENT_UNSYNCED as DEPRECATED

2017-12-06 Thread Chen Hanxiao
From: Chen Hanxiao Since commit 5e5019bf, we've no longer use VIR_ERR_AGENT_UNSYNCED anymore. Mark it as DEPRECATED. Signed-off-by: Chen Hanxiao --- include/libvirt/virterror.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/libvirt/virterror.h b/include/libvirt/vir

[libvirt] [PATCH v2] qemu: Add support for hot unplug redirdev device

2017-12-06 Thread Chen Hanxiao
From: Chen Hanxiao We lacked of hot unplugging redirdev device. This patch add support for it. We could use detach-device --live now. Signed-off-by: Chen Hanxiao --- v2: add news section docs/news.xml | 9 src/qemu/qemu_driver.c | 4 +- src/qemu/qemu_hotplug.c | 111

[libvirt] [PATCH v3 06/12] qemu: Introduce qemuDomainDeviceDefValidateControllerPCI

2017-12-06 Thread John Ferlan
Move PCI validation checks out of qemu_command into the proper qemu_domain validation helper. Since there's a lot to move, we'll start slow by replicating the pcie-root and pci-root avoidance from qemuBuildSkipController and the first switch found in qemuBuildControllerDevStr. Signed-off-by: John

[libvirt] [PATCH v3 10/12] qemu: Move PCI more command checks to controller def validate

2017-12-06 Thread John Ferlan
Excluding the qemuCaps checks, move the remainder of the checks that validate whether the PCI definition is valid or not into qemuDomainControllerDefValidatePCI. Signed-off-by: John Ferlan --- src/qemu/qemu_command.c | 96 -- src/qemu/qemu_domain.c | 134 +++

[libvirt] [PATCH v3 12/12] qemu: Introduce qemuDomainDeviceDefValidateControllerSATA

2017-12-06 Thread John Ferlan
Move the SATA controller check from command line building to controller def validation. This includes copying the SATA skip check found in qemuBuildSkipController. Signed-off-by: John Ferlan --- src/qemu/qemu_command.c | 6 -- src/qemu/qemu_domain.c | 25 - 2 files

[libvirt] [PATCH v3 11/12] qemu: Complete PCI command checks to controller def validate

2017-12-06 Thread John Ferlan
Move the qemuCaps checks over to qemuDomainControllerDefValidatePCI and add empty lines between cases so it's a bit easier on the eyes to read. This requires two test updates in order to set the correct capability bit for an xml2xml test as well as setting up the similar capability for the pseries

[libvirt] [PATCH v3 03/12] qemu: Move CCW S390 Address check to controller def validate

2017-12-06 Thread John Ferlan
Move the call to qemuDomainCheckCCWS390AddressSupport from qemuBuildControllerDevStr to qemuDomainDeviceDefValidateController. This means we will get the qemuCaps from the driver opaque variable passed to qemuDomainDeviceDefValidate. Signed-off-by: John Ferlan --- src/qemu/qemu_command.c | 4 -

[libvirt] [PATCH v3 09/12] qemu: Move PCI command modelName TypeToString to controller def validate

2017-12-06 Thread John Ferlan
Similar to the checking the modelName vs. NAME_NONE, let's make the ModelNameTypeToString check more generic too within the checking done in controller validation (with the same ignore certain models. NB: We need to keep the ModelNameTypeToString fetch in command line validation since we use it, b

[libvirt] [PATCH v3 04/12] qemu: Introduce qemuDomainDeviceDefValidateControllerIDE

2017-12-06 Thread John Ferlan
From: Lin Ma Move the IDE controller check from command line building to controller def validation. Also explicitly include the avoidance check for the implicit IDE controller from qemuBuildSkipController. Cause the IDE case for command line building to generate a failure if called to add an IDE

[libvirt] [PATCH v3 05/12] qemu: Introduce qemuDomainDeviceDefValidateControllerSCSI

2017-12-06 Thread John Ferlan
Move SCSI validation from qemu_command into qemu_domain. This includes the @model reset/check when the controller model hasn't yet been set. While at it modify the switch to account for all virDomainControllerModelSCSI types rather than using the default label. Rename/reorder the args in qemuCheck

[libvirt] [PATCH v3 07/12] qemu: Use virDomainPCIControllerOpts in qemuBuildControllerDevStr

2017-12-06 Thread John Ferlan
Shorten up a few characters and reference the pciopts pointer Signed-off-by: John Ferlan --- src/qemu/qemu_command.c | 115 +--- 1 file changed, 59 insertions(+), 56 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index e84

[libvirt] [PATCH v3 01/12] qemu: Introduce qemuBuildSkipController

2017-12-06 Thread John Ferlan
Move the non USB implicit controller checks into their own helper to reduce the cruft in qemuBuildControllerDevCommandLine. Signed-off-by: John Ferlan --- src/qemu/qemu_command.c | 65 +++-- 1 file changed, 41 insertions(+), 24 deletions(-) diff --git

[libvirt] [PATCH v3 00/12] Move qemu command line controller checks to qemuDomainDeviceDefValidateController* checks

2017-12-06 Thread John Ferlan
v2: https://www.redhat.com/archives/libvir-list/2017-December/msg00173.html Changes since v2: * Push a few patches from v1 that were ACK'd * Make the Skip helper private to qemu_command.c and just copied the various skip checks from the new helper into the specific controller validate he

[libvirt] [PATCH v3 08/12] qemu: Move PCI command modelName check to controller def validate

2017-12-06 Thread John Ferlan
Move the various modelName == NAME_NONE from the command line generation into domain controller validation. Also rather than have multiple cases with the same check, let's make the code more generic, but also note that it was the modelName option that caused the failure. We also have to be sure no

[libvirt] [PATCH v3 02/12] qemu: Introduce qemuDomainDeviceDefValidateController

2017-12-06 Thread John Ferlan
Introduce the bare bones helper to validate whether the controller definition is valid. Signed-off-by: John Ferlan --- src/qemu/qemu_domain.c | 25 - 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 75cecb

Re: [libvirt] [PATCH v2 00/15] Move qemu command line controller checks to qemuDomainDeviceDefValidateController* checks

2017-12-06 Thread John Ferlan
On 12/06/2017 10:27 AM, John Ferlan wrote: > v1: > https://www.redhat.com/archives/libvir-list/2017-December/msg00079.html > > Changes since v1: > > * Remove USB from the pile of things to move. That simplifies the >Skip helper to remove the @flags argument. > >Even though it seems t

Re: [libvirt] [PATCH] storage: Don't dereference driver object if virStorageSource is not initialized

2017-12-06 Thread John Ferlan
On 12/06/2017 10:28 AM, Peter Krempa wrote: > virStorageFileReportBrokenChain uses data from the driver private data > pointer to print the user and group. This would lead to a crash in call > paths where we did not initialize the storage backend as recently added > in commit 24e47ee2b93 to qemuD

Re: [libvirt] [PATCH] docs: remove outdated link to Fedora mingw staging repo

2017-12-06 Thread John Ferlan
On 12/06/2017 01:06 PM, Daniel P. Berrange wrote: > The Fedora mingw support is all merged in Fedora repos, so remove the > outdated link. > > Signed-off-by: Daniel P. Berrange > --- > docs/windows.html.in | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > Reviewed-by: John Ferlan

Re: [libvirt] [PATCH] docs: update entries in the apps page

2017-12-06 Thread John Ferlan
On 12/06/2017 01:05 PM, Daniel P. Berrange wrote: > Change all links to https:// where the remote site supports it. Fix URLs for > a few packages that moved, and delete entries which appear to be dead. > > Signed-off-by: Daniel P. Berrange > --- > docs/apps.html.in | 70 >

Re: [libvirt] [PATCH] docs: update instructions for TLS cert generation

2017-12-06 Thread John Ferlan
On 12/06/2017 12:50 PM, Daniel P. Berrange wrote: > Currently we only describe setting the CN field for server certs. This leads > to inevitable pain for users who set it to the fully qualified hostname and > then use a unqualified hostname or IP address to connect in the URI. Describe > the usag

Re: [libvirt] [PATCH] rng: fix nwfilter rule contents

2017-12-06 Thread John Ferlan
On 12/06/2017 11:53 AM, Daniel P. Berrange wrote: > The contents of a are a choice of exactly one union member. The > RNG schema, however, was allowing an arbitrary number of instances of every > union member at once. > > Signed-off-by: Daniel P. Berrange > --- > docs/schemas/nwfilter.rng | 9

Re: [libvirt] [PATCH] nwfilter: remove bogus 'protocolid' attribute on arp/rarp fields

2017-12-06 Thread John Ferlan
On 12/06/2017 11:55 AM, Daniel P. Berrange wrote: > Various example XML documents for arp/rarp filtering have a protocolid > XML attribute defined. This is never parsed or output by the libvirt XML > handling code, so shouldn't be present in example XML files either > > Signed-off-by: Daniel P.

[libvirt] [PATCH] docs: remove outdated link to Fedora mingw staging repo

2017-12-06 Thread Daniel P. Berrange
The Fedora mingw support is all merged in Fedora repos, so remove the outdated link. Signed-off-by: Daniel P. Berrange --- docs/windows.html.in | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/windows.html.in b/docs/windows.html.in index df60940750..3f012d18da 100644 -

[libvirt] [PATCH] docs: update entries in the apps page

2017-12-06 Thread Daniel P. Berrange
Change all links to https:// where the remote site supports it. Fix URLs for a few packages that moved, and delete entries which appear to be dead. Signed-off-by: Daniel P. Berrange --- docs/apps.html.in | 70 --- 1 file changed, 30 insertions(

[libvirt] [PATCH] docs: update instructions for TLS cert generation

2017-12-06 Thread Daniel P. Berrange
Currently we only describe setting the CN field for server certs. This leads to inevitable pain for users who set it to the fully qualified hostname and then use a unqualified hostname or IP address to connect in the URI. Describe the usage of Subject Alt Name extensions, to provide multiple hostna

Re: [libvirt] [PATCH] nwfilter: fix deadlock on firewalld restart/reload

2017-12-06 Thread John Ferlan
On 10/30/2017 07:49 AM, Nikolay Shirokovskiy wrote: > Deadlock scenario: > > 1. domain is being started and domain driver takes read lock > for nwfilter update lock thru virNWFilterReadLockFilterUpdates. > > 2. firewalld restarted and event loop hangs trying to take write lock > for nwfilter up

[libvirt] [PATCH] nwfilter: remove bogus 'protocolid' attribute on arp/rarp fields

2017-12-06 Thread Daniel P. Berrange
Various example XML documents for arp/rarp filtering have a protocolid XML attribute defined. This is never parsed or output by the libvirt XML handling code, so shouldn't be present in example XML files either Signed-off-by: Daniel P. Berrange --- tests/nwfilterxml2firewalldata/arp.xml|

[libvirt] [PATCH php v2] Fix crash in VIRT_HASH_CURRENT_KEY_INFO macro

2017-12-06 Thread Dawid Zamirski
The PHP7 variant of the macro wasn't safe if the hash key was not a string type. This was found when running php script with just libvirt_connect call under xdebug session which segfaulted. This patch makes the following changes: * make sure that tmp_name is initialized to NULL * set the key name

[libvirt] [PATCH] rng: fix nwfilter rule contents

2017-12-06 Thread Daniel P. Berrange
The contents of a are a choice of exactly one union member. The RNG schema, however, was allowing an arbitrary number of instances of every union member at once. Signed-off-by: Daniel P. Berrange --- docs/schemas/nwfilter.rng | 98 +-- 1 file changed,

Re: [libvirt] [libvirt-php PATCH] Fix crash in VIRT_HASH_CURRENT_KEY_INFO macro

2017-12-06 Thread Dawid Zamirski
On Wed, 2017-12-06 at 11:40 -0500, Dawid Zamirski wrote: > On Wed, 2017-12-06 at 16:21 +0100, Michal Privoznik wrote: > > On 12/06/2017 12:17 AM, Dawid Zamirski wrote: > > > > > > &_info.length, &_info.index, 0, &_pos); \ > > > > but not here. Does that work for you? > > > > It does but with a

Re: [libvirt] [libvirt-php PATCH] Fix crash in VIRT_HASH_CURRENT_KEY_INFO macro

2017-12-06 Thread Dawid Zamirski
On Wed, 2017-12-06 at 16:21 +0100, Michal Privoznik wrote: > On 12/06/2017 12:17 AM, Dawid Zamirski wrote: > > > > &_info.length, &_info.index, 0, &_pos); \ > > but not here. Does that work for you? > It does but with a compiler warning :-) I did not realize PHP5 had zend_ulong and I thought it

Re: [libvirt] [PATCHv2 5/7] Introduce qemuDomainNamespaceUnlinkPaths

2017-12-06 Thread Michal Privoznik
On 12/01/2017 05:50 PM, Ján Tomko wrote: > Split out the logic of unlinking devices from > qemuDomainNamespaceTeardownHostdev for reuse in other functions. > --- > src/qemu/qemu_domain.c | 55 > +++--- > 1 file changed, 39 insertions(+), 16 deletions(-)

Re: [libvirt] [PATCHv2 0/7] Remove some repetitive code from qemuDomainNamespace* functions

2017-12-06 Thread Michal Privoznik
On 12/01/2017 05:50 PM, Ján Tomko wrote: > Rebased + rename path to paths in one more function. > > Ján Tomko (7): > qemuDomainNamespaceTeardownHostdev: rename path to paths > qemuDomainNamespaceSetupHostdev: rename path to paths > Introduce qemuDomainNamespaceMknodPaths > Introduce qemuDo

Re: [libvirt] [PATCH 02/17] qemu: Introduce qemuDomainDeviceDefSkipController

2017-12-06 Thread Ján Tomko
On Wed, Dec 06, 2017 at 10:18:53AM -0500, John Ferlan wrote: On 12/05/2017 09:18 AM, Ján Tomko wrote: [...] We should not skip validation for implicit devices. Some of the checks added later are for implicit devices (PCI root, SATA controller). It would be enough to split out the logic of f

[libvirt] [PATCH] storage: Don't dereference driver object if virStorageSource is not initialized

2017-12-06 Thread Peter Krempa
virStorageFileReportBrokenChain uses data from the driver private data pointer to print the user and group. This would lead to a crash in call paths where we did not initialize the storage backend as recently added in commit 24e47ee2b93 to qemuDomainDetermineDiskChain. Resolves: https://bugzilla.r

[libvirt] [PATCH v2 15/15] qemu: Introduce qemuDomainDeviceDefValidateControllerSATA

2017-12-06 Thread John Ferlan
Move the SATA controller check from command line building to controller def validation. Signed-off-by: John Ferlan --- src/qemu/qemu_command.c | 6 -- src/qemu/qemu_domain.c | 17 - 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/src/qemu/qemu_command.c b/sr

[libvirt] [PATCH v2 14/15] qemu: Complete PCI command checks to controller def validate

2017-12-06 Thread John Ferlan
Move the qemuCaps checks over to qemuDomainControllerDefValidatePCI and add empty lines between cases so it's a bit easier on the eyes to read. This requires two test updates in order to set the correct capability bit for an xml2xml test as well as setting up the similar capability for the pseries

[libvirt] [PATCH v2 12/15] qemu: Move PCI command modelName TypeToString to controller def validate

2017-12-06 Thread John Ferlan
Similar to the checking the modelName vs. NAME_NONE, let's make the ModelNameTypeToString check more generic too within the checking done in controller validation (with the same ignore certain models. NB: We need to keep the ModelNameTypeToString fetch in command line validation since we use it, b

[libvirt] [PATCH v2 11/15] qemu: Move PCI command modelName check to controller def validate

2017-12-06 Thread John Ferlan
Move the various modelName == NAME_NONE from the command line generation into domain controller validation. Also rather than have multiple cases with the same check, let's make the code more generic, but also note that it was the modelName option that caused the failure. We also have to be sure no

[libvirt] [PATCH v2 05/15] tests: Remove use of IDE disk for pseries floppy test

2017-12-06 Thread John Ferlan
From: Lin Ma Adding an IDE controller for a machinetype that has no built-in IDE controller, libvirt will log an error. Currently the machinetype list which returns by qemuDomainMachineHasBuiltinIDE only includes 440fx, malta, sun4u and g3beige. Remove the disk and the .args file since the expec

[libvirt] [PATCH v2 06/15] tests: Drop IDE controller in CCW

2017-12-06 Thread John Ferlan
From: Lin Ma Adding an IDE controller for a machinetype that has no built-in IDE controller, libvirt will log an error. Currently the machinetype list which returns by qemuDomainMachineHasBuiltinIDE only includes 440fx, malta, sun4u and g3beige. Signed-off-by: Lin Ma Signed-off-by: John Ferlan

[libvirt] [PATCH v2 04/15] qemu: Move CCW S390 Address check to controller def validate

2017-12-06 Thread John Ferlan
Move the call to qemuDomainCheckCCWS390AddressSupport from qemuBuildControllerDevStr to qemuDomainDeviceDefValidateController. This means we will get the qemuCaps from the driver opaque variable passed to qemuDomainDeviceDefValidate. Signed-off-by: John Ferlan --- src/qemu/qemu_command.c | 4 -

[libvirt] [PATCH v2 00/15] Move qemu command line controller checks to qemuDomainDeviceDefValidateController* checks

2017-12-06 Thread John Ferlan
v1: https://www.redhat.com/archives/libvir-list/2017-December/msg00079.html Changes since v1: * Remove USB from the pile of things to move. That simplifies the Skip helper to remove the @flags argument. Even though it seems there was some sort of objection to Skip'ing during Validatio

[libvirt] [PATCH v2 08/15] qemu: Introduce qemuDomainDeviceDefValidateControllerSCSI

2017-12-06 Thread John Ferlan
Move SCSI validation from qemu_command into qemu_domain. This includes the @model reset/check when the controller model hasn't yet been set. While at it modify the switch to account for all virDomainControllerModelSCSI types rather than using the default label. Rename/reorder the args in qemuCheck

[libvirt] [PATCH v2 03/15] qemu: Use virDomainControllerType in qemuBuildControllerDevStr switch

2017-12-06 Thread John Ferlan
Make sure all types of virDomainControllerType are handled in the switch statement. Signed-off-by: John Ferlan --- src/qemu/qemu_command.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index d7696fb93..c5066b16b 100644

[libvirt] [PATCH v2 02/15] qemu: Introduce qemuDomainDeviceDefSkipController

2017-12-06 Thread John Ferlan
In order to be able to reuse some code for both controller def validation and command line building, create a convenience helper that will skip the same devices for validation that are being skipped for command line building. This is in preference to copying the individual checks in subsequent patc

[libvirt] [PATCH v2 07/15] qemu: Introduce qemuDomainDeviceDefValidateControllerIDE

2017-12-06 Thread John Ferlan
From: Lin Ma Move the IDE controller check from command line building to controller def validation. Cause the IDE case for command line building to generate a failure if called to add an IDE since that shouldn't happen if the Validate code did the right thing. Signed-off-by: John Ferlan --- s

[libvirt] [PATCH v2 01/15] qemu: Introduce qemuDomainDeviceDefValidateController

2017-12-06 Thread John Ferlan
Introduce the bare bones helper to validate whether the controller definition is valid. Signed-off-by: John Ferlan --- src/qemu/qemu_domain.c | 26 +- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index cd213

[libvirt] [PATCH v2 09/15] qemu: Introduce qemuDomainDeviceDefValidateControllerPCI

2017-12-06 Thread John Ferlan
Move PCI validation checks out of qemu_command into the proper qemu_domain validation helper. Since there's a lot to move, we'll start slow by replicating the check in qemuBuildControllerDevCommandLine to skip the pcie-root and pci-root tests for not pseries guests. Next we'll move the controller

[libvirt] [PATCH v2 13/15] qemu: Move PCI more command checks to controller def validate

2017-12-06 Thread John Ferlan
Excluding the qemuCaps checks, move the remainder of the checks that validate whether the PCI definition is valid or not into qemuDomainControllerDefValidatePCI. Signed-off-by: John Ferlan --- src/qemu/qemu_command.c | 96 -- src/qemu/qemu_domain.c | 134 +++

[libvirt] [PATCH v2 10/15] qemu: Use virDomainPCIControllerOpts in qemuBuildControllerDevStr

2017-12-06 Thread John Ferlan
Shorten up a few characters and reference the pciopts pointer Signed-off-by: John Ferlan --- src/qemu/qemu_command.c | 115 +--- 1 file changed, 59 insertions(+), 56 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 3ec

Re: [libvirt] [libvirt-php PATCH] Fix crash in VIRT_HASH_CURRENT_KEY_INFO macro

2017-12-06 Thread Michal Privoznik
On 12/06/2017 12:17 AM, Dawid Zamirski wrote: > The PHP7 variant of the macro wasn't safe if the hash key was not a > string type. This was found when running php script with just > libvirt_connect call under xdebug session which segfaulted. This patch > makes the following changes: > > * make sur

Re: [libvirt] [PATCH 02/17] qemu: Introduce qemuDomainDeviceDefSkipController

2017-12-06 Thread John Ferlan
On 12/05/2017 09:18 AM, Ján Tomko wrote: > On Mon, Dec 04, 2017 at 08:38:52PM -0500, John Ferlan wrote: >> In order to be able to reuse some code for both controller def >> validation and command line building, create a convenience helper >> that will perform the "skip" avoidance checks. It will

Re: [libvirt] [PATCH] virfile: relax checks for hugetlbfs

2017-12-06 Thread Michal Privoznik
On 12/04/2017 04:21 PM, David Vrabel wrote: > There are use cases where it is useful to use the support in libvirt > for file-backed guest memory, but without using hugetlbfs but tmpfs > instead (for example, to run tests on hosts that do not have hugepages > configured, or to use Linux's idle page

Re: [libvirt] [sandbox 1/6] Pass debug and verbose values to init

2017-12-06 Thread Daniel P. Berrange
On Wed, Dec 06, 2017 at 01:56:23PM +0100, Cedric Bosdonnat wrote: > On Tue, 2017-12-05 at 16:52 +, Daniel P. Berrange wrote: > > On Tue, Dec 05, 2017 at 10:53:17AM +0100, Cédric Bosdonnat wrote: > > > libvirt-sandbox-init-common is expecting -d and -v parameters to > > > set it in debug or verb

[libvirt] [PATCH 2/4] qemu: Use same model when adding hostdev SCSI controller

2017-12-06 Thread John Ferlan
When qemuDomainFindOrCreateSCSIDiskController adds a controller, let's use the same model as a currently found controller under the assumption that the reason to add the controller in hotplug is because virDomainHostdevAssignAddress determined that there were too many devices on the existing contro

[libvirt] [PATCH 0/4] Resolve issue with duplicated SCSI hostdev addresses

2017-12-06 Thread John Ferlan
Details in the various patches. John Ferlan (4): qemu: Tolerate storage source private data being NULL for hotplug SCSI hostdev qemu: Use same model when adding hostdev SCSI controller conf: Use existing SCSI hostdev model to create new conf: Fix generating addresses for SCSI hostdev

[libvirt] [PATCH 1/4] qemu: Tolerate storage source private data being NULL for hotplug SCSI hostdev

2017-12-06 Thread John Ferlan
Commit id 'c5c96545' neglected to validate that the srcPriv was non-NULL before dereferencing. Similar problem to what was fixed by commit id '8056721c' but missed during multiple rebases and code reworks. Signed-off-by: John Ferlan --- src/qemu/qemu_hotplug.c | 5 +++-- 1 file changed, 3 insert

[libvirt] [PATCH 3/4] conf: Use existing SCSI hostdev model to create new

2017-12-06 Thread John Ferlan
In virDomainDefMaybeAddHostdevSCSIcontroller when we add a new controller because someone neglected to add one or we're adding one because the existing one is full, we should copy over the model number from the existing controller since whatever we create should at least have the same characteristi

[libvirt] [PATCH 4/4] conf: Fix generating addresses for SCSI hostdev

2017-12-06 Thread John Ferlan
https://bugzilla.redhat.com/show_bug.cgi?id=1519130 Commit id 'dc692438' reverted the automagic addition of a SCSI controller attempt during virDomainHostdevAssignAddress; however, the logic to determine where to place the next_unit depended upon the "new" controller being added. Without the new

Re: [libvirt] [sandbox 1/6] Pass debug and verbose values to init

2017-12-06 Thread Cedric Bosdonnat
On Tue, 2017-12-05 at 16:52 +, Daniel P. Berrange wrote: > On Tue, Dec 05, 2017 at 10:53:17AM +0100, Cédric Bosdonnat wrote: > > libvirt-sandbox-init-common is expecting -d and -v parameters to > > set it in debug or verbose mode... but those will never be passed > > by the launcher program. >

Re: [libvirt] [sandbox 5/6] Convert to python3

2017-12-06 Thread Daniel P. Berrange
On Wed, Dec 06, 2017 at 01:50:56PM +0100, Cedric Bosdonnat wrote: > On Tue, 2017-12-05 at 16:57 +, Daniel P. Berrange wrote: > > On Tue, Dec 05, 2017 at 10:53:21AM +0100, Cédric Bosdonnat wrote: > > > Python2 is going to die soon, convert to python3. > > > > I'm unclear whether this change dro

Re: [libvirt] [sandbox 5/6] Convert to python3

2017-12-06 Thread Cedric Bosdonnat
On Tue, 2017-12-05 at 16:57 +, Daniel P. Berrange wrote: > On Tue, Dec 05, 2017 at 10:53:21AM +0100, Cédric Bosdonnat wrote: > > Python2 is going to die soon, convert to python3. > > I'm unclear whether this change drops py2 support, or whether it makes it > work with py2+3 in parallel. > > T

Re: [libvirt] [PATCH jenkins-ci] Trigger rebuild of libvirt-go-xml when libvirt changes

2017-12-06 Thread Andrea Bolognani
On Wed, 2017-12-06 at 10:18 +, Daniel P. Berrange wrote: > Although the core code in libvirt-go-xml doesn't depend on libvirt, the test > suite pulls in libvirt.git to validate XML parsing against all XML files found > under libvirt.git/tests. We should thus have a dependancy in jenkins to > t

Re: [libvirt] [jenkins-ci PATCH] guests: install additional debugging tools

2017-12-06 Thread Andrea Bolognani
On Wed, 2017-11-22 at 17:40 +0100, Pavel Hrdina wrote: > Signed-off-by: Pavel Hrdina > --- > guests/vars/mappings.yml | 14 ++ > guests/vars/projects/base.yml | 4 > 2 files changed, 18 insertions(+) I guess this is intended mostly for the 'test' flavor? In any case, R

[libvirt] [PATCH jenkins-ci] Trigger rebuild of libvirt-go-xml when libvirt changes

2017-12-06 Thread Daniel P. Berrange
Although the core code in libvirt-go-xml doesn't depend on libvirt, the test suite pulls in libvirt.git to validate XML parsing against all XML files found under libvirt.git/tests. We should thus have a dependancy in jenkins to trigger rebuilds when libvirt changes. Signed-off-by: Daniel P. Berran

[libvirt] [PATCH 1/3] qemu: Add missing checks for pcie-root-port options

2017-12-06 Thread Andrea Bolognani
We format the 'chassis' and 'port' properties on the QEMU command line later on, so we should make sure they've been set. Signed-off-by: Andrea Bolognani --- src/qemu/qemu_command.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_com

[libvirt] [PATCH 3/3] qemu: Clean up PCI controller options

2017-12-06 Thread Andrea Bolognani
Most of the options are only applicable to one or two controller types, so they should be filtered out everywhere else. This will reduce user confusion and, in at least one corner case, prevent guests from disappearing on daemon restart. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=14838

[libvirt] [PATCH 2/3] tests: Add some tests for PCI controller options

2017-12-06 Thread Andrea Bolognani
The input configurations set all existing options for all PCI controllers, to see what ends up sticking in the output. Signed-off-by: Andrea Bolognani --- .../i440fx-controllers-pciopts.args| 24 +++ .../i440fx-controllers-pciopts.xml | 36 ++ .../pser

[libvirt] [PATCH 0/3] qemu: Clean up PCI controller options

2017-12-06 Thread Andrea Bolognani
See patch 3/3 for an explanation. Andrea Bolognani (3): qemu: Add missing checks for pcie-root-port options tests: Add some tests for PCI controller options qemu: Clean up PCI controller options src/qemu/qemu_command.c| 4 +- src/qemu/qemu_domain.c

Re: [libvirt] [PATCH] nwfilter: don't crash listing filters in unprivileged daemon

2017-12-06 Thread Peter Krempa
On Tue, Dec 05, 2017 at 16:48:36 -0500, John Ferlan wrote: > > > On 12/05/2017 11:41 AM, Daniel P. Berrange wrote: > > The unprivileged libvirtd does not support nwfilter config, by leaves the > > driver active. It is supposed to result in all APIs being an effective > > no-op, but several APIs r