Re: [libvirt] [PATCH] network: restrict usage of port management APIs

2018-08-09 Thread Daniel P . Berrangé
On Wed, Aug 08, 2018 at 11:41:23PM -0400, Laine Stump wrote: > On 08/08/2018 11:46 AM, Daniel P. Berrangé wrote: > > The port allocation APIs are currently called unconditionally for all > > types of NIC, but (mostly) only do anything for NICs with type=network. > > > > The exception is the port

[libvirt] [PATCH v2] qemu: qemuDomainChangeNet: validity checks should be done before XML autocompletion

2018-08-09 Thread Katerina Koukiou
This patch ensures that changes in attributes of interfaces will be emit errors accept if they are missing from the XML. Previously we were falsely reporting successfull updates, because some changed attributes got overwritten before the validity checks.

Re: [libvirt] [PATCH] conf: rewrite filtering for capabilities lookup

2018-08-09 Thread Daniel P . Berrangé
ping On Fri, Aug 03, 2018 at 03:28:16PM +0100, Daniel P. Berrangé wrote: > The virCapabilitiesDomainDataLookupInternal() is given a list of > parameters representing the desired domain characteristics. It then has > to look throught the capabilities to identify an acceptable match. > > The

Re: [libvirt] [jenkins-ci PATCH 11/12] lcitool: Support building arbitrary branches

