Re: [libvirt] [PATCH 2/8] tests: Use DO_TEST_CAPS_*() for Intel IOMMU

2019-05-22 Thread Andrea Bolognani
On Tue, 2019-05-21 at 16:15 +0200, Ján Tomko wrote: > On Mon, May 20, 2019 at 01:37:47PM +0200, Andrea Bolognani wrote: > > diff --git a/tests/qemuxml2argvdata/intel-iommu-machine.xml > > b/tests/qemuxml2argvdata/intel-iommu-machine.xml > > index 90aba16156..85027cd938 100644 > > ---

Re: [libvirt] (Dropping) OOM Handling in libvirt

2019-05-22 Thread Markus Armbruster
Andrea Bolognani writes: > On Mon, 2019-05-13 at 13:19 +0100, Daniel P. Berrangé wrote: >> On Mon, May 13, 2019 at 02:00:28PM +0200, Andrea Bolognani wrote: >> > One possible complication is that we would not be able to use any >> > of the GLib types in our public API... I think the way we

Re: [libvirt] (Dropping) OOM Handling in libvirt

2019-05-22 Thread Markus Armbruster
Eric Blake writes: > On 5/13/19 8:28 AM, Michal Privoznik wrote: >> On 5/13/19 12:17 PM, Daniel P. Berrangé wrote: >>> This is a long mail about ENOMEM (OOM) handling in libvirt. The executive >>> summary is that it is not worth the maint cost because: >>> > >>> The long answer follows... >> >>

Re: [libvirt] [PATCH v5 02/24] conf: introduce virNetworkPortDefPtr struct and XML support

2019-05-22 Thread Daniel P . Berrangé
On Mon, May 20, 2019 at 09:44:04PM -0400, Laine Stump wrote: > On 5/14/19 11:48 AM, Daniel P. Berrangé wrote: > > Introduce a virNetworkPortDefPtr struct to represent the data associated > > with a virtual network port. Add APIs for parsing/formatting XML docs > > with the data. > > > >

[libvirt] [PATCH 1/3] network: pull global chain init into separate method

2019-05-22 Thread Daniel P . Berrangé
Pull the logic for creating global iptables chains into a separate method and protect its invokation with virOnce, to make it possible to reuse it in non-startup paths. Signed-off-by: Daniel P. Berrangé --- src/network/bridge_driver_linux.c | 39 +++ 1 file changed,

[libvirt] [PATCH 2/3] network: add more debugging of firewall chain creation

2019-05-22 Thread Daniel P . Berrangé
Signed-off-by: Daniel P. Berrangé --- src/network/bridge_driver_linux.c | 18 -- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/network/bridge_driver_linux.c b/src/network/bridge_driver_linux.c index 0d849173b2..2b29363f3c 100644 ---

[libvirt] [PATCH 1/2] qemu: Set emulator thread scheduler only after QEMU starts

2019-05-22 Thread Martin Kletzander
If the scheduler is set before vCPU0 cannot be moved into its cpu,cpuacct cgroup. While it is not yet known whether this is a bug or not, it makes sense for us to do that later as otherwise the scheduler would be inherited by vCPU and I/O Threads even when they do not have any such setting

[libvirt] [PATCH 0/2] qemu: Fix for emulatorsched

2019-05-22 Thread Martin Kletzander
Partially-related-to: https://bugzilla.redhat.com/show_bug.cgi?id=1712781 Martin Kletzander (2): qemu: Set emulator thread scheduler only after QEMU starts docs: Add emulatorsched fix info to news.xml docs/news.xml | 12 src/qemu/qemu_process.c | 10 +- 2

Re: [libvirt] [PATCH v5 02/24] conf: introduce virNetworkPortDefPtr struct and XML support

