Re: [PATCH 4/5] doc: rng schemas and html doc for rbd namespace attribute

2020-04-16 Thread Han Han
On Thu, Apr 16, 2020 at 9:12 PM Jason Dillaman wrote: > On Wed, Apr 8, 2020 at 5:06 AM Han Han wrote: > >> Signed-off-by: Han Han >> --- >> docs/formatdomain.html.in | 5 + >> docs/schemas/domaincommon.rng | 3 +++ >> 2 files changed, 8 insertions(+) >> >> diff --git

[PATCH v1 2/7] qemu: Implement the CFPC pSeries feature

2020-04-16 Thread Daniel Henrique Barboza
This patch adds the implementation of the CFPC pSeries feature, using the QEMU_CAPS_MACHINE_PSERIES_CAP_CFPC capability added in the previous patch. CPFC can have the values "broken", "workaround" or "fixed". Extra code is required to handle it since it's not a regular tristate capability. This

[PATCH v1 7/7] news: Update for the recent added pSeries features

2020-04-16 Thread Daniel Henrique Barboza
Update news.xml to inform about the availability of CFPC, SBBC and IBS features. Signed-off-by: Daniel Henrique Barboza --- docs/news.xml | 10 ++ 1 file changed, 10 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index 4d0efd4219..2066f0eef3 100644 --- a/docs/news.xml +++

[PATCH v1 6/7] qemu: Implement the IBS pSeries feature

2020-04-16 Thread Daniel Henrique Barboza
This patch adds the implementation of the IBS pSeries feature, using the QEMU_CAPS_MACHINE_PSERIES_CAP_IBS capability added in the previous patch. IBS can have the following values: "broken", "workaround", "fixed-ibs", "fixed-ccd" and "fixed-na". This is the XML format for the cap:

[PATCH v1 1/7] qemu: Add capability for CFPC pSeries feature

2020-04-16 Thread Daniel Henrique Barboza
CFPC (Cache Flush on Privilege Change) is one of the capabilities added to QEMU to mitigate Spectre vulnerabilities in Power chips. It was implemented in QEMU 2.12 by commit 6898aed77f46. This capability is still used today due to differences in how the host setup (hardware and firmware/kernel)

[PATCH v1 5/7] qemu: Add capability for IBS pSeries feature

2020-04-16 Thread Daniel Henrique Barboza
IBS (Indirect Branch Speculation) is the last capability added in QEMU 2.12 related to Spectre mitigation for Power. It was added in commit 4be8d4e7d935. This patch introduces it as QEMU_CAPS_MACHINE_PSERIES_CAP_IBS. Like CFPC and SBBC, users might want to tune in IBS based on their HW and guest

[PATCH v1 4/7] qemu: Implement the SBBC pSeries feature

2020-04-16 Thread Daniel Henrique Barboza
This patch adds the implementation of the SBBC pSeries feature, using the QEMU_CAPS_MACHINE_PSERIES_CAP_SBBC capability added in the previous patch. Like the previously added CPFC feature, SBBC can have the values "broken", "workaround" or "fixed". Extra code is required to handle it since it's

[PATCH v1 0/7] add Spectre related PowerPC features

2020-04-16 Thread Daniel Henrique Barboza
Hi, This series implements 3 Spectre related PowerPC features that were added back in QEMU 2.12: - CFPC: Cache Flush on Privilege Change - SBBC: Speculation Barrier Bounds Checking - IBS: Indirect Branch Speculation These options aren't much of a problem for users using latest hardware and

[PATCH v1 3/7] qemu: Add capability for SBBC pSeries feature

2020-04-16 Thread Daniel Henrique Barboza
SBBC (Speculation Barrier Bounds Checking) is another capability related to Spectre mitigation efforts in Power processors. It was implemented in QEMU 2.12 by commit 09114fd81799. This patch introduces it as QEMU_CAPS_MACHINE_PSERIES_CAP_SBBC to be implemented in the next patch. Like the case

Re: [libvirt PATCH] docs: kbase: add a page about debugging

2020-04-16 Thread Andrea Bolognani
On Wed, 2020-04-15 at 17:10 +0200, Ján Tomko wrote: > Migrate the following wiki articles: > https://wiki.libvirt.org/page/DebugLogs > https://wiki.libvirt.org/page/Debugging > > With the syntax changed to rST and rewrapped. > > Signed-off-by: Ján Tomko > --- > I might've changed an article or

Re: [libvirt PATCH] docs: Add section about code blocks to styleguide.rst

2020-04-16 Thread Daniel P . Berrangé
On Thu, Apr 16, 2020 at 06:38:25PM +0200, Andrea Bolognani wrote: > Signed-off-by: Andrea Bolognani > --- > docs/styleguide.rst | 12 > 1 file changed, 12 insertions(+) Reviewed-by: Daniel P. Berrangé Regards, Daniel -- |: https://berrange.com -o-

Re: [libvirt PATCH 1/4] docs: Use consistent style in pci-addresses.rst

2020-04-16 Thread Andrea Bolognani
On Thu, 2020-04-16 at 12:38 +0100, Daniel P. Berrangé wrote: > On Thu, Apr 16, 2020 at 01:35:57PM +0200, Andrea Bolognani wrote: > > On Thu, 2020-04-16 at 12:58 +0200, Ján Tomko wrote: > > > On a Wednesday in 2020, Andrea Bolognani wrote: > > > > Indent all code snippets by the same number of

[libvirt PATCH] docs: Add section about code blocks to styleguide.rst

2020-04-16 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani --- docs/styleguide.rst | 12 1 file changed, 12 insertions(+) diff --git a/docs/styleguide.rst b/docs/styleguide.rst index 2998e90963..3162868fb7 100644 --- a/docs/styleguide.rst +++ b/docs/styleguide.rst @@ -24,6 +24,18 @@ Whitespace Blocks

Re: [PATCH 2/2] docs: Improve zPCI section in pci-addresses.rst

2020-04-16 Thread Andrea Bolognani
On Thu, 2020-04-16 at 17:56 +0200, Boris Fiuczynski wrote: > Note that the PCI bridge is not visible in the guest; s390x always has a flat > -topology. > +topology. Also ``fid`` does not define slot or function of the PCI address. This sentence is unnecessary, since you explain what fid does

Re: [PATCH 2/2] docs: Improve zPCI section in pci-addresses.rst

2020-04-16 Thread Cornelia Huck
On Thu, 16 Apr 2020 17:56:18 +0200 Boris Fiuczynski wrote: > Improving the zPCI example by choosing more distinct values and > adding explanation for fid. > > Signed-off-by: Boris Fiuczynski > --- > docs/pci-addresses.rst | 15 --- > 1 file changed, 8 insertions(+), 7 deletions(-)

Re: [PATCH] conf: Trivial comment fix

2020-04-16 Thread Leonid Bloch
On Thu, Apr 16, 2020 at 5:39 PM Andrea Bolognani wrote: > On Thu, 2020-04-16 at 14:24 +0300, Leonid Bloch wrote: > > Trivial comment fix, reflecting the changes in > > 4ee2b31804f4d3477ee83bac28d9991afb0c3393. > > > > Signed-off-by: Leonid Bloch > > --- > > src/conf/domain_conf.h | 2 +- > > 1

Re: [PATCH 1/2] docs: Update introduction in pci-addresses.rst

2020-04-16 Thread Cornelia Huck
On Thu, 16 Apr 2020 17:56:17 +0200 Boris Fiuczynski wrote: > Changing the introduction to bring the idea of this document better across. > > Signed-off-by: Andrea Bolognani > Reviewed-by: Boris Fiuczynski > --- > docs/pci-addresses.rst | 9 ++--- > 1 file changed, 6 insertions(+), 3

[PATCH 2/2] Avoid unnecessary error messages handling udev events

2020-04-16 Thread Mark Asselstine
The udev monitor thread "udevEventHandleThread()" will lag the actual/real view of devices in sysfs as it serially processes udev monitor events. So for instance if you were to run the following cmd to create a new veth pair and rename one of the veth endpoints you might see the following monitor

[PATCH 1/2] node_device_udev: handle move events

2020-04-16 Thread Mark Asselstine
It is possible and common to rename some devices, this is especially true for ethernet devices such as veth pairs. In the udevEventHandleThread() we will be notified of this change but currently we only process "add", "change" and "remove" events. Renaming a device such as above results in a

[PATCH 1/2] docs: Update introduction in pci-addresses.rst

2020-04-16 Thread Boris Fiuczynski
Changing the introduction to bring the idea of this document better across. Signed-off-by: Andrea Bolognani Reviewed-by: Boris Fiuczynski --- docs/pci-addresses.rst | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/pci-addresses.rst b/docs/pci-addresses.rst

[PATCH 0/2] docs: Further adjustments to pci-addresses.rst

2020-04-16 Thread Boris Fiuczynski
Andrea Bolognani (1): docs: Update introduction in pci-addresses.rst Boris Fiuczynski (2): docs: Improve zPCI section in pci-addresses.rst docs/pci-addresses.rst | 24 ++-- 1 file changed, 14 insertions(+), 10 deletions(-) -- 2.25.1

[PATCH 2/2] docs: Improve zPCI section in pci-addresses.rst

2020-04-16 Thread Boris Fiuczynski
Improving the zPCI example by choosing more distinct values and adding explanation for fid. Signed-off-by: Boris Fiuczynski --- docs/pci-addresses.rst | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/docs/pci-addresses.rst b/docs/pci-addresses.rst index

Re: [libvirt PATCH 0/3] docs: misc fixes to static asset handling

2020-04-16 Thread Laine Stump
On 4/16/20 7:53 AM, Daniel P. Berrangé wrote: When looking at switching libvirt.org to use files output from gitlab CI I discovered some missing static assets Daniel P. Berrangé (3): docs: fix handling of static assets in build dir docs: add missing files to static asset list docs:

Re: [libvirt PATCH 3/3] qemu: block: external snapshot-delete implementation for straightforward cases

2020-04-16 Thread Pavel Mores
On Fri, Apr 03, 2020 at 05:56:59PM +0200, Pavel Mores wrote: > On Tue, Mar 31, 2020 at 12:06:15PM +0200, Peter Krempa wrote: > > On Tue, Mar 31, 2020 at 11:18:29 +0200, Pavel Mores wrote: > > > +} > > > + > > > +if (flags & VIR_DOMAIN_SNAPSHOT_DELETE_CHILDREN) > > > +

[PATCH] bhyve: add missing param to virDomainPCIAddressBusSetModel

2020-04-16 Thread Daniel P . Berrangé
Fixes build error introduced in commit aa15e9259f1f246e69fb9742581ced720c88695d Author: Laine Stump Date: Sun Apr 5 22:40:37 2020 -0400 qemu/conf: set HOTPLUGGABLE connect flag during PCI address set init Signed-off-by: Daniel P. Berrangé --- Pushed as a CI fix

Re: [PATCH] docs: add zpci information to pci-addresses.rst

2020-04-16 Thread Boris Fiuczynski
On 4/16/20 2:21 PM, Andrea Bolognani wrote: On Thu, 2020-04-16 at 11:46 +0200, Boris Fiuczynski wrote: On 4/15/20 6:38 PM, Andrea Bolognani wrote: The idea behind it was to show users that they shouldn't expect the address in the domain XML to match the one in the guest OS, with a few

Re: [PATCH] conf: Trivial comment fix

2020-04-16 Thread Andrea Bolognani
On Thu, 2020-04-16 at 14:24 +0300, Leonid Bloch wrote: > Trivial comment fix, reflecting the changes in > 4ee2b31804f4d3477ee83bac28d9991afb0c3393. > > Signed-off-by: Leonid Bloch > --- > src/conf/domain_conf.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Patch Reviewed-by:

Re: [libvirt PATCH] docs: fix mistaken description of the read-only socket units

2020-04-16 Thread Andrea Bolognani
On Thu, 2020-04-16 at 14:19 +0100, Daniel P. Berrangé wrote: > Signed-off-by: Daniel P. Berrangé > --- > docs/daemons.rst | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) Reviewed-by: Andrea Bolognani -- Andrea Bolognani / Red Hat / Virtualization

Re: [RFC] Adding docker driver to libvirt

2020-04-16 Thread Dmitry Nesterenko
What format does the API take ? Is it a plain REST API we will call via the existing libcurl dependancy in libvirt ? Yes of course. It is just what I think - plain REST API by https requests and already existing in project libcurl. Dmitry From: Daniel P.

Re: [RFC] Adding docker driver to libvirt

2020-04-16 Thread Daniel P . Berrangé
On Thu, Apr 16, 2020 at 01:47:39PM +, Dmitry Nesterenko wrote: > > > The container based drivers in libvirt have been a bit of a square-peg / > > round-hole thing. Given that we have a couple of them already (LXC, > > OpenVZ, VZ), I wouldn't say no to adding a docker one too. The only > >

[libvirt PATCH] util: Fix virDaemonForkIntoBackground

2020-04-16 Thread Jiri Denemark
This commit partially reverts commit c360ea28dc267802690e129fbad08ca2f22a44e9 Refs: v6.2.0-rc1-1-gc360ea28dc Author: Rafael Fonseca AuthorDate: Fri Mar 27 18:40:47 2020 +0100 Commit: Michal Prívozník CommitDate: Mon Mar 30 09:48:22 2020 +0200 util:

Re: [RFC] Adding docker driver to libvirt

2020-04-16 Thread Dmitry Nesterenko
> The container based drivers in libvirt have been a bit of a square-peg / > round-hole thing. Given that we have a couple of them already (LXC, > OpenVZ, VZ), I wouldn't say no to adding a docker one too. The only > real issue is having people willing to do the work to implement it and > then

Re: [PATCH 2/5] qemu: Add free and copy function for qemuDomainJobInfo and use it

2020-04-16 Thread Eric Blake
On 4/16/20 4:55 AM, Peter Krempa wrote: In order to add a string to qemuDomainJobInfo we must ensure that it's freed and copied properly. Add helpers to copy and free the structure and adjust the code to use them properly for the new semantics. Additionally also allocation is changed to g_new0

Re: [PATCH 1/5] remote: remoteDispatchDomainGetJobStats: Encode typed parameter strings

2020-04-16 Thread Eric Blake
On 4/16/20 4:55 AM, Peter Krempa wrote: String typed parameter values were introduced in v0.9.7-30-g40624d32fb. virDomainGetJobStats was introduced in v1.0.2-239-g4dd00f4238 so all clients already support typed parameter stings at that time thus we can enable it unconditionally. Signed-off-by:

Re: [PATCH] qemuDomainDefPostParse: Fail if unable to fill machine type

2020-04-16 Thread Pavel Mores
On Thu, Apr 16, 2020 at 02:33:33PM +0200, Michal Privoznik wrote: > Previously, we used virCapabilitiesDomainDataLookup() to fill > machine type in post parse callback if none was provided in the > domain XML. If machine type couldn't be filled in an error was > reported. After 4a4132b4625 we've

[libvirt PATCH] docs: fix mistaken description of the read-only socket units

2020-04-16 Thread Daniel P . Berrangé
Signed-off-by: Daniel P. Berrangé --- docs/daemons.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/daemons.rst b/docs/daemons.rst index 13c244de7b..e0b95105e4 100644 --- a/docs/daemons.rst +++ b/docs/daemons.rst @@ -145,7 +145,7 @@ Libvirt ships a number of

Re: [PATCH 4/5] doc: rng schemas and html doc for rbd namespace attribute

2020-04-16 Thread Jason Dillaman
On Wed, Apr 8, 2020 at 5:06 AM Han Han wrote: > Signed-off-by: Han Han > --- > docs/formatdomain.html.in | 5 + > docs/schemas/domaincommon.rng | 3 +++ > 2 files changed, 8 insertions(+) > > diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in > index d56600dc..06e1a7ee

[PATCH] qemuDomainDefPostParse: Fail if unable to fill machine type

2020-04-16 Thread Michal Privoznik
Previously, we used virCapabilitiesDomainDataLookup() to fill machine type in post parse callback if none was provided in the domain XML. If machine type couldn't be filled in an error was reported. After 4a4132b4625 we've changed it to virQEMUCapsGetPreferredMachine() which returns NULL, but we

Re: [libvirt PATCH 4/4] docs: Remove one example from pci-addresses.rst

2020-04-16 Thread Andrea Bolognani
On Thu, 2020-04-16 at 12:29 +0200, Boris Fiuczynski wrote: > I suggest to use the zpci addressing from the removed example because it > outlines more clearly the differences in the parameters. > Something like the example below: > > For s390x machines, PCI addresses are handled yet differently.

Re: [PATCH] docs: add zpci information to pci-addresses.rst

2020-04-16 Thread Andrea Bolognani
On Thu, 2020-04-16 at 11:46 +0200, Boris Fiuczynski wrote: > On 4/15/20 6:38 PM, Andrea Bolognani wrote: > > The idea behind it was to show users that they shouldn't expect the > > address in the domain XML to match the one in the guest OS, with a > > few real-life examples to illustrate the

Re: [RFC] Adding docker driver to libvirt

2020-04-16 Thread Nikolay Shirokovskiy
Adding to cc again, now keeping mailing list On 15.04.2020 16:09, Daniel P. Berrangé wrote: > On Tue, Apr 14, 2020 at 09:56:24AM +0300, nshirokovskiy wrote: >> >> >> On 12.04.2020 12:39, Martin Kletzander wrote: >>> On Thu, Apr 09, 2020 at 03:30:11PM +0300, nshirokovskiy wrote: Hi, all.

Re: [libvirt PATCH 3/3] docs: remove old unused favicon file

2020-04-16 Thread Daniel P . Berrangé
On Thu, Apr 16, 2020 at 12:53:45PM +0100, Daniel P. Berrangé wrote: > The use of 32favicon.png was removed when the new favicons were > introduced in > > commit 40cb5581c4ace6c4a5b68990aaac4dff1b656054 > Author: Daniel P. Berrangé > Date: Wed Jul 26 18:22:11 2017 +0100 > > docs: add

[libvirt PATCH 3/3] docs: remove old unused favicon file

2020-04-16 Thread Daniel P . Berrangé
The use of 32favicon.png was removed when the new favicons were introduced in commit 40cb5581c4ace6c4a5b68990aaac4dff1b656054 Author: Daniel P. Berrangé Date: Wed Jul 26 18:22:11 2017 +0100 docs: add full set of "favicon" files to support modern clients Signed-off-by: Daniel P.

[libvirt PATCH 0/3] docs: misc fixes to static asset handling

2020-04-16 Thread Daniel P . Berrangé
When looking at switching libvirt.org to use files output from gitlab CI I discovered some missing static assets Daniel P. Berrangé (3): docs: fix handling of static assets in build dir docs: add missing files to static asset list docs: remove old unused favicon file docs/32favicon.png |

[libvirt PATCH 2/3] docs: add missing files to static asset list

2020-04-16 Thread Daniel P . Berrangé
The various favicon files were missing from the favicon list, so never installed, as was an example code diagram. Signed-off-by: Daniel P. Berrangé --- docs/Makefile.am | 10 ++ 1 file changed, 10 insertions(+) diff --git a/docs/Makefile.am b/docs/Makefile.am index

[libvirt PATCH 1/3] docs: fix handling of static assets in build dir

2020-04-16 Thread Daniel P . Berrangé
We previously added a hack to symlink CSS files from the source dir into the build dir, to allow the website to be browsed locally. We should have also done this for any images. This change merges several variables into one "$(assets)" so that we treat all static files in the root dir the same

Re: [libvirt PATCH 1/4] docs: Use consistent style in pci-addresses.rst

2020-04-16 Thread Daniel P . Berrangé
On Thu, Apr 16, 2020 at 01:35:57PM +0200, Andrea Bolognani wrote: > On Thu, 2020-04-16 at 12:58 +0200, Ján Tomko wrote: > > On a Wednesday in 2020, Andrea Bolognani wrote: > > > Indent all code snippets by the same number of spaces, and don't > > > embed the :: marker in the line preceding a code

Re: [libvirt PATCH 1/4] docs: Use consistent style in pci-addresses.rst

2020-04-16 Thread Andrea Bolognani
On Thu, 2020-04-16 at 12:58 +0200, Ján Tomko wrote: > On a Wednesday in 2020, Andrea Bolognani wrote: > > Indent all code snippets by the same number of spaces, and don't > > embed the :: marker in the line preceding a code block. > > But why? It's so ugly. I disagree, and find it much easier on

Re: [libvirt-php] libvirt_domain_interface_addresses causing segfault

2020-04-16 Thread Fernando Casas Schössow
Excellent and thanks again the rapid response. Fernando On jue, abr 16, 2020 at 1:22 PM, Michal Privoznik wrote: On 4/16/20 12:32 PM, Fernando Casas Schössow wrote: > Pushed fix for both problems. Michal

[PATCH] conf: Trivial comment fix

2020-04-16 Thread Leonid Bloch
Trivial comment fix, reflecting the changes in 4ee2b31804f4d3477ee83bac28d9991afb0c3393. Signed-off-by: Leonid Bloch --- src/conf/domain_conf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index aad3f82db7..7d8f1aa31b 100644

Re: [libvirt-php] libvirt_domain_interface_addresses causing segfault

2020-04-16 Thread Michal Privoznik
On 4/16/20 12:32 PM, Fernando Casas Schössow wrote: > Pushed fix for both problems. Michal

Re: [libvirt PATCH 1/4] docs: Use consistent style in pci-addresses.rst

2020-04-16 Thread Daniel P . Berrangé
On Thu, Apr 16, 2020 at 12:58:43PM +0200, Ján Tomko wrote: > On a Wednesday in 2020, Andrea Bolognani wrote: > > Indent all code snippets by the same number of spaces, and don't > > embed the :: marker in the line preceding a code block. > > But why? It's so ugly. That aligns with the style

FYI: upstream bug reporting now using https://gitlab.com/libvirt

2020-04-16 Thread Daniel P . Berrangé
In keeping with our general aim to consolidate libvirt project infrastructure services on GitLab, we now wish to have issues for upstream libvirt projects reported on the appropriate https://gitlab.com/libvirt/ repository issue tracker. For further details see: https://libvirt.org/bugs.html

Re: [libvirt PATCH 1/4] docs: Use consistent style in pci-addresses.rst

2020-04-16 Thread Ján Tomko
On a Wednesday in 2020, Andrea Bolognani wrote: Indent all code snippets by the same number of spaces, and don't embed the :: marker in the line preceding a code block. But why? It's so ugly. Jano This commit is best viewed with 'git show -w'. Signed-off-by: Andrea Bolognani ---

Re: [libvirt-php] libvirt_domain_interface_addresses() only returns only on IP address for NICs with multiple IPs

2020-04-16 Thread Michal Privoznik
On 4/16/20 9:08 AM, Fernando Casas Schössow wrote: Forgot to add the output of the equivalent virsh command for the same VM: Name MAC address Protocol Address --- lo 00:00:00:00:00:00 ipv4 127.0.0.1/8 lo

Re: [libvirt-php] libvirt_domain_interface_addresses causing segfault

2020-04-16 Thread Fernando Casas Schössow
That was fast! Thanks a lot Michal. Kind regards, Fernando On jue, abr 16, 2020 at 12:21 PM, Michal Privoznik wrote: On 4/16/20 12:08 AM, Fernando Casas Schössow wrote: I think I found the problem and it seems to affect only Windows guests. I'm not sure about the cause tough. Possible

Re: [libvirt PATCH 4/4] docs: Remove one example from pci-addresses.rst

2020-04-16 Thread Boris Fiuczynski
On 4/15/20 7:47 PM, Cornelia Huck wrote: On Wed, 15 Apr 2020 19:31:36 +0200 Andrea Bolognani wrote: The idea behind this document is to show, with actual examples, that users should not expect PCI addresses in the domain XML and in the guest OS to match. The first zPCI example already serves

Re: [libvirt-php] libvirt_domain_interface_addresses causing segfault

2020-04-16 Thread Michal Privoznik
On 4/16/20 12:08 AM, Fernando Casas Schössow wrote: I think I found the problem and it seems to affect only Windows guests. I'm not sure about the cause tough. Possible causes: 1- Network interface names containing white spaces. 2- One of the interfaces not reporting a MAC address.

[PATCH 3/5] API: Add VIR_DOMAIN_JOB_ERRMSG domain job statistics field

2020-04-16 Thread Peter Krempa
In some cases it's useful to report the error which caused the domain job to fail. Add an optional field for holding the error message so that it can be later retrieved from statistics of a completed job. Add the field name macro and code for extracting it in virsh. Signed-off-by: Peter Krempa

[PATCH 5/5] backup: Store error message for failed backups

2020-04-16 Thread Peter Krempa
If a backup job fails midway it's hard to figure out what happened as it's running asynchronous. Use the VIR_DOMAIN_JOB_ERRMSG job statistics field to pass through the error from the first failed backup-blockjob so that both the consumer of the virDomainGetJobStats and the corresponding event can

[PATCH 2/5] qemu: Add free and copy function for qemuDomainJobInfo and use it

2020-04-16 Thread Peter Krempa
In order to add a string to qemuDomainJobInfo we must ensure that it's freed and copied properly. Add helpers to copy and free the structure and adjust the code to use them properly for the new semantics. Additionally also allocation is changed to g_new0 as it includes the type and thus it's very

[PATCH 4/5] qemu: domain: Add 'errmsg' field to qemuDomainJobInfo

2020-04-16 Thread Peter Krempa
The field can be used by jobs to add an optional error message to a completed (failed) job. Signed-off-by: Peter Krempa --- src/qemu/qemu_domain.c | 3 +++ src/qemu/qemu_domain.h | 2 ++ 2 files changed, 5 insertions(+) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index

[PATCH 1/5] remote: remoteDispatchDomainGetJobStats: Encode typed parameter strings

2020-04-16 Thread Peter Krempa
String typed parameter values were introduced in v0.9.7-30-g40624d32fb. virDomainGetJobStats was introduced in v1.0.2-239-g4dd00f4238 so all clients already support typed parameter stings at that time thus we can enable it unconditionally. Signed-off-by: Peter Krempa ---

[PATCH 0/5] backup: Preserve error of failed backup job

2020-04-16 Thread Peter Krempa
Aid in problem identification by storing the error for users as it wasn't accessible besides from logs. Peter Krempa (5): remote: remoteDispatchDomainGetJobStats: Encode typed parameter strings qemu: Add free and copy function for qemuDomainJobInfo and use it API: Add

Re: [PATCH] docs: add zpci information to pci-addresses.rst

2020-04-16 Thread Boris Fiuczynski
On 4/15/20 6:38 PM, Andrea Bolognani wrote: On Wed, 2020-04-15 at 16:45 +0200, Cornelia Huck wrote: On Wed, 15 Apr 2020 16:23:46 +0200 Boris Fiuczynski wrote: Once I understand you confusion above I will provide a patch... I'd say just go ahead. While I appreciate the sentiment, I would

[libvirt-php] libvirt_domain_interface_addresses causing segfault

2020-04-16 Thread Fernando Casas Schössow
Hi, While executing libvirt_domain_interface_addresses() with the qemu-agent running in the guest as the source, the function causes PHP to segfault. If I change the source to either dhcp or arp, the function executes correctly. Example: $netdetails =

[libvirt-php] libvirt_domain_interface_addresses() only returns only on IP address for NICs with multiple IPs

2020-04-16 Thread Fernando Casas Schössow
Hi, While using the function libvirt_domain_interface_addresses() with qemu guest agent as the source, for interfaces with more than one IP address, the function will only return one IP. Example code: $netdetails = libvirt_domain_interface_addresses($vmres, 2); foreach ($netdetails as $nic)

Re: [libvirt-php] libvirt_domain_interface_addresses causing segfault

2020-04-16 Thread Fernando Casas Schössow
I think I found the problem and it seems to affect only Windows guests. I'm not sure about the cause tough. Possible causes: 1- Network interface names containing white spaces. 2- One of the interfaces not reporting a MAC address. As an example here is the output of the equivalent virsh

Re: [libvirt-php] libvirt_domain_interface_addresses() only returns only on IP address for NICs with multiple IPs

2020-04-16 Thread Fernando Casas Schössow
Forgot to add the output of the equivalent virsh command for the same VM: Name MAC address Protocol Address --- lo 00:00:00:00:00:00 ipv4 127.0.0.1/8 lo 00:00:00:00:00:00 ipv6 ::1/128 eth0 52:54:00:12:b9:22 ipv4

Re: [PATCH v2] qemu: Revoke access to mirror on failed blockcopy

2020-04-16 Thread Pavel Mores
On Thu, Apr 16, 2020 at 09:42:46AM +0200, Michal Privoznik wrote: > When preparing to do a blockcopy, the mirror image is modified so > that QEMU can access it. For instance, the mirror has seclabels > set, if it is a NVMe disk it is detached from the host and so on. > And usually, the restore is

Re: [libvirt PATCH 4/4] docs: Remove one example from pci-addresses.rst

2020-04-16 Thread Cornelia Huck
On Thu, 16 Apr 2020 09:28:58 +0200 Andrea Bolognani wrote: > On Wed, 2020-04-15 at 19:47 +0200, Cornelia Huck wrote: > > On Wed, 15 Apr 2020 19:31:36 +0200 > > Andrea Bolognani wrote: > > > -Therefore, replacing the virtio-net device definition with the following > > > XML > > > -snippet > >

Re: [libvirt] [PATCH] qemu: fix hang in p2p + xbzrle compression + parallel migration

2020-04-16 Thread Jiri Denemark
On Thu, Apr 16, 2020 at 12:44:51 +0800, Lin Ma wrote: > When we do parallel migration, The multifd-channels migration parameter > needs to be set on the destination side as well before incoming migration > URI, unless we accept the default number of connections(2). > > Usually, This can be

[PATCH v2] qemu: Revoke access to mirror on failed blockcopy

2020-04-16 Thread Michal Privoznik
When preparing to do a blockcopy, the mirror image is modified so that QEMU can access it. For instance, the mirror has seclabels set, if it is a NVMe disk it is detached from the host and so on. And usually, the restore is done upon successful finish of the blockcopy operation. But, if something

Re: [libvirt PATCH 4/4] docs: Remove one example from pci-addresses.rst

2020-04-16 Thread Andrea Bolognani
On Wed, 2020-04-15 at 19:47 +0200, Cornelia Huck wrote: > On Wed, 15 Apr 2020 19:31:36 +0200 > Andrea Bolognani wrote: > > -Therefore, replacing the virtio-net device definition with the following > > XML > > -snippet > > - > > -:: > > - > > - > > - > > - > > - > function='0x3'> >