2018-08-09 Thread Andrea Bolognani
On Wed, 2018-08-08 at 15:45 +0200, Andrea Bolognani wrote: [...] > -def _action_update(self, hosts, projects): > -self._execute_playbook("update", hosts, projects) > +def _action_update(self, hosts, projects, _branch): > +self._execute_playbook("update", hosts, project,

Re: [libvirt] [PATCH] storage: tweak error message when skipping file

2018-08-09 Thread Martin Kletzander
On Wed, Aug 08, 2018 at 04:45:43PM +0100, Daniel P. Berrangé wrote: Signed-off-by: Daniel P. Berrangé --- src/storage/storage_util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Martin Kletzander diff --git a/src/storage/storage_util.c b/src/storage/storage_util.c

Re: [libvirt] [PATCH libvirt-tck] Cleanup secret in disk encryption test

2018-08-09 Thread Daniel P . Berrangé
On Wed, Aug 08, 2018 at 02:44:54PM -0600, Jim Fehlig wrote: > 100-disk-encryption.t does not undefine the secret it defines > for the test disk, causing subsequent runs of the test to fail > > not ok 1 - secret created > Failed test 'secret created' > at

Re: [libvirt] [jenkins-ci PATCH] jobs: ensure rpmbuild purges $RPM-ROOT/BUILD/$PACKAGE

2018-08-09 Thread Andrea Bolognani
On Thu, 2018-08-09 at 12:02 +0100, Daniel P. Berrangé wrote: > When using 'rpmbuild --rebuild', $RPM-ROOT/BUILD/$PACKAGE is s/ / / > automatically deleted on completion, but when using 'rpmbuild --ta' it s/--ta/-ta/ > is not deleted. We need to pass --clean to get the desired behaviour. > >

[libvirt] [PATCH v1 2/6] lock_driver.h: Introduce metadata flag

2018-08-09 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- src/locking/lock_driver.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/locking/lock_driver.h b/src/locking/lock_driver.h index 8b7521..7c8f79520a 100644 --- a/src/locking/lock_driver.h +++ b/src/locking/lock_driver.h @@ -56,6 +56,8 @@ typedef

[libvirt] [PATCH v1 0/6] Introduce metadata locking

2018-08-09 Thread Michal Privoznik
All patches are for: https://bugzilla.redhat.com/show_bug.cgi?id=1524792 You can find them on my Github too: https://github.com/zippy2/libvirt/tree/disk_metadata_lock_alt The locking by itself make very little sense. I have a patches waiting that implement restoring original seclabels

Re: [libvirt] [PATCH 2/6] qemu: capabilities: Remove unused QEMU_CAPS_DRIVE_BOOT

2018-08-09 Thread Ján Tomko
On Thu, Aug 09, 2018 at 02:48:55PM +0200, Peter Krempa wrote: The capability was never set except for (stale) tests. Remove it. Signed-off-by: Peter Krempa --- src/qemu/qemu_capabilities.h | 2 +- src/qemu/qemu_command.c | 19 +-- tests/qemuxml2argvtest.c | 26

Re: [libvirt] [PATCH 4/6] tests: qemuxml2argv: Add 2 floppy drive tests for q35 with 2.9 and 2.11 machine

2018-08-09 Thread Ján Tomko
On Thu, Aug 09, 2018 at 02:48:57PM +0200, Peter Krempa wrote: The floppy drive command line is different on the q35 machine. Make sure to test that both drives are supported and also multiple machine versions as we generate the commandline differently. Note that both output files show wrong

[libvirt] [jenkins-ci PATCH] jobs: ensure rpmbuild purges $RPM-ROOT/BUILD/$PACKAGE

2018-08-09 Thread Daniel P . Berrangé
When using 'rpmbuild --rebuild', $RPM-ROOT/BUILD/$PACKAGE is automatically deleted on completion, but when using 'rpmbuild --ta' it is not deleted. We need to pass --clean to get the desired behaviour. This was not a visible problem in the past because "git clean -fdx" would purge the directory,

Re: [libvirt] [PATCH v3 11/11] util: qemu: use VIR_AUTOPTR for aggregate types

2018-08-09 Thread Sukrit Bhatnagar
My bad. You can ignore this patch. On Thu, 9 Aug 2018 at 18:18, Erik Skultety wrote: > > On Thu, Aug 09, 2018 at 09:42:19AM +0530, Sukrit Bhatnagar wrote: > > By making use of GNU C's cleanup attribute handled by the > > VIR_AUTOPTR macro for declaring aggregate pointer variables, > > majority of

[libvirt] [jenkins-ci PATCH 3/6] guests: Prepare Debian 8 for libvirt-sandbox

2018-08-09 Thread Andrea Bolognani
libvirt-sandbox can be built successfully on the platform, so we should install the corresponding build dependencies. Signed-off-by: Andrea Bolognani --- guests/host_vars/libvirt-debian-8/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/guests/host_vars/libvirt-debian-8/main.yml

[libvirt] [jenkins-ci PATCH 1/6] guests: Don't prepare Ubuntu 16.04 for virt-manager

2018-08-09 Thread Andrea Bolognani
virt-manager can't be built successfully on the platform, so we shouldn't install the corresponding build dependencies. Signed-off-by: Andrea Bolognani --- guests/host_vars/libvirt-ubuntu-16/main.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/guests/host_vars/libvirt-ubuntu-16/main.yml

[libvirt] [jenkins-ci PATCH 5/6] guests: Prepare Debian 8 for libvirt-dbus

2018-08-09 Thread Andrea Bolognani
libvirt-dbus can be built successfully on the platform, so we should install the corresponding build dependencies. Signed-off-by: Andrea Bolognani --- guests/host_vars/libvirt-debian-8/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/guests/host_vars/libvirt-debian-8/main.yml

[libvirt] [jenkins-ci PATCH 4/6] projects: Build libvirt-sandbox on Debian 8

2018-08-09 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani --- projects/libvirt-sandbox.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/projects/libvirt-sandbox.yaml b/projects/libvirt-sandbox.yaml index 518080a..da9bf77 100644 --- a/projects/libvirt-sandbox.yaml +++ b/projects/libvirt-sandbox.yaml @@ -2,6 +2,7

[libvirt] [jenkins-ci PATCH 6/6] projects: Build libvirt-dbus on Debian 8

2018-08-09 Thread Andrea Bolognani
As with CentOS 7, we can't run 'make check' on the platform because we don't have a recent enough Python interpreter, but the daemon itself will build and run just fine. Signed-off-by: Andrea Bolognani --- projects/libvirt-dbus.yaml | 1 + 1 file changed, 1 insertion(+) diff --git

[libvirt] [jenkins-ci PATCH 0/6] Some coverage fixes and improvements

2018-08-09 Thread Andrea Bolognani
We were installing some unnecessary packages and not building projects on as many platforms as possible. Let's fix that :) Andrea Bolognani (6): guests: Don't prepare Ubuntu 16.04 for virt-manager guests: Don't prepare CentOS 7 for libvirt-sandbox guests: Prepare Debian 8 for

[libvirt] [jenkins-ci PATCH 2/6] guests: Don't prepare CentOS 7 for libvirt-sandbox

2018-08-09 Thread Andrea Bolognani
libvirt-sandbox can't be built successfully on the platform, so we shouldn't install the corresponding build dependencies. Signed-off-by: Andrea Bolognani --- guests/host_vars/libvirt-centos-7/main.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/guests/host_vars/libvirt-centos-7/main.yml

Re: [libvirt] [PATCH 3/6] qemu: Remove unused argument 'bootable' from qemuBuildDriveStr

2018-08-09 Thread Ján Tomko
On Thu, Aug 09, 2018 at 02:48:56PM +0200, Peter Krempa wrote: Now that the argument is unused we can remove it transitively from all the call graphs. Signed-off-by: Peter Krempa --- src/qemu/qemu_command.c | 20 +++- src/qemu/qemu_command.h | 3 +-- src/qemu/qemu_hotplug.c | 2

[libvirt] [jenkins-ci PATCH] projects: Don't use ~/rpmbuild for osinfo-db

2018-08-09 Thread Andrea Bolognani
Commit 15a19dbc0b73 made sure all explicit calls use the current directory instead of ~/rpmbuild as workspace, but osinfo-db wasn't affected by the change since its build recipe calls the custom 'make rpm' target and continued storing build artifacts in ~/rpmbuild. Signed-off-by: Andrea Bolognani

[libvirt] [PATCH v3 06/11] util: netdevbridge: use VIR_AUTOPTR for aggregate types

2018-08-09 Thread Sukrit Bhatnagar
By making use of GNU C's cleanup attribute handled by the VIR_AUTOPTR macro for declaring aggregate pointer variables, majority of the calls to *Free functions can be dropped, which in turn leads to getting rid of most of our cleanup sections. Signed-off-by: Sukrit Bhatnagar ---

[libvirt] [PATCH v3 10/11] util: netdevopenvswitch: use VIR_AUTOPTR for aggregate types

2018-08-09 Thread Sukrit Bhatnagar
By making use of GNU C's cleanup attribute handled by the VIR_AUTOPTR macro for declaring aggregate pointer variables, majority of the calls to *Free functions can be dropped, which in turn leads to getting rid of most of our cleanup sections. Signed-off-by: Sukrit Bhatnagar ---

[libvirt] [PATCH v3 08/11] util: netdev: use VIR_AUTOPTR for aggregate types

2018-08-09 Thread Sukrit Bhatnagar
By making use of GNU C's cleanup attribute handled by the VIR_AUTOPTR macro for declaring aggregate pointer variables, majority of the calls to *Free functions can be dropped, which in turn leads to getting rid of most of our cleanup sections. Signed-off-by: Sukrit Bhatnagar ---

[libvirt] [PATCH v3 07/11] util: netdev: use VIR_AUTOFREE instead of VIR_FREE for scalar types

2018-08-09 Thread Sukrit Bhatnagar
By making use of GNU C's cleanup attribute handled by the VIR_AUTOFREE macro for declaring scalar variables, majority of the VIR_FREE calls can be dropped, which in turn leads to getting rid of most of our cleanup sections. Signed-off-by: Sukrit Bhatnagar --- src/util/virnetdev.c | 343

[libvirt] [PATCH v3 04/11] util: netlink: use VIR_AUTOPTR for aggregate types

2018-08-09 Thread Sukrit Bhatnagar
By making use of GNU C's cleanup attribute handled by the VIR_AUTOPTR macro for declaring aggregate pointer variables, majority of the calls to *Free functions can be dropped, which in turn leads to getting rid of most of our cleanup sections. Signed-off-by: Sukrit Bhatnagar ---

[libvirt] [PATCH v3 05/11] util: netdevbridge: use VIR_AUTOFREE instead of VIR_FREE for scalar types

2018-08-09 Thread Sukrit Bhatnagar
By making use of GNU C's cleanup attribute handled by the VIR_AUTOFREE macro for declaring scalar variables, majority of the VIR_FREE calls can be dropped, which in turn leads to getting rid of most of our cleanup sections. Signed-off-by: Sukrit Bhatnagar --- src/util/virnetdevbridge.c | 46

[libvirt] [PATCH v3 01/11] util: iscsi: use VIR_AUTOFREE instead of VIR_FREE for scalar types

2018-08-09 Thread Sukrit Bhatnagar
Add another usage for VIR_AUTOFREE macro which was left in the commit ec3e878, thereby dropping a VIR_FREE call and and a cleanup section. Signed-off-by: Sukrit Bhatnagar --- src/util/viriscsi.c | 22 ++ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git

[libvirt] [PATCH v3 03/11] util: netlink: use VIR_AUTOFREE instead of VIR_FREE for scalar types

2018-08-09 Thread Sukrit Bhatnagar
By making use of GNU C's cleanup attribute handled by the VIR_AUTOFREE macro for declaring scalar variables, majority of the VIR_FREE calls can be dropped, which in turn leads to getting rid of most of our cleanup sections. Signed-off-by: Sukrit Bhatnagar --- src/util/virnetlink.c | 43

[libvirt] [PATCH v3 11/11] util: qemu: use VIR_AUTOPTR for aggregate types

2018-08-09 Thread Sukrit Bhatnagar
By making use of GNU C's cleanup attribute handled by the VIR_AUTOPTR macro for declaring aggregate pointer variables, majority of the calls to *Free functions can be dropped, which in turn leads to getting rid of most of our cleanup sections. Signed-off-by: Sukrit Bhatnagar ---

[libvirt] [PATCH v3 09/11] util: netdevip: use VIR_AUTOPTR for aggregate types

2018-08-09 Thread Sukrit Bhatnagar
By making use of GNU C's cleanup attribute handled by the VIR_AUTOPTR macro for declaring aggregate pointer variables, majority of the calls to *Free functions can be dropped, which in turn leads to getting rid of most of our cleanup sections. Signed-off-by: Sukrit Bhatnagar ---

[libvirt] [PATCH 2/6] qemu: capabilities: Remove unused QEMU_CAPS_DRIVE_BOOT

2018-08-09 Thread Peter Krempa
The capability was never set except for (stale) tests. Remove it. Signed-off-by: Peter Krempa --- src/qemu/qemu_capabilities.h | 2 +- src/qemu/qemu_command.c | 19 +-- tests/qemuxml2argvtest.c | 26 +- 3 files changed, 11 insertions(+), 36

[libvirt] [PATCH 0/6] qemu: Fix handling of floppy controller setup

2018-08-09 Thread Peter Krempa
Cleanup always present capability QEMU_CAPS_BOOTINDEX and unused capability QEMU_CAPS_DRIVE_BOOT as a preparation/cleanup step and fix two bugs in setup of the floppy controller for the q35 machine type. Peter Krempa (6): qemu: capabilities: Always assume QEMU_CAPS_BOOTINDEX qemu:

[libvirt] [PATCH 6/6] qemu: domain: Fix machine type version check for 'isa-fdc' usage

2018-08-09 Thread Peter Krempa
Starting from pc-q35-2.4 the floppy controller is not enabled by default. Fix the version check so that it does not match 2.11 as being 2.1. Signed-off-by: Peter Krempa --- src/qemu/qemu_domain.c | 12

[libvirt] [PATCH 4/6] tests: qemuxml2argv: Add 2 floppy drive tests for q35 with 2.9 and 2.11 machine

2018-08-09 Thread Peter Krempa
The floppy drive command line is different on the q35 machine. Make sure to test that both drives are supported and also multiple machine versions as we generate the commandline differently. Note that both output files show wrong command line which will be fixed subsequently. Signed-off-by:

[libvirt] [PATCH 3/6] qemu: Remove unused argument 'bootable' from qemuBuildDriveStr

2018-08-09 Thread Peter Krempa
Now that the argument is unused we can remove it transitively from all the call graphs. Signed-off-by: Peter Krempa --- src/qemu/qemu_command.c | 20 +++- src/qemu/qemu_command.h | 3 +-- src/qemu/qemu_hotplug.c | 2 +- 3 files changed, 9 insertions(+), 16 deletions(-) diff

[libvirt] [PATCH 5/6] qemu: command: Don't format -device isa-fdc, ... twice with two floppy drives

2018-08-09 Thread Peter Krempa
Fix regression introduced in 42fd5a58adb. With q35 machine type which requires the explicitly specified FDC we'd format two isa-fdc controllers to the command line as the code was moved to a place where it's called per-disk. Move the call back after formatting all disks and reiterate the disks

[libvirt] [PATCH 0/3] conf: qemu: support new Hyper-V enlightenments

2018-08-09 Thread Vitaly Kuznetsov
Several new Hyper-V enlightenments were recently added to Qemu: - hv-frequencies - hv-reenlightenment - hv-tlbflush Support these in libvirt. Vitaly Kuznetsov (3): conf: qemu: add support for Hyper-V frequency MSRs conf: qemu: add support for Hyper-V reenlightenment notifications conf:

[libvirt] [PATCH 1/3] conf: qemu: add support for Hyper-V frequency MSRs

2018-08-09 Thread Vitaly Kuznetsov
Qemu-2.12 gained 'hv-frequencies' cpu flag to enable Hyper-V frequency MSRs. These MSRs are required (but not sufficient) to make Hyper-V on KVM pass stable TSC page clocksource to L2 guests. Signed-off-by: Vitaly Kuznetsov --- docs/formatdomain.html.in | 7 +++

[libvirt] [PATCH 2/3] conf: qemu: add support for Hyper-V reenlightenment notifications

2018-08-09 Thread Vitaly Kuznetsov
Qemu-3.0 supports so-called 'Reenlightenment' notifications and this (in conjunction with 'hv-frequencies') can be used make Hyper-V on KVM pass stable TSC page clocksource to L2 guests. Signed-off-by: Vitaly Kuznetsov --- docs/formatdomain.html.in | 7 +++

[libvirt] [PATCH 3/3] conf: qemu: add support for Hyper-V PV TLB flush

2018-08-09 Thread Vitaly Kuznetsov
Qemu-3.0 supports Hyper-V-style PV TLB flush, Windows guests can benefit from this feature as KVM knows which vCPUs are not currently scheduled (and thus don't require any immediate action). Signed-off-by: Vitaly Kuznetsov --- docs/formatdomain.html.in | 7 +++

[libvirt] [PATCH 03/17] vircgroup: Rename structs to start with underscore

2018-08-09 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- src/util/vircgroup.c | 2 +- src/util/vircgroup.h | 4 ++-- src/util/vircgrouppriv.h | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c index 6bf4e88da1..7602641713 100644 ---

[libvirt] [PATCH 06/17] vircgroup: Remove unused function virCgroupKill()

2018-08-09 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- src/libvirt_private.syms | 1 - src/util/vircgroup.c | 37 - src/util/vircgroup.h | 1 - 3 files changed, 39 deletions(-) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 32ed5a09f9..8f80ee2250

[libvirt] [PATCH 17/17] lxc: Use virCgroupGetMemoryStat

2018-08-09 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- src/lxc/lxc_cgroup.c | 65 +--- 1 file changed, 7 insertions(+), 58 deletions(-) diff --git a/src/lxc/lxc_cgroup.c b/src/lxc/lxc_cgroup.c index 8e937ec389..d93a19d684 100644 --- a/src/lxc/lxc_cgroup.c +++

[libvirt] [PATCH 10/17] vircgroup: Remove pointless bool parameter

2018-08-09 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- src/util/vircgroup.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c index 280d781f41..6ffa1e9c58 100644 --- a/src/util/vircgroup.c +++ b/src/util/vircgroup.c @@ -251,7 +251,6 @@ static

[libvirt] [PATCH 00/17] some cgroup cleanup patches

2018-08-09 Thread Pavel Hrdina
Preparation for cgroupv2 support. Pavel Hrdina (17): docs: List cpuacct in controllers used by QEMU driver docs: Update how we create cgroup directory names vircgroup: Rename structs to start with underscore vircgroup: Introduce standard set of typedefs and use them vircgroup: Extract

[libvirt] [PATCH 01/17] docs: List cpuacct in controllers used by QEMU driver

2018-08-09 Thread Pavel Hrdina
The cpuacct controller is used to get cpu stats. Signed-off-by: Pavel Hrdina --- docs/cgroups.html.in | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/docs/cgroups.html.in b/docs/cgroups.html.in index e33d07a82b..a498590c45 100644 --- a/docs/cgroups.html.in +++

[libvirt] [PATCH 08/17] vircgroup: Unexport unused function virCgroupRemoveRecursively

2018-08-09 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- src/libvirt_private.syms | 1 - src/util/vircgroup.c | 11 +-- src/util/vircgroup.h | 1 - 3 files changed, 1 insertion(+), 12 deletions(-) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 95d7c9f834..59d9bc380e 100644 ---

[libvirt] [PATCH 16/17] vircgroup: Introduce virCgroupGetMemoryStat

2018-08-09 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- src/libvirt_private.syms | 1 + src/util/vircgroup.c | 88 src/util/vircgroup.h | 7 3 files changed, 96 insertions(+) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index

[libvirt] [PATCH 11/17] vircgroup: Extract mount options matching into function

2018-08-09 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- src/util/vircgroup.c | 80 ++-- 1 file changed, 47 insertions(+), 33 deletions(-) diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c index 6ffa1e9c58..52be5e5fb8 100644 --- a/src/util/vircgroup.c +++

[libvirt] [PATCH 04/17] vircgroup: Introduce standard set of typedefs and use them

2018-08-09 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- src/util/vircgroup.c | 2 +- src/util/vircgroup.h | 3 ++- src/util/vircgrouppriv.h | 4 +++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c index 7602641713..5144b33d43 100644 ---

[libvirt] [PATCH 07/17] vircgroup: Unexport unused function virCgroupAddTaskController()

2018-08-09 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- src/libvirt_private.syms | 1 - src/util/vircgroup.c | 69 +--- src/util/vircgroup.h | 4 --- 3 files changed, 29 insertions(+), 45 deletions(-) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index

[libvirt] [PATCH v2 12/20] tests: rename hugepages-pages6 into hugepages-default-system-size

2018-08-09 Thread Pavel Hrdina
Remove unnecessary XML elements as well. Signed-off-by: Pavel Hrdina --- ...ges6.args => hugepages-default-system-size.args} | 5 + ...pages6.xml => hugepages-default-system-size.xml} | 13 + tests/qemuxml2argvtest.c| 2 +-