2019-05-22 Thread Daniel P . Berrangé
On Tue, May 21, 2019 at 10:46:27AM -0400, Laine Stump wrote: > On 5/20/19 9:44 PM, Laine Stump wrote: > > On 5/14/19 11:48 AM, Daniel P. Berrangé wrote: > > > Introduce a virNetworkPortDefPtr struct to represent the data associated > > > with a virtual network port. Add APIs for parsing/formatting

[libvirt] [PATCH 3/3] network: delay global firewall setup if no networks are running

2019-05-22 Thread Daniel P . Berrangé
Creating firewall rules for the virtual networks causes the kernel to load the conntrack module. This imposes a significant performance penalty on Linux network traffic. Thus we want to only take that hit if we actually have virtual networks running. We need to create global firewall rules during

Re: [libvirt] (Dropping) OOM Handling in libvirt

2019-05-22 Thread Daniel P . Berrangé
On Wed, May 22, 2019 at 10:08:44AM +0200, Markus Armbruster wrote: > Andrea Bolognani writes: > > > On Mon, 2019-05-13 at 13:19 +0100, Daniel P. Berrangé wrote: > >> On Mon, May 13, 2019 at 02:00:28PM +0200, Andrea Bolognani wrote: > >> > One possible complication is that we would not be able to

Re: [libvirt] [PATCH 2/8] tests: Use DO_TEST_CAPS_*() for Intel IOMMU

2019-05-22 Thread Ján Tomko
On Wed, May 22, 2019 at 10:33:39AM +0200, Andrea Bolognani wrote: On Tue, 2019-05-21 at 16:15 +0200, Ján Tomko wrote: On Mon, May 20, 2019 at 01:37:47PM +0200, Andrea Bolognani wrote: > diff --git a/tests/qemuxml2argvdata/intel-iommu-machine.xml b/tests/qemuxml2argvdata/intel-iommu-machine.xml

[libvirt] [PATCH 2/2] docs: Add emulatorsched fix info to news.xml

2019-05-22 Thread Martin Kletzander
Signed-off-by: Martin Kletzander --- docs/news.xml | 12 1 file changed, 12 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index 2ecb835e45f0..9922cd4de0e2 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -45,6 +45,18 @@ + + +

Re: [libvirt] [PATCH 2/8] tests: Use DO_TEST_CAPS_*() for Intel IOMMU

2019-05-22 Thread Peter Krempa
On Wed, May 22, 2019 at 12:34:18 +0200, Ján Tomko wrote: > On Wed, May 22, 2019 at 10:33:39AM +0200, Andrea Bolognani wrote: > > On Tue, 2019-05-21 at 16:15 +0200, Ján Tomko wrote: > > > On Mon, May 20, 2019 at 01:37:47PM +0200, Andrea Bolognani wrote: > > > > diff --git

[libvirt] [PATCH 0/3] network: Delay creating private chains until starting network

2019-05-22 Thread Daniel P . Berrangé
This is an series to delay creating libvirt firewall chains if nothing needs them during startup. Daniel P. Berrangé (3): network: pull global chain init into separate method network: add more debugging of firewall chain creation network: delay global firewall setup if no networks are

Re: [libvirt] [PATCH 2/8] tests: Use DO_TEST_CAPS_*() for Intel IOMMU

2019-05-22 Thread Andrea Bolognani
On Wed, 2019-05-22 at 13:45 +0200, Peter Krempa wrote: > On Wed, May 22, 2019 at 12:34:18 +0200, Ján Tomko wrote: > > On Wed, May 22, 2019 at 10:33:39AM +0200, Andrea Bolognani wrote: > > > Personally I like the idea of using the same input file for different > > > DO_TEST*() calls, highlighting

Re: [libvirt] [PATCH 1/3] network: pull global chain init into separate method

2019-05-22 Thread Eric Blake
On 5/22/19 7:29 AM, Daniel P. Berrangé wrote: > Pull the logic for creating global iptables chains into a separate > method and protect its invokation with virOnce, to make it possible invocation > to reuse it in non-startup paths. > > Signed-off-by: Daniel P. Berrangé > --- >

Re: [libvirt] [PATCH v5 02/24] conf: introduce virNetworkPortDefPtr struct and XML support

2019-05-22 Thread Laine Stump
On 5/22/19 6:29 AM, Daniel P. Berrangé wrote: On Mon, May 20, 2019 at 09:44:04PM -0400, Laine Stump wrote: On 5/14/19 11:48 AM, Daniel P. Berrangé wrote: Introduce a virNetworkPortDefPtr struct to represent the data associated with a virtual network port. Add APIs for parsing/formatting XML

Re: [libvirt] [PATCH 1/2] Introduce virDomainDeviceIterate

2019-05-22 Thread Andrea Bolognani
On Tue, 2019-05-21 at 16:25 +0200, Ján Tomko wrote: [...] > @@ -5793,10 +5806,9 @@ virDomainDefPostParse(virDomainDefPtr def, > } > > /* iterate the devices */ > -ret = virDomainDeviceInfoIterateInternal(def, > - >

Re: [libvirt] [PATCH 4/8] conf: Allow NULL for virDomainDeviceInfoCallback

2019-05-22 Thread Andrea Bolognani
On Wed, 2019-05-22 at 16:12 +0200, Ján Tomko wrote: > On Wed, May 22, 2019 at 03:36:59PM +0200, Andrea Bolognani wrote: > > I don't much like the idea of adding a separate function that does > > almost the same thing but not quite, because that will ultimately > > result in the same situation we

Re: [libvirt] [PATCH 2/2] Introduce DOMAIN_DEVICE_ITERATE_MISSING_INFO

2019-05-22 Thread Andrea Bolognani
On Tue, 2019-05-21 at 16:26 +0200, Ján Tomko wrote: > Rename the DOMAIN_DEVICE_ITERATE_GRAPHICS flag. > It was introduced by commit dd45c2710f6fd2d4f8a47f97960532d0e0091e7d > with the intention to run the Validate callback even on the graphics > device. > > However, enumerating every single

Re: [libvirt] [PATCH 4/8] conf: Allow NULL for virDomainDeviceInfoCallback

2019-05-22 Thread Ján Tomko
On Wed, May 22, 2019 at 03:36:59PM +0200, Andrea Bolognani wrote: On Tue, 2019-05-21 at 16:28 +0200, Ján Tomko wrote: On Mon, May 20, 2019 at 03:24:06PM +0200, Andrea Bolognani wrote: > On Mon, 2019-05-20 at 14:59 +0200, Ján Tomko wrote: > > Of course, there is a huge overlap between iterating

Re: [libvirt] [PATCH 4/8] conf: Allow NULL for virDomainDeviceInfoCallback

2019-05-22 Thread Andrea Bolognani
On Tue, 2019-05-21 at 16:28 +0200, Ján Tomko wrote: > On Mon, May 20, 2019 at 03:24:06PM +0200, Andrea Bolognani wrote: > > On Mon, 2019-05-20 at 14:59 +0200, Ján Tomko wrote: > > > Of course, there is a huge overlap between iterating over all devices > > > and just those with an info, but since

Re: [libvirt] [PATCH 1/3] network: pull global chain init into separate method

2019-05-22 Thread Jim Fehlig
On 5/22/19 6:29 AM, Daniel P. Berrangé wrote: Pull the logic for creating global iptables chains into a separate method and protect its invokation with virOnce, to make it possible to reuse it in non-startup paths. Signed-off-by: Daniel P. Berrangé --- src/network/bridge_driver_linux.c | 39

Re: [libvirt] [PATCH 3/3] network: delay global firewall setup if no networks are running

2019-05-22 Thread Jim Fehlig
On 5/22/19 6:29 AM, Daniel P. Berrangé wrote: Creating firewall rules for the virtual networks causes the kernel to load the conntrack module. This imposes a significant performance penalty on Linux network traffic. Thus we want to only take that hit if we actually have virtual networks running.

[libvirt] Increasing TasksMax when creating machines via systemd

2019-05-22 Thread Jim Fehlig
Hi All, I recently received an internal bug report of VM "crashing" due to hitting thread limits. Seems there was an assert in pthread_create within the VM when hitting the limit enforced by pids controller on the host Apr 28 07:45:46 lpcomp02007 kernel: cgroup: fork rejected by pids

[libvirt] [PATCH 14/16] examples: Organize C examples into categories

2019-05-22 Thread Andrea Bolognani
Most C examples live in their own directory, which seems a bit unnecessary especially considering that all virt-admin related examples share a single admin/ directory. Reorganize non-admin C examples in two categories: domain/ for those that act on a domain, and misc/ for everything else.

[libvirt] [PATCH 15/16] examples: Rework C examples installation

2019-05-22 Thread Andrea Bolognani
Now that all C examples are neatly sorted into only three categories, getting rid of our custom installation machinery and replacing it with the standard autotools mechanism finally becomes feasible. Signed-off-by: Andrea Bolognani --- examples/Makefile.am | 44

[libvirt] [PATCH 16/16] examples: Group all C programs together

2019-05-22 Thread Andrea Bolognani
All other examples are organized using the either the format/ or the format/category/ hierarchy already, and grouping all C programs together removes the last remaining outliers. Signed-off-by: Andrea Bolognani --- .gitignore | 30 - examples/Makefile.am

[libvirt] [PATCH 10/16] examples: Install Polkit examples

2019-05-22 Thread Andrea Bolognani
Right now we install the files in RPMs only, and we include them in the -daemon package which is probably not the best option either. Start installing them via autotools; the RPMs will get them automatically in the -docs package. Signed-off-by: Andrea Bolognani --- examples/Makefile.am | 9

[libvirt] [PATCH 08/16] examples: Drop unnecessary $(mkinstalldirs) call

2019-05-22 Thread Andrea Bolognani
$(mkinstalldirs) works like 'mkdir -p' in that it will create all the necessary parts of the path leading up to the actual directory, which means creating $(examplesdir) beforehand is not necessary. Signed-off-by: Andrea Bolognani --- examples/Makefile.am | 1 - 1 file changed, 1 deletion(-)

[libvirt] [PATCH 11/16] examples: Install SystemTap examples

2019-05-22 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani --- examples/Makefile.am | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/examples/Makefile.am b/examples/Makefile.am index 4122219e22..7a15decc00 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -22,10 +22,14 @@

[libvirt] [PATCH 00/16] examples: Install more files and tidy up

2019-05-22 Thread Andrea Bolognani
This series changes our install procedure so that we install all available examples on the target system; in the process, it also removes all custom shell code from the installation procedure, replacing it with standard autotools usage, and fixes a few admittedly very minor issues. Andrea

[libvirt] [PATCH 01/16] spec: Don't install libvirt-api.xml as documentation

2019-05-22 Thread Andrea Bolognani
We already install the file, along with its driver-specific counterparts, into ${datadir}/libvirt/api/ where language bindings will actually look for them. Signed-off-by: Andrea Bolognani --- libvirt.spec.in | 2 -- 1 file changed, 2 deletions(-) diff --git a/libvirt.spec.in b/libvirt.spec.in

[libvirt] [PATCH 06/16] examples: Move $(STATIC_BINARIES) to $(AM_LDFLAGS)

2019-05-22 Thread Andrea Bolognani
$(LDADD) is for object files that should be added during linking, not for options that should be passed to the linker: that's what $(AM_LDFLAGS) is for. Signed-off-by: Andrea Bolognani --- examples/Makefile.am | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git

[libvirt] [PATCH 13/16] examples: Move and install shell examples

2019-05-22 Thread Andrea Bolognani
The virt-lxc-convert shell script is at this point the only example we don't install on the target system. Create a sh/ subdirectory, following the example set by the existing polkit/, systemtap/ and xml/, and move the script there; then add rules that will install all example shell scripts as

[libvirt] [PATCH 07/16] examples: Move $(WARN_CFLAGS) to $(AM_CFLAGS)

2019-05-22 Thread Andrea Bolognani
$(AM_CPPFLAGS) is for passing options to the C preprocessor, not the C compiler, and the stuff in $(WARN_CFLAGS) belongs to the latter category. Signed-off-by: Andrea Bolognani --- examples/Makefile.am | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/Makefile.am

[libvirt] [PATCH 05/16] examples: Don't look for headers in $(top_srcdir)

2019-05-22 Thread Andrea Bolognani
The C programs in this directory are supposed to be only using public functions, so having $(top_srcdir) in the header search path is unnecessary at best and actively harmful at worst. Signed-off-by: Andrea Bolognani --- examples/Makefile.am | 1 - 1 file changed, 1 deletion(-) diff --git

[libvirt] [PATCH 02/16] examples: Drop object_events_event_test_CFLAGS

2019-05-22 Thread Andrea Bolognani
$(AM_CPPFLAGS) already includes $(WARN_CFLAGS), so this is not doing anything useful. Signed-off-by: Andrea Bolognani --- examples/Makefile.am | 3 --- 1 file changed, 3 deletions(-) diff --git a/examples/Makefile.am b/examples/Makefile.am index 11c9f44917..9a32fd5d4a 100644 ---

[libvirt] [PATCH 09/16] examples: Install nwfilters without shell scripting

2019-05-22 Thread Andrea Bolognani
We're doing nothing more than copying files to a target directory, so we don't need any custom shell commands and can just use the standard autotools data installation support instead. Signed-off-by: Andrea Bolognani --- examples/Makefile.am | 23 --- 1 file changed, 4

[libvirt] [PATCH 03/16] examples: Reformat $(AM_CPPFLAGS) and $(LDADDS)

2019-05-22 Thread Andrea Bolognani
This will make further changes easier to review. Signed-off-by: Andrea Bolognani --- examples/Makefile.am | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/examples/Makefile.am b/examples/Makefile.am index 9a32fd5d4a..8f50149812 100644 ---

[libvirt] [PATCH 04/16] examples: Remove $(WARN_CFLAGS) from $(LDADD)

2019-05-22 Thread Andrea Bolognani
$(WARN_CFLAGS) contains options intended for the compiler, whereas $(LDADD) is supposed to list additional objects required during linking, so the former clearly doesn't belong in the latter. Signed-off-by: Andrea Bolognani --- examples/Makefile.am | 1 - 1 file changed, 1 deletion(-) diff

[libvirt] [PATCH 12/16] examples: Install remaining XML examples

2019-05-22 Thread Andrea Bolognani
We already install nwfilters separately. Signed-off-by: Andrea Bolognani --- examples/Makefile.am | 19 +-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/examples/Makefile.am b/examples/Makefile.am index 7a15decc00..c0d0100c9f 100644 --- a/examples/Makefile.am

[libvirt] [PATCH] test_driver: implement virDomainInterfaceAddresses

2019-05-22 Thread Ilias Stamatis
Ignore @source in the case of the test driver and return fixed private IPv4 addresses for all the interfaces defined in the domain. Signed-off-by: Ilias Stamatis --- The default config of the test driver has no guest interfaces defined, so this must be tested with a custom config. Maybe it

Re: [libvirt] [PATCH 2/3] network: add more debugging of firewall chain creation

2019-05-22 Thread Jim Fehlig
On 5/22/19 6:29 AM, Daniel P. Berrangé wrote: Signed-off-by: Daniel P. Berrangé --- src/network/bridge_driver_linux.c | 18 -- 1 file changed, 16 insertions(+), 2 deletions(-) The additional debug messages proved helpful while testing the patches! Reviewed-by: Jim Fehlig