Re: [libvirt PATCH 0/7] docs: ci: Update the CI pages with fresh contents

2023-10-10 Thread Pavel Hrdina
testing: Adjust the docs on how to run container workloads > locally > docs: testtck: Add a clear note on libvirt + Perl bindings dependency > docs: testtck: Expand the 'Run TCK' section on making use of > ci/jobs.sh With the issues fixed: Reviewed-by: Pavel Hrdina signature.asc Description: PGP signature

Re: [libvirt PATCH 7/7] docs: testtck: Expand the 'Run TCK' section on making use of ci/jobs.sh

2023-10-10 Thread Pavel Hrdina
On Wed, Sep 27, 2023 at 08:53:48PM +0200, Erik Skultety wrote: > Ever since commit 6e9bd600 added a new GitLab job description function Same here, please use full commit hash. > handling the integration test suite process to ci/jobs.sh it should be > mentioned in the docs. > This patch splits the

Re: [libvirt PATCH 5/7] docs: testing: Adjust the docs on how to run container workloads locally

2023-10-10 Thread Pavel Hrdina
On Wed, Sep 27, 2023 at 08:53:46PM +0200, Erik Skultety wrote: > The fact that we need ci/helper script to run the workloads remains > true, but the invocation has changed as of commit eb41e456 . We also Use full commit hash as in the future the short one might not be unique. > extracted GitLab j

Re: [libvirt PATCH 26/42] systemd: Switch virtchd to common templates

2023-09-26 Thread Pavel Hrdina
On Mon, Sep 25, 2023 at 08:58:24PM +0200, Andrea Bolognani wrote: > Signed-off-by: Andrea Bolognani > --- > src/ch/meson.build| 27 > src/ch/virtchd.service.in | 44 --- > 2 files changed, 23 insertions(+), 48 deletions(-) > de

Re: [libvirt PATCH v8 10/37] qemu: add functions to start and stop nbdkit

2023-09-20 Thread Pavel Hrdina
On Thu, Aug 31, 2023 at 04:39:50PM -0500, Jonathon Jongsma wrote: > Add some helper functions to build a virCommand object and run the > nbdkit process for a given virStorageSource. > > Signed-off-by: Jonathon Jongsma > Reviewed-by: Peter Krempa > --- > src/qemu/qemu_nbdkit.c | 250

[libvirt PATCH] qemu_nbdkit: fix possible null dereference

2023-09-20 Thread Pavel Hrdina
Function virGetConnectSecret() can return NULL so we need to check it since in virSecretGetSecretString() it gets dereferenced. Reported-by: coverity Signed-off-by: Pavel Hrdina --- src/qemu/qemu_nbdkit.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/qemu/qemu_nbdkit.c b/src/qemu

[libvirt PATCH v3 10/10] NEWS: document support for reverting external snapshots

2023-09-18 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- NEWS.rst | 8 1 file changed, 8 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index 926620b03f..940e6e348a 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -23,6 +23,14 @@ v9.8.0 (unreleased) * **New features** + * QEMU: implement reverting external

[libvirt PATCH v3 07/10] qemu_snapshot: fix reverting external snapshot when not all disks are included

2023-09-18 Thread Pavel Hrdina
We need to skip all disks that have snapshot type other than 'external'. Signed-off-by: Pavel Hrdina --- src/qemu/qemu_snapshot.c | 12 1 file changed, 12 insertions(+) diff --git a/src/qemu/qemu_snapshot.c b/src/qemu/qemu_snapshot.c index cdc8e12cff..44bd97e564 100644

[libvirt PATCH v3 09/10] capabilities: report full external snapshot support

2023-09-18 Thread Pavel Hrdina
Now that deleting and reverting external snapshots is implemented we can report that in capabilities so management applications can use that information and start using external snapshots. Signed-off-by: Pavel Hrdina Reviewed-by: Peter Krempa --- docs/formatcaps.rst

[libvirt PATCH v3 05/10] qemuProcessStartWithMemoryState: add snapshot argument

2023-09-18 Thread Pavel Hrdina
When called from snapshot code we will need to pass snapshot object in order to make internal snapshots work correctly. Signed-off-by: Pavel Hrdina --- src/qemu/qemu_process.c | 9 - src/qemu/qemu_process.h | 1 + src/qemu/qemu_saveimage.c | 2 +- 3 files changed, 10 insertions

[libvirt PATCH v3 08/10] qemu_snapshot: correctly load the saved memory state file

2023-09-18 Thread Pavel Hrdina
Original code assumed that the memory state file is only migration stream but it has additional metadata stored by libvirt. To correctly load the memory state file we need to reuse code that is used when restoring domain from saved image. Signed-off-by: Pavel Hrdina --- src/qemu/qemu_snapshot.c

[libvirt PATCH v3 06/10] qemuProcessStartWithMemoryState: make it possible to use without data

2023-09-18 Thread Pavel Hrdina
When used with internal snapshots there is no memory state file so we have no data to load and decompression is not needed. Signed-off-by: Pavel Hrdina --- src/qemu/qemu_process.c | 23 +-- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/src/qemu

[libvirt PATCH v3 03/10] qemu_saveimage: move qemuSaveImageStartProcess to qemu_process

2023-09-18 Thread Pavel Hrdina
The function will no longer be used only when restoring VM as it will be used when reverting snapshot as well so move it to qemu_process and rename it accordingly. Signed-off-by: Pavel Hrdina --- src/qemu/qemu_process.c | 73 + src/qemu/qemu_process.h

[libvirt PATCH v3 04/10] qemuProcessStartWithMemoryState: allow setting reason for audit log

2023-09-18 Thread Pavel Hrdina
When called by snapshot code we will need to use different reason. Signed-off-by: Pavel Hrdina Reviewed-by: Peter Krempa --- src/qemu/qemu_process.c | 6 +- src/qemu/qemu_process.h | 1 + src/qemu/qemu_saveimage.c | 3 ++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a

[libvirt PATCH v3 01/10] qemu_saveimage: extract starting process to qemuSaveImageStartProcess

2023-09-18 Thread Pavel Hrdina
Part of qemuSaveImageStartVM() function will be used when reverting external snapshots. To avoid duplicating code and logic extract the shared bits into separate function. Signed-off-by: Pavel Hrdina --- src/qemu/qemu_saveimage.c | 96 +++ src/qemu

[libvirt PATCH v3 00/10] external snapshot revert fixes

2023-09-18 Thread Pavel Hrdina
qemuProcessStartWithMemoryState - change it to use cookie from memory state file instead of using cookie from snapshot xml - comments improvements - introduces new helpers to start and stop decompression process - reintroduces capability Pavel Hrdina (10): qemu_saveimage

[libvirt PATCH v3 02/10] qemu_saveimage: introduce helpers to decompress memory state file

2023-09-18 Thread Pavel Hrdina
These new helpers separates the code from the logic used to start new QEMU process with memory state and will make it easier to move qemuSaveImageStartProcess() into qemu_process.c file. Signed-off-by: Pavel Hrdina --- src/qemu/qemu_saveimage.c | 155 +++--- src

Re: [libvirt PATCH v2 1/6] qemu_snapshot: fix reverting external snapshot when not all disks are included

2023-09-01 Thread Pavel Hrdina
On Fri, Sep 01, 2023 at 11:10:43AM +0200, Peter Krempa wrote: > On Fri, Sep 01, 2023 at 10:32:12 +0200, Pavel Hrdina wrote: > > We need to skip all disks that have snapshot type other than 'external'. > > Since the commit message is vague on the specific problem details

[libvirt PATCH v2 2/6] qemu_saveimage: export virQEMUSaveFormat enum

2023-09-01 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- src/qemu/qemu_saveimage.c | 17 - src/qemu/qemu_saveimage.h | 17 + 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/qemu/qemu_saveimage.c b/src/qemu/qemu_saveimage.c index 41310d6a9a..eca47171c2 100644 --- a/src

[libvirt PATCH v2 4/6] qemu_snapshot: correctly load the saved memory state file

2023-09-01 Thread Pavel Hrdina
qemuSaveImageStartVM() because the external snapshot memory state is done by qemuSaveImageCreate(). Signed-off-by: Pavel Hrdina --- src/qemu/qemu_snapshot.c | 115 +-- 1 file changed, 97 insertions(+), 18 deletions(-) diff --git a/src/qemu/qemu_snapshot.c b/src/qemu

[libvirt PATCH v2 5/6] NEWS: document support for reverting external snapshots

2023-09-01 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- NEWS.rst | 8 1 file changed, 8 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index e40c8ac259..a3be76d6cc 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -28,6 +28,14 @@ v9.7.0 (unreleased) 2) pre-binding the variant driver using the ``--driver`` option

[libvirt PATCH v2 3/6] qemu_saveimage: export qemuSaveImageGetCompressionCommand

2023-09-01 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- src/qemu/qemu_saveimage.c | 2 +- src/qemu/qemu_saveimage.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_saveimage.c b/src/qemu/qemu_saveimage.c index eca47171c2..44ab263144 100644 --- a/src/qemu/qemu_saveimage.c +++ b/src

[libvirt PATCH v2 6/6] Revert "capabilities: report full external snapshot support"

2023-09-01 Thread Pavel Hrdina
Reverting external snapshot for running VM doesn't work correctly so we should not report this capability until it is fixed. This reverts commit de71573bfec7f3acd22ec74794318de121716e21. Signed-off-by: Pavel Hrdina --- docs/formatcaps.rst| 7 --- src

[libvirt PATCH v2 1/6] qemu_snapshot: fix reverting external snapshot when not all disks are included

2023-09-01 Thread Pavel Hrdina
We need to skip all disks that have snapshot type other than 'external'. Signed-off-by: Pavel Hrdina --- src/qemu/qemu_snapshot.c | 12 1 file changed, 12 insertions(+) diff --git a/src/qemu/qemu_snapshot.c b/src/qemu/qemu_snapshot.c index d943281e35..ff85d56572 100644

[libvirt PATCH v2 0/6] external snapshot revert fixes

2023-09-01 Thread Pavel Hrdina
9.7.0 in case the code fixing reverting snapshots is considered too complex. This v2 limits the impact only to snapshot code and no longer changes anything in qemu_saveimage except for exporting one function and one enum. Pavel Hrdina (6): qemu_snapshot: fix reverting external snapshot when not

Re: [libvirt PATCH 4/7] qemuSaveImageStartProcess: make it possible to use without header

2023-08-31 Thread Pavel Hrdina
On Thu, Aug 31, 2023 at 05:43:35PM +0200, Peter Krempa wrote: > On Thu, Aug 31, 2023 at 16:55:03 +0200, Pavel Hrdina wrote: > > When used with internal snapshots there is no header to be used and no > > memory state to be decompressed. > > I didn't yet have a look at

Re: [libvirt PATCH 0/7] external snapshot revert fixes

2023-08-31 Thread Pavel Hrdina
On Thu, Aug 31, 2023 at 04:54:59PM +0200, Pavel Hrdina wrote: > This fixes reverting external snapshots to not error out in cases where > it should work and makes it correctly load the memory state when > reverting to snapshot of running VM. Forget to mention that we need this

[libvirt PATCH 2/7] qemuSaveImageStartProcess: allow setting reason for audit log

2023-08-31 Thread Pavel Hrdina
When called by snapshot code we will need to use different reason. Signed-off-by: Pavel Hrdina --- src/qemu/qemu_saveimage.c | 6 -- src/qemu/qemu_saveimage.h | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_saveimage.c b/src/qemu/qemu_saveimage.c index

[libvirt PATCH 0/7] external snapshot revert fixes

2023-08-31 Thread Pavel Hrdina
This fixes reverting external snapshots to not error out in cases where it should work and makes it correctly load the memory state when reverting to snapshot of running VM. Pavel Hrdina (7): qemu_saveimage: extract starting process to qemuSaveImageStartProcess

[libvirt PATCH 5/7] qemu_snapshot: fix reverting external snapshot when not all disks are included

2023-08-31 Thread Pavel Hrdina
We need to skip all disks that have snapshot type other than 'external'. Signed-off-by: Pavel Hrdina --- src/qemu/qemu_snapshot.c | 12 1 file changed, 12 insertions(+) diff --git a/src/qemu/qemu_snapshot.c b/src/qemu/qemu_snapshot.c index d943281e35..ff85d56572 100644

[libvirt PATCH 3/7] qemuSaveImageStartProcess: add snapshot argument

2023-08-31 Thread Pavel Hrdina
When called from snapshot code we will need to pass snapshot object in order to make internal snapshots work correctly. Signed-off-by: Pavel Hrdina --- src/qemu/qemu_saveimage.c | 6 -- src/qemu/qemu_saveimage.h | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/qemu

[libvirt PATCH 6/7] qemu_snapshot: correctly load the saved memory state file

2023-08-31 Thread Pavel Hrdina
Original code assumed that the memory state file is only migration stream but it has additional metadata stored by libvirt. To correctly load the memory state file we need to reuse code that is used when restoring domain from saved image. Signed-off-by: Pavel Hrdina --- src/qemu/qemu_snapshot.c

[libvirt PATCH 7/7] NEWS: document support for reverting external snapshots

2023-08-31 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- NEWS.rst | 8 1 file changed, 8 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index e40c8ac259..a3be76d6cc 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -28,6 +28,14 @@ v9.7.0 (unreleased) 2) pre-binding the variant driver using the ``--driver`` option

[libvirt PATCH 4/7] qemuSaveImageStartProcess: make it possible to use without header

2023-08-31 Thread Pavel Hrdina
When used with internal snapshots there is no header to be used and no memory state to be decompressed. Signed-off-by: Pavel Hrdina --- src/qemu/qemu_saveimage.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_saveimage.c b/src/qemu/qemu_saveimage.c index

[libvirt PATCH 1/7] qemu_saveimage: extract starting process to qemuSaveImageStartProcess

2023-08-31 Thread Pavel Hrdina
Part of qemuSaveImageStartVM() function will be used when reverting external snapshots. To avoid duplicating code and logic extract the shared bits into separate function. Signed-off-by: Pavel Hrdina --- src/qemu/qemu_saveimage.c | 103 ++ src/qemu

[libvirt PATCH] NEWS: document support for reverting external snapshots

2023-08-30 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- NEWS.rst | 8 1 file changed, 8 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index e40c8ac259..a3be76d6cc 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -28,6 +28,14 @@ v9.7.0 (unreleased) 2) pre-binding the variant driver using the ``--driver`` option

Re: [PATCH] docs: Improve documentation of

2023-08-25 Thread Pavel Hrdina
tions(+) Reviewed-by: Pavel Hrdina signature.asc Description: PGP signature

Re: [PATCH 00/27] Move error messages onto a single line

2023-08-25 Thread Pavel Hrdina
t affects basically the whole libvirt code base. > And ideally I'd present a green pipeline but for some reason, I can't: > > https://gitlab.com/MichalPrivoznik/libvirt/-/pipelines/981105262 > > But the problem is not with my code rather than our CI. Unless there are objectio

[libvirt PATCH v2 2/2] capabilities: report full external snapshot support

2023-08-24 Thread Pavel Hrdina
Now that deleting and reverting external snapshots is implemented we can report that in capabilities so management applications can use that information and start using external snapshots. Signed-off-by: Pavel Hrdina --- docs/formatcaps.rst| 6 ++ src/conf

[libvirt PATCH v2 1/2] capabilities: reword disksnapshot feature to mention creating snapshots

2023-08-24 Thread Pavel Hrdina
Libvirt supports creating snapshots for a long time but the wording of the feature may imply that libvirt supports external snapshots in general but that is not true as users were not able to use APIs to delete or revert external snapshots. Signed-off-by: Pavel Hrdina --- docs/formatcaps.rst

[libvirt PATCH v2 0/2] reword and add external snapshot related capabilities

2023-08-24 Thread Pavel Hrdina
Pavel Hrdina (2): capabilities: reword disksnapshot feature to mention creating snapshots capabilities: report full external snapshot support docs/formatcaps.rst| 12 +--- src/conf/capabilities.c| 1 + src/conf/capabilities.h

Re: [libvirt PATCH] capabilities: report full external snapshot support

2023-08-24 Thread Pavel Hrdina
On Thu, Aug 24, 2023 at 05:44:32PM +0200, Peter Krempa wrote: > On Thu, Aug 24, 2023 at 17:29:49 +0200, Pavel Hrdina wrote: > > Now that deleting and reverting external snapshots is implemented we can > > report that in capabilities so management applications can use that > >

[libvirt PATCH] capabilities: report full external snapshot support

2023-08-24 Thread Pavel Hrdina
Now that deleting and reverting external snapshots is implemented we can report that in capabilities so management applications can use that information and start using external snapshots. Signed-off-by: Pavel Hrdina --- docs/formatcaps.rst| 6 ++ src/conf

Re: [PATCH RESEND 0/2] qemu: generate shorter channel target paths

2023-08-17 Thread Pavel Hrdina
t; qemu: Generate shorter channel target paths > qemu: Move channelTargetDir into stateDir Reviewed-by: Pavel Hrdina signature.asc Description: PGP signature

Re: [PATCH 3/3] meson: Drop python3_prog

2023-08-16 Thread Pavel Hrdina
On Wed, Aug 16, 2023 at 01:18:37PM +0200, Michal Prívozník wrote: > On 8/16/23 12:25, Pavel Hrdina wrote: > > On Tue, Aug 15, 2023 at 02:45:37PM +0200, Michal Privoznik wrote: > >> Signed-off-by: Michal Privoznik > >> --- > >> docs/meson.build

Re: [PATCH 3/3] meson: Drop python3_prog

2023-08-16 Thread Pavel Hrdina
On Tue, Aug 15, 2023 at 02:45:37PM +0200, Michal Privoznik wrote: > Signed-off-by: Michal Privoznik > --- > docs/meson.build| 7 +++ > meson.build | 4 ++-- > src/access/meson.build | 6 +++--- > src/meson.build | 43 +++-- >

[libvirt PATCH v3 13/25] qemu_snapshot: rename qemuSnapshotDeleteExternalPrepare

2023-08-14 Thread Pavel Hrdina
The new name reflects that we prepare data for external snapshot deletion and the old name will be used later for different part of code. Signed-off-by: Pavel Hrdina Reviewed-by: Peter Krempa --- src/qemu/qemu_snapshot.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff

[libvirt PATCH v3 06/25] qemu_snapshot: introduce qemuSnapshotDomainDefUpdateDisk

2023-08-14 Thread Pavel Hrdina
Extract the code that updates disks in domain definition while creating external snapshots. We will use it later in the external snapshot revert code. Signed-off-by: Pavel Hrdina Reviewed-by: Peter Krempa --- src/qemu/qemu_snapshot.c | 63 1 file

[libvirt PATCH v3 08/25] qemu_snapshot: introduce qemuSnapshotCreateQcow2Files

2023-08-14 Thread Pavel Hrdina
Extract creation of qcow2 files for external snapshots to separate function as we will need it for external snapshot revert code. Signed-off-by: Pavel Hrdina --- src/qemu/qemu_snapshot.c | 85 ++-- 1 file changed, 56 insertions(+), 29 deletions(-) diff --git

[libvirt PATCH v3 16/25] qemu_snapshot: prepare data for non-active leaf external snapshot deletion

2023-08-14 Thread Pavel Hrdina
In this case there is no need to run block commit and using qemu process at all. Signed-off-by: Pavel Hrdina Reviewed-by: Peter Krempa --- src/qemu/qemu_snapshot.c | 55 +++- 1 file changed, 32 insertions(+), 23 deletions(-) diff --git a/src/qemu

[libvirt PATCH v3 10/25] qemu_snapshot: move external disk prepare to single function

2023-08-14 Thread Pavel Hrdina
We will need to reuse the functionality when reverting external snapshots. Signed-off-by: Pavel Hrdina Reviewed-by: Peter Krempa --- src/qemu/qemu_snapshot.c | 38 +++--- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/src/qemu/qemu_snapshot.c b

[libvirt PATCH v3 25/25] qemu_snapshot: allow snapshot revert for external snapshots

2023-08-14 Thread Pavel Hrdina
Now that the support to revert external snapshots is implemented we can drop this check. Signed-off-by: Pavel Hrdina Reviewed-by: Peter Krempa --- src/qemu/qemu_snapshot.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/src/qemu/qemu_snapshot.c b/src/qemu/qemu_snapshot.c index

[libvirt PATCH v3 22/25] qemu_snapshot: update backing store after deleting external snapshot

2023-08-14 Thread Pavel Hrdina
process doing the merge operation. Signed-off-by: Pavel Hrdina --- src/qemu/qemu_snapshot.c | 122 +++ 1 file changed, 122 insertions(+) diff --git a/src/qemu/qemu_snapshot.c b/src/qemu/qemu_snapshot.c index 0238ab2249..8d0581d33b 100644 --- a/src/qemu

[libvirt PATCH v3 11/25] qemu_snapshot: use VIR_ASYNC_JOB_SNAPSHOT when reverting snapshot

2023-08-14 Thread Pavel Hrdina
Both creating and deleting snapshot are using VIR_ASYNC_JOB_SNAPSHOT but reverting is using VIR_ASYNC_JOB_START. Let's unify it to make it consistent for all snapshot operations. Signed-off-by: Pavel Hrdina --- src/qemu/qemu_snapshot.c | 19 ++- 1 file changed, 10 inser

[libvirt PATCH v3 21/25] qemuDomainGetImageIds: pass domain definition directly

2023-08-14 Thread Pavel Hrdina
We only need the domain definition from domain object. This will allow us to use it from snapshot code where we need to pass different domain definition. Signed-off-by: Pavel Hrdina --- src/qemu/qemu_backup.c | 2 +- src/qemu/qemu_blockjob.c | 2 +- src/qemu/qemu_domain.c | 8 src

[libvirt PATCH v3 09/25] qemuSnapshotCreateQcow2Files: use domain definition directly

2023-08-14 Thread Pavel Hrdina
To create new overlay files when external snapshot revert support is introduced we will be using different domain definition than what is currently used by the domain. Signed-off-by: Pavel Hrdina Reviewed-by: Peter Krempa --- src/qemu/qemu_snapshot.c | 13 +++-- 1 file changed, 7

[libvirt PATCH v3 17/25] qemu_snapshot: add support to delete external snapshot without block commit

2023-08-14 Thread Pavel Hrdina
When block commit is not needed we can just simply unlink the disk files. Signed-off-by: Pavel Hrdina Reviewed-by: Peter Krempa --- src/qemu/qemu_snapshot.c | 56 ++-- 1 file changed, 36 insertions(+), 20 deletions(-) diff --git a/src/qemu/qemu_snapshot.c b

[libvirt PATCH v3 23/25] qemu_snapshot: check only once if snapshot is external

2023-08-14 Thread Pavel Hrdina
There will be more external snapshot checks introduced by following patch so group them together. Signed-off-by: Pavel Hrdina Reviewed-by: Peter Krempa --- src/qemu/qemu_snapshot.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/qemu

[libvirt PATCH v3 01/25] libvirt_private: list virDomainMomentDefPostParse

2023-08-14 Thread Pavel Hrdina
We will need to call this function from qemu_snapshot when introducing external snapshot revert support. Signed-off-by: Pavel Hrdina Reviewed-by: Peter Krempa --- src/libvirt_private.syms | 4 1 file changed, 4 insertions(+) diff --git a/src/libvirt_private.syms b/src

[libvirt PATCH v3 12/25] qemu_snapshot: introduce external snapshot revert support

2023-08-14 Thread Pavel Hrdina
he current state before reverting they need to create a new snapshot. For now this will only work if the current snapshot is the last. Signed-off-by: Pavel Hrdina Reviewed-by: Peter Krempa --- src/qemu/qemu_snapshot.c | 278 ++- 1 file changed, 274 insert

[libvirt PATCH v3 20/25] virdomainmomentobjlist: introduce virDomainMomentIsAncestor

2023-08-14 Thread Pavel Hrdina
This new helper will allow us to check if we are able to delete external snapshot after user did revert to non-leaf snapshot. Signed-off-by: Pavel Hrdina Reviewed-by: Peter Krempa --- src/conf/virdomainmomentobjlist.c | 17 + src/conf/virdomainmomentobjlist.h | 4 src

[libvirt PATCH v3 02/25] snapshot_conf: export virDomainSnapshotDiskDefClear

2023-08-14 Thread Pavel Hrdina
We will need to call this function from qemu_snapshot when introducing external snapshot revert support. Signed-off-by: Pavel Hrdina Reviewed-by: Peter Krempa --- src/conf/snapshot_conf.c | 2 +- src/conf/snapshot_conf.h | 3 +++ src/libvirt_private.syms | 1 + 3 files changed, 5 insertions

[libvirt PATCH v3 19/25] qemu_snapshot: remove revertdisks when creating new snapshot

2023-08-14 Thread Pavel Hrdina
When user creates a new snapshot after reverting to non-leaf snapshot we no longer need to store the temporary overlays as they will be part of the VM XMLs stored in the newly created snapshot. Signed-off-by: Pavel Hrdina --- src/qemu/qemu_snapshot.c | 28 +++- 1 file

[libvirt PATCH v3 00/25] introduce external snapshot revert support

2023-08-14 Thread Pavel Hrdina
uses qemuDomainGetImageIds() to get correct UID and GID for virStorageSourceGetMetadata() and also for virCommandRun() as well by storing it in `struct _qemuSnapshotDisksWithBackingStoreData` Pavel Hrdina (25): libvirt_private: list virDomainMomentDefPostParse snapshot_conf: e

[libvirt PATCH v3 03/25] snapshot_conf: use alternate domain definition in virDomainSnapshotDefAssignExternalNames

2023-08-14 Thread Pavel Hrdina
default external file names. It should be still fixed to make it safe. Future external snapshot revert code will use this to generate default file names and in this case it would crash. Signed-off-by: Pavel Hrdina Reviewed-by: Peter Krempa --- src/conf/snapshot_conf.c | 8 +--- 1 file changed

[libvirt PATCH v3 05/25] virDomainSnapshotAlignDisks: Allow overriding user-configured snapshot default

2023-08-14 Thread Pavel Hrdina
This new option will be used by external snapshot revert code. Signed-off-by: Pavel Hrdina Reviewed-by: Peter Krempa --- src/conf/snapshot_conf.c | 15 --- src/conf/snapshot_conf.h | 3 ++- src/qemu/qemu_snapshot.c | 2 +- src/test/test_driver.c | 2 +- 4 files changed, 16

[libvirt PATCH v3 04/25] snapshot_conf: introduce metadata element

2023-08-14 Thread Pavel Hrdina
This new element will hold the new disk overlay created when reverting to non-leaf snapshot in order to remember the files libvirt created. Signed-off-by: Pavel Hrdina Reviewed-by: Peter Krempa --- src/conf/schemas/domainsnapshot.rng | 7 +++ src/conf/snapshot_conf.c| 30

[libvirt PATCH v3 24/25] qemu_snapshot: add checks for external snapshot deletion

2023-08-14 Thread Pavel Hrdina
creates new snapshot after reverting to non-leaf snapshot it creates a new branch. Deleting snapshot with multiple children will require block-stream which is not implemented for now. Signed-off-by: Pavel Hrdina Reviewed-by: Peter Krempa --- src/qemu/qemu_snapshot.c | 21

[libvirt PATCH v3 18/25] qemu_snapshot: delete: properly update parent snapshot with revert data

2023-08-14 Thread Pavel Hrdina
original overlay files. Signed-off-by: Pavel Hrdina Reviewed-by: Peter Krempa --- src/qemu/qemu_snapshot.c | 40 1 file changed, 40 insertions(+) diff --git a/src/qemu/qemu_snapshot.c b/src/qemu/qemu_snapshot.c index a67be1ae49..6dd420a53b 100644 --- a

[libvirt PATCH v3 15/25] qemu_snapshot: add merge to external snapshot delete prepare data

2023-08-14 Thread Pavel Hrdina
Before external snapshot revert every delete operation did block commit in order to delete a snapshot. But now when user reverts to non-leaf snapshot deleting leaf snapshot will not have any overlay files so we can just simply delete the snapshot images. Signed-off-by: Pavel Hrdina Reviewed-by

[libvirt PATCH v3 14/25] qemu_snapshot: extract external snapshot delete prepare to function

2023-08-14 Thread Pavel Hrdina
This part of code is about to grow to make deletion work when user reverts to non-leaf snapshot. Signed-off-by: Pavel Hrdina Reviewed-by: Peter Krempa --- src/qemu/qemu_snapshot.c | 104 ++- 1 file changed, 70 insertions(+), 34 deletions(-) diff --git a/src

[libvirt PATCH v3 07/25] qemu_snapshot: use virDomainDiskByName while updating domain def

2023-08-14 Thread Pavel Hrdina
active or inactive definition. The current code would crash so use virDomainDiskByName() to get the correct disk from the domain definition based on the disk name and make sure it exists. Signed-off-by: Pavel Hrdina Reviewed-by: Peter Krempa --- src/qemu/qemu_snapshot.c | 5 - 1 file changed, 4

Re: [libvirt PATCH v2 11/24] qemu_snapshot: use VIR_ASYNC_JOB_SNAPSHOT when reverting snapshot

2023-07-25 Thread Pavel Hrdina
On Tue, Jul 25, 2023 at 03:54:54PM +0200, Peter Krempa wrote: > On Tue, Jun 27, 2023 at 17:07:14 +0200, Pavel Hrdina wrote: > > So what is this actually doing? > > > > Signed-off-by: Pavel Hrdina > > --- > > src/qemu/qemu_snapshot.c | 19 ++- &

[libvirt PATCH v2 11/24] qemu_snapshot: use VIR_ASYNC_JOB_SNAPSHOT when reverting snapshot

2023-06-27 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- src/qemu/qemu_snapshot.c | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/qemu/qemu_snapshot.c b/src/qemu/qemu_snapshot.c index 5d2ffdeee6..1cb0ea55de 100644 --- a/src/qemu/qemu_snapshot.c +++ b/src/qemu/qemu_snapshot.c

[libvirt PATCH v2 02/24] snapshot_conf: export virDomainSnapshotDiskDefClear

2023-06-27 Thread Pavel Hrdina
We will need to call this function from qemu_snapshot when introducing external snapshot revert support. Signed-off-by: Pavel Hrdina Reviewed-by: Peter Krempa --- src/conf/snapshot_conf.c | 2 +- src/conf/snapshot_conf.h | 3 +++ src/libvirt_private.syms | 1 + 3 files changed, 5 insertions

[libvirt PATCH v2 20/24] virdomainmomentobjlist: introduce virDomainMomentIsAncestor

2023-06-27 Thread Pavel Hrdina
This new helper will allow us to check if we are able to delete external snapshot after user did revert to non-leaf snapshot. Signed-off-by: Pavel Hrdina Reviewed-by: Peter Krempa --- src/conf/virdomainmomentobjlist.c | 17 + src/conf/virdomainmomentobjlist.h | 4 src

[libvirt PATCH v2 14/24] qemu_snapshot: extract external snapshot delete prepare to function

2023-06-27 Thread Pavel Hrdina
This part of code is about to grow to make deletion work when user reverts to non-leaf snapshot. Signed-off-by: Pavel Hrdina Reviewed-by: Peter Krempa --- src/qemu/qemu_snapshot.c | 89 +--- 1 file changed, 55 insertions(+), 34 deletions(-) diff --git a/src

[libvirt PATCH v2 00/24] introduce external snapshot revert support

2023-06-27 Thread Pavel Hrdina
/phrdina/libvirt/-/tree/snapshot-revert-external Pavel Hrdina (24): libvirt_private: list virDomainMomentDefPostParse snapshot_conf: export virDomainSnapshotDiskDefClear snapshot_conf: use alternate domain definition in virDomainSnapshotDefAssignExternalNames snapshot_conf: introduce

[libvirt PATCH v2 07/24] qemu_snapshot: use virDomainDiskByName while updating domain def

2023-06-27 Thread Pavel Hrdina
active or inactive definition. The current code would crash so use virDomainDiskByName() to get the correct disk from the domain definition based on the disk name and make sure it exists. Signed-off-by: Pavel Hrdina Reviewed-by: Peter Krempa --- src/qemu/qemu_snapshot.c | 5 - 1 file changed, 4

[libvirt PATCH v2 21/24] qemu_snapshot: update backing store after deleting external snapshot

2023-06-27 Thread Pavel Hrdina
process doing the merge operation. Signed-off-by: Pavel Hrdina --- src/qemu/qemu_snapshot.c | 95 1 file changed, 95 insertions(+) diff --git a/src/qemu/qemu_snapshot.c b/src/qemu/qemu_snapshot.c index 2950ad7d77..337c83f151 100644 --- a/src/qemu

[libvirt PATCH v2 19/24] qemu_snapshot: remove revertdisks when creating new snapshot

2023-06-27 Thread Pavel Hrdina
When user creates a new snapshot after reverting to non-leaf snapshot we no longer need to store the temporary overlays as they will be part of the VM XMLs stored in the newly created snapshot. Signed-off-by: Pavel Hrdina --- src/qemu/qemu_snapshot.c | 23 ++- 1 file changed

[libvirt PATCH v2 05/24] snapshot_conf: add new argument to virDomainSnapshotAlignDisks

2023-06-27 Thread Pavel Hrdina
This new option will be used by external snapshot revert code. Signed-off-by: Pavel Hrdina --- src/conf/snapshot_conf.c | 15 --- src/conf/snapshot_conf.h | 3 ++- src/qemu/qemu_snapshot.c | 2 +- src/test/test_driver.c | 2 +- 4 files changed, 16 insertions(+), 6 deletions

[libvirt PATCH v2 18/24] qemu_snapshot: delete: properly update parent snapshot with revert data

2023-06-27 Thread Pavel Hrdina
original overlay files. Signed-off-by: Pavel Hrdina Reviewed-by: Peter Krempa --- src/qemu/qemu_snapshot.c | 40 1 file changed, 40 insertions(+) diff --git a/src/qemu/qemu_snapshot.c b/src/qemu/qemu_snapshot.c index b08e06d312..a206f015c4 100644 --- a

[libvirt PATCH v2 06/24] qemu_snapshot: introduce qemuSnapshotDomainDefUpdateDisk

2023-06-27 Thread Pavel Hrdina
Extract the code that updates disks in domain definition while creating external snapshots. We will use it later in the external snapshot revert code. Signed-off-by: Pavel Hrdina Reviewed-by: Peter Krempa --- src/qemu/qemu_snapshot.c | 63 1 file

[libvirt PATCH v2 23/24] qemu_snapshot: add checks for external snapshot deletion

2023-06-27 Thread Pavel Hrdina
creates new snapshot after reverting to non-leaf snapshot it creates a new branch. Deleting snapshot with multiple children will require block-stream which is not implemented for now. Signed-off-by: Pavel Hrdina --- src/qemu/qemu_snapshot.c | 21 + 1 file changed, 21

[libvirt PATCH v2 24/24] qemu_snapshot: allow snapshot revert for external snapshots

2023-06-27 Thread Pavel Hrdina
Now that the support to revert external snapshots is implemented we can drop this check. Signed-off-by: Pavel Hrdina --- src/qemu/qemu_snapshot.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/src/qemu/qemu_snapshot.c b/src/qemu/qemu_snapshot.c index 9e8a7f2f9f..5150e8685a 100644

[libvirt PATCH v2 10/24] qemu_snapshot: move external disk prepare to single function

2023-06-27 Thread Pavel Hrdina
We will need to reuse the functionality when reverting external snapshots. Signed-off-by: Pavel Hrdina --- src/qemu/qemu_snapshot.c | 38 +++--- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/src/qemu/qemu_snapshot.c b/src/qemu/qemu_snapshot.c

[libvirt PATCH v2 22/24] qemu_snapshot: check only once if snapshot is external

2023-06-27 Thread Pavel Hrdina
There will be more external snapshot checks introduced by following patch so group them together. Signed-off-by: Pavel Hrdina Reviewed-by: Peter Krempa --- src/qemu/qemu_snapshot.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/qemu

[libvirt PATCH v2 12/24] qemu_snapshot: introduce external snapshot revert support

2023-06-27 Thread Pavel Hrdina
he current state before reverting they need to create a new snapshot. For now this will only work if the current snapshot is the last. Signed-off-by: Pavel Hrdina --- src/qemu/qemu_snapshot.c | 232 ++- 1 file changed, 228 insertions(+), 4 deletions(-) di

[libvirt PATCH v2 17/24] qemu_snapshot: add support to delete external snapshot without block commit

2023-06-27 Thread Pavel Hrdina
When block commit is not needed we can just simply unlink the disk files. Signed-off-by: Pavel Hrdina --- src/qemu/qemu_snapshot.c | 56 ++-- 1 file changed, 36 insertions(+), 20 deletions(-) diff --git a/src/qemu/qemu_snapshot.c b/src/qemu/qemu_snapshot.c

[libvirt PATCH v2 16/24] qemu_snapshot: prepare data for non-active leaf external snapshot deletion

2023-06-27 Thread Pavel Hrdina
In this case there is no need to run block commit and using qemu process at all. Signed-off-by: Pavel Hrdina Reviewed-by: Peter Krempa --- src/qemu/qemu_snapshot.c | 55 +++- 1 file changed, 32 insertions(+), 23 deletions(-) diff --git a/src/qemu

[libvirt PATCH v2 08/24] qemu_snapshot: introduce qemuSnapshotCreateQcow2Files

2023-06-27 Thread Pavel Hrdina
Extract creation of qcow2 files for external snapshots to separate function as we will need it for external snapshot revert code. Signed-off-by: Pavel Hrdina --- src/qemu/qemu_snapshot.c | 67 +--- 1 file changed, 42 insertions(+), 25 deletions(-) diff --git

[libvirt PATCH v2 09/24] qemu_snapshot: allow using alternate domain definition when creating qcow2 files

2023-06-27 Thread Pavel Hrdina
To create new overlay files when external snapshot revert support is introduced we will be using different domain definition than what is currently used by the domain. Signed-off-by: Pavel Hrdina --- src/qemu/qemu_snapshot.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff

[libvirt PATCH v2 15/24] qemu_snapshot: add merge to external snapshot delete prepare data

2023-06-27 Thread Pavel Hrdina
Before external snapshot revert every delete operation did block commit in order to delete a snapshot. But now when user reverts to non-leaf snapshot deleting leaf snapshot will not have any overlay files so we can just simply delete the snapshot images. Signed-off-by: Pavel Hrdina --- src/qemu

[libvirt PATCH v2 01/24] libvirt_private: list virDomainMomentDefPostParse

2023-06-27 Thread Pavel Hrdina
We will need to call this function from qemu_snapshot when introducing external snapshot revert support. Signed-off-by: Pavel Hrdina Reviewed-by: Peter Krempa --- src/libvirt_private.syms | 4 1 file changed, 4 insertions(+) diff --git a/src/libvirt_private.syms b/src

[libvirt PATCH v2 13/24] qemu_snapshot: rename qemuSnapshotDeleteExternalPrepare

2023-06-27 Thread Pavel Hrdina
The new name reflects that we prepare data for external snapshot deletion and the old name will be used later for different part of code. Signed-off-by: Pavel Hrdina Reviewed-by: Peter Krempa --- src/qemu/qemu_snapshot.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff

[libvirt PATCH v2 03/24] snapshot_conf: use alternate domain definition in virDomainSnapshotDefAssignExternalNames

2023-06-27 Thread Pavel Hrdina
default external file names. It should be still fixed to make it safe. Future external snapshot revert code will use this to generate default file names and in this case it would crash. Signed-off-by: Pavel Hrdina Reviewed-by: Peter Krempa --- src/conf/snapshot_conf.c | 8 +--- 1 file changed

[libvirt PATCH v2 04/24] snapshot_conf: introduce metadata element

2023-06-27 Thread Pavel Hrdina
This new element will hold the new disk overlay created when reverting to non-leaf snapshot in order to remember the files libvirt created. Signed-off-by: Pavel Hrdina Reviewed-by: Peter Krempa --- src/conf/schemas/domainsnapshot.rng | 7 +++ src/conf/snapshot_conf.c| 27

Re: [PATCH] ci: Regenerate files

2023-04-27 Thread Pavel Hrdina
p-15.sh} (100%) > rename ci/containers/{opensuse-leap-154.Dockerfile => > opensuse-leap-15.Dockerfile} (100%) Reviewed-by: Pavel Hrdina signature.asc Description: PGP signature

Re: [libvirt PATCH 0/4] Various cleanups

2023-04-20 Thread Pavel Hrdina
ondition Reviewed-by: Pavel Hrdina signature.asc Description: PGP signature

  1   2   3   4   5   6   7   8   9   10   >