[libvirt] [PATCH v2 15/20] tests: introduce hugepages-default-1G-nodeset-2M

2018-08-09 Thread Pavel Hrdina
This test case is currently working but it uncovers existing issue in our code that the generated QEMU commandline uses the default 1G hugepage instead of the 2M hugepage specified for exact node. The issue in our code is that for non-numa guests we take into account only the first hugepage.

[libvirt] [PATCH v2 06/20] tests: rename hugepages-pages into hugepages-numa-nodeset

2018-08-09 Thread Pavel Hrdina
Remove unnecessary XML elements as well. for numa guest is tested by numatune-memnode test. Signed-off-by: Pavel Hrdina --- ...s-pages.args => hugepages-numa-nodeset.args} | 17 + ...ges-pages.xml => hugepages-numa-nodeset.xml} | 12 +--- tests/qemuxml2argvtest.c

[libvirt] [PATCH v2 14/20] tests: rename hugepages-pages8 into hugepages-nodeset-nonexist

2018-08-09 Thread Pavel Hrdina
Remove unnecessary XML elements as well. Signed-off-by: Pavel Hrdina --- ...es-pages8.xml => hugepages-nodeset-nonexist.xml} | 13 + tests/qemuxml2argvtest.c| 7 --- 2 files changed, 5 insertions(+), 15 deletions(-) rename

