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

2023-07-24 Thread Peter Krempa
Preferrably: virDomainSnapshotAlignDisks: Allow overriding user-configured snapshot default Reply-To: In-Reply-To: <322f30a38fa3a4e7a6ef9b1161a07da4b74f0d6e.1687877087.git.phrd...@redhat.com> On Tue, Jun 27, 2023 at 17:07:08 +0200, Pavel Hrdina wrote: > This new option will be used by externa

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

2023-07-19 Thread K Shiva Kiran
On 19/07/23 21:47, K Shiva Kiran wrote: - Introduces virNetworkObjGetMetadata() and virNetworkObjSetMetadata(). - These functions implement common behaviour that can be reused by network drivers that use the virNetworkObj struct. - Introduces virNetworkObjUpdateModificationImpact() among o

[libvirt PATCH v2 3/4] Add virNetworkObj Get and Set Methods for Metadata

2023-07-19 Thread K Shiva Kiran
- Introduces virNetworkObjGetMetadata() and virNetworkObjSetMetadata(). - These functions implement common behaviour that can be reused by network drivers that use the virNetworkObj struct. - Introduces virNetworkObjUpdateModificationImpact() among other helper functions that resolve the live

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

2023-07-19 Thread K Shiva Kiran
From 61d699de0603ca49a67cc898a219cce2613b82ba Mon Sep 17 00:00:00 2001 From: K Shiva Kiran Date: Tue, 27 Jun 2023 20:48:52 +0530 Subject: [libvirt PATCH v2 2/4] Adding Public Get and Set APIs for Network Metadata This patch introduces public Get and Set APIs for modifying , and elements of

Re: [libvirt PATCH v2 4/4] qemu: enable asynchronous teardown on s390x hosts

2023-07-03 Thread Boris Fiuczynski
On 6/28/23 10:26 PM, Jonathon Jongsma wrote: On 6/27/23 10:51 AM, Boris Fiuczynski wrote: Enablement of asynchronous teardown on S390 and add tests for asynchronous teardown autogeneration support. I don't know all of the implications of enabling vs not enabling this feature. It sounds like i

Re: [libvirt PATCH v2 1/4] tests: add capabilities for QEMU 8.1.0 on s390x

2023-06-30 Thread Boris Fiuczynski
On 6/29/23 3:02 PM, Peter Krempa wrote: diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-ccw-virtio.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-ccw-virtio.xml index 82402ffe1b..42f89a07a2 100644 --- a/tests/qemuhotplugtestdomains/qemuhotplug-base-cc

Re: [libvirt PATCH v2 1/4] tests: add capabilities for QEMU 8.1.0 on s390x

2023-06-29 Thread Peter Krempa
On Tue, Jun 27, 2023 at 17:51:26 +0200, Boris Fiuczynski wrote: > From: Shalini Chellathurai Saroja > > Let us introduce the xml and reply files for QEMU 8.1.0 on s390x. > > Signed-off-by: Boris Fiuczynski > Signed-off-by: Shalini Chellathurai Saroja > --- > 68 files changed, 38786 insertions

Re: [libvirt PATCH v2 4/4] qemu: enable asynchronous teardown on s390x hosts

2023-06-28 Thread Jonathon Jongsma
On 6/27/23 10:51 AM, Boris Fiuczynski wrote: Enablement of asynchronous teardown on S390 and add tests for asynchronous teardown autogeneration support. I don't know all of the implications of enabling vs not enabling this feature. It sounds like it speeds up shutdown significantly in some si

Re: [libvirt PATCH v2 3/4] qemu: allow use of async teardown in domain

2023-06-28 Thread Boris Fiuczynski
On 6/28/23 3:34 PM, Thomas Huth wrote: On 27/06/2023 17.51, Boris Fiuczynski wrote: Asynchronous teardown can be specified if the QEMU binary supports it by adding in the domain XML    ... ...    By default this new feature is disabled. Signed-off-by: Boris Fiuczynski ---

Re: [libvirt PATCH v2 3/4] qemu: allow use of async teardown in domain

2023-06-28 Thread Thomas Huth
On 27/06/2023 17.51, Boris Fiuczynski wrote: Asynchronous teardown can be specified if the QEMU binary supports it by adding in the domain XML ... ... By default this new feature is disabled. Signed-off-by: Boris Fiuczynski --- ... diff --git a/docs/formatdomain.rst

Re: [libvirt PATCH v2 2/4] qemu: add run-with async-teardown capability

2023-06-28 Thread Thomas Huth
On 27/06/2023 17.51, Boris Fiuczynski wrote: QEMU capability is looking in query-command-line-options response for ... { "parameters": [ { "name": "async-teardown", "type": "boolean" } ], "option": "run-with" } ... allow to us

[libvirt PATCH v2] Add and for Network Objects

2023-06-27 Thread K Shiva Kiran
From: K Shiva 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.r

[libvirt PATCH v2 2/4] qemu: add run-with async-teardown capability

2023-06-27 Thread Boris Fiuczynski
QEMU capability is looking in query-command-line-options response for ... { "parameters": [ { "name": "async-teardown", "type": "boolean" } ], "option": "run-with" } ... allow to use the QEMU option -run-with async-teardown=on|off Signe

[libvirt PATCH v2 0/4] Enable asynchronous teardown

2023-06-27 Thread Boris Fiuczynski
Update capabilities for QEMU 8.1 on s390x, add a new capability async-teardown and make use of it when running on s390x hosts to improve memory reclaiming. v2: - switch to use on/off on the QEMU command line - added configuration management of the feature to the domain XML Boris Fiuczynski (3):

[libvirt PATCH v2 4/4] qemu: enable asynchronous teardown on s390x hosts

2023-06-27 Thread Boris Fiuczynski
Enablement of asynchronous teardown on S390 and add tests for asynchronous teardown autogeneration support. Signed-off-by: Boris Fiuczynski --- src/qemu/qemu_domain.c| 14 .../qemuhotplug-base-ccw-live+ccw-virtio.xml | 1 + ...with-2-ccw-virtio+ccw-virtio-1-rev

[libvirt PATCH v2 3/4] qemu: allow use of async teardown in domain

2023-06-27 Thread Boris Fiuczynski
Asynchronous teardown can be specified if the QEMU binary supports it by adding in the domain XML ... ... By default this new feature is disabled. Signed-off-by: Boris Fiuczynski --- docs/formatdomain.rst | 6 +++ src/conf/domain_conf.c

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

[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
This implements virDomainRevertToSnapshot to work with external snapshots. In addition it modifies virDomainSnapshotDelete to work correctly when we revert to non-leaf snapshot or when there is non-linear snapshot tree with multiple branches. Gitlab repo with the patches: https://gitlab.com/phrdin

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

2023-06-27 Thread Pavel Hrdina
When creating external snapshot this function is called only when the VM is not running so there is only one definition to care about. However, it will be used by external snapshot revert code for active and inactive definition and they may be different if a disk was (un)plugged only for the active

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

2023-06-27 Thread Pavel Hrdina
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 revert not all existing snapshots will be known to that QEMU process

[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
When deleting external snapshot and parent snapshot is the currently active snapshot as user reverted to it we need to properly update the parent snapshot metadata. After the delete is done the new overlay files will be the currently used files created when snapshot revert was done, replacing the

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

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

2023-06-27 Thread Pavel Hrdina
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 would not work currently as this operation would require using block-stre

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

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

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

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

2023-06-27 Thread Pavel Hrdina
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 reverting to last snapshot we need to first create new overlay files before w

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

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

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

[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_private.syms

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

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

2023-06-27 Thread Pavel Hrdina
Commit introduced new argument for virDomainSnapshotAlignDisks() that allows passing alternate domain definition in case the snapshot parent.dom is NULL. In case of redefining snapshot it will not hit the part of code that unconditionally uses parent.dom as there will not be need to generate defa

[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: [libvirt PATCH v2] Metadata support for Network Objects

2023-06-26 Thread Michal Prívozník
On 6/26/23 11:26, K Shiva wrote: > Adds the following to Network Object: > - , and to the Network Schema. > - Get and Set APIs to access or modify the above. > - An async callback that notifies of metadata changes. > > Resolves (GSoC 2023): > https://wiki.libvirt.org/Google_Summer_of_Code_Ideas

[libvirt PATCH v2] Metadata support for Network Objects

2023-06-26 Thread K Shiva
Adds the following to Network Object: - , and to the Network Schema. - Get and Set APIs to access or modify the above. - An async callback that notifies of metadata changes. Resolves (GSoC 2023): https://wiki.libvirt.org/Google_Summer_of_Code_Ideas.html Signed-off-by: K Shiva --- This is a v2 o

Re: [libvirt PATCH v2 2/2] Corrected names in comments

2023-06-26 Thread Michal Prívozník
On 6/14/23 07:21, K Shiva wrote: > Signed-off-by: K Shiva > --- > This patch applies to: > https://listman.redhat.com/archives/libvir-list/2023-June/240299.html > src/conf/virnetworkobj.c | 8 > src/libvirt-network.c| 10 +- > 2 files changed, 9 insertions(+), 9 deletions(-

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

2023-06-21 Thread Jonathon Jongsma
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 libvirt is running with the system_u:system_r:virtd_t context. This

[libvirt PATCH v2 2/2] Corrected names in comments

2023-06-13 Thread K Shiva
Signed-off-by: K Shiva --- This patch applies to: https://listman.redhat.com/archives/libvir-list/2023-June/240299.html src/conf/virnetworkobj.c | 8 src/libvirt-network.c| 10 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/conf/virnetworkobj.c b/src/

Re: [libvirt PATCH v2] ci: refresh with latest lcitool manifest

2023-06-01 Thread Andrea Bolognani
On Thu, Jun 01, 2023 at 10:59:11AM +0200, Erik Skultety wrote: > Main lcitool changes: > - added Alpine 3.17 and 3.18 targets > - dropped Alpine 3.15 and 3.16 > > Note that we're not actively testing all Alpine targets due to CI > quota, so only 3.17 is used as a replacement for 3.15 in this patch.

[libvirt PATCH v2] ci: refresh with latest lcitool manifest

2023-06-01 Thread Erik Skultety
Main lcitool changes: - added Alpine 3.17 and 3.18 targets - dropped Alpine 3.15 and 3.16 Note that we're not actively testing all Alpine targets due to CI quota, so only 3.17 is used as a replacement for 3.15 in this patch. Signed-off-by: Erik Skultety --- ci/buildenv/{alpine-315.sh => alpine-

Re: [libvirt PATCH v2] rpm: Explain BuildRequires on qemu-img

2023-05-22 Thread Andrea Bolognani
On Wed, May 10, 2023 at 03:08:37PM +0200, Andrea Bolognani wrote: > It's not used as part of the build process or searched for at > build time, and the QEMU driver detects its path at runtime, > so one could think that the BuildRequires is unnecessary. But > we actually need it to be present at bui

[libvirt PATCH v2] rpm: Explain BuildRequires on qemu-img

2023-05-10 Thread Andrea Bolognani
It's not used as part of the build process or searched for at build time, and the QEMU driver detects its path at runtime, so one could think that the BuildRequires is unnecessary. But we actually need it to be present at build time in order to run the full test suite. Signed-off-by: Andrea Bologn

Re: [libvirt PATCH v2 1/1] meson: Check header usability

2023-04-27 Thread Andrea Bolognani
On Thu, Apr 27, 2023 at 03:23:29PM +0200, Michal Prívozník wrote: > On 4/27/23 15:12, Andrea Bolognani wrote: > > Do you think it's okay for me to push this now, so that it gets > > included in 9.3.0, or should I rather wait until after the release? > > It's a bug fix and as such can and in fact sh

Re: [libvirt PATCH v2 1/1] meson: Check header usability

2023-04-27 Thread Michal Prívozník
On 4/27/23 15:12, Andrea Bolognani wrote: > On Thu, Apr 27, 2023 at 02:57:54PM +0200, Michal Prívozník wrote: >> On 4/27/23 14:22, Andrea Bolognani wrote: >>> This fixes cross-building in some scenarios. >>> >>> Specifically, when building for armv7l on x86_64, has_header() >>> will see the x86_64

Re: [libvirt PATCH v2 1/1] meson: Check header usability

2023-04-27 Thread Andrea Bolognani
On Thu, Apr 27, 2023 at 02:57:54PM +0200, Michal Prívozník wrote: > On 4/27/23 14:22, Andrea Bolognani wrote: > > This fixes cross-building in some scenarios. > > > > Specifically, when building for armv7l on x86_64, has_header() > > will see the x86_64 version of the linux/kmv.h header and > > con

Re: [libvirt PATCH v2 1/1] meson: Check header usability

2023-04-27 Thread Michal Prívozník
On 4/27/23 14:22, Andrea Bolognani wrote: > This fixes cross-building in some scenarios. > > Specifically, when building for armv7l on x86_64, has_header() > will see the x86_64 version of the linux/kmv.h header and > consider it to be usable. Later, when an attempt is made to > actually include i

[libvirt PATCH v2 0/1] meson: Check header usability

2023-04-27 Thread Andrea Bolognani
Test pipeline: https://gitlab.com/abologna/libvirt/-/pipelines/850846324 Changes from [v1]: * replace all uses of has_header() with check_header(). [v1] https://listman.redhat.com/archives/libvir-list/2023-April/239672.html Andrea Bolognani (1): meson: Check header usability meson.build |

[libvirt PATCH v2 1/1] meson: Check header usability

2023-04-27 Thread Andrea Bolognani
This fixes cross-building in some scenarios. Specifically, when building for armv7l on x86_64, has_header() will see the x86_64 version of the linux/kmv.h header and consider it to be usable. Later, when an attempt is made to actually include it, the compiler will quickly realize that things can't

Re: [libvirt PATCH v2 6/6] Move src/keycodemapdb -> subprojects/keycodemapdb

2023-04-21 Thread Boris Fiuczynski
On 4/20/23 5:34 PM, Michal Prívozník wrote: On 4/20/23 17:10, Boris Fiuczynski wrote: With this code in master I am no longer able to build rpms from the tarball with rpmbuild. Am I the only one? This is the pipeline that run after this very patch: https://gitlab.com/libvirt/libvirt/-/pipelin

Re: [libvirt PATCH v2 6/6] Move src/keycodemapdb -> subprojects/keycodemapdb

2023-04-20 Thread Michal Prívozník
On 4/20/23 17:10, Boris Fiuczynski wrote: > With this code in master I am no longer able to build rpms from the > tarball with rpmbuild. Am I the only one? This is the pipeline that run after this very patch: https://gitlab.com/libvirt/libvirt/-/pipelines/839521848 and for instance x86_64-fedora

Re: [libvirt PATCH v2 6/6] Move src/keycodemapdb -> subprojects/keycodemapdb

2023-04-20 Thread Boris Fiuczynski
With this code in master I am no longer able to build rpms from the tarball with rpmbuild. Am I the only one? On 4/17/23 1:54 PM, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau Follow better meson build system conventions. This allows to find keymap-gen or CSV without explicitly s

Re: [libvirt PATCH v2 0/6] Fix compilation on msys2, update keycodemapdb

2023-04-17 Thread Michal Prívozník
On 4/17/23 13:53, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > Hi, > > libvirt fails to compile on msys2/win32. > > Also update keycodemapdb to fix CI build issues, and turn it into a > subproject(), as that makes things simpler for meson. > > Fixes: > https://gitlab.com/li

[libvirt PATCH v2 6/6] Move src/keycodemapdb -> subprojects/keycodemapdb

2023-04-17 Thread marcandre . lureau
From: Marc-André Lureau Follow better meson build system conventions. This allows to find keymap-gen or CSV without explicitly setting the paths. Signed-off-by: Marc-André Lureau --- .gitmodules | 2 +- meson.build | 1 + src/util/meson.build

[libvirt PATCH v2 5/6] rpc/ssh: ssh_userauth_agent() is not supported on win32

2023-04-17 Thread marcandre . lureau
From: Marc-André Lureau The function does not exist on win32. Signed-off-by: Marc-André Lureau Signed-off-by: Michal Privoznik Reviewed-by: Michal Privoznik --- src/rpc/virnetlibsshsession.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/rpc/virnetlibsshses

[libvirt PATCH v2 4/6] meson: drop explicit python interpreter

2023-04-17 Thread marcandre . lureau
From: Marc-André Lureau meson wraps python scripts already on win32, so we end up with these failing commands: [1/359] "C:/msys64/ucrt64/bin/meson" "--internal" "exe" "--capture" "src/util/virkeycodetable_atset1.h" "--" "sh" "C:/msys64/home/marca/src/libvirt/scripts/meson-python.sh" "C:/msys6

[libvirt PATCH v2 3/6] meson: don't hard code find_program() location

2023-04-17 Thread marcandre . lureau
From: Marc-André Lureau Use 'dirs' argument to locate the program. Signed-off-by: Marc-André Lureau --- src/util/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/meson.build b/src/util/meson.build index 2fe6f7699e..f055079d0b 100644 --- a/src/util/meson.

[libvirt PATCH v2 2/6] keycodemapdb: update submodule for build fixes

2023-04-17 Thread marcandre . lureau
From: Marc-André Lureau A number of changes, but notably python script shebang fixing build issues in CI: Daniel P. Berrangé (1): Revert "Add local argparse for compat with python 2.6" Dawid Dziurla (1): Don't hardcode python3 path in shebang Eli Schwartz (1): make the meson.

[libvirt PATCH v2 1/6] meson: don't look for unix paths on win32

2023-04-17 Thread marcandre . lureau
From: Marc-André Lureau Or meson will complain with: ../meson.build:770:2: ERROR: Search directory /sbin is not an absolute path. Signed-off-by: Marc-André Lureau Reviewed-by: Michal Privoznik --- meson.build | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/m

[libvirt PATCH v2 0/6] Fix compilation on msys2, update keycodemapdb

2023-04-17 Thread marcandre . lureau
From: Marc-André Lureau Hi, libvirt fails to compile on msys2/win32. Also update keycodemapdb to fix CI build issues, and turn it into a subproject(), as that makes things simpler for meson. Fixes: https://gitlab.com/libvirt/libvirt/-/issues/453 v2: - update based on Michal version - update

Re: [libvirt PATCH v2] remote: add mutex when freeing private callbacks

2023-03-07 Thread Martin Kletzander
On Tue, Mar 07, 2023 at 05:57:56PM +, Mike Pontillo wrote: This commit resolves illegal memory accesses observed via: remoteClientFreePrivateCallbacks() remoteClientCloseFunc() virNetServerClientCloseLocked() virNetServerProcessClients() daemonServerProcessClients() virHashForEach() v

[libvirt PATCH v2] remote: add mutex when freeing private callbacks

2023-03-07 Thread Mike Pontillo
This commit resolves illegal memory accesses observed via: remoteClientFreePrivateCallbacks() remoteClientCloseFunc() virNetServerClientCloseLocked() virNetServerProcessClients() daemonServerProcessClients() virHashForEach() virNetDaemonRun() main() Signed-off-by: Mike Pontillo -

Re: [libvirt PATCH v2] tests: Undo recent breakages

2023-03-06 Thread Andrea Bolognani
On Mon, Mar 06, 2023 at 04:29:19PM +, Daniel P. Berrangé wrote: > On Mon, Mar 06, 2023 at 05:23:46PM +0100, Andrea Bolognani wrote: > > Turns out that those overrides I recently removed where actually > > there for a reason, and there was a motivation behind creating > > the driver config as un

Re: [libvirt PATCH v2] tests: Undo recent breakages

2023-03-06 Thread Daniel P . Berrangé
On Mon, Mar 06, 2023 at 05:23:46PM +0100, Andrea Bolognani wrote: > Turns out that those overrides I recently removed where actually > there for a reason, and there was a motivation behind creating > the driver config as unprivileged too O:-) FWIW, this is going to be a super frustrating descripti

[libvirt PATCH v2] tests: Undo recent breakages

2023-03-06 Thread Andrea Bolognani
Turns out that those overrides I recently removed where actually there for a reason, and there was a motivation behind creating the driver config as unprivileged too O:-) Until a solution that can both ensure predictable output and avoid code duplication is developed, go back to the previous appro

Re: [libvirt PATCH v2] qemu: implement QEMU NBD source reconnect delay attribute

2023-02-22 Thread Christian Nautze
I had a first version on gitlab https://gitlab.com/libvirt/libvirt/-/merge_requests/216 where I added the attribute to the source. Peter Krempa noted that this most likely has to be moved to the reconnect element. I actually prefer adding it to reconnect (with choice in the schema). If there are no

Re: [libvirt PATCH v2] qemu: implement QEMU NBD source reconnect delay attribute

2023-02-21 Thread Jonathon Jongsma
On 2/17/23 10:50 AM, Christian Nautze wrote: Currently it's only possible to set this parameter during domain creation via QEMU commandline passthrough feature. With the new delay attribute it's also possible to set this parameter if you want to attach a new NBD disk usin

[libvirt PATCH v2] qemu: implement QEMU NBD source reconnect delay attribute

2023-02-17 Thread Christian Nautze
Currently it's only possible to set this parameter during domain creation via QEMU commandline passthrough feature. With the new delay attribute it's also possible to set this parameter if you want to attach a new NBD disk using "virsh attach-device domain device.xml" e.g.:

Re: [libvirt PATCH v2 0/8] Extract the integration job commands to a shell script

2023-02-06 Thread Erik Skultety
On Fri, Jan 27, 2023 at 10:26:48AM +0100, Erik Skultety wrote: > Using shell scripts rather than inlining shell commands to YAML feels more > natural, more readable, and will keep all different variations of execution > consistent. Essentially the only disadvantage is that we won't see each > comm

[libvirt PATCH v2 7/8] ci: integration.sh: Replace 'test' with '[' operator

2023-01-27 Thread Erik Skultety
Since we now have a standalone script instead of inlined shell commands in a YAML, we can adopt the common syntax for if-then-else clauses which involve the '[' test command alias rather than keep using 'test' explicitly. Signed-off-by: Erik Skultety --- ci/integration.sh | 2 +- 1 file changed,

[libvirt PATCH v2 8/8] ci: integration.sh: Define the SCRATCH_DIR variable for local execution

2023-01-27 Thread Erik Skultety
Running outside of GitLab will likely not have the variable set and hence the execution would fail. Signed-off-by: Erik Skultety --- ci/integration.sh | 9 + 1 file changed, 9 insertions(+) diff --git a/ci/integration.sh b/ci/integration.sh index 7bf3623809..e1f461a441 100644 --- a/ci/i

[libvirt PATCH v2 5/8] ci: integration-template: Drop the '-lt Fedora 35' check

2023-01-27 Thread Erik Skultety
We no longer support Fedora 35 or older. While at it, we can also tailor the rest of the check to CentOS Stream 8 only since all other supported Red Hat like platforms have moved onto modular daemons setup already. Signed-off-by: Erik Skultety --- ci/integration.sh | 3 +-- 1 file changed, 1 ins

[libvirt PATCH v2 6/8] ci: integration.sh: Add/Rewrite/Reformat commentaries

2023-01-27 Thread Erik Skultety
Because of the nature of writing inline shell commands to YAML, most of the commentaries where inlined with the command not to hinder YAML readability any further. Since we moved the logic to a standalone script, we can now do whatever formatting & readability adjustments we want. Signed-off-by: E

[libvirt PATCH v2 2/8] ci: Move the SCRATCH_DIR from /tmp

2023-01-27 Thread Erik Skultety
In case /tmp is mounted as an in-memory file system, we're fairly storage limited. This might pose a problem in VM scenarios if we build multiple projects in there or download some data needed for testing. Therefore, move the scratch to /home. Also, take the opportunity and rename scratch to 'vroot

[libvirt PATCH v2 4/8] ci: integration: Drop the 'install-deps' hidden job and reference

2023-01-27 Thread Erik Skultety
Since the section now only consists of a single command, we can happily move the command to the main integration template job body. Signed-off-by: Erik Skultety --- ci/integration-template.yml | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/ci/integration-template.yml b/

[libvirt PATCH v2 3/8] ci: integration: Extract several hidden job definitions to a script

2023-01-27 Thread Erik Skultety
This will allow us to re-use the script in other scenarios like local executions where up until now one had to copy-paste the recipe line-by-line. Signed-off-by: Erik Skultety --- ci/integration-template.yml | 36 +--- ci/integration.sh | 32

[libvirt PATCH v2 0/8] Extract the integration job commands to a shell script

2023-01-27 Thread Erik Skultety
Using shell scripts rather than inlining shell commands to YAML feels more natural, more readable, and will keep all different variations of execution consistent. Essentially the only disadvantage is that we won't see each command listed one-by-one in gitlab's log output (unless we set -x that is),

[libvirt PATCH v2 1/8] syntax-check: Drop the shell's 'check for minus' rule

2023-01-27 Thread Erik Skultety
Apparently we've only had it because the -[ao] options weren't portable at the time, but according to https://pubs.opengroup.org/onlinepubs/9699919799/utilities/test.html both are defined in POSIX.1-2017 revision which is old enough for all our supported platforms to have adopted it already. There

Re: [libvirt PATCH v2 25/31] qemu_snapshot: implement deletion of external snapshot

2023-01-06 Thread Peter Krempa
On Thu, Jan 05, 2023 at 12:47:01 +0100, Pavel Hrdina wrote: > When deleting snapshot we are starting block-commit job over all disks > that are part of the snapshot. > > This operation may fail as it writes data changes to the backing qcow2 > image so we need to wait for all the disks to finish th

Re: [libvirt PATCH v2 28/31] qemu_process: abort snapshot delete when daemon starts

2023-01-06 Thread Peter Krempa
On Thu, Jan 05, 2023 at 12:47:04 +0100, Pavel Hrdina wrote: > If the daemon crashes or is restarted while the snapshot delete is in > progress we have to handle it gracefully to not leave any block jobs > active. > > For now we will simply abort the snapshot delete operation so user can > start it

Re: [libvirt PATCH v2 12/31] storage_source: introduce virStorageSourceChainLookupBySource

2023-01-06 Thread Peter Krempa
On Thu, Jan 05, 2023 at 12:46:48 +0100, Pavel Hrdina wrote: > Looks up disk storage source within storage source chain using storage > source object instead of path to make it work with all disk types. > > Signed-off-by: Pavel Hrdina > --- > src/libvirt_private.syms | 1 + > src/storag

Re: [libvirt PATCH v2 11/31] qemu_blockjob: process QEMU_MONITOR_JOB_STATUS_PENDING signal

2023-01-06 Thread Peter Krempa
On Thu, Jan 05, 2023 at 12:46:47 +0100, Pavel Hrdina wrote: > QEMU emits this signal when the job finished its work and is about to be > finalized. If the job is started with autofinalize disabled the job > waits for user input to finalize the job. > > This will be used by snapshot delete code. >

Re: [libvirt PATCH v2 10/31] qemu_block: change qemuBlockCommit to return job pointer

2023-01-06 Thread Peter Krempa
On Thu, Jan 05, 2023 at 12:46:46 +0100, Pavel Hrdina wrote: > The created job will be needed by external snapshot delete code so > rework qemuBlockCommit to return that pointer. > > Signed-off-by: Pavel Hrdina > --- > src/qemu/qemu_block.c | 57 ++ > src/

Re: [libvirt PATCH v2 02/31] qemu_block: extract block commit code to separate function

2023-01-06 Thread Peter Krempa
On Thu, Jan 05, 2023 at 12:46:38 +0100, Pavel Hrdina wrote: > Signed-off-by: Pavel Hrdina > --- > src/qemu/qemu_block.c | 177 + > src/qemu/qemu_block.h | 9 +++ > src/qemu/qemu_driver.c | 162 + > 3 files changed, 18

[libvirt PATCH v2 28/31] qemu_process: abort snapshot delete when daemon starts

2023-01-05 Thread Pavel Hrdina
If the daemon crashes or is restarted while the snapshot delete is in progress we have to handle it gracefully to not leave any block jobs active. For now we will simply abort the snapshot delete operation so user can start it again. We need to refuse deleting external snapshots if there is alread

[libvirt PATCH v2 24/31] qemu_snapshot: prepare data for external snapshot deletion

2023-01-05 Thread Pavel Hrdina
In order to save some CPU cycles we will collect all the necessary data to delete external snapshot before we even start. They will be later used by code that deletes the snapshots and updates metadata when needed. With external snapshots we need data that libvirt gets from running QEMU process so

[libvirt PATCH v2 23/31] qemu_snapshot: convert snapshot delete to async domain job

2023-01-05 Thread Pavel Hrdina
Deleting external snapshots will require to run it as async domain job, the same way as we do for snapshot creation. For internal snapshots modify the job mask in order to forbid any other job to be started. Signed-off-by: Pavel Hrdina Reviewed-by: Peter Krempa --- src/qemu/qemu_snapshot.c | 1

[libvirt PATCH v2 10/31] qemu_block: change qemuBlockCommit to return job pointer

2023-01-05 Thread Pavel Hrdina
The created job will be needed by external snapshot delete code so rework qemuBlockCommit to return that pointer. Signed-off-by: Pavel Hrdina --- src/qemu/qemu_block.c | 57 ++ src/qemu/qemu_block.h | 2 +- src/qemu/qemu_driver.c | 5 +++- 3 files chan

[libvirt PATCH v2 18/31] qemu_snapshot: move snapshot metadata reparent code

2023-01-05 Thread Pavel Hrdina
Previously the reparent happened before the actual snapshot deletion. This change moves the code closer to the rest of the code handling snapshot metadata when deletion happens. This makes the metadate deletion happen after the data files are deleted. Following patch will extract it into separate

[libvirt PATCH v2 29/31] qemu_snapshot: enable deletion of external snapshots

2023-01-05 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina Reviewed-by: Peter Krempa --- src/qemu/qemu_snapshot.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_snapshot.c b/src/qemu/qemu_snapshot.c index f5b88daa5d..4f83eb6bf9 100644 --- a/src/qemu/qemu_snapshot.c +++ b/src/qemu/qemu_sn

[libvirt PATCH v2 27/31] qemu_snapshot: when deleting snapshot invalidate parent snapshot

2023-01-05 Thread Pavel Hrdina
When deleting external snapshots the operation may fail at any point which could lead to situation that some disks finished the block commit operation but for some disks it failed and the libvirt job ends. In order to make sure that the qcow2 images are in consistent state introduce new element ""

[libvirt PATCH v2 26/31] qemu_snapshot: update metadata when deleting snapshots

2023-01-05 Thread Pavel Hrdina
With external snapshots we need to modify the metadata bit more then what is required for internal snapshots. Mainly the storage source location changes with every external snapshot. This means that if we delete non-leaf snapshot we need to update all children snapshots and modify the disk sources

[libvirt PATCH v2 30/31] api: document support for external snapshot deletion

2023-01-05 Thread Pavel Hrdina
Now that deletion of external snapshot is implemented document the current virDomainSnapshotDelete supported state. Signed-off-by: Pavel Hrdina Reviewed-by: Peter Krempa --- src/libvirt-domain-snapshot.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/libvirt-domain-snapshot.c b/

<    1   2   3   4   5   6   7   8   9   10   >