Re: [libvirt] [RFC] Accepting PRs/MRs for libvirt on GitHub/GitLab

2019-10-16 Thread Peter Krempa
On Wed, Oct 16, 2019 at 17:08:20 +0100, Daniel Berrange wrote: > On Wed, Oct 16, 2019 at 05:03:31PM +0200, Ján Tomko wrote: > > On Wed, Oct 16, 2019 at 02:22:56PM +0200, Andrea Bolognani wrote: [...] > > Here it deviates from the usual mailing list workflow where the patch > > has (in theory) a

[libvirt] [PATCH 1/2] conf: Reset disk type if element is completely missing

2019-10-15 Thread Peter Krempa
to '_FILE' for an empty cdrom which is handled correctly. Signed-off-by: Peter Krempa --- src/conf/domain_conf.c| 4 tests/qemuxml2xmloutdata/disk-source-pool.xml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/conf/domain_conf.c b/src/conf

[libvirt] [PATCH 0/2] conf: Fix up empty 'network' cdroms

2019-10-15 Thread Peter Krempa
Peter Krempa (2): conf: Reset disk type if element is completely missing tests: Add test case for empty 'network' cdrom src/conf/domain_conf.c| 4 +++ ...m-empty-network-invalid.x86_64-latest.args | 34 +++ .../disk-cdrom-empty-network-invalid.xml

[libvirt] [PATCH 2/2] tests: Add test case for empty 'network' cdrom

2019-10-15 Thread Peter Krempa
We don't allow such config in the schema but the code can handle that so add a test case supporting it. Signed-off-by: Peter Krempa --- ...m-empty-network-invalid.x86_64-latest.args | 34 +++ .../disk-cdrom-empty-network-invalid.xml | 30 tests

Re: [libvirt] [RFC 0/1] convert virStorageSource to GObject

2019-10-15 Thread Peter Krempa
On Tue, Oct 15, 2019 at 09:42:45 -0300, Daniel Henrique Barboza wrote: > I was hoping to quickly re-send the qemu_driver cleanups I've > sent some time ago, now using Glib. I started by attempting to > change the first VIR_AUTOUNREF() call in qemu_driver.c to > g_autoptr(), which happens to be a

Re: [libvirt] [PATCH] util: ignore SIGPIPE when writing to stderr/stdout

2019-10-14 Thread Peter Krempa
On Sat, Oct 12, 2019 at 16:04:11 +0800, Wang Yechao wrote: > libvirtd's stderr/stdout redirected to journald by default, so if > the journald has stopped, libvirtd and libvirtd's child process > will receive SIGPIPE signal when writing logs to stderr/stdout. > > journald stopped reasons: > 1.

Re: [libvirt] [PATCH v2 1/1] IDE: deprecate ide-drive

2019-10-11 Thread Peter Krempa
On Thu, Oct 10, 2019 at 14:08:12 -0400, John Snow wrote: > On 10/10/19 7:54 AM, Peter Krempa wrote: > > On Thu, Oct 10, 2019 at 13:42:26 +0200, Philippe Mathieu-Daudé wrote: > >> On 10/10/19 1:26 PM, Peter Krempa wrote: [...] > > To be honest, I didn't re

Re: [libvirt] [PATCH v2 1/1] IDE: deprecate ide-drive

2019-10-10 Thread Peter Krempa
On Thu, Oct 10, 2019 at 13:42:26 +0200, Philippe Mathieu-Daudé wrote: > On 10/10/19 1:26 PM, Peter Krempa wrote: > > On Thu, Oct 10, 2019 at 13:22:37 +0200, Philippe Mathieu-Daudé wrote: > > > On 10/10/19 12:43 AM, John Snow wrote: > > > > It's an old compatibility s

Re: [libvirt] [PATCH v2 1/1] IDE: deprecate ide-drive