[libvirt] [PATCH v2 17/20] conf: Move hugepage XML validation check out of qemu_command

2018-08-09 Thread Pavel Hrdina
We can safely validate the hugepage nodeset attribute at a define time. This validation is not done for already existing domains when the daemon is restarted. All the changes to the tests are necessary because we move the error from domain start into XML parse. Signed-off-by: Pavel Hrdina ---

[libvirt] [PATCH v2 05/20] tests: extract pages-discard out of hugepages-pages

2018-08-09 Thread Pavel Hrdina
>From the args output you can see that the 'discard' feature is not honored if you don't use hugepages, that is a bug, following patche will fix it. Signed-off-by: Pavel Hrdina --- tests/qemuxml2argvdata/hugepages-pages.args | 12 +++ tests/qemuxml2argvdata/hugepages-pages.xml | 3 +-

[libvirt] [PATCH v2 10/20] tests: rename hugepages-pages4 into hugepages-numa-nodeset-nonexist

2018-08-09 Thread Pavel Hrdina
Remove unnecessary XML elements as well. Signed-off-by: Pavel Hrdina --- xml => hugepages-numa-nodeset-nonexist.xml} | 17 + tests/qemuxml2argvtest.c| 5 +++-- .../hugepages-numa-nodeset-nonexist.xml | 1 +

[libvirt] [PATCH v2 08/20] tests: extract pages-discard-hugepages out of hugepages-pages3

2018-08-09 Thread Pavel Hrdina
Similar thing happens as for pages-discard, it is not passed to QEMU. Signed-off-by: Pavel Hrdina --- tests/qemuxml2argvdata/hugepages-pages3.args | 3 +- tests/qemuxml2argvdata/hugepages-pages3.xml | 4 +-- .../pages-discard-hugepages.args | 28 +++

[libvirt] [PATCH v2 19/20] conf: Introduce virDomainDefPostParseMemtune

2018-08-09 Thread Pavel Hrdina
Previously we were ignoring "nodeset" attribute for hugepage pages if there was no guest NUMA topology configured in the domain XML. Commit partially fixed that issue but it introduced a somehow valid regression. In case that there is no guest NUMA topology configured and the "nodeset" attribute

[libvirt] [PATCH v2 16/20] tests: introduce hugepages-nodeset

2018-08-09 Thread Pavel Hrdina
This use-case was broken by commit . We allowed this configuration and it was working as expected therefore we can consider it as regression. We should have never allowed such configuration so now the best solution is in case of non-numa guest silently ignore the 'nodeset' attribute if it's set

[libvirt] [PATCH v2 20/20] qemu: ensure that memory 'discard' is used if specified in XML

2018-08-09 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- src/qemu/qemu_command.c| 4 +++- .../pages-discard-hugepages.args | 11 +++ tests/qemuxml2argvdata/pages-discard.args | 18 ++ 3 files changed, 24 insertions(+), 9 deletions(-) diff --git

[libvirt] [PATCH v2 02/20] tests: extract hugepages-numa-default-dimm out of hugepages-numa

2018-08-09 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- .../hugepages-numa-default-dimm.args | 31 + .../hugepages-numa-default-dimm.xml | 45 +++ tests/qemuxml2argvdata/hugepages-numa.args| 6 +-- tests/qemuxml2argvdata/hugepages-numa.xml | 11 -

[libvirt] [PATCH v2 09/20] tests: rename hugepages-pages3 into hugepages-numa-nodeset-part

2018-08-09 Thread Pavel Hrdina
Remove unnecessary XML elements as well. Signed-off-by: Pavel Hrdina --- ...pages3.args => hugepages-numa-nodeset-part.args} | 5 + ...s-pages3.xml => hugepages-numa-nodeset-part.xml} | 8 +--- tests/qemuxml2argvtest.c| 3 ++- ...s-pages3.xml =>

[libvirt] [PATCH v2 03/20] tests: rename hugepages-numa into hugepages-numa-default

2018-08-09 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- .../{hugepages-numa.args => hugepages-numa-default.args}| 0 .../{hugepages-numa.xml => hugepages-numa-default.xml} | 0 tests/qemuxml2argvtest.c| 2 +- 3 files changed, 1 insertion(+), 1 deletion(-) rename

[libvirt] [PATCH v2 11/20] tests: rename hugepages-pages5 into hugepages-default-2M

2018-08-09 Thread Pavel Hrdina
Remove unnecessary XML elements as well. Signed-off-by: Pavel Hrdina --- ...epages-pages5.args => hugepages-default-2M.args} | 5 + ...ugepages-pages5.xml => hugepages-default-2M.xml} | 13 + tests/qemuxml2argvtest.c| 2 +-

[libvirt] [PATCH v2 04/20] tests: remove unnecessary XML elements from hugepages-numa-default

2018-08-09 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- .../hugepages-numa-default.args | 42 ++- .../hugepages-numa-default.xml| 74 +-- tests/qemuxml2argvtest.c | 6 -- 3 files changed, 7 insertions(+), 115 deletions(-) diff --git

[libvirt] [PATCH v2 13/20] tests: rename hugepages-pages7 into pages-dimm-discard

2018-08-09 Thread Pavel Hrdina
Remove unnecessary XML elements as well. Signed-off-by: Pavel Hrdina --- ...ges-pages7.args => pages-dimm-discard.args} | 16 +--- ...pages-pages7.xml => pages-dimm-discard.xml} | 18 +- tests/qemuxml2argvtest.c | 7 ---

[libvirt] [PATCH v2 07/20] tests: rename hugepages-pages2 into hugepages-numa-default-2M

2018-08-09 Thread Pavel Hrdina
Remove unnecessary XML elements as well. Signed-off-by: Pavel Hrdina --- ...s-pages2.args => hugepages-numa-default-2M.args} | 5 + ...ges-pages2.xml => hugepages-numa-default-2M.xml} | 8 +--- tests/qemuxml2argvtest.c| 5 +++-- ...ges-pages2.xml =>

[libvirt] [PATCH v2 18/20] conf: Move hugepages validation out of XML parser

2018-08-09 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- src/conf/domain_conf.c | 75 ++ 1 file changed, 40 insertions(+), 35 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index be9c08626a..f88576b5cc 100644 --- a/src/conf/domain_conf.c +++

Re: [libvirt] [PATCH v3 11/11] util: qemu: use VIR_AUTOPTR for aggregate types

2018-08-09 Thread Erik Skultety
On Thu, Aug 09, 2018 at 09:42:19AM +0530, Sukrit Bhatnagar wrote: > By making use of GNU C's cleanup attribute handled by the > VIR_AUTOPTR macro for declaring aggregate pointer variables, > majority of the calls to *Free functions can be dropped, which > in turn leads to getting rid of most of

[libvirt] [PATCH 13/17] vircgroup: Introduce virCgroupEnableMissingControllers

2018-08-09 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- src/util/vircgroup.c | 103 --- 1 file changed, 58 insertions(+), 45 deletions(-) diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c index 45fe2595d1..99cbdaa59b 100644 --- a/src/util/vircgroup.c +++

[libvirt] [PATCH 15/17] vircgroup: Remove virCgroupAddTaskController

2018-08-09 Thread Pavel Hrdina
There is no need for this function, both of the checks are done later by virCgroupGetControllerPath. Signed-off-by: Pavel Hrdina --- src/util/vircgroup.c | 31 +-- 1 file changed, 1 insertion(+), 30 deletions(-) diff --git a/src/util/vircgroup.c

[libvirt] [PATCH v3 02/11] util: netlink: define cleanup function using VIR_DEFINE_AUTOPTR_FUNC

2018-08-09 Thread Sukrit Bhatnagar
Using the new VIR_DEFINE_AUTOPTR_FUNC macro defined in src/util/viralloc.h, define a new wrapper around an existing cleanup function which will be called when a variable declared with VIR_AUTOPTR macro goes out of scope. Also, drop the redundant viralloc.h include, since that has moved from the

[libvirt] [PATCH v3 00/11] use GNU C's cleanup attribute in src/util (batch III)

2018-08-09 Thread Sukrit Bhatnagar
This third series of patches also modifies a few files in src/util to use VIR_AUTOFREE and VIR_AUTOPTR for automatic freeing of memory and get rid of some VIR_FREE macro invocations and *Free function calls. This is meant as a follow-up of the v1 series [1] of the same batch, and contains those

Re: [libvirt] [PATCH] Fix link errors in tools/nss and tests

2018-08-09 Thread Michal Privoznik
On 08/08/2018 07:00 PM, Jim Fehlig wrote: > While local builds succeed fine, a build worker building in a chroot > environment is encountering errors when linking some items in tools/nss > and tests, e.g. > > [ 469s] libtool: link: gcc -shared -fPIC -DPIC -Wl,--whole-archive >

[libvirt] [PATCH 09/17] vircgroup: Move function used in tests into vircgrouppriv.h

2018-08-09 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- src/util/vircgroup.h | 13 - src/util/vircgrouppriv.h | 13 + 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/util/vircgroup.h b/src/util/vircgroup.h index 138bb3c076..48be077aba 100644 --- a/src/util/vircgroup.h

[libvirt] [PATCH 02/17] docs: Update how we create cgroup directory names

2018-08-09 Thread Pavel Hrdina
Commit changed the way how cgroup directory names are constructed but the documentation was not updated. Signed-off-by: Pavel Hrdina --- docs/cgroups.html.in | 34 ++ 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/docs/cgroups.html.in

[libvirt] [PATCH 05/17] vircgroup: Extract file link resolving into separate function

2018-08-09 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- src/util/vircgroup.c | 85 +--- 1 file changed, 48 insertions(+), 37 deletions(-) diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c index 5144b33d43..fd58ba154f 100644 --- a/src/util/vircgroup.c +++

[libvirt] [PATCH 12/17] vircgroup: Use virCgroupMountOptsMatchController in virCgroupDetectPlacement

2018-08-09 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- src/util/vircgroup.c | 43 ++- 1 file changed, 14 insertions(+), 29 deletions(-) diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c index 52be5e5fb8..45fe2595d1 100644 --- a/src/util/vircgroup.c +++

[libvirt] [PATCH 14/17] vircgroup: machinename will never be NULL

2018-08-09 Thread Pavel Hrdina
Commit moved machineName generation before virCgroupNewDetectMachine() is called. Signed-off-by: Pavel Hrdina --- src/util/vircgroup.c | 27 +++ 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c index

[libvirt] [PATCH v2 01/20] tests: rename hugepages to hugepages-default

2018-08-09 Thread Pavel Hrdina
Remove unnecessary XML elements as well. Signed-off-by: Pavel Hrdina --- .../{hugepages.args => hugepages-default.args} | 2 -- .../{hugepages.xml => hugepages-default.xml}| 5 - tests/qemuxml2argvtest.c| 2 +-

[libvirt] [PATCH v2 00/20] Fix and improve hugepage code

2018-08-09 Thread Pavel Hrdina
changes in v2: - renamed existing test cases to sensible names - split of some existing test cases - fixed uncovered issue with memory discard v1: https://www.redhat.com/archives/libvir-list/2018-July/msg00667.html Pavel Hrdina (20): tests: rename hugepages to hugepages-default

[libvirt] [PATCH v1 5/6] domain_lock: Implement metadata locking

2018-08-09 Thread Michal Privoznik
In order for our drivers to lock resources for metadata change we need set of new APIs. Fortunately, we don't have to care about every possible device a domain can have. We care only about those which can live on a network filesystem and hence can be accessed by multiple daemons at the same time.

[libvirt] [PATCH v1 6/6] qemu_security: Lock metadata while relabelling

2018-08-09 Thread Michal Privoznik
Fortunately, we have qemu wrappers so it's sufficient to put lock/unlock call only there. Signed-off-by: Michal Privoznik --- src/qemu/qemu_security.c | 107 +++ 1 file changed, 107 insertions(+) diff --git a/src/qemu/qemu_security.c

[libvirt] [PATCH v1 4/6] lock_driver_sanlock: Handle metadata flag gracefully

2018-08-09 Thread Michal Privoznik
No real support implemented here. But hey, at least we will not fail. Signed-off-by: Michal Privoznik --- src/locking/lock_driver_sanlock.c | 25 ++--- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/src/locking/lock_driver_sanlock.c

[libvirt] [PATCH v1 3/6] lockd_driver_lockd: Implement metadata flag

2018-08-09 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- src/locking/lock_daemon_dispatch.c | 5 - src/locking/lock_driver_lockd.c| 31 +-- src/locking/lock_driver_lockd.h| 1 + 3 files changed, 26 insertions(+), 11 deletions(-) diff --git

[libvirt] [PATCH v1 1/6] virlockspace: Introduce VIR_LOCK_SPACE_ACQUIRE_METADATA flag

2018-08-09 Thread Michal Privoznik
This flag is going to be used to alter default behaviour of the lock. Firstly, it means we will lock different offset in the file (offset 1 instead of 0). Secondly, it means the lock acquiring will actually wait for the lock to be set (compared to default behaviour which is set or error out).

Re: [libvirt] [PATCH 1/6] qemu: capabilities: Always assume QEMU_CAPS_BOOTINDEX

2018-08-09 Thread Ján Tomko
On Thu, Aug 09, 2018 at 02:48:54PM +0200, Peter Krempa wrote: The field was added in qemu v0.13.0-rc0-731-g1ca4d09ae0 so all supported qemu versions now use it. There's a LOT of test fallout as we did not use capabilities close enough to upstream for many of our tests. Signed-off-by: Peter

Re: [libvirt] [jenkins-ci PATCH] projects: Don't use ~/rpmbuild for osinfo-db

2018-08-09 Thread Daniel P . Berrangé
On Thu, Aug 09, 2018 at 03:57:00PM +0200, Andrea Bolognani wrote: > Commit 15a19dbc0b73 made sure all explicit calls use > the current directory instead of ~/rpmbuild as workspace, > but osinfo-db wasn't affected by the change since its > build recipe calls the custom 'make rpm' target and >

Re: [libvirt] [PATCH 1/6] qemu: capabilities: Always assume QEMU_CAPS_BOOTINDEX

2018-08-09 Thread Ján Tomko
On Thu, Aug 09, 2018 at 02:48:54PM +0200, Peter Krempa wrote: The field was added in qemu v0.13.0-rc0-731-g1ca4d09ae0 so all supported qemu versions now use it. There's a LOT of test fallout as we did not use capabilities close enough to upstream for many of our tests. Signed-off-by: Peter

Re: [libvirt] [PATCH] qemuxml2xmloutdata: Use more symlinks

2018-08-09 Thread Ján Tomko
On Thu, Aug 09, 2018 at 04:50:58PM +0200, Michal Privoznik wrote: There are couple of files that are the same in both qemuxml2argvdata and qemuxml2xmloutdata directories. Link them instead of having full copy. Signed-off-by: Michal Privoznik --- tests/qemuxml2xmloutdata/boot-floppy-q35.xml

Re: [libvirt] [PATCH] conf: rewrite filtering for capabilities lookup

2018-08-09 Thread Michal Privoznik
On 08/03/2018 04:28 PM, Daniel P. Berrangé wrote: > The virCapabilitiesDomainDataLookupInternal() is given a list of > parameters representing the desired domain characteristics. It then has > to look throught the capabilities to identify an acceptable match. > > The virCapsDomainDataCompare()

Re: [libvirt] [PATCH v2] qemu: qemuDomainChangeNet: validity checks should be done before XML autocompletion

2018-08-09 Thread Ján Tomko
On Thu, Aug 09, 2018 at 11:21:52AM +0200, Katerina Koukiou wrote: This patch ensures that changes in attributes of interfaces will be emit errors accept if they are missing from the XML. Previously we were falsely reporting successfull updates, because some *successful changed attributes got

Re: [libvirt] [PATCH] network: restrict usage of port management APIs

2018-08-09 Thread Laine Stump
On 08/09/2018 03:58 AM, Daniel P. Berrangé wrote: > On Wed, Aug 08, 2018 at 11:41:23PM -0400, Laine Stump wrote: >> On 08/08/2018 11:46 AM, Daniel P. Berrangé wrote: >>> The port allocation APIs are currently called unconditionally for all >>> types of NIC, but (mostly) only do anything for NICs

Re: [libvirt] [PATCH 5/6] qemu: command: Don't format -device isa-fdc, ... twice with two floppy drives

2018-08-09 Thread Ján Tomko
On Thu, Aug 09, 2018 at 02:48:58PM +0200, Peter Krempa wrote: Fix regression introduced in 42fd5a58adb. With q35 machine type which Please wrap the commit id in <> or rephrase the sentence to have the commit id separated by spaces. requires the explicitly specified FDC we'd format two

[libvirt] [PATCH] qemuxml2xmloutdata: Use more symlinks

2018-08-09 Thread Michal Privoznik
There are couple of files that are the same in both qemuxml2argvdata and qemuxml2xmloutdata directories. Link them instead of having full copy. Signed-off-by: Michal Privoznik --- tests/qemuxml2xmloutdata/boot-floppy-q35.xml | 33 +---

Re: [libvirt] [PATCH] qemu:Fix snapshot creating with vm xml persistent

2018-08-09 Thread Michal Privoznik
On 08/07/2018 01:46 PM, Bobo Du wrote: > the vm xml will be existed when the vm is undefined after started. > blockcommit interface also has the bug with above. > Step1:prepare a vm,eg:test1,start it and undefined > Step2: virsh snapshot-create-as test1 --disk-only --no-metadata > Step3:ls

  1   2   >