Re: [libvirt PATCH v2 16/35] ci: Rename build.sh -> jobs.sh

2023-09-11 Thread Daniel P . Berrangé
On Mon, Sep 11, 2023 at 03:43:17PM +0200, Erik Skultety wrote: > After the recent changes, this script no longer executes any logic > anymore, it merely defines the jobs run in the GitLab environment. In > order to use it, one has to source the file in the environment and then > run one of the job

Re: [libvirt PATCH v2 14/35] ci: build.sh: Drop direct invocation of meson/ninja commands

2023-09-11 Thread Daniel P . Berrangé
On Mon, Sep 11, 2023 at 03:43:15PM +0200, Erik Skultety wrote: > We've moved all invocations to the respective helper function which > we'll execute both from gitlab CI jobs and local environments so we > don't need to have them on the global level as it would also not work > with "sourcing" this f

Re: [libvirt PATCH v2 12/35] ci: build.sh: Add a wrapper function over the 'website' job

2023-09-11 Thread Daniel P . Berrangé
On Mon, Sep 11, 2023 at 03:43:13PM +0200, Erik Skultety wrote: > This helper is a shell function transcript of its original GitLab CI > counterpart. > > Signed-off-by: Erik Skultety > Erik Skultety : > --- > ci/build.sh | 7 +++ > 1 file changed, 7 insertions(+) Reviewed-by: Daniel P. Berra

Re: [libvirt PATCH v2 11/35] ci: build.sh: Add a wrapper function over the 'rpmbuild' job

2023-09-11 Thread Daniel P . Berrangé
On Mon, Sep 11, 2023 at 03:43:12PM +0200, Erik Skultety wrote: > This helper is a shell function transcript of its original GitLab CI > counterpart. > > Signed-off-by: Erik Skultety > Erik Skultety : > --- > ci/build.sh | 9 + > 1 file changed, 9 insertions(+) Reviewed-by: Daniel P. Ber

Re: [libvirt PATCH v2 09/35] ci: build.sh: Add a wrapper function over the 'codestyle' job

2023-09-11 Thread Daniel P . Berrangé
On Mon, Sep 11, 2023 at 03:43:10PM +0200, Erik Skultety wrote: > This helper is a shell function transcript of its original GitLab CI > counterpart. > > Signed-off-by: Erik Skultety > Erik Skultety : > --- > ci/build.sh | 8 > 1 file changed, 8 insertions(+) Reviewed-by: Daniel P. Berr

Re: [libvirt PATCH v2 08/35] ci: build.sh: Add a wrapper function over the 'test' job

2023-09-11 Thread Daniel P . Berrangé
On Mon, Sep 11, 2023 at 03:43:09PM +0200, Erik Skultety wrote: > This helper is a shell function transcript of its original GitLab CI > counterpart. > > Signed-off-by: Erik Skultety > Erik Skultety : > --- > ci/build.sh | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/ci/build.sh b

Re: [libvirt PATCH v2 07/35] ci: build.sh: Add a helper function to create the dist tarball

2023-09-11 Thread Daniel P . Berrangé
On Mon, Sep 11, 2023 at 03:43:08PM +0200, Erik Skultety wrote: > This helper function does not correspond to a particular GitLab job, it > just logically separates the necessary step of creating a dist tarball > from the RPM build job that takes over. > One notable change here is the need to update

Re: [libvirt PATCH v2 06/35] ci: build.sh: Add a wrapper function over the 'build' job

2023-09-11 Thread Daniel P . Berrangé
On Mon, Sep 11, 2023 at 03:43:07PM +0200, Erik Skultety wrote: > This helper is a shell function transcript of its original GitLab CI > counterpart. > > Signed-off-by: Erik Skultety > Erik Skultety : > --- > ci/build.sh | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/ci/build.sh b

Re: [libvirt PATCH v2 05/35] ci: build.sh: Add a wrapper function over meson's setup

2023-09-11 Thread Daniel P . Berrangé
On Mon, Sep 11, 2023 at 03:43:06PM +0200, Erik Skultety wrote: > The reason for this wrapper is that all job functions introduced in > future patches will refer to this one instead of open-coding the same > 'meson setup' invocation N times. It also prevents 'setup' to be called > multiple times as

Re: [libvirt PATCH v2 04/35] ci: build.sh: Add a wrapper function executing 'shell' commands

2023-09-11 Thread Daniel P . Berrangé
On Mon, Sep 11, 2023 at 03:43:05PM +0200, Erik Skultety wrote: > This would normally be not needed at all, but the problem here is the > Shell-in-YAML which GitLab interprets. It outputs every command that > appears as a line in the 'script' segment in a color-coded fashion for > easy identificatio

Re: [libvirt PATCH v2 01/35] ci: build.sh: Add variables from .gitlab-ci.yml

2023-09-11 Thread Erik Skultety
On Mon, Sep 11, 2023 at 03:02:15PM +0100, Daniel P. Berrangé wrote: > On Mon, Sep 11, 2023 at 03:43:02PM +0200, Erik Skultety wrote: > > These are common variables we wish to use in containerized environments > > both in GitLab and locally. Having these defined in a single place > > rather than twi

Re: [libvirt PATCH v2 01/35] ci: build.sh: Add variables from .gitlab-ci.yml

2023-09-11 Thread Daniel P . Berrangé
On Mon, Sep 11, 2023 at 03:43:02PM +0200, Erik Skultety wrote: > These are common variables we wish to use in containerized environments > both in GitLab and locally. Having these defined in a single place > rather than twice is highly preferable. > > Signed-off-by: Erik Skultety > Erik Skultety

[libvirt PATCH v2 33/35] ci: helper: Drop the --meson-args/--ninja-args CLI options

2023-09-11 Thread Erik Skultety
These originally allowed customizing the ci/Makefile script which was the core of the local container executions. The problem was that however flexible this may have been, it never mirrored what was being done as part of the GitLab jobs. Motivated by the effort of mirroring GitLab jobs locally, the

[libvirt PATCH v2 26/35] ci: helper: Add a required_deps higher order helper/decorator

2023-09-11 Thread Erik Skultety
Since we'll depend on GitPython for repo cloning, we need to make sure to emit a user friendly error if the module is not installed. This patch introduces a helper which future patches will use as a decorator. Inspiration for this helper has been taken out of lcitool where we use an identical helpe

[libvirt PATCH v2 22/35] .gitlab-ci.yml: Convert the potfile job to the build.sh usage

2023-09-11 Thread Erik Skultety
Individual shell command executions are replaced by respective functions in the ci/build.sh base script. This will make sure we use the same recipes in GitLab jobs as well as in local executions. Signed-off-by: Erik Skultety Reviewed-by: Daniel P. Berrangé Erik Skultety : --- .gitlab-ci.yml | 5

[libvirt PATCH v2 29/35] ci: helper: Rework _lcitool_run method logic

2023-09-11 Thread Erik Skultety
This method wasn't even utilized before this patch. This patch adds all the necessary logic to successfully execute a container workload via lcitool (which will later allow us to ditch ci/Makefile). Because container executions via lcitool creates the following inside the container: $ ls s

[libvirt PATCH v2 23/35] ci: helper: Drop _lcitool_get_targets method

2023-09-11 Thread Erik Skultety
This method unused anywhere, so drop it. Signed-off-by: Erik Skultety Reviewed-by: Daniel P. Berrangé Erik Skultety : --- ci/helper | 4 1 file changed, 4 deletions(-) diff --git a/ci/helper b/ci/helper index fb562d55e1..8986772153 100755 --- a/ci/helper +++ b/ci/helper @@ -163,10 +163,6

[libvirt PATCH v2 06/35] ci: build.sh: Add a wrapper function over the 'build' job

2023-09-11 Thread Erik Skultety
This helper is a shell function transcript of its original GitLab CI counterpart. Signed-off-by: Erik Skultety Erik Skultety : --- ci/build.sh | 5 + 1 file changed, 5 insertions(+) diff --git a/ci/build.sh b/ci/build.sh index 477ccbc7d1..f908bbc5d4 100644 --- a/ci/build.sh +++ b/ci/build.s

[libvirt PATCH v2 17/35] .gitlab-ci.yml: Add 'after_script' stage to prep for artifact collection

2023-09-11 Thread Erik Skultety
This is one of the preparation steps that if not done would otherwise collide with local container executions where we: 1) don't collect artifacts 2) are not limited by GitLab's environment and hence moving build artifacts to unusual places would only cause confusion when doing local build in

[libvirt PATCH v2 10/35] ci: build.sh: Add a wrapper function over the 'potfile' job

2023-09-11 Thread Erik Skultety
This helper is a shell function transcript of its original GitLab CI counterpart. There's one notable difference such that we pass '-j1' to the meson compile command otherwise we'd have to execute the 'run_build' function twice, passing 'libvirt-pot-dep' and 'libvirt-pot' targets in a serial manner

[libvirt PATCH v2 07/35] ci: build.sh: Add a helper function to create the dist tarball

2023-09-11 Thread Erik Skultety
This helper function does not correspond to a particular GitLab job, it just logically separates the necessary step of creating a dist tarball from the RPM build job that takes over. One notable change here is the need to update git's file index which causes issues in local container executions whi

[libvirt PATCH v2 15/35] ci: build.sh: Drop MESON_ARGS definition from global level

2023-09-11 Thread Erik Skultety
Signed-off-by: Erik Skultety Reviewed-by: Daniel P. Berrangé Erik Skultety : --- ci/build.sh | 10 -- 1 file changed, 10 deletions(-) diff --git a/ci/build.sh b/ci/build.sh index ac649ed9a9..96ee289c4f 100644 --- a/ci/build.sh +++ b/ci/build.sh @@ -13,16 +13,6 @@ if ! [ -t 1 ]; then fi

[libvirt PATCH v2 31/35] ci: helper: Add a job argparse subparser

2023-09-11 Thread Erik Skultety
The idea behind this subcommand is to follow whatever build job we have defined in the GitLab CI pipeline, so that we only have a single source of truth for the recipes. Adds 'shell' as an extra option for interactive container build debugging. Signed-off-by: Erik Skultety Reviewed-by: Daniel P.

[libvirt PATCH v2 35/35] ci: Drop the now unused Makefile

2023-09-11 Thread Erik Skultety
All the functionality this script provided has been incorporated either in the Python ci/helper tool or lcitool directly. Signed-off-by: Erik Skultety Reviewed-by: Daniel P. Berrangé Erik Skultety : --- ci/Makefile | 245 1 file changed, 245

[libvirt PATCH v2 34/35] ci: helper: Drop the _make_run method

2023-09-11 Thread Erik Skultety
We've successfully migrated over to lcitool to take care of the container workload execution, so dropping this 'make' prep code is a prerequisite of finally getting rid of the ci/Makefile script. Signed-off-by: Erik Skultety Reviewed-by: Daniel P. Berrangé Erik Skultety : --- ci/helper | 25 ---

[libvirt PATCH v2 32/35] ci: helper: Drop original actions

2023-09-11 Thread Erik Skultety
Previous patches added a single 'run' command parametrized with GitLab job specs via '--job' that cover all of these original actions, adding some more in the process. Drop the original actions as we don't need them anymore. Signed-off-by: Erik Skultety Reviewed-by: Daniel P. Berrangé Erik Skult

[libvirt PATCH v2 24/35] ci: helper: Don't make ':' literal a static part of the image tag

2023-09-11 Thread Erik Skultety
':' is just a connecting character, we can add it to the appropriate place later in the Python script later, but it doesn't make sense to be part of the image 'tag' string. Signed-off-by: Erik Skultety Reviewed-by: Daniel P. Berrangé Erik Skultety : --- ci/helper | 2 +- 1 file changed, 1 inser

[libvirt PATCH v2 30/35] ci: helper: Add an action to run the container workload via lcitool

2023-09-11 Thread Erik Skultety
Just like with the other CLI sub-commands, add an action to run a GitLab spec job in a local container via lcitool. Signed-off-by: Erik Skultety Reviewed-by: Daniel P. Berrangé Erik Skultety : --- ci/helper | 4 1 file changed, 4 insertions(+) diff --git a/ci/helper b/ci/helper index fce3

[libvirt PATCH v2 08/35] ci: build.sh: Add a wrapper function over the 'test' job

2023-09-11 Thread Erik Skultety
This helper is a shell function transcript of its original GitLab CI counterpart. Signed-off-by: Erik Skultety Erik Skultety : --- ci/build.sh | 5 + 1 file changed, 5 insertions(+) diff --git a/ci/build.sh b/ci/build.sh index ab56c5e5eb..29b6a3306d 100644 --- a/ci/build.sh +++ b/ci/build.s

[libvirt PATCH v2 21/35] .gitlab-ci.yml: Convert the codestyle job to the build.sh usage

2023-09-11 Thread Erik Skultety
Individual shell command executions are replaced by respective functions in the ci/build.sh base script. This will make sure we use the same recipes in GitLab jobs as well as in local executions. Signed-off-by: Erik Skultety Reviewed-by: Daniel P. Berrangé Erik Skultety : --- .gitlab-ci.yml | 6

[libvirt PATCH v2 28/35] ci: helper: Add a helper to create a local repo clone Pythonic way

2023-09-11 Thread Erik Skultety
A proper Python equivalent of 'git clone --local'. Signed-off-by: Erik Skultety Reviewed-by: Daniel P. Berrangé Erik Skultety : --- ci/helper | 4 1 file changed, 4 insertions(+) diff --git a/ci/helper b/ci/helper index 6aca089db4..392702ae41 100755 --- a/ci/helper +++ b/ci/helper @@ -196

[libvirt PATCH v2 14/35] ci: build.sh: Drop direct invocation of meson/ninja commands

2023-09-11 Thread Erik Skultety
We've moved all invocations to the respective helper function which we'll execute both from gitlab CI jobs and local environments so we don't need to have them on the global level as it would also not work with "sourcing" this file to populate the environment with function definitions. Signed-off-

[libvirt PATCH v2 27/35] ci: helper: Add Python code hangling git clones

2023-09-11 Thread Erik Skultety
This helper will be utilized by a future patch which will add the lcitool container execution logic. The reason why the required_deps decorator isn't being used here is because this is a property. Signed-off-by: Erik Skultety Reviewed-by: Daniel P. Berrangé Erik Skultety : --- ci/helper | 9 +++

[libvirt PATCH v2 25/35] ci: helper: Add --lcitool-path CLI option

2023-09-11 Thread Erik Skultety
We'll soon be relying solely on lcitool so we need to be able to run it from a user-provided location if it's not installed in a known location. Signed-off-by: Erik Skultety Reviewed-by: Daniel P. Berrangé Erik Skultety : --- ci/helper | 6 ++ 1 file changed, 6 insertions(+) diff --git a/c

[libvirt PATCH v2 20/35] .gitlab-ci.yml: Convert the website build job to the build.sh usage

2023-09-11 Thread Erik Skultety
Individual shell command executions are replaced by respective functions in the ci/build.sh base script. This will make sure we use the same recipes in GitLab jobs as well as in local executions. Signed-off-by: Erik Skultety Reviewed-by: Daniel P. Berrangé Erik Skultety : --- .gitlab-ci.yml | 5

[libvirt PATCH v2 05/35] ci: build.sh: Add a wrapper function over meson's setup

2023-09-11 Thread Erik Skultety
The reason for this wrapper is that all job functions introduced in future patches will refer to this one instead of open-coding the same 'meson setup' invocation N times. It also prevents 'setup' to be called multiple times as some future job functions might actually do just that in a transitive m

[libvirt PATCH v2 18/35] .gitlab-ci.yml: Convert the native build job to the build.sh usage

2023-09-11 Thread Erik Skultety
Individual shell command executions are replaced by respective functions in the ci/build.sh base script. This will make sure we use the same recipes in GitLab jobs as well as in local executions. Signed-off-by: Erik Skultety Reviewed-by: Daniel P. Berrangé Erik Skultety : --- .gitlab-ci.yml | 1

[libvirt PATCH v2 12/35] ci: build.sh: Add a wrapper function over the 'website' job

2023-09-11 Thread Erik Skultety
This helper is a shell function transcript of its original GitLab CI counterpart. Signed-off-by: Erik Skultety Erik Skultety : --- ci/build.sh | 7 +++ 1 file changed, 7 insertions(+) diff --git a/ci/build.sh b/ci/build.sh index c558b4c9ca..8e1619d483 100644 --- a/ci/build.sh +++ b/ci/build

[libvirt PATCH v2 09/35] ci: build.sh: Add a wrapper function over the 'codestyle' job

2023-09-11 Thread Erik Skultety
This helper is a shell function transcript of its original GitLab CI counterpart. Signed-off-by: Erik Skultety Erik Skultety : --- ci/build.sh | 8 1 file changed, 8 insertions(+) diff --git a/ci/build.sh b/ci/build.sh index 29b6a3306d..e6c3225691 100644 --- a/ci/build.sh +++ b/ci/buil

[libvirt PATCH v2 13/35] ci: build.sh: Drop changing working directory to CI_CONT_DIR

2023-09-11 Thread Erik Skultety
Firstly, this would mangle with "sourcing" this file in either execution environment later down the road. Secondly, we won't need this as future ci/helper patches will generate a throwaway script that will take care of a correct execution of a build job in a similar fashion as if the job ran in a G

[libvirt PATCH v2 19/35] .gitlab-ci.yml: Convert the cross build job to the build.sh usage

2023-09-11 Thread Erik Skultety
Individual shell command executions are replaced by respective functions in the ci/build.sh base script. This will make sure we use the same recipes in GitLab jobs as well as in local executions. Signed-off-by: Erik Skultety Reviewed-by: Daniel P. Berrangé Erik Skultety : --- .gitlab-ci.yml | 1

[libvirt PATCH v2 04/35] ci: build.sh: Add a wrapper function executing 'shell' commands

2023-09-11 Thread Erik Skultety
This would normally be not needed at all, but the problem here is the Shell-in-YAML which GitLab interprets. It outputs every command that appears as a line in the 'script' segment in a color-coded fashion for easy identification of problems. Well, that useful feature is lost when there's indirecti

[libvirt PATCH v2 11/35] ci: build.sh: Add a wrapper function over the 'rpmbuild' job

2023-09-11 Thread Erik Skultety
This helper is a shell function transcript of its original GitLab CI counterpart. Signed-off-by: Erik Skultety Erik Skultety : --- ci/build.sh | 9 + 1 file changed, 9 insertions(+) diff --git a/ci/build.sh b/ci/build.sh index d6361f3ade..c558b4c9ca 100644 --- a/ci/build.sh +++ b/ci/bui

[libvirt PATCH v2 16/35] ci: Rename build.sh -> jobs.sh

2023-09-11 Thread Erik Skultety
After the recent changes, this script no longer executes any logic anymore, it merely defines the jobs run in the GitLab environment. In order to use it, one has to source the file in the environment and then run one of the job "functions". For that, the 'build.sh' name is no longer descriptive eno

[libvirt PATCH v2 03/35] ci: build.sh: Don't mention that MESON_ARGS are available via CLI

2023-09-11 Thread Erik Skultety
Previous patches have removed the code that allowed injecting arbitrary meson arguments, same for ninja args. Signed-off-by: Erik Skultety Reviewed-by: Daniel P. Berrangé Erik Skultety : --- ci/build.sh | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/ci/build.sh b/ci/

[libvirt PATCH v2 01/35] ci: build.sh: Add variables from .gitlab-ci.yml

2023-09-11 Thread Erik Skultety
These are common variables we wish to use in containerized environments both in GitLab and locally. Having these defined in a single place rather than twice is highly preferable. Signed-off-by: Erik Skultety Erik Skultety : --- ci/build.sh | 12 +++- 1 file changed, 11 insertions(+), 1 d

[libvirt PATCH v2 00/35] ci: Unify the GitLab CI jobs with local executions && adopt lcitool container executions

2023-09-11 Thread Erik Skultety
since v2 [1]: - moved the custom meson.build directory check before running setup to individual callers for better robustness, but actually let meson deal with an existing setup directory most of the time - drops the ci/Makefile - only set our verbose env variables when running without a TTY -

[libvirt PATCH v2 02/35] ci: build.sh: Add GIT_ROOT env helper variable

2023-09-11 Thread Erik Skultety
We'll use this one in many of the job functions future patches will introduce, it's a neat shortcut to avoid using relative paths. Signed-off-by: Erik Skultety Reviewed-by: Daniel P. Berrangé Erik Skultety : --- ci/build.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ci/build.sh b/ci/

Re: [libvirt PATCH v2] ch: Fix cloud-hypervisor version processing

2023-09-06 Thread Praveen Paladugu
Wed, Sep 06, 2023 at 09:51:11AM +0100, Daniel P. Berrang?? wrote: > On Tue, Sep 05, 2023 at 12:44:25PM -0500, Praveen K Paladugu wrote: > > Refactor the version processing logic in ch driver to support versions > > from non-release cloud-hypervisor binaries. This version also supports > > versions

Re: [libvirt PATCH v2] ch: Fix cloud-hypervisor version processing

2023-09-06 Thread Daniel P . Berrangé
On Tue, Sep 05, 2023 at 12:44:25PM -0500, Praveen K Paladugu wrote: > Refactor the version processing logic in ch driver to support versions > from non-release cloud-hypervisor binaries. This version also supports > versions with branch prefixes in them. > > Signed-off-by: Praveen K Paladugu > --

[libvirt PATCH v2] ch: Fix cloud-hypervisor version processing

2023-09-05 Thread Praveen K Paladugu
Refactor the version processing logic in ch driver to support versions from non-release cloud-hypervisor binaries. This version also supports versions with branch prefixes in them. Signed-off-by: Praveen K Paladugu --- src/ch/ch_conf.c | 39 --- 1 file changed

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 ... > > > Signed-off-by: P

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

2023-09-01 Thread Jiri Denemark
On Fri, Sep 01, 2023 at 11:24:28 +0200, Peter Krempa wrote: > On Fri, Sep 01, 2023 at 10:32:17 +0200, Pavel Hrdina wrote: > > Reverting external snapshot for running VM doesn't work correctly so we > > should not report this capability until it is fixed. > > > > This reverts commit de71573bfec7f3a

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

2023-09-01 Thread Peter Krempa
On Fri, Sep 01, 2023 at 10:32:15 +0200, Pavel Hrdina wrote: > 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

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

2023-09-01 Thread Peter Krempa
On Fri, Sep 01, 2023 at 10:32:17 +0200, Pavel Hrdina wrote: > 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 > --- If

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

2023-09-01 Thread Peter Krempa
On Fri, Sep 01, 2023 at 10:32:16 +0200, Pavel Hrdina wrote: > Signed-off-by: Pavel Hrdina > --- > NEWS.rst | 8 > 1 file changed, 8 insertions(+) Reviewed-by: Peter Krempa

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

2023-09-01 Thread Peter Krempa
On Fri, Sep 01, 2023 at 10:32:15 +0200, Pavel Hrdina wrote: > 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

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

2023-09-01 Thread Peter Krempa
On Fri, Sep 01, 2023 at 10:32:14 +0200, Pavel Hrdina wrote: > Signed-off-by: Pavel Hrdina > --- > src/qemu/qemu_saveimage.c | 2 +- > src/qemu/qemu_saveimage.h | 3 +++ > 2 files changed, 4 insertions(+), 1 deletion(-) Also squashable into the previous commit since you need both for the same rea

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

2023-09-01 Thread Peter Krempa
On Fri, Sep 01, 2023 at 10:32:13 +0200, Pavel Hrdina wrote: > Signed-off-by: Pavel Hrdina > --- > src/qemu/qemu_saveimage.c | 17 - > src/qemu/qemu_saveimage.h | 17 + > 2 files changed, 17 insertions(+), 17 deletions(-) Reviewed-by: Peter Krempa

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

2023-09-01 Thread Peter Krempa
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 ... > Signed-off-by: Pavel Hrdina > --- > src/qemu/qemu_snapshot.c | 12 > 1 file

[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
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. This duplicates some necessary parts of qemuSaveImageStartV

[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 of

[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/qe

[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/conf/capabil

[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 --- a/src/qe

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

2023-09-01 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. Last patch is not part of the fix, it is alternative solution to remove the capability as we are close to releasing libvirt

Re: [libvirt PATCH v2 5/7] Add virNetworkObj Get and Set Methods for Metadata

2023-08-25 Thread Shiva
My previous misunderstanding was exactly as you mentioned, to group commits on a file to file basis. Now I have understood what a semantic change should be like, with your provided example. You are not asking for much, your corrections help me a lot in my learning journey and I am very grateful

Re: [libvirt PATCH v2 4/7] virsh exposure of Network Metadata APIs

2023-08-25 Thread Michal Prívozník
On 8/16/23 20:47, K Shiva Kiran wrote: > Adds two new commands and a new option: > - 'net-desc' to show/modify network title and description. > - 'net-metadata' to show/modify network metadata. > - Option '--title' for 'net-list' to print corresponding > network titles in an additional column. >

Re: [libvirt PATCH v2 0/7] Introduce new Metadata fields for Network object with corresponding APIs

2023-08-25 Thread Michal Prívozník
On 8/16/23 20:47, K Shiva Kiran wrote: > This commit adds the following: > - Introduction of and fields to the Network Object. > - Introduction of Get and Set Public APIs for the aforementioned fields. > - virsh exposure of the aforementioned Public APIs. > - Adds implementation in test driver al

Re: [libvirt PATCH v2 5/7] Add virNetworkObj Get and Set Methods for Metadata

2023-08-25 Thread Michal Prívozník
On 8/16/23 20:47, K Shiva Kiran wrote: > - Introduces virNetworkObjGetMetadata() and > virNetworkObjSetMetadata(). > - These functions implement common behaviour that can be reused by > network drivers. > - Introduces virNetworkObjUpdateModificationImpact() among other > helper functions that

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

2023-08-24 Thread Peter Krempa
On Thu, Aug 24, 2023 at 18:21:40 +0200, Pavel Hrdina wrote: > 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 s

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

2023-08-24 Thread Peter Krempa
On Thu, Aug 24, 2023 at 18:21:41 +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 > information and start using external snapshots. > > Signed-off-by: Pavel Hrdina > --- > d

[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/capabil

[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 | 6

[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

[libvirt PATCH v2 7/7] Added bridge driver implementation

2023-08-16 Thread K Shiva Kiran
Signed-off-by: K Shiva Kiran --- src/network/bridge_driver.c | 64 + 1 file changed, 64 insertions(+) diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c index e776d86c73..caad085192 100644 --- a/src/network/bridge_driver.c +++ b/src/network

[libvirt PATCH v2 4/7] virsh exposure of Network Metadata APIs

2023-08-16 Thread K Shiva Kiran
Adds two new commands and a new option: - 'net-desc' to show/modify network title and description. - 'net-metadata' to show/modify network metadata. - Option '--title' for 'net-list' to print corresponding network titles in an additional column. - Documentation for all the above. - XML Fallback f

[libvirt PATCH v2 1/7] Add and for Network Objects

2023-08-16 Thread K Shiva Kiran
This patch adds new elements and to the Network XML. - The attribute holds a short title defined by the user and cannot contain newlines. - The attribute holds any documentation that the user wants to store. - Schema definitions of and have been moved from domaincommon.rng to basictypes

[libvirt PATCH v2 3/7] Implementing Remote Protocol for Network Metadata

2023-08-16 Thread K Shiva Kiran
- Defines wire protocol format. - Implements remote driver. Signed-off-by: K Shiva Kiran --- src/remote/remote_driver.c | 2 ++ src/remote/remote_protocol.x | 36 +++- src/remote_protocol-structs | 19 +++ 3 files changed, 56 insertions(+), 1 d

[libvirt PATCH v2 6/7] Add Test driver and testcase for Network Metadata change APIs

2023-08-16 Thread K Shiva Kiran
This commit implements the newly defined Network Metadata Get and Set APIs into the test driver. It also adds a new testcase "networkmetadatatest" to test the APIs. Signed-off-by: K Shiva Kiran --- src/conf/network_conf.c | 3 + src/test/test_driver.c | 67 tests/meson.build

[libvirt PATCH v2 0/7] Introduce new Metadata fields for Network object with corresponding APIs

2023-08-16 Thread K Shiva Kiran
This commit adds the following: - Introduction of and fields to the Network Object. - Introduction of Get and Set Public APIs for the aforementioned fields. - virsh exposure of the aforementioned Public APIs. - Adds implementation in test driver along with a testcase. - Implementation in bridge d

[libvirt PATCH v2 5/7] Add virNetworkObj Get and Set Methods for Metadata

2023-08-16 Thread K Shiva Kiran
- Introduces virNetworkObjGetMetadata() and virNetworkObjSetMetadata(). - These functions implement common behaviour that can be reused by network drivers. - Introduces virNetworkObjUpdateModificationImpact() among other helper functions that resolve the live/persistent state of the network

[libvirt PATCH v2 2/7] Adding Public Get and Set APIs for Network Metadata

2023-08-16 Thread K Shiva Kiran
This patch introduces public Get and Set APIs for modifying , and elements of the Network object. - Added enum virNetworkMetadataType to select one of the above elements to operate on. - Added error code and messages for missing metadata. - Added public API implementation. - Added driver suppo

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

2023-08-08 Thread Peter Krempa
On Tue, Jun 27, 2023 at 17:07:27 +0200, Pavel Hrdina wrote: > 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(-) Reviewed-by: Peter Krempa

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

2023-08-08 Thread Peter Krempa
On Tue, Jun 27, 2023 at 17:07:26 +0200, Pavel Hrdina wrote: > With the introduction of external snapshot revert support we need to > error out in some cases when trying to delete some snapshots. > > If users reverts to non-leaf snapshots and would try to delete it after > the revert is done it wou

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

2023-08-08 Thread Peter Krempa
On Tue, Jun 27, 2023 at 17:07:24 +0200, Pavel Hrdina wrote: > With introduction of external snapshot revert we will have to update > backing store of qcow images not actively used be QEMU manually. > The need for this patch comes from the fact that we stop and start QEMU > process therefore after r

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

2023-08-02 Thread Peter Krempa
On Tue, Jun 27, 2023 at 17:07:22 +0200, Pavel Hrdina wrote: > 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 > ---

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

2023-08-02 Thread Peter Krempa
On Tue, Jun 27, 2023 at 17:07:20 +0200, Pavel Hrdina wrote: > 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 deletio

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

2023-07-31 Thread Peter Krempa
On Tue, Jun 27, 2023 at 17:07:18 +0200, Pavel Hrdina wrote: > 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 dele

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

2023-07-31 Thread Peter Krempa
On Tue, Jun 27, 2023 at 17:07:17 +0200, Pavel Hrdina wrote: > 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 +---

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

2023-07-31 Thread Peter Krempa
On Tue, Jun 27, 2023 at 17:07:15 +0200, Pavel Hrdina wrote: > When reverting to external snapshot we need to create new overlay qcow2 > files from the disk files the VM had when the snapshot was taken. > > There are some specifics and limitations when reverting to a snapshot: > > 1) When revertin

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 ++- > > 1 file changed, 10 insertions(+

Re: [libvirt PATCH v2] run: add ability to set selinux context

2023-07-25 Thread Martin Kletzander
On Wed, Jun 21, 2023 at 02:43:03PM -0500, Jonathon Jongsma wrote: When running libvirt from the build directory with the 'run' script, it will run as unconfined_t. This can result in unexpected behavior when selinux is enforcing due to the fact that the selinux policies are written assuming that

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

2023-07-25 Thread Peter Krempa
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 ++- > 1 file changed, 10 insertions(+), 9 deletions(-) > > diff --git a/src/qemu/qemu_snapshot.c b/src/qemu/qemu_sna

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

2023-07-25 Thread Peter Krempa
On Mon, Jul 24, 2023 at 16:08:14 +0200, Peter Krempa wrote: > Preferrably: > > virDomainSnapshotAlignDisks: Allow overriding user-configured snapshot default > > > Reply-To: > In-Reply-To: > <322f30a38fa3a4e7a6ef9b1161a07da4b74f0d6e.1687877087.git.phrd...@redhat.com> Oops! I broke the threadi

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

2023-07-25 Thread Peter Krempa
Preferrably: virDomainSnapshotAlignDisks: Allow overriding user-configured snapshot default On Tue, Jun 27, 2023 at 17:07:08 +0200, Pavel Hrdina wrote: > This new option will be used by external snapshot revert code. > > Signed-off-by: Pavel Hrdina > --- > src/conf/snapshot_conf.c | 15 +++

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

2023-07-25 Thread Peter Krempa
On Tue, Jun 27, 2023 at 17:07:13 +0200, Pavel Hrdina wrote: > 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 deletion

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

2023-07-25 Thread Peter Krempa
On Tue, Jun 27, 2023 at 17:07:12 +0200, Pavel Hrdina wrote: > 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

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

2023-07-25 Thread Peter Krempa
On Tue, Jun 27, 2023 at 17:07:11 +0200, Pavel Hrdina wrote: > 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   2   3   4   5   6   7   8   9   10   >