2019-10-10 Thread Peter Krempa
will make that easier. > > > > Either way, we don't need this. > > > > Libvirt-checked-by: Peter Krempa > > Peter made a comment regarding Laszlo's Regression-tested-by tag: > > [...] nobody else is using > this convention (there are exactly 0 instances

Re: [libvirt] Semantic change in v4.3 slows down image creation and snapshots (on ZFS)

2019-10-09 Thread Peter Krempa
On Wed, Oct 09, 2019 at 13:39:54 +0200, Christian Ehrhardt wrote: > Hi, > when discussing bug [1] triggered by [2] Daniel and I have found that > the change [3] which is in since v4.3 was a semantic change to the > behavior of libvirt. > > virt-manager used and still does issue a volume XML like:

Re: [libvirt] [PATCH v4 00/26] scripts: convert most perl scripts to python

2019-10-09 Thread Peter Krempa
On Wed, Oct 09, 2019 at 12:37:15 +0100, Daniel Berrange wrote: [...] > - src/rpc/gendispatch.pl > - src/rpc/genprotocol.pl > - tools/wireshark/util/genxdrstub.pl [...] > Note that the check-spacing.py script is significantly > slower in Python than in Perl. After researching this > it

Re: [libvirt] [PATCH] build: stop clang complaining about redefined typedefs

2019-10-08 Thread Peter Krempa
On Tue, Oct 08, 2019 at 15:39:22 +0100, Daniel Berrange wrote: > Clang's gnu99 mode is not quite the same as GCC's. It will complain > about redefined typedefs being a C11 feature, while GCC does not > complain and allows them in GNU99. > > Signed-off-by: Daniel P. Berrangé > --- > >

Re: [libvirt] -blockdev bug (and some questions)

2019-10-07 Thread Peter Krempa
On Mon, Oct 07, 2019 at 09:34:39 -0400, Cole Robinson wrote: > On 10/7/19 2:07 AM, Peter Krempa wrote: > > On Sat, Oct 05, 2019 at 17:39:01 -0400, Cole Robinson wrote: [...] > > > More generally I have questions about why we track backingStore in the XML > > > f

Re: [libvirt] [PATCH] build: ask for -std=gnu99 explicitly

2019-10-07 Thread Peter Krempa
On Mon, Oct 07, 2019 at 15:52:07 +0100, Daniel Berrange wrote: > On Mon, Oct 07, 2019 at 04:27:31PM +0200, Peter Krempa wrote: > > On Mon, Oct 07, 2019 at 15:09:52 +0100, Daniel Berrange wrote: > > > We previously got -std=gnu99 secretly enabled as a side-effect > > >

Re: [libvirt] [PATCH] build: ask for -std=gnu99 explicitly

2019-10-07 Thread Peter Krempa
On Mon, Oct 07, 2019 at 15:09:52 +0100, Daniel Berrange wrote: > We previously got -std=gnu99 secretly enabled as a side-effect > of requesting the 'stdarg' gnulib module. We rely on some > extensions from c99/gnu99 and while RHEL-7 supports this, it > still defaults to gnu89. RHEL-7 also

[libvirt] [PATCH 5/5] tests: qemuxml2argv: Make use of versioned cpu-tsc-frequency and cpu-host-model-cmt tests

2019-10-07 Thread Peter Krempa
Commit fb973cfbb4de added versioned test outputs for the above mentioned tests but didn't actually enable them. Fix that mistake and fix the output of the tsc-frequency test. Signed-off-by: Peter Krempa --- tests/qemuxml2argvdata/cpu-tsc-frequency.x86_64-4.0.0.args | 4 ++-- tests

[libvirt] [PATCH 3/5] tests: qemuxml2argv: Remove unused data for s390 keywrap

2019-10-07 Thread Peter Krempa
machine-deakeywrap-off-caps machine-deakeywrap-off-cap Signed-off-by: Peter Krempa --- .../machine-aeskeywrap-off-argv.args | 20 -- .../machine-aeskeywrap-off-argv.xml | 27 --- .../machine-aeskeywrap-on-argv.args | 20

[libvirt] [PATCH 4/5] tests: qemuxml2argv: Remove unused output of 'mlock-on' legacy test

2019-10-07 Thread Peter Krempa
The test data was modernized to use actual caps but commit 4dadcaa98e5 forgot to delete this test data. Signed-off-by: Peter Krempa --- tests/qemuxml2argvdata/mlock-on.args | 27 --- 1 file changed, 27 deletions(-) delete mode 100644 tests/qemuxml2argvdata/mlock-on.args

[libvirt] [PATCH 0/5] tests: Clean up some unused test files

2019-10-07 Thread Peter Krempa
Some files were left behind when we deleted the qemu argv parser and few other ones were missed when modifying tests. Peter Krempa (5): tests: qemuxml2argv: Remove unused data for 'serial-pty' tests: qemuxml2argv: Remove unused data for 'pseries-disk' tests: qemuxml2argv: Remove unused data

[libvirt] [PATCH 2/5] tests: qemuxml2argv: Remove unused data for 'pseries-disk'

2019-10-07 Thread Peter Krempa
The last use was removed in 7b604379ba747cd8 when we deleted the old commandline parser. The same functionality is tested by many tests for pseries guests. Signed-off-by: Peter Krempa --- tests/qemuxml2argvdata/pseries-disk.args | 18 -- tests/qemuxml2argvdata/pseries-disk.xml | 42

[libvirt] [PATCH 1/5] tests: qemuxml2argv: Remove unused data for 'serial-pty'

2019-10-07 Thread Peter Krempa
The last use was removed in 7b604379ba747cd8 when we deleted the old commandline parser. The same functionality is tested by 'serial-pty-chardev'. Signed-off-by: Peter Krempa --- tests/qemuxml2argvdata/serial-pty.args | 24 - tests/qemuxml2argvdata/serial-pty.xml | 36

Re: [libvirt] [PATCH 1/1] IDE: deprecate ide-drive

2019-10-07 Thread Peter Krempa
I'll just delete it. This means that libvirt is prepared for this deprecation so I guess you can add a vanity-by: Libvirt-checked-by: Peter Krempa [0] https://libvirt.org/git/?p=libvirt.git;a=commit;h=a4cda054e7 [1] https://libvirt.org/git/?p=libvirt.git;a=commit;h=e67b6dcf361 -- libvir-li

[libvirt] [PATCH] maint: Post-release version bump to 5.9.0

2019-10-07 Thread Peter Krempa
Signed-off-by: Peter Krempa --- configure.ac | 2 +- docs/news.xml | 8 2 files changed, 9 insertions(+), 1 deletion(-) Pushed now. diff --git a/configure.ac b/configure.ac index af8cbcdfd8..5269db425c 100644 --- a/configure.ac +++ b/configure.ac @@ -16,7 +16,7 @@ dnl You should have

Re: [libvirt] -blockdev bug (and some questions)

2019-10-07 Thread Peter Krempa
On Sat, Oct 05, 2019 at 17:39:01 -0400, Cole Robinson wrote: > Hi Peter + list, > > I'm testing libvirt -blockdev, using your enablement patches from here: > https://www.redhat.com/archives/libvir-list/2019-September/msg00524.html > > I'm hitting an issue but the fix isn't clear to me. Take a VM

Re: [libvirt] [RFC] Add API to change qemu agent response timeout

2019-10-04 Thread Peter Krempa
On Thu, Oct 03, 2019 at 16:52:12 -0500, Jonathon Jongsma wrote: > Some layered products such as oVirt have requested a way to avoid being > blocked by guest agent commands when querying a loaded vm. For example, > many guest agent commands are polled periodically to monitor changes, > and rather

Re: [libvirt] [PATCH 16/22] qemu: Store typename from query-cpu-definitions in qemuCaps

2019-10-03 Thread Peter Krempa
On Thu, Oct 03, 2019 at 16:00:34 +0200, Jiri Denemark wrote: > We need to create a mapping between CPU model names and their > corresponding QOM types. > > Signed-off-by: Jiri Denemark > --- > src/qemu/qemu_capabilities.c |4 + > src/qemu/qemu_monitor.c

Re: [libvirt] [PATCH 06/11] util: use glib base64 encoding/decoding APIs

2019-09-30 Thread Peter Krempa
On Mon, Sep 30, 2019 at 16:10:11 +0100, Daniel Berrange wrote: > On Mon, Sep 30, 2019 at 05:03:47PM +0200, Peter Krempa wrote: > > On Mon, Sep 30, 2019 at 15:53:35 +0100, Daniel Berrange wrote: > > > On Mon, Sep 30, 2019 at 04:05:57PM +0200, Andrea Bolognani wrote: > > >

Re: [libvirt] [PATCH v2 0/6] rewrite virt-host-validate to be data driven, using Go & YAML

2019-09-30 Thread Peter Krempa
On Mon, Sep 30, 2019 at 15:48:29 +0100, Daniel Berrange wrote: > On Mon, Sep 30, 2019 at 10:47:39AM +0200, Martin Kletzander wrote: > > On Fri, Sep 27, 2019 at 01:52:19PM +0100, Daniel P. Berrangé wrote: > > > This is a followup to a previous PoC patch I submitted a > > > month ago: [...] > >

Re: [libvirt] [PATCH 06/11] util: use glib base64 encoding/decoding APIs

2019-09-30 Thread Peter Krempa
On Mon, Sep 30, 2019 at 15:53:35 +0100, Daniel Berrange wrote: > On Mon, Sep 30, 2019 at 04:05:57PM +0200, Andrea Bolognani wrote: > > On Mon, 2019-09-30 at 13:41 +0100, Daniel P. Berrangé wrote: > > > On Mon, Sep 30, 2019 at 02:18:17PM +0200, Andrea Bolognani wrote: > > > > On Mon, 2019-09-30 at

[libvirt] [PATCH 2/2] qemu: checkpoint: Don't update current checkpoint until we are done

2019-09-30 Thread Peter Krempa
Similarly to the snapshot code there's no reason to modify current checkpoint until we are done creating the new one. Signed-off-by: Peter Krempa --- src/qemu/qemu_checkpoint.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/src/qemu/qemu_checkpoint.c b/src/qemu/qemu_checkpoint.c

[libvirt] [PATCH 1/2] qemu: snapshot: Don't update current snapshot until we're done

2019-09-30 Thread Peter Krempa
-by: Peter Krempa --- src/qemu/qemu_driver.c | 19 --- 1 file changed, 19 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 8751145ea0..95fe844c34 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -16001,13 +16001,6

[libvirt] [PATCH 0/2] qemu: Sanitize update of 'current' checkpoint/snapshot

2019-09-30 Thread Peter Krempa
See 1/2. Peter Krempa (2): qemu: snapshot: Don't update current snapshot until we're done qemu: checkpoint: Don't update current checkpoint until we are done src/qemu/qemu_checkpoint.c | 7 --- src/qemu/qemu_driver.c | 19 --- 2 files changed, 26 deletions

Re: [libvirt] [PATCH 4/4] qemu: Don't repeat virDomainObjEndAPI in qemuDomainBlockPull

2019-09-30 Thread Peter Krempa
On Mon, Sep 30, 2019 at 16:22:34 +0200, Michal Privoznik wrote: > On 9/27/19 3:05 PM, Peter Krempa wrote: > > Use VIR_AUTORELEASE instead. > > > > Signed-off-by: Peter Krempa > > --- > > src/qemu/qemu_driver.c | 8 +++- > > 1 file changed, 3 inse

Re: [libvirt] [PATCH 06/11] util: use glib base64 encoding/decoding APIs

2019-09-30 Thread Peter Krempa
On Mon, Sep 30, 2019 at 13:19:41 +0100, Daniel Berrange wrote: > On Mon, Sep 30, 2019 at 02:03:53PM +0200, Peter Krempa wrote: > > On Mon, Sep 30, 2019 at 13:56:06 +0200, Pavel Hrdina wrote: > > > On Mon, Sep 30, 2019 at 12:45:56PM +0100, Daniel P. Berrangé wrote: > >

Re: [libvirt] [PATCH 06/11] util: use glib base64 encoding/decoding APIs

2019-09-30 Thread Peter Krempa
On Mon, Sep 30, 2019 at 13:56:06 +0200, Pavel Hrdina wrote: > On Mon, Sep 30, 2019 at 12:45:56PM +0100, Daniel P. Berrangé wrote: > > On Mon, Sep 30, 2019 at 01:41:52PM +0200, Pavel Hrdina wrote: > > > On Mon, Sep 30, 2019 at 09:02:36AM +0200, Peter Krempa wrote: > > > &

Re: [libvirt] [PATCH v2 3/6] tools: define YAML rules for virt-host-validate checks

2019-09-30 Thread Peter Krempa
On Fri, Sep 27, 2019 at 13:52:22 +0100, Daniel Berrange wrote: > This commit defines a set of YAML rules that result in the same set of > logical checks as the existing hardcoded virt-host-validate > implementation does. > > Signed-off-by: Daniel P. Berrangé > --- >

Re: [libvirt] [PATCH 05/11] util: use glib string allocation/formatting functions

2019-09-30 Thread Peter Krempa
On Fri, Sep 27, 2019 at 18:17:27 +0100, Daniel Berrange wrote: > Convert the string duplication APIs to use the g_strdup family of APIs. > > Annoyingly our virVasprintf/virAsprintf functions return the character > count, even though 90% of our usage doesn't need it. To retain compat > with these

Re: [libvirt] [PATCH 06/11] util: use glib base64 encoding/decoding APIs

2019-09-30 Thread Peter Krempa
On Fri, Sep 27, 2019 at 18:17:28 +0100, Daniel Berrange wrote: > Replace use of the gnulib base64 module with glib's own base64 API family. > > Signed-off-by: Daniel P. Berrangé > --- > bootstrap.conf| 1 - > src/conf/virsecretobj.c | 38

Re: [libvirt] [PATCH] tools: fix regression passing command with virt-login-shell

2019-09-30 Thread Peter Krempa
On Fri, Sep 27, 2019 at 17:23:02 +0100, Daniel Berrange wrote: > It is documented that a command to run inside the container can be > passed with the -c arg. > > virt-login-shell -c "ls -l /" > > This fixes > > commit 4feeb2d986b98013ebfb1d41ab6b9007b6cce6e2 > Author: Daniel P. Berrangé

Re: [libvirt] [PATCH] qemu: make attaching disk partition to VM illegal

2019-09-30 Thread Peter Krempa
On Fri, Sep 27, 2019 at 12:41:29 -0300, Daniel Henrique Barboza wrote: > > > On 9/27/19 12:11 PM, Pavel Mores wrote: > > The way in which the qemu driver generates aliases for disks involves > > ignoring the partition number part of a target dev name. This means that > > all partitions of a

[libvirt] [PATCH 4/4] qemu: Don't repeat virDomainObjEndAPI in qemuDomainBlockPull

2019-09-27 Thread Peter Krempa
Use VIR_AUTORELEASE instead. Signed-off-by: Peter Krempa --- src/qemu/qemu_driver.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 0988071708..ed59e64c10 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu

[libvirt] [PATCH 3/4] qemu: driver: Convert qemuDomainGetInfo to use VIR_AUTORELEASE

2019-09-27 Thread Peter Krempa
As an example of how to use VIR_AUTORELEASE let's convert this API's 'vm' object to use the new helper. Signed-off-by: Peter Krempa --- src/qemu/qemu_driver.c | 21 - 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu

[libvirt] [PATCH 1/4] util: object: Note that VIR_AUTOUNREF variables must have the reference

2019-09-27 Thread Peter Krempa
When a pointer is assigned to a variable marked by VIR_AUTOUNREF it will be unref'd when the stack frame of the variable is destroyed and thus users must assign it only when they wish to shed the reference. Add this as a note to the VIR_AUTOUNREF macro. Signed-off-by: Peter Krempa --- src/util

[libvirt] [PATCH 2/4] util: object: Add VIR_AUTOUNLOCK and VIR_AUTORELEASE

2019-09-27 Thread Peter Krempa
Add helpers for using automatic stack'd variable cleaning for lockable objects. Signed-off-by: Peter Krempa --- src/libvirt_private.syms | 2 ++ src/util/virobject.c | 29 + src/util/virobject.h | 30 ++ 3 files changed, 61

[libvirt] [PATCH 0/4] Automatic lockable object unlocking

2019-09-27 Thread Peter Krempa
A spin-off from the refactors to checkpoints where Eric suggested that we might want to replace virDomainObjEndAPI. See patch 2 for the implementation and patch 3 for example use. Peter Krempa (4): util: object: Note that VIR_AUTOUNREF variables must have the reference util: object: Add

Re: [libvirt] [PATCH 4/8] qemu: Don't repeat virDomainObjEndAPI in qemuDomainBlockPull

2019-09-27 Thread Peter Krempa
On Fri, Sep 27, 2019 at 07:48:55 -0500, Eric Blake wrote: > On 9/27/19 1:33 AM, Peter Krempa wrote: > > On Thu, Sep 26, 2019 at 17:02:49 -0500, Eric Blake wrote: > > > On 9/26/19 10:51 AM, Peter Krempa wrote: > > > > Add a 'cleanup' label and use

Re: [libvirt] [PATCH] qemu_monitor: s/size_t/ULL/ in qemuMonitorSave{Virtual, Physical}Memory

2019-09-27 Thread Peter Krempa
On Fri, Sep 27, 2019 at 13:57:26 +0200, Michal Privoznik wrote: > As it turns out, on my 32bit ARM machine size_t is not the same > size as ULL. However, @length argument for both functions is type > of size_t but it's treated as ULL - for instance when passed to > qemuMonitorJSONMakeCommand().

Re: [libvirt] [PATCH v3 05/22] build-aux: rewrite whitespace checker in Python

2019-09-27 Thread Peter Krempa
On Fri, Sep 27, 2019 at 12:24:05 +0100, Daniel Berrange wrote: > On Fri, Sep 27, 2019 at 11:42:28AM +0100, Daniel P. Berrangé wrote: > > On Fri, Sep 27, 2019 at 10:33:45AM +0100, Daniel P. Berrangé wrote: > > > On Thu, Sep 26, 2019 at 06:08:14PM +0200, Ján Tomko wrote: > > > > On Tue, Sep 24, 2019

Re: [libvirt] [PATCH v3 05/22] build-aux: rewrite whitespace checker in Python

2019-09-27 Thread Peter Krempa
On Fri, Sep 27, 2019 at 10:33:45 +0100, Daniel Berrange wrote: > On Thu, Sep 26, 2019 at 06:08:14PM +0200, Ján Tomko wrote: > > On Tue, Sep 24, 2019 at 03:58:46PM +0100, Daniel P. Berrangé wrote: > > > As part of an goal to eliminate Perl from libvirt build tools, > > > rewrite the

[libvirt] [PATCH] qemu: checkpoint: Do ACL check prior to snapshot interlocking

2019-09-27 Thread Peter Krempa
The interlocking with snapshots is executed prior to the ACL check so if a VM has snapshots invoking the checkpoint API may leak it's existance. Introduced with the qemuDomainCheckpointCreateXML API implementation in commit 5f4e0796503. Signed-off-by: Peter Krempa --- Split out from

Re: [libvirt] [PATCH 4/8] qemu: Don't repeat virDomainObjEndAPI in qemuDomainBlockPull

2019-09-27 Thread Peter Krempa
On Thu, Sep 26, 2019 at 17:02:49 -0500, Eric Blake wrote: > On 9/26/19 10:51 AM, Peter Krempa wrote: > > Add a 'cleanup' label and use jumps as we do in other places. > > > > Signed-off-by: Peter Krempa > > --- > > src/qemu/qemu_driver.c | 17 +

Re: [libvirt] [PATCH 1/9] DO NOT PUSH: tests: add qemu capabilities data for qemu 4.2

2019-09-26 Thread Peter Krempa
On Thu, Sep 26, 2019 at 19:28:54 +0200, Jiri Denemark wrote: > On Thu, Sep 26, 2019 at 18:05:14 +0200, Peter Krempa wrote: > > Currently I don't indend to push this as I'm waiting for some qemu > > patches to be merged to allow detection of blockdev. > > > > This patch

[libvirt] [PATCH 7/9] qemu: monitor: unexport qemuMonitorJSONTransactionAdd

2019-09-26 Thread Peter Krempa
Now it's not used outside of qemu_monitor_json.c. Signed-off-by: Peter Krempa --- src/qemu/qemu_monitor_json.c | 2 +- src/qemu/qemu_monitor_json.h | 4 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index

[libvirt] [PATCH 9/9] qemu: monitor: Remove non-transaction based dirty bitmap APIs

2019-09-26 Thread Peter Krempa
We replaced them by use of transaction to simplify possible failure scenarios. Signed-off-by: Peter Krempa --- src/qemu/qemu_monitor.c | 51 --- src/qemu/qemu_monitor.h | 19 -- src/qemu/qemu_monitor_json.c | 119 --- src/qemu

[libvirt] [PATCH 6/9] qemu: checkpoint: Replace open-coded transaction action generators

2019-09-26 Thread Peter Krempa
Use the generators provided by the monitor code instead. Signed-off-by: Peter Krempa --- src/qemu/qemu_checkpoint.c | 14 ++ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/src/qemu/qemu_checkpoint.c b/src/qemu/qemu_checkpoint.c index 30d1b6ae3a..04320b8e39 100644

[libvirt] [PATCH 2/9] qemu: monitor: Add transaction generators for dirty bitmap APIs

2019-09-26 Thread Peter Krempa
Rather than generating the transaction contents in random places add a unified set of APIs to generate the contents for a 'transaction' for the dirty bitmap APIs. Signed-off-by: Peter Krempa --- src/qemu/qemu_monitor.c | 48 src/qemu/qemu_monitor.h | 24

[libvirt] [PATCH 0/9] qemu: Refactor transaction actions handling and refactor checkpoint deletion

2019-09-26 Thread Peter Krempa
This should be applied on top of the checkpoints split. Pushing it requires the interlocking patches for checkpoints being merged as the bitmap removal QMP command is transactionable only since qemu 4.2. That is also the reason for the addition of the capabilities of qemu 4.2. Peter Krempa (9

[libvirt] [PATCH 4/9] tests: qemumonitor: Add testing for the 'transaction' command and generators

2019-09-26 Thread Peter Krempa
Validate all the commands against the schema. Signed-off-by: Peter Krempa --- tests/qemumonitorjsontest.c | 39 + 1 file changed, 39 insertions(+) diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c index d0bbb1f674..8179e802c1 100644

[libvirt] [PATCH 8/9] qemu: checkpoint: Fix rollback and access to unlocked 'vm' when deleting checkpoints

2019-09-26 Thread Peter Krempa
Delete/merge bitmaps when deleting checkpoints using a 'transaction' so that we don't have to deal with halfway-failed scenarios and also fix access to 'vm' while in the monitor lock. Signed-off-by: Peter Krempa --- src/qemu/qemu_checkpoint.c | 47 +++--- 1 file

[libvirt] [PATCH 3/9] qemu: monitor: Add transaction generators for snapshot APIs

2019-09-26 Thread Peter Krempa
Unify with other code that generates parameters for the 'transaction' command. Signed-off-by: Peter Krempa --- src/qemu/qemu_monitor.c | 21 + src/qemu/qemu_monitor.h | 11 +++ src/qemu/qemu_monitor_json.c | 35 +++ src/qemu

[libvirt] [PATCH 5/9] qemu: block: Replace snapshot transaction action generator

2019-09-26 Thread Peter Krempa
Use the new generator residing in the monitor code rather than directly using qemuMonitorJSONTransactionAdd. Signed-off-by: Peter Krempa --- src/qemu/qemu_block.c | 21 - 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/src/qemu/qemu_block.c b/src/qemu

Re: [libvirt] [PATCH v3 02/22] build-aux: rewrite augest test generator in Python

2019-09-26 Thread Peter Krempa
On Thu, Sep 26, 2019 at 16:40:54 +0100, Daniel Berrange wrote: > On Thu, Sep 26, 2019 at 05:35:46PM +0200, Ján Tomko wrote: > > On Wed, Sep 25, 2019 at 03:17:10PM +0100, Daniel P. Berrangé wrote: > > > On Wed, Sep 25, 2019 at 03:25:39PM +0200, Ján Tomko wrote: > > > > On Tue, Sep 24, 2019 at

[libvirt] [PATCH 4/8] qemu: Don't repeat virDomainObjEndAPI in qemuDomainBlockPull

2019-09-26 Thread Peter Krempa
Add a 'cleanup' label and use jumps as we do in other places. Signed-off-by: Peter Krempa --- src/qemu/qemu_driver.c | 17 ++--- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 71503898e4..3ad1699eb1 100644

[libvirt] [PATCH 7/8] qemu: Aggregate interlocking of blockjobs by checkpoints in one place

2019-09-26 Thread Peter Krempa
Rather than having to fix 5 places once we support the combination add a function called by all the blockjob/snapshot APIs. Signed-off-by: Peter Krempa --- src/qemu/qemu_domain.c | 21 + src/qemu/qemu_domain.h | 4 src/qemu/qemu_driver.c | 25

[libvirt] [PATCH 8/8] qemu: domain: Base block job interlocking on QEMU_CAPS_INCREMENTAL_BACKUP

2019-09-26 Thread Peter Krempa
. Signed-off-by: Peter Krempa --- src/qemu/qemu_domain.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index e8a82fee0b..6d42530db0 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -15526,7 +15526,10

[libvirt] [PATCH 5/8] qemu: caps: Add capability for incremental backup support

2019-09-26 Thread Peter Krempa
Add a new all-covering capability which will be used to interlock incremental backup support until all bits are ready. --- src/qemu/qemu_capabilities.c | 3 +++ src/qemu/qemu_capabilities.h | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/qemu/qemu_capabilities.c

[libvirt] [PATCH 6/8] qemu: checkpoint: Forbid creating checkpoints until we support backups

2019-09-26 Thread Peter Krempa
: ... Signed-off-by: Peter Krempa --- src/qemu/qemu_checkpoint.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/qemu/qemu_checkpoint.c b/src/qemu/qemu_checkpoint.c index 59f700e1d3..46a10cbeba 100644 --- a/src/qemu/qemu_checkpoint.c +++ b/src/qemu

[libvirt] [PATCH 3/8] qemu: Simplify argument list of qemuDomainBlockPullCommon

2019-09-26 Thread Peter Krempa
Drop the 'driver' argument since it can be extracted from private data to shorten the argument list. Signed-off-by: Peter Krempa --- src/qemu/qemu_driver.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index

[libvirt] [PATCH 0/8] qemu: Lock-out checkpoints until backups are ready

2019-09-26 Thread Peter Krempa
See patch 6/8 for the reasoning. This series applies on top of the v2 of splitting checkpoints into a separate file. Peter Krempa (8): qemu: checkpoint: Refactor cleanup in qemuCheckpointCreateXML qemu: checkpoint: Remove open-ended TODOs qemu: Simplify argument list

[libvirt] [PATCH 2/8] qemu: checkpoint: Remove open-ended TODOs

2019-09-26 Thread Peter Krempa
Once somebody is motivated enough to add the support for the quiesce flag or offline checkpoint deletion they are welcome to do so but we don't need to have a reminder. Signed-off-by: Peter Krempa --- src/qemu/qemu_checkpoint.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/qemu

[libvirt] [PATCH 1/8] qemu: checkpoint: Refactor cleanup in qemuCheckpointCreateXML

2019-09-26 Thread Peter Krempa
Use VIR_AUTO* helpers and get rid of the 'cleanup' label. Signed-off-by: Peter Krempa --- src/qemu/qemu_checkpoint.c | 22 +- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/src/qemu/qemu_checkpoint.c b/src/qemu/qemu_checkpoint.c index 30d1b6ae3a..4430f69911

Re: [libvirt] [PATCH v2 5/7] qemu: driver: Move checkpoint-related code to qemu_checkpoint.c

2019-09-26 Thread Peter Krempa
On Thu, Sep 26, 2019 at 10:38:11 -0500, Eric Blake wrote: > On 9/25/19 7:54 AM, Peter Krempa wrote: > > Move all extensive functions to a new file so that we don't just pile > > everything in the common files. This obviously isn't possible with > > straight code movement a

Re: [libvirt] [PATCH v2 5/7] qemu: driver: Move checkpoint-related code to qemu_checkpoint.c

2019-09-26 Thread Peter Krempa
On Wed, Sep 25, 2019 at 14:54:41 +0200, Peter Krempa wrote: > Move all extensive functions to a new file so that we don't just pile > everything in the common files. This obviously isn't possible with > straight code movement as we still need stubs in qemu_driver.c > > Additionally

[libvirt] [PATCH v2 1/7] qemu: Move, rename and export qemuDomObjFromDomain

2019-09-25 Thread Peter Krempa
Move it to qemu_domain.c and rename it to qemuDomainObjFromDomain. This will allow reusing it after splitting out checkpoint code from qemu_driver.c. Signed-off-by: Peter Krempa --- src/qemu/qemu_domain.c | 31 + src/qemu/qemu_domain.h | 1 + src/qemu/qemu_driver.c | 303

[libvirt] [PATCH v2 6/7] qemu: domain: Move checkpoint related code to qemu_checkpoint.c

2019-09-25 Thread Peter Krempa
Signed-off-by: Peter Krempa --- src/qemu/qemu_checkpoint.c | 185 ++--- src/qemu/qemu_checkpoint.h | 5 + src/qemu/qemu_domain.c | 162 +--- src/qemu/qemu_domain.h | 15 --- 4 files changed, 180 insertions(+), 187 deletions

[libvirt] [PATCH v2 4/7] qemu: driver: Remove misplaced qemuDomainObjEndJob in qemuDomainCheckpointGetXMLDesc

2019-09-25 Thread Peter Krempa
The code that gets the job to refresh disk sizes was not merged yet so remove this artifact. Signed-off-by: Peter Krempa --- src/qemu/qemu_driver.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index ca25814bd1..7da6dbce66 100644 --- a/src

[libvirt] [PATCH v2 0/7] qemu: checkpoints: Collect most code in a single place

2019-09-25 Thread Peter Krempa
backup implementation. diff to v1: - rebased on top of the patches to remove checking of AUTODESTROY - kept only one instance of virCheckFlags per API (inside qemu_checkpoint.c) Peter Krempa (7): qemu: Move, rename and export qemuDomObjFromDomain conf: Drop pointless 'domain' argument from

[libvirt] [PATCH v2 5/7] qemu: driver: Move checkpoint-related code to qemu_checkpoint.c

2019-09-25 Thread Peter Krempa
the impl didn't make sense. Note that in the move the new file also doesn't use virQEMUMomentReparent but rather an stripped down copy. As I plan to split out snapshot code into a separate file the unification doesn't make sense any more. Signed-off-by: Peter Krempa --- src/qemu/Makefile.inc.am

[libvirt] [PATCH v2 2/7] conf: Drop pointless 'domain' argument from virDomainCheckpointRedefinePrep

2019-09-25 Thread Peter Krempa
'vm' is passed in which contains the definition which contains the UUID so we don't need another parameter for this. Signed-off-by: Peter Krempa --- src/conf/checkpoint_conf.c | 7 +++ src/conf/checkpoint_conf.h | 3 +-- src/qemu/qemu_driver.c | 2 +- src/test/test_driver.c | 2

[libvirt] [PATCH v2 7/7] qemu: driver: Don't pull in qemu_monitor_json.h directly

2019-09-25 Thread Peter Krempa
There's nothing that uses it directly now. Also not allowing direct use will promote our layering. Signed-off-by: Peter Krempa --- src/qemu/qemu_driver.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 7163216f69..5852df2a53 100644

[libvirt] [PATCH v2 3/7] conf: Drop pointless 'domain' argument from virDomainSnapshotRedefinePrep

2019-09-25 Thread Peter Krempa
'vm' is passed in which contains the definition which contains the UUID so we don't need another parameter for this. Signed-off-by: Peter Krempa --- src/conf/snapshot_conf.c | 5 ++--- src/conf/snapshot_conf.h | 3 +-- src/qemu/qemu_driver.c | 2 +- src/test/test_driver.c | 2 +- 4 files

Re: [libvirt] [PATCH 1/1] conf: handle empty string in interface target name

2019-09-25 Thread Peter Krempa
On Wed, Sep 25, 2019 at 12:42:07 +, Nikolay Shirokovskiy wrote: > > > On 23.09.2019 17:44, Peter Krempa wrote: > > On Mon, Sep 23, 2019 at 11:21:33 -0300, Daniel Henrique Barboza wrote: > >> > >> > >> On 9/23/19 8:55 AM, Nikolay Shirokovskiy wrote:

Re: [libvirt] [PATCH] qemu_blockjob: Remove secdriver metadata for whole backing chain on job completion

2019-09-25 Thread Peter Krempa
On Mon, Sep 16, 2019 at 16:13:39 +0200, Peter Krempa wrote: > On Mon, Sep 16, 2019 at 12:34:32 +0200, Michal Privoznik wrote: > > Turns out, block mirror is not the only job a disk can have. It > > can also do commits of one layer into the other. Or possibly some > > othe

[libvirt] [PATCH 2/4] qemu: migration: Forbid only remote migration if autodestroy is active for VM

2019-09-24 Thread Peter Krempa
Semantically we can't guarantee that we'll be able to destroy the VM on the remote host, thus we can't allow remote migration. All other forms of migration (e.g. saving to file) are okay though as they don't clash with semantics of the flag. Signed-off-by: Peter Krempa --- src/qemu

[libvirt] [PATCH 4/4] qemu: checkpoint: Don't forbid checkpoint when VM is marked for autodestroy

2019-09-24 Thread Peter Krempa
The check was copied from the snapshot code and makes even less sense here. Signed-off-by: Peter Krempa --- src/qemu/qemu_driver.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 823aa558ac..db4b39dc9e 100644 --- a/src/qemu

[libvirt] [PATCH 0/4] Sanitize restrictions imposed by VIR_DOMAIN_START_AUTODESTROY

2019-09-24 Thread Peter Krempa
Migration to a different host is the only reasonable restriction that should apply. Fix the wording in the docs and remove the restrictions of saving the VM, taking a snapshot and taking a checkpoint. Peter Krempa (4): lib: Lessen restrictions on VIR_DOMAIN_START_AUTODESTROY qemu: migration

[libvirt] [PATCH 3/4] qemu: snapshot: Don't forbid snapshot if autodestroy is registered

2019-09-24 Thread Peter Krempa
. Signed-off-by: Peter Krempa --- src/qemu/qemu_driver.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index f7f059b6d6..823aa558ac 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -15917,12 +15917,6

[libvirt] [PATCH 1/4] lib: Lessen restrictions on VIR_DOMAIN_START_AUTODESTROY

2019-09-24 Thread Peter Krempa
to a file may be permitted as they semantically don't clash with the flag itself. Otherwise we'd have to forbid other APIs, such as virDomainDestroy as well. Signed-off-by: Peter Krempa --- src/libvirt-domain.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src

Re: [libvirt] [PATCH 1/1] conf: handle empty string in interface target name

2019-09-23 Thread Peter Krempa
On Mon, Sep 23, 2019 at 11:21:33 -0300, Daniel Henrique Barboza wrote: > > > On 9/23/19 8:55 AM, Nikolay Shirokovskiy wrote: > > Empty name is not allowed by schema but qemu is able to start with such > > a config (and I guess some other hypervisors too). As a result name will > > be generated

[libvirt] [PATCH] qemu: snapshot: Do ACL check prior to checkpoint interlocking

2019-09-23 Thread Peter Krempa
Commit 7efe930ec3c introduced interlock of snapshots and checkpoints, but the check is executed prior to the snapshot API ACL check. This means that an unauthorized user can see whether a VM exists if it has a checkpoint. Move the checks to proper places. Signed-off-by: Peter Krempa --- Given

Re: [libvirt] [PATCH] docs: attempt to document the general libvirt dev strategy

2019-09-20 Thread Peter Krempa
On Fri, Sep 20, 2019 at 15:12:01 +0100, Daniel Berrange wrote: > There are various ideas / plans floating around for future libvirt work, > some of which is actively in progress. Historically we've never captured > this kind of information anywhere, except in mailing list discussions. > In

[libvirt] [PATCH 5/7] qemu: driver: Move checkpoint-related code to qemu_checkpoint.c

2019-09-20 Thread Peter Krempa
the impl didn't make sense. Note that in the move the new file also doesn't use virQEMUMomentReparent but rather an stripped down copy. As I plan to split out snapshot code into a separate file the unification doesn't make sense any more. Signed-off-by: Peter Krempa --- src/qemu/Makefile.inc.am

[libvirt] [PATCH 7/7] qemu: driver: Don't pull in qemu_monitor_json.h directly

2019-09-20 Thread Peter Krempa
There's nothing that uses it directly now. Also not allowing direct use will promote our layering. Signed-off-by: Peter Krempa --- src/qemu/qemu_driver.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 89a0b0963d..186b6ed528 100644

[libvirt] [PATCH 6/7] qemu: domain: Move checkpoint related code to qemu_checkpoint.c

2019-09-20 Thread Peter Krempa
Signed-off-by: Peter Krempa --- src/qemu/qemu_checkpoint.c | 185 ++--- src/qemu/qemu_checkpoint.h | 5 + src/qemu/qemu_domain.c | 162 +--- src/qemu/qemu_domain.h | 15 --- 4 files changed, 180 insertions(+), 187 deletions

[libvirt] [PATCH 0/7] qemu: checkpoints: Collect most code in a single place

2019-09-20 Thread Peter Krempa
backup implementation. Peter Krempa (7): qemu: Move, rename and export qemuDomObjFromDomain conf: Drop pointless 'domain' argument from virDomainCheckpointRedefinePrep conf: Drop pointless 'domain' argument from virDomainSnapshotRedefinePrep qemu: driver: Remove misplaced

[libvirt] [PATCH 4/7] qemu: driver: Remove misplaced qemuDomainObjEndJob in qemuDomainCheckpointGetXMLDesc

2019-09-20 Thread Peter Krempa
The code that gets the job to refresh disk sizes was not merged yet so remove this artifact. Signed-off-by: Peter Krempa --- src/qemu/qemu_driver.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 69467c21f6..485b38ebac 100644 --- a/src

[libvirt] [PATCH 2/7] conf: Drop pointless 'domain' argument from virDomainCheckpointRedefinePrep

2019-09-20 Thread Peter Krempa
'vm' is passed in which contains the definition which contains the UUID so we don't need another parameter for this. Signed-off-by: Peter Krempa --- src/conf/checkpoint_conf.c | 7 +++ src/conf/checkpoint_conf.h | 3 +-- src/qemu/qemu_driver.c | 2 +- src/test/test_driver.c | 2

[libvirt] [PATCH 1/7] qemu: Move, rename and export qemuDomObjFromDomain

2019-09-20 Thread Peter Krempa
Move it to qemu_domain.c and rename it to qemuDomainObjFromDomain. This will allow reusing it after splitting out checkpoint code from qemu_driver.c. Signed-off-by: Peter Krempa --- src/qemu/qemu_domain.c | 31 + src/qemu/qemu_domain.h | 1 + src/qemu/qemu_driver.c | 303

[libvirt] [PATCH 3/7] conf: Drop pointless 'domain' argument from virDomainSnapshotRedefinePrep

2019-09-20 Thread Peter Krempa
'vm' is passed in which contains the definition which contains the UUID so we don't need another parameter for this. Signed-off-by: Peter Krempa --- src/conf/snapshot_conf.c | 5 ++--- src/conf/snapshot_conf.h | 3 +-- src/qemu/qemu_driver.c | 2 +- src/test/test_driver.c | 2 +- 4 files

[libvirt] [PATCH 20/22] qemu: driver: Stop using QEMU_ADD_BLOCK_PARAM_ULL in qemuDomainGetStatsBlockExportBackendStorage

2019-09-19 Thread Peter Krempa
Signed-off-by: Peter Krempa --- src/qemu/qemu_driver.c | 18 +++--- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 703f07a388..2163d14cea 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c

  1   2   3   4   5   6   7   8   9   10   >