Re: [libvirt] [PATCH v5 10/20] tpm: Parse the capabilities supported by swtpm and swtpm_setup

2019-07-24 Thread Stefan Berger
On 7/24/19 1:05 PM, Daniel P. Berrangé wrote: On Fri, Jul 12, 2019 at 12:23:44PM -0400, Stefan Berger wrote: If you re-post this series, just use VIR_AUTOFREE straightaway in the earlier patch. Done. With the debug line added Done Reviewed-by: Daniel P. Berrangé I'll post v6

Re: [libvirt] [PATCH v5 09/20] tpm: Check whether previously found executables were updated

2019-07-24 Thread Stefan Berger
On 7/24/19 1:02 PM, Daniel P. Berrangé wrote: On Fri, Jul 12, 2019 at 12:23:43PM -0400, Stefan Berger wrote: for (i = 0; i < ARRAY_CARDINALITY(prgs); i++) { char *path; bool findit = *prgs[i].path == NULL; +struct stat statbuf; +char *tmp; + +if

Re: [libvirt] [PATCH v5 07/20] tpm: Move qemuTPMEmulatorInit to virTPMEmulatorInit in virtpm.c

2019-07-24 Thread Stefan Berger
On 7/24/19 12:55 PM, Daniel P. Berrangé wrote: This isn't a thread safe initialization process. Use VIR_ONCE_GLOBAL_INIT to declare the initializer funtion, then just unconditionally invoke the initializer here. This is then guaranteed to be called only once with no race possible As you

Re: [libvirt] [PATCH v10 08/19] backup: Parse and output checkpoint XML

2019-07-24 Thread Eric Blake
On 7/24/19 11:40 AM, Daniel P. Berrangé wrote: > On Wed, Jul 24, 2019 at 06:17:24PM +0200, Peter Krempa wrote: >> On Wed, Jul 24, 2019 at 17:11:19 +0100, Daniel Berrange wrote: >>> On Wed, Jul 24, 2019 at 12:55:58AM -0500, Eric Blake wrote: Add a new file checkpoint_conf.c that performs the

Re: [libvirt] [PATCH 7/9] qemu: blockjob: Ensure that config disk source is identical when modifying it

2019-07-24 Thread Eric Blake
On 7/24/19 4:07 PM, Peter Krempa wrote: > qemuBlockJobRewriteConfigDiskSource rewrites the disk source only > according to the 'target'. This means that if someone would change the > inactive config of the VM to refer to a different disk a block job would > rewrite it when finishing a job which

Re: [libvirt] [PATCH 6/9] qemu: blockjob: Esure that persistent definition source does not copy irrelevant data

2019-07-24 Thread Eric Blake
On 7/24/19 4:07 PM, Peter Krempa wrote: typo in subject: Ensure subject line is long, maybe: qemu: blockjob: Clear out any irrelevant data in copied source > Since we copy everything from the original storage source including some > runtime data which are not relevant for the config we should

Re: [libvirt] [PATCH 5/9] qemu: blockjob: Split out update of persistent XML disk's source on mirror jobs

2019-07-24 Thread Eric Blake
On 7/24/19 4:07 PM, Peter Krempa wrote: > Both active block commit and block copy modify the disk source of the > active definition and thus also must modify the corresponding inactive > definition source so that the VM starts up later. This is currently > implemented in the legacy block job

Re: [libvirt] [Qemu-devel] [PATCH v3] qapi: add dirty-bitmaps to query-named-block-nodes result

2019-07-24 Thread John Snow
On 7/24/19 12:47 AM, Markus Armbruster wrote: > John Snow writes: > >> From: Vladimir Sementsov-Ogievskiy >> >> Let's add a possibility to query dirty-bitmaps not only on root nodes. >> It is useful when dealing both with snapshots and incremental backups. >> >> Signed-off-by: Vladimir

Re: [libvirt] [PATCH 4/9] qemu: blockjob: Register disk->mirror with a job only when required

2019-07-24 Thread Eric Blake
On 7/24/19 4:07 PM, Peter Krempa wrote: > Commit job for example references existing storage in the > subelement thus tracking it separately could lead into problems. Grammar is hard to parse, maybe: The subelement is used in two ways: in a commit job to point to existing storage, and in a

Re: [libvirt] [PATCH 3/9] qemu: blockjob: Document qemuBlockJobRegister

2019-07-24 Thread Eric Blake
On 7/24/19 4:07 PM, Peter Krempa wrote: > Signed-off-by: Peter Krempa > --- > src/qemu/qemu_blockjob.c | 10 ++ > 1 file changed, 10 insertions(+) ACK -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org

Re: [libvirt] [PATCH 2/9] tests: qemustatusxml: Add few disks with backing chains for blockdev job testing

2019-07-24 Thread Eric Blake
On 7/24/19 4:07 PM, Peter Krempa wrote: > Add 4 disks to the blockjob-blockdev-in.xml test case to allow adding > data for block pull, block copy, block commit, and active block commit > jobs. > > Signed-off-by: Peter Krempa > --- > .../blockjob-blockdev-in.xml | 264

Re: [libvirt] [PATCH 1/9] qemu: blockjob: Use proper value when setting disk's READY state

2019-07-24 Thread Eric Blake
On 7/24/19 4:07 PM, Peter Krempa wrote: > Commit c412383796c used value from wrong enum when setting the disk's used a value from the wrong enum > mirrorState variable. This meant that a 'READY' job would show up as > 'PIVOTING'. > > Signed-off-by: Peter Krempa > --- >

[libvirt] [PATCH 9/9] qemu: Add -blockdev support for block commit job

2019-07-24 Thread Peter Krempa
Introduce the handler for finalizing a block commit and active bloc commit job which will allow to use it with blockdev. Signed-off-by: Peter Krempa --- src/qemu/qemu_blockjob.c | 212 ++ src/qemu/qemu_blockjob.h | 18 ++

[libvirt] [PATCH 7/9] qemu: blockjob: Ensure that config disk source is identical when modifying it

2019-07-24 Thread Peter Krempa
qemuBlockJobRewriteConfigDiskSource rewrites the disk source only according to the 'target'. This means that if someone would change the inactive config of the VM to refer to a different disk a block job would rewrite it when finishing a job which modifies the disk source. Make sure that this

[libvirt] [PATCH 8/9] qemu: Add -blockdev support for block pull job

2019-07-24 Thread Peter Krempa
Introduce the handler for finalizing a block pull job which will allow to use it with blockdev. This patch also contains some additional machinery which is required to store all the relevant job data in the status XML which will also be reused with other block job types. Signed-off-by: Peter

[libvirt] [PATCH 6/9] qemu: blockjob: Esure that persistent definition source does not copy irrelevant data

2019-07-24 Thread Peter Krempa
Since we copy everything from the original storage source including some runtime data which are not relevant for the config we should clear them. Signed-off-by: Peter Krempa --- src/qemu/qemu_blockjob.c | 21 + 1 file changed, 21 insertions(+) diff --git

[libvirt] [PATCH 4/9] qemu: blockjob: Register disk->mirror with a job only when required

2019-07-24 Thread Peter Krempa
Commit job for example references existing storage in the subelement thus tracking it separately could lead into problems. This patch introduces qemuBlockJobDiskRegisterMirror which registers the mirror chain separately only for job which require it. This also comes with remembering that in the

[libvirt] [PATCH 5/9] qemu: blockjob: Split out update of persistent XML disk's source on mirror jobs

2019-07-24 Thread Peter Krempa
Both active block commit and block copy modify the disk source of the active definition and thus also must modify the corresponding inactive definition source so that the VM starts up later. This is currently implemented in the legacy block job handler but the logic will be ueful also for the new

[libvirt] [PATCH 1/9] qemu: blockjob: Use proper value when setting disk's READY state

2019-07-24 Thread Peter Krempa
Commit c412383796c used value from wrong enum when setting the disk's mirrorState variable. This meant that a 'READY' job would show up as 'PIVOTING'. Signed-off-by: Peter Krempa --- src/qemu/qemu_blockjob.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[libvirt] [PATCH 2/9] tests: qemustatusxml: Add few disks with backing chains for blockdev job testing

2019-07-24 Thread Peter Krempa
Add 4 disks to the blockjob-blockdev-in.xml test case to allow adding data for block pull, block copy, block commit, and active block commit jobs. Signed-off-by: Peter Krempa --- .../blockjob-blockdev-in.xml | 264 ++ 1 file changed, 264 insertions(+) diff

[libvirt] [PATCH 3/9] qemu: blockjob: Document qemuBlockJobRegister

2019-07-24 Thread Peter Krempa
Signed-off-by: Peter Krempa --- src/qemu/qemu_blockjob.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/src/qemu/qemu_blockjob.c b/src/qemu/qemu_blockjob.c index e63dc49e92..ac7b3a0aef 100644 --- a/src/qemu/qemu_blockjob.c +++ b/src/qemu/qemu_blockjob.c @@ -117,6 +117,16 @@

[libvirt] [PATCH 0/9] qemu: Support block pull/commit jobs with blockdev (blockdev-add saga)

2019-07-24 Thread Peter Krempa
One of the final chapters of the saga. At the end we finally support first blockjobs with blockdev. This series depends on some of the previous postings so for convenience it can be fetched at: git fetch https://gitlab.com/pipo.sk/libvirt.git blockjobs-send-partial The above branch also

Re: [libvirt] [PATCH 4/7] qemu: Use virStorageSourceIsEmpty in qemuDomainBlockCommit

2019-07-24 Thread Ján Tomko
On Tue, Jul 23, 2019 at 02:08:48PM +0200, Peter Krempa wrote: The block commit API checked 'disk->src->path' to see whether there is a reasonable disk source to be committed. As the top image can be e.g. backed by NBD the check is not good enough. Replace it by virStorageSourceIsEmpty.

Re: [libvirt] [PATCH 2/7] qemu: Add possibility to prepare top image only for attachment via blockdev

2019-07-24 Thread Ján Tomko
On Tue, Jul 23, 2019 at 02:08:46PM +0200, Peter Krempa wrote: qemuBuildStorageSourceChainAttachPrepareBlockdev prepares the full backing chain for attachment via blockdev. For snapshots we'll need to prepare one image only as it needs to be plugged on top of the existing chain. This patch

Re: [libvirt] [PATCH v10 08/19] backup: Parse and output checkpoint XML

2019-07-24 Thread Peter Krempa
On Wed, Jul 24, 2019 at 18:10:47 +0100, Daniel Berrange wrote: > On Wed, Jul 24, 2019 at 06:55:18PM +0200, Peter Krempa wrote: > > On Wed, Jul 24, 2019 at 17:40:51 +0100, Daniel Berrange wrote: > > > On Wed, Jul 24, 2019 at 06:17:24PM +0200, Peter Krempa wrote: > > > > On Wed, Jul 24, 2019 at

Re: [libvirt] [PATCH v10 08/19] backup: Parse and output checkpoint XML

2019-07-24 Thread Daniel P . Berrangé
On Wed, Jul 24, 2019 at 06:55:18PM +0200, Peter Krempa wrote: > On Wed, Jul 24, 2019 at 17:40:51 +0100, Daniel Berrange wrote: > > On Wed, Jul 24, 2019 at 06:17:24PM +0200, Peter Krempa wrote: > > > On Wed, Jul 24, 2019 at 17:11:19 +0100, Daniel Berrange wrote: > > > > On Wed, Jul 24, 2019 at

Re: [libvirt] [PATCH v5 10/20] tpm: Parse the capabilities supported by swtpm and swtpm_setup

2019-07-24 Thread Daniel P . Berrangé
On Fri, Jul 12, 2019 at 12:23:44PM -0400, Stefan Berger wrote: > Run 'swtpm socket --print-capabilities' and > 'swtpm_setup --print-capabilities' to get the JSON object of the > features the programs are supporting and parse them into a bitmap. > > Signed-off-by: Stefan Berger > --- >

Re: [libvirt] [PATCH v5 09/20] tpm: Check whether previously found executables were updated

2019-07-24 Thread Daniel P . Berrangé
On Fri, Jul 12, 2019 at 12:23:43PM -0400, Stefan Berger wrote: > Check whether previously found executables were updated and if > so look for them again. This helps to use updated features of > swtpm and its tools upon updating them. Hmm, so this answers some of my earlier questions. If we

Re: [libvirt] [PATCH v5 08/20] tpm: Refactor virTPMEmulatorInit to use loop

2019-07-24 Thread Daniel P . Berrangé
On Fri, Jul 12, 2019 at 12:23:42PM -0400, Stefan Berger wrote: > Refactor virTPMEmulatorInit to use a loop with parameters. This allows > for easier extension later on. > > Signed-off-by: Stefan Berger > Reviewed-by: Marc-André Lureau > --- > src/util/virtpm.c | 80

Re: [libvirt] [PATCH v5 07/20] tpm: Move qemuTPMEmulatorInit to virTPMEmulatorInit in virtpm.c

2019-07-24 Thread Daniel P . Berrangé
On Fri, Jul 12, 2019 at 12:23:41PM -0400, Stefan Berger wrote: > Move qemuTPMEmulatorInit to virTPMEmulatorInit in virtpm.c and introduce > a few functions to query the executables needed for virCommands. > > Signed-off-by: Stefan Berger > Reviewed-by: Marc-André Lureau > --- >

Re: [libvirt] [PATCH v10 08/19] backup: Parse and output checkpoint XML

2019-07-24 Thread Peter Krempa
On Wed, Jul 24, 2019 at 17:40:51 +0100, Daniel Berrange wrote: > On Wed, Jul 24, 2019 at 06:17:24PM +0200, Peter Krempa wrote: > > On Wed, Jul 24, 2019 at 17:11:19 +0100, Daniel Berrange wrote: > > > On Wed, Jul 24, 2019 at 12:55:58AM -0500, Eric Blake wrote: [...] > So overall, either we should

Re: [libvirt] [PATCH v5 06/20] tests: Add tests for QEMU command line generation with encrypted TPM

2019-07-24 Thread Daniel P . Berrangé
On Fri, Jul 12, 2019 at 12:23:40PM -0400, Stefan Berger wrote: > The QEMU command line does not change when TPM state is encrypted > compared to when it is plain. > > Signed-off-by: Stefan Berger > Reviewed-by: Marc-André Lureau > --- > .../tpm-emulator-tpm2-enc.x86_64-latest.args | 35

Re: [libvirt] [PATCH v5 05/20] tests: Add test for TPM XML encryption parser and formatter

2019-07-24 Thread Daniel P . Berrangé
On Fri, Jul 12, 2019 at 12:23:39PM -0400, Stefan Berger wrote: > Add a test case for the TPM XML encryption parser and formatter. > > Signed-off-by: Stefan Berger > Reviewed-by: Marc-André Lureau > --- > .../tpm-emulator-tpm2-enc.xml | 32 + >

Re: [libvirt] [PATCH v5 04/20] schema: Extend the TPM XML schema with support for encryption

2019-07-24 Thread Daniel P . Berrangé
On Fri, Jul 12, 2019 at 12:23:38PM -0400, Stefan Berger wrote: > Extend the TPM XML schema with support for an encryption node. > > Signed-off-by: Stefan Berger > --- > docs/schemas/domaincommon.rng | 11 +++ > 1 file changed, 11 insertions(+) Arguably should be squashed into the

Re: [libvirt] [PATCH v5 03/20] conf: Extend TPM XML parser with encryption support

2019-07-24 Thread Daniel P . Berrangé
On Fri, Jul 12, 2019 at 12:23:37PM -0400, Stefan Berger wrote: > Extend the TPM device XML parser and XML generator with emulator > state encryption support. > > Signed-off-by: Stefan Berger > --- > src/conf/domain_conf.c | 31 ++- > src/conf/domain_conf.h | 2 ++ >

[libvirt] [BUG] Hyper-V Enlightenments are broken in 5.5.0+

2019-07-24 Thread Vitaly Kuznetsov
Hi, when some Hyper-V enlightenments are added to the domain configuration, e.g. ... .. ... I'm observing the following: # virsh create /etc/libvirt/qemu/win2k16.xml error: Failed to create domain from /etc/libvirt/qemu/win2k16.xml error: unsupported

Re: [libvirt] [PATCH v10 08/19] backup: Parse and output checkpoint XML

2019-07-24 Thread Daniel P . Berrangé
On Wed, Jul 24, 2019 at 06:17:24PM +0200, Peter Krempa wrote: > On Wed, Jul 24, 2019 at 17:11:19 +0100, Daniel Berrange wrote: > > On Wed, Jul 24, 2019 at 12:55:58AM -0500, Eric Blake wrote: > > > Add a new file checkpoint_conf.c that performs the translation to and > > > from new XML describing a

Re: [libvirt] [PATCH v10 18/19] backup: Wire up qemu checkpoint commands over QMP

2019-07-24 Thread Daniel P . Berrangé
On Wed, Jul 24, 2019 at 12:56:08AM -0500, Eric Blake wrote: > Time to actually issue the QMP transactions that create and delete > persistent checkpoints. For create, we only need one transaction: > inside, we visit all disks affected by the checkpoint, and create a > new enabled bitmap, as well

Re: [libvirt] [PATCH v10 19/19] backup: Prevent snapshots and checkpoints at same time

2019-07-24 Thread Daniel P . Berrangé
On Wed, Jul 24, 2019 at 12:56:09AM -0500, Eric Blake wrote: > Earlier patches mentioned that the initial implementation will prevent > snapshots and checkpoints from being used on the same domain at once. > However, the actual restriction is done in this separate patch to make > it easier to lift

Re: [libvirt] [PATCH v10 16/19] backup: qemu: Implement metadata tracking for checkpoint APIs

2019-07-24 Thread Daniel P . Berrangé
On Wed, Jul 24, 2019 at 12:56:06AM -0500, Eric Blake wrote: > A lot of this work heavily copies from the existing snapshot > APIs. The interaction with qemu during create/delete still > needs to be implemented, but this takes care of all the libvirt > metadata (saving and restoring XML, and

Re: [libvirt] [PATCH v10 17/19] backup: qemu: Add helper API for looking up node name

2019-07-24 Thread Daniel P . Berrangé
On Wed, Jul 24, 2019 at 12:56:07AM -0500, Eric Blake wrote: > Qemu bitmap operations require knowing the node name associated with > the format layer (the qcow2 file); as upcoming patches will be > grabbing that information frequently, make a helper function to access > it. > > Signed-off-by:

Re: [libvirt] [PATCH v10 15/19] backup: qemu: Add directory for tracking checkpoints

2019-07-24 Thread Daniel P . Berrangé
On Wed, Jul 24, 2019 at 12:56:05AM -0500, Eric Blake wrote: > This is similar to the existing directory for snapshots; the domain > will save one xml file per checkpoint, for reloading on the next > libvirtd restart. Fortunately, since checkpoints mandate RNG > validation, we are assured that the

Re: [libvirt] [PATCH v10 15/19] backup: qemu: Add directory for tracking checkpoints

2019-07-24 Thread Daniel P . Berrangé
On Wed, Jul 24, 2019 at 12:56:05AM -0500, Eric Blake wrote: > This is similar to the existing directory for snapshots; the domain > will save one xml file per checkpoint, for reloading on the next > libvirtd restart. Fortunately, since checkpoints mandate RNG > validation, we are assured that the

Re: [libvirt] [PATCH v4 8/8] qemu_driver: hook up query-cpu-model-comparison

2019-07-24 Thread Boris Fiuczynski
Reviewed-by: Boris Fiuczynski On 7/17/19 4:03 PM, Collin Walling wrote: This command is hooked into the virsh hypervisor-cpu-compare command. As such, the CPU model XML provided to the command will be compared to the hypervisor CPU contained in the QEMU capabilities file for the appropriate

Re: [libvirt] [PATCH v4 5/8] qemu_monitor: implement query-cpu-model-comparison

2019-07-24 Thread Boris Fiuczynski
On 7/17/19 4:03 PM, Collin Walling wrote: Interfaces with QEMU to compare CPU models. The command takes two CPU models, A and B, that are given a model name and an optional list of CPU features. Through the query-cpu-model-comparison command issued via QMP, a result is produced that contains the

Re: [libvirt] [PATCH v4 3/8] qemu_capabilities: introduce QEMU_CAPS_QUERY_CPU_MODEL_BASELINE

2019-07-24 Thread Boris Fiuczynski
Reviewed-by: Boris Fiuczynski On 7/17/19 4:03 PM, Collin Walling wrote: This capability enables CPU model baselining between two CPU definitions via QMP. Signed-off-by: Collin Walling Reviewed-by: Daniel Henrique Barboza --- src/qemu/qemu_capabilities.c | 2 ++

Re: [libvirt] [PATCH v4 6/8] qemu_capabilities: introduce QEMU_CAPS_QUERY_CPU_MODEL_COMPARISON

2019-07-24 Thread Boris Fiuczynski
Reviewed-by: Boris Fiuczynski On 7/17/19 4:03 PM, Collin Walling wrote: This capability enables CPU model comparison between two CPU definitions via QMP. Signed-off-by: Collin Walling Reviewed-by: Daniel Henrique Barboza --- src/qemu/qemu_capabilities.c | 2 ++

Re: [libvirt] [PATCH v4 1/8] qemu_monitor: helper functions for CPU models

2019-07-24 Thread Boris Fiuczynski
Reviewed-by: Boris Fiuczynski On 7/17/19 4:03 PM, Collin Walling wrote: Refactor some code in qemuMonitorJSONGetCPUModelExpansion to be later used for the comparison and baseline functions. This does not alter any functionality. Signed-off-by: Collin Walling Reviewed-by: Bjoern Walk

Re: [libvirt] [PATCH v10 13/19] backup: test: Implement metadata tracking for checkpoint APIs

2019-07-24 Thread Daniel P . Berrangé
On Wed, Jul 24, 2019 at 12:56:03AM -0500, Eric Blake wrote: > A lot of this work heavily copies from the existing snapshot APIs. > The test driver doesn't really have to do anything more than just > expose an interface into libvirt metadata, making it possible to test > saving and restoring XML,

Re: [libvirt] [PATCH v10 14/19] backup: Add virsh-checkpoints test

2019-07-24 Thread Daniel P . Berrangé
On Wed, Jul 24, 2019 at 12:56:04AM -0500, Eric Blake wrote: > Similar to virsh-snapshots (which also gets a minor tweak, to prove we > properly lock out one API from the other until later integration > efforts figure out the best way to proceed). Provides decent coverage > of the checkpoint API,

Re: [libvirt] [PATCH v4 4/8] qemu_driver: hook up query-cpu-model-baseline

2019-07-24 Thread Boris Fiuczynski
Besides the comment below Reviewed-by: Boris Fiuczynski On 7/17/19 4:03 PM, Collin Walling wrote: This command is hooked into the virsh hypervisor-cpu-baseline command. As such, the CPU models provided in the XML sent to the command will be baselined with the CPU contained in the QEMU

Re: [libvirt] [PATCH v4 7/8] cpu_conf: xml to cpu definition parse helper

2019-07-24 Thread Boris Fiuczynski
Reviewed-by: Boris Fiuczynski On 7/17/19 4:03 PM, Collin Walling wrote: Implement an XML to virCPUDefPtr helper that handles the ctxt prerequisite for virCPUDefParseXML. This does not alter any functionality. Signed-off-by: Collin Walling Reviewed-by: Bjoern Walk Reviewed-by: Daniel

Re: [libvirt] [PATCH v4 2/8] qemu_monitor: implement query-cpu-model-baseline

2019-07-24 Thread Boris Fiuczynski
On 7/17/19 4:03 PM, Collin Walling wrote: Interfaces with QEMU to baseline CPU models. The command takes two CPU models, A and B, that are given a model name and an optional list of CPU features. Through the query-cpu-model-baseline command issued via QMP, a result is produced that contains a

Re: [libvirt] [PATCH v10 12/19] backup: Implement virsh support for checkpoints

2019-07-24 Thread Daniel P . Berrangé
On Wed, Jul 24, 2019 at 12:56:02AM -0500, Eric Blake wrote: > Introduce a bunch of new virsh commands for managing checkpoints in > isolation. More commands are needed for performing incremental > backups, but these commands were easy to implement by modeling heavily > after virsh-snapshot.c.

Re: [libvirt] [PATCH v10 08/19] backup: Parse and output checkpoint XML

2019-07-24 Thread Peter Krempa
On Wed, Jul 24, 2019 at 17:11:19 +0100, Daniel Berrange wrote: > On Wed, Jul 24, 2019 at 12:55:58AM -0500, Eric Blake wrote: > > Add a new file checkpoint_conf.c that performs the translation to and > > from new XML describing a checkpoint. The code shares a common base > > class with snapshots,

Re: [libvirt] [PATCH v10 09/19] backup: Allow for lists of checkpoint objects

2019-07-24 Thread Daniel P . Berrangé
On Wed, Jul 24, 2019 at 12:55:59AM -0500, Eric Blake wrote: > Create a new file for managing a list of checkpoint objects, borrowing > heavily from existing virDomainSnapshotObjList paradigms. > > Note that while snapshots definitely have a use case for multiple > children to a single parent

Re: [libvirt] [PATCH v10 08/19] backup: Parse and output checkpoint XML

2019-07-24 Thread Daniel P . Berrangé
On Wed, Jul 24, 2019 at 12:55:58AM -0500, Eric Blake wrote: > Add a new file checkpoint_conf.c that performs the translation to and > from new XML describing a checkpoint. The code shares a common base > class with snapshots, since a checkpoint similarly represents the > domain state at a moment

Re: [libvirt] [PATCH v10 05/19] backup: Document new XML for checkpoints

2019-07-24 Thread Daniel P . Berrangé
On Wed, Jul 24, 2019 at 12:55:55AM -0500, Eric Blake wrote: > Prepare for new checkpoint APIs by describing the XML that will > represent a checkpoint. The checkpoint XML is modeled heavily after > virDomainSnapshotPtr. See the docs for more details. > > Add testsuite coverage for some minimal

Re: [libvirt] [PATCH v10 06/19] backup: Introduce virDomainCheckpoint APIs

2019-07-24 Thread Daniel P . Berrangé
On Wed, Jul 24, 2019 at 12:55:56AM -0500, Eric Blake wrote: > Introduce a bunch of new public APIs related to backup checkpoints. > Checkpoints are modeled heavily after virDomainSnapshotPtr (both > represent a point in time of the guest), although a snapshot exists > with the intent of rolling

Re: [libvirt] [PATCH v10 19/19] backup: Prevent snapshots and checkpoints at same time

2019-07-24 Thread Peter Krempa
On Wed, Jul 24, 2019 at 00:56:09 -0500, Eric Blake wrote: > Earlier patches mentioned that the initial implementation will prevent > snapshots and checkpoints from being used on the same domain at once. > However, the actual restriction is done in this separate patch to make > it easier to lift

Re: [libvirt] [PATCH v2 3/3] test_driver: testDomainSetMaxMemory should simply forward the call

2019-07-24 Thread Erik Skultety
On Wed, Jul 24, 2019 at 02:53:23PM +0200, Erik Skultety wrote: > On Fri, Jul 12, 2019 at 07:55:35AM +0200, Ilias Stamatis wrote: > > Signed-off-by: Ilias Stamatis > > --- > > This patch cannot be applied, was it formatted from a different branch? I only > applied the diff, built and reviewed.

Re: [libvirt] [PATCH v10 04/19] backup: qemu: Detect node names at domain startup

2019-07-24 Thread Daniel P . Berrangé
On Wed, Jul 24, 2019 at 12:55:54AM -0500, Eric Blake wrote: > If we are using -blockdev, then node names are always available > (because we set them). But when not using it, we were scraping node > names after reconnecting a new libvirtd to an existing guest (see > qemuProcessReconnect), and

Re: [libvirt] [PATCH v10 03/19] snapshot: Documentation and comment improvements

2019-07-24 Thread Daniel P . Berrangé
On Wed, Jul 24, 2019 at 12:55:53AM -0500, Eric Blake wrote: > Changes noticed while copying to similar aspects of checkpoints. > > Signed-off-by: Eric Blake > --- > docs/formatsnapshot.html.in | 8 +++- > tests/virsh-snapshot| 2 +- > 2 files changed, 4 insertions(+), 6 deletions(-)

Re: [libvirt] [PATCH v10 02/19] snapshot: Saner error message for duplicate create

2019-07-24 Thread Daniel P . Berrangé
On Wed, Jul 24, 2019 at 12:55:52AM -0500, Eric Blake wrote: > Any message that is easy to trigger (as evidenced by the testsuite > update) should not use 'internal error' as its category. > > Signed-off-by: Eric Blake > --- > src/conf/virdomainmomentobjlist.c | 4 ++-- > tests/virsh-snapshot

Re: [libvirt] [PATCH v10 00/19] Checkpoint APIs (incremental backup saga)

2019-07-24 Thread Daniel P . Berrangé
On Wed, Jul 24, 2019 at 12:55:50AM -0500, Eric Blake wrote: > This is a subset of v10 of incremental backup, fixing Peter's review > comments from v9 (and even some from v8 that I had missed earlier). > There's still a lot more rebasing churn to resolve in the backup > portion of the series before

Re: [libvirt] [PATCH v2 0/2] test_driver: implement virDomainSetNumaParameters

2019-07-24 Thread Erik Skultety
On Wed, Jul 24, 2019 at 04:31:32PM +0200, Ilias Stamatis wrote: > Change since v1: > * virDomainObjGetOneDefState is used instead of virDomainObjGetOneDef > > I send these 2 patches together, since testConnectSupportsFeature needs > to be implemented in order for testDomainSetNumaParameters to

Re: [libvirt] [PATCH v10 01/19] snapshot: Don't leak moment obj list metaroot to callers

2019-07-24 Thread Daniel P . Berrangé
On Wed, Jul 24, 2019 at 12:55:51AM -0500, Eric Blake wrote: > virDomainSnapshotFindByName(list, NULL) should return NULL, rather > than the internal-use-only metaroot. Most existing callers pass in a > non-NULL name; the few that don't are immediately calling > virDomainMomentSetParent (which

Re: [libvirt] [PATCH v2] implement virDomainSetInterfaceParameters

2019-07-24 Thread Erik Skultety
On Wed, Jul 24, 2019 at 04:07:29PM +0200, Ilias Stamatis wrote: > Signed-off-by: Ilias Stamatis > --- > src/test/test_driver.c | 106 + > 1 file changed, 106 insertions(+) > > diff --git a/src/test/test_driver.c b/src/test/test_driver.c > index

Re: [libvirt] [RFC] New domain job control and stat APIs

2019-07-24 Thread Daniel P . Berrangé
On Wed, Jul 10, 2019 at 02:27:21PM +0200, Peter Krempa wrote: > Currently we don't have a consolidated approach for managing > asynchronous long-running domain jobs. Historically there were > long-running jobs which interlocked with each other and thus there was > only one such job possible at

[libvirt] [PATCH v2 0/2] test_driver: implement virDomainSetNumaParameters

2019-07-24 Thread Ilias Stamatis
Change since v1: * virDomainObjGetOneDefState is used instead of virDomainObjGetOneDef I send these 2 patches together, since testConnectSupportsFeature needs to be implemented in order for testDomainSetNumaParameters to support string parameters. Ilias Stamatis (2): test_driver: implement

[libvirt] [PATCH v2 1/2] test_driver: implement virConnectSupportsFeature

2019-07-24 Thread Ilias Stamatis
Make the test driver only support the VIR_TYPED_PARAM_STRING flag for now. Signed-off-by: Ilias Stamatis --- src/test/test_driver.c | 29 + 1 file changed, 29 insertions(+) mode change 100644 => 100755 src/test/test_driver.c diff --git a/src/test/test_driver.c

[libvirt] [PATCH v2 2/2] test_driver: implement virDomainSetNumaParameters

2019-07-24 Thread Ilias Stamatis
Signed-off-by: Ilias Stamatis --- src/test/test_driver.c | 82 ++ 1 file changed, 82 insertions(+) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 6221f5b9ae..127403bc0c 100755 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c

Re: [libvirt] [PATCH] test_driver: implement virDomainMemoryStats

2019-07-24 Thread Erik Skultety
On Tue, Jul 16, 2019 at 11:36:31PM +0200, Ilias Stamatis wrote: > Signed-off-by: Ilias Stamatis > --- > src/test/test_driver.c | 52 ++ > 1 file changed, 52 insertions(+) > > diff --git a/src/test/test_driver.c b/src/test/test_driver.c > index

[libvirt] [PATCH v2] implement virDomainSetInterfaceParameters

2019-07-24 Thread Ilias Stamatis
Signed-off-by: Ilias Stamatis --- src/test/test_driver.c | 106 + 1 file changed, 106 insertions(+) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 7cf92e78a7..fce38acc17 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c

Re: [libvirt] [PATCH v2 3/3] test_driver: testDomainSetMaxMemory should simply forward the call

2019-07-24 Thread Erik Skultety
On Fri, Jul 12, 2019 at 07:55:35AM +0200, Ilias Stamatis wrote: > Signed-off-by: Ilias Stamatis > --- This patch cannot be applied, was it formatted from a different branch? I only applied the diff, built and reviewed. Like I said in the other series, I could fix it, but I'd be forging a patch

Re: [libvirt] [PATCH v2 2/3] test_driver: testDomainSetMemory should forward the call with VIR_DOMAIN_AFFECT_LIVE

2019-07-24 Thread Erik Skultety
On Fri, Jul 12, 2019 at 07:55:34AM +0200, Ilias Stamatis wrote: > Signed-off-by: Ilias Stamatis > --- Reviewed-by: Erik Skultety -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH v2 1/3] test_driver: consider flags in testDomainSetMemoryFlags

2019-07-24 Thread Erik Skultety
On Fri, Jul 12, 2019 at 07:55:33AM +0200, Ilias Stamatis wrote: > Update the current or max memory, on the persistent or live definition > depending on the flags which are currently ignored. > > Signed-off-by: Ilias Stamatis > --- > src/test/test_driver.c | 51

Re: [libvirt] [PATCH] test_driver: implement virDomainInjectNMI

2019-07-24 Thread Erik Skultety
On Thu, Jul 18, 2019 at 12:29:53PM +0200, Ilias Stamatis wrote: > Signed-off-by: Ilias Stamatis > --- Reviewed-by: Erik Skultety -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] Problem with version 5.5.x

2019-07-24 Thread Raghav Gururajan
> Unfortunately no, this will require one more fix.  I managed to > reproduce it on my gentoo testing machine. Glad that you were able to reproduce. > No need for the debug logs, I've tracked down the issue and working on > a fix, thanks for reporting it. That's great to hear. Thank you

Re: [libvirt] Problem with version 5.5.x

2019-07-24 Thread Pavel Hrdina
On Wed, Jul 24, 2019 at 12:27:58PM +0200, Martin Kletzander wrote: > [Cc'ing Pavel in case he already has a hunch as to whether it's fixed or not] > > Did one of the latest fixes [1] help in any way? Unfortunately no, this will require one more fix. I managed to reproduce it on my gentoo

Re: [libvirt] [PATCH] implement virDomainSetInterfaceParameters

2019-07-24 Thread Ilias Stamatis
On Wed, Jul 24, 2019 at 1:04 PM Erik Skultety wrote: > > On Sat, Jul 06, 2019 at 01:24:22PM +0200, Ilias Stamatis wrote: > > Signed-off-by: Ilias Stamatis > > --- > ... > > > + > > +/* average or floor are mandatory, peak and burst are optional */ > > +if (!bandwidth->in->average &&

Re: [libvirt] [PATCH] test_driver: implement virDomainSetMemoryStatsPeriod

2019-07-24 Thread Erik Skultety
On Thu, Jul 11, 2019 at 01:22:02PM +0200, Ilias Stamatis wrote: > Signed-off-by: Ilias Stamatis > --- Reviewed-by: Erik Skultety -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH] implement virDomainSetInterfaceParameters

2019-07-24 Thread Erik Skultety
On Sat, Jul 06, 2019 at 01:24:22PM +0200, Ilias Stamatis wrote: > Signed-off-by: Ilias Stamatis > --- ... > + > +/* average or floor are mandatory, peak and burst are optional */ > +if (!bandwidth->in->average && !bandwidth->in->floor) > +VIR_FREE(bandwidth->in); > +if

Re: [libvirt] [PATCH Rust 3/4] fix pointer type of macro used to convert rs string to c string

2019-07-24 Thread Martin Kletzander
On Wed, Jul 17, 2019 at 08:59:32AM +, Sahid Orentino Ferdjaoui wrote: In this commit we also add todo and warning to avoid using them + remove them in future. Signed-off-by: Sahid Orentino Ferdjaoui --- src/lib.rs | 23 +-- 1 file changed, 21 insertions(+), 2

Re: [libvirt] [PATCH Rust 1/4] connect: cleanup around Connect::open_auth()'s method

2019-07-24 Thread Martin Kletzander
On Wed, Jul 17, 2019 at 08:59:30AM +, Sahid Orentino Ferdjaoui wrote: In this refactor we avoid to enclose all the code with unsafe tags and just use it when necessary. Also we add annotations to explain why it's safe to use. The integrations tests related are also been reviewed to avoid

Re: [libvirt] [PATCH Rust 4/4] fix email address in Cargo.toml + update README

2019-07-24 Thread Martin Kletzander
On Wed, Jul 17, 2019 at 08:59:33AM +, Sahid Orentino Ferdjaoui wrote: This is fixing the invalid email address in Cargo.toml + update the command examples to send patches so they CC the current maintainer. Signed-off-by: Sahid Orentino Ferdjaoui --- .gitpublish | 3 ++- Cargo.toml | 2 +-

Re: [libvirt] [PATCH 2/2] test_driver: implement virDomainSetNumaParameters

2019-07-24 Thread Erik Skultety
On Thu, Jul 04, 2019 at 11:32:07PM +0200, Ilias Stamatis wrote: > Signed-off-by: Ilias Stamatis > --- > src/test/test_driver.c | 82 ++ > 1 file changed, 82 insertions(+) > > diff --git a/src/test/test_driver.c b/src/test/test_driver.c > index

Re: [libvirt] Problem with version 5.5.x

2019-07-24 Thread Martin Kletzander
[Cc'ing Pavel in case he already has a hunch as to whether it's fixed or not] Did one of the latest fixes [1] help in any way? If yes, then it's going to be in the next release. If not, then in order to figure out where the issue is, we at least need some debug logs [2]. [1]

Re: [libvirt] [PATCH RESEND] qemu: Add support for overriding max threads per process limit

2019-07-24 Thread Daniel P . Berrangé
On Tue, Jul 23, 2019 at 07:56:56PM +, Jim Fehlig wrote: > Some VM configurations may result in a large number of threads created by > the associated qemu process which can exceed the system default limit. The > maximum number of threads allowed per process is controlled by the pids > cgroup

Re: [libvirt] [PATCH 0/3] cgroups v2 fixes

2019-07-24 Thread Peter Krempa
On Mon, Jul 22, 2019 at 15:07:03 +0200, Pavel Hrdina wrote: > Pavel Hrdina (3): > vircgroup: fix cgroups v2 controllers detection > vircgroupv2: store enabled controllers > vircgroupv2: remove ATTRIBUTE_UNUSED for used attribute ACK series. signature.asc Description: PGP signature --