Re: [PATCH v1 00/12] libxl: bump LIBXL_API_VERSION

2021-03-18 Thread Jim Fehlig
On 3/17/21 4:57 AM, Olaf Hering wrote: Various changes to handle libxl API variants. Thanks for taking this on! It is much simpler than the crap I've cooked up in the past. I haven't taken another stab since we've moved to meson, and I'd like to blame autotools, but... We'll need to sort

Re: [PATCH v1 11/12] libxl: add API wrapper for libxl_set_memory_target

2021-03-18 Thread Jim Fehlig
On 3/17/21 4:57 AM, Olaf Hering wrote: Upcoming changes will use different LIBXL_API_VERSION variants. Prepare libxl_set_memory_target, which changed the storage size of parameter "target_memkb" in Xen 4.8. No functional change intended. Signed-off-by: Olaf Hering --- src/libxl/libxl_api.h

Re: [PATCH v1 08/12] libxl: add API wrapper for libxl_get_free_memory

2021-03-18 Thread Jim Fehlig
On 3/17/21 4:57 AM, Olaf Hering wrote: Upcoming changes will use different LIBXL_API_VERSION variants. Prepare libxl_get_free_memory, which changed storage size of parameter "memkb" in Xen 4.8. No functional change intended. Signed-off-by: Olaf Hering --- src/libxl/libxl_api.h| 19

Re: [PATCH v1 01/12] libxl: add API wrapper for libxl_domain_create_restore

2021-03-18 Thread Jim Fehlig
On 3/17/21 4:57 AM, Olaf Hering wrote: Upcoming changes will use different LIBXL_API_VERSION variants. Prepare libxl_domain_create_restore, which got a new parameter "send_back_fd" in Xen 4.7. libvirt does not use this parameter. No functional change intended. Signed-off-by: Olaf Hering ---

Re: [PATCH v1 01/12] libxl: add API wrapper for libxl_domain_create_restore

2021-03-18 Thread Olaf Hering
Am Thu, 18 Mar 2021 16:26:14 -0600 schrieb Jim Fehlig : > Maybe libxlDomainCreateRestoreWrap? > The 'Wrap' suffix compliments the libxl_api_wrap.h name suggestion. "Naming conventions" does not cover API wrapping. Some of the names are already taken, like

Re: [PULL v2 00/13] misc patches removing deprecated features

2021-03-18 Thread Peter Maydell
On Thu, 18 Mar 2021 at 09:30, Daniel P. Berrangé wrote: > > The following changes since commit 571d413b5da6bc6f1c2aaca8484717642255ddb0: > > Merge remote-tracking branch 'remotes/mcayland/tags/qemu-openbios-20210316' > into staging (2021-03-17 21:02:37 +) > > are available in the Git

[libvirt PATCH 2/2] build: teach run script how to temporarily stop systemd units

2021-03-18 Thread Daniel P . Berrangé
When testing locally built daemons on a systemd host there can be quite a few systemd units that need temporarily stopping, and ideally restarting after the test is complete. This becomes a massive burden when modular daemons are running and you want to test libvirtd, as a huge number of units

[libvirt PATCH 0/2] build: make the run script more intelligent on systemd hosts

2021-03-18 Thread Daniel P . Berrangé
Running virtqemud, we just stop the virqemud daemon units Temporarily stopping systemd units... > virtqemud.socket > virtqemud-ro.socket > virtqemud-admin.socket Running ./src/virtqemud... ^CRe-starting original systemd units... > virtqemud-admin.socket > virtqemud-ro.socket >

[libvirt PATCH 1/2] build: convert the run script to use Python

2021-03-18 Thread Daniel P . Berrangé
This fits with the goal of eliminating non-Python scripting languages, and makes forthcoming changes far easier. Signed-off-by: Daniel P. Berrangé --- run.in | 45 ++--- 1 file changed, 26 insertions(+), 19 deletions(-) diff --git a/run.in b/run.in index

[PATCH 3/3] qemu: Update paused reason on unexpected 'STOP' event

2021-03-18 Thread Peter Krempa
The qemu STOP event doesn't really report why the VM was stopped. In certain cases we do expect this by storing the expectation in the private data. In cases we've encountered an unexpected STOP event we can offload to the event thread a job to refresh the state using 'query-status'. For all

[PATCH 2/3] API: Add VIR_DOMAIN_PAUSED_HYPERVISOR_FAULT enum value

2021-03-18 Thread Peter Krempa
In certain cases hypervisors on encountering an internal fault pause the domain to allow gathering useful debugging information. Libvirt for now would report 'VIR_DOMAIN_PAUSED_UNKNOWN' which isn't entirely helpful. Add a new paused reason and the corresponding value for the suspended event, so

[PATCH 1/3] qemuMonitorJSONGetStatus: Refactor cleanup

2021-03-18 Thread Peter Krempa
Use g_autofree for the JSON values to remove cleanup label and ret variable. Signed-off-by: Peter Krempa --- src/qemu/qemu_monitor_json.c | 18 ++ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index

[PATCH 0/3] Add event for hypervisor faults and implement it for qemu

2021-03-18 Thread Peter Krempa
Peter Krempa (3): qemuMonitorJSONGetStatus: Refactor cleanup API: Add VIR_DOMAIN_PAUSED_HYPERVISOR_FAULT enum value qemu: Update paused reason on unexpected 'STOP' event examples/c/misc/event-test.c | 3 +++ include/libvirt/libvirt-domain.h | 2 ++ src/conf/domain_conf.c |

Re: [libvirt PATCH 8/9] conf: introduce support for firmware auto-selection feature filtering

2021-03-18 Thread Pavel Hrdina
On Thu, Mar 18, 2021 at 06:10:45PM +0100, Pavel Hrdina wrote: > On Thu, Mar 18, 2021 at 05:18:36PM +0100, Michal Privoznik wrote: > > On 3/18/21 1:26 PM, Pavel Hrdina wrote: > > > When the firmware auto-selection was introduced it always picked first > > > usable firmware based on the JSON

Re: [libvirt PATCH 1/9] docs: improve description of secure attribute for loader element

2021-03-18 Thread Pavel Hrdina
On Thu, Mar 18, 2021 at 05:42:47PM +0100, Kashyap Chamarthy wrote: > On Thu, Mar 18, 2021 at 01:26:38PM +0100, Pavel Hrdina wrote: > > The original text was not explaining what this attribute actually > > controls and could have been interpreted as a control switch for the > > Secure boot feature

Re: [libvirt PATCH 9/9] qemu: implement support for firmware auto-selection feature filtering

2021-03-18 Thread Pavel Hrdina
On Thu, Mar 18, 2021 at 05:18:38PM +0100, Michal Privoznik wrote: > On 3/18/21 1:26 PM, Pavel Hrdina wrote: > > Signed-off-by: Pavel Hrdina > > --- > > src/qemu/qemu_firmware.c | 40 +++ > > ...re-efi-no-enrolled-keys.x86_64-latest.args | 49 ++

Re: [libvirt PATCH 8/9] conf: introduce support for firmware auto-selection feature filtering

2021-03-18 Thread Pavel Hrdina
On Thu, Mar 18, 2021 at 05:18:36PM +0100, Michal Privoznik wrote: > On 3/18/21 1:26 PM, Pavel Hrdina wrote: > > When the firmware auto-selection was introduced it always picked first > > usable firmware based on the JSON descriptions on the host. It is > > possible to add/remove/change the JSON

[PATCH] qemu: backup: Restore security label on backup disk store image on VM termination

2021-03-18 Thread Peter Krempa
When the backup job is terminated normally the security label is restored by the blockjob finishing handler. If the VM dies or is destroyed that wouldn't happen as the blockjob handler wouldn't be called. Restore the security label on disk store where we remember that the job was running at the

[PATCH 2/3] qemu: backup: Enable full backup support

2021-03-18 Thread Peter Krempa
qemuBackupBegin can take a full backup of the disks (excluding any operations with bitmaps) without the need to wait for the blockdev-reopen support in qemu. Add a check that no checkpoint creation is required and the disk backup mode isn't VIR_DOMAIN_BACKUP_DISK_BACKUP_MODE_INCREMENTAL. Call to

[PATCH 3/3] NEWS: Mention support for full backups via virDomainBackupBegin

2021-03-18 Thread Peter Krempa
Signed-off-by: Peter Krempa --- NEWS.rst | 9 + 1 file changed, 9 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index 9d819a3cf2..c2013ecac9 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -24,6 +24,15 @@ v7.2.0 (unreleased) The memory dirty rate stats can be obtained through ``virsh

[PATCH 1/3] qemu: capabilities: Introduce QEMU_CAPS_BLOCKDEV_BACKUP

2021-03-18 Thread Peter Krempa
Upcoming commit will enable full backup support (incremental part requires blockdev-reopen, which won't happen in qemu for at least another release). Add a capability that the 'blockdev-backup' job is supported by qemu capped, but limited to when qemu supports QEMU_CAPS_BLOCKDEV. We can also use

[PATCH 0/3] qemu: Enable virDomainBackupBegin for full backups

2021-03-18 Thread Peter Krempa
Peter Krempa (3): qemu: capabilities: Introduce QEMU_CAPS_BLOCKDEV_BACKUP qemu: backup: Enable full backup support NEWS: Mention support for full backups via virDomainBackupBegin NEWS.rst | 9 ++ src/qemu/qemu_backup.c| 28

Re: [libvirt PATCH 1/9] docs: improve description of secure attribute for loader element

2021-03-18 Thread Kashyap Chamarthy
On Thu, Mar 18, 2021 at 01:26:38PM +0100, Pavel Hrdina wrote: > The original text was not explaining what this attribute actually > controls and could have been interpreted as a control switch for the > Secure boot feature in firmwares. Yep, I've indeed seen people misread it as such. >

Re: [libvirt PATCH v4 5/6] ci: util: Add a registry checker for stale images

2021-03-18 Thread Andrea Bolognani
On Thu, 2021-03-18 at 17:11 +0100, Erik Skultety wrote: > +msg = textwrap.dedent(f""" > +The following images are stale and can be purged from the > registry: > + > +STALE_DETAILS > + > +You can delete the images listed above using

Re: [libvirt PATCH 9/9] qemu: implement support for firmware auto-selection feature filtering

2021-03-18 Thread Michal Privoznik
On 3/18/21 1:26 PM, Pavel Hrdina wrote: Signed-off-by: Pavel Hrdina --- src/qemu/qemu_firmware.c | 40 +++ ...re-efi-no-enrolled-keys.x86_64-latest.args | 49 ++ .../os-firmware-efi-no-enrolled-keys.xml | 25 ++

Re: [libvirt PATCH 8/9] conf: introduce support for firmware auto-selection feature filtering

2021-03-18 Thread Michal Privoznik
On 3/18/21 1:26 PM, Pavel Hrdina wrote: When the firmware auto-selection was introduced it always picked first usable firmware based on the JSON descriptions on the host. It is possible to add/remove/change the JSON files but it will always be for the whole host. This patch introduces support

[libvirt PATCH v4 5/6] ci: util: Add a registry checker for stale images

2021-03-18 Thread Erik Skultety
This function checks whether there are any stale Docker images in the registry that can be purged. Since we're pulling available container images from our GitLab registry with the 'list-images' action, it could happen that we'd list old (already unsupported) images and make them available for the

[libvirt PATCH v4 6/6] ci: helper: Apply Python naming practice to private methods/attributes

2021-03-18 Thread Erik Skultety
As documented at [1], the common practice with respect to private attributes/methods naming is to prefix them with an underscore. [1] https://docs.python.org/3/tutorial/classes.html#private-variables Signed-off-by: Erik Skultety --- ci/helper | 122

[libvirt PATCH v4 2/6] ci: helper: Introduce --quiet

2021-03-18 Thread Erik Skultety
Offer an option to silence all output to stdout, e.g. when generating dockerfiles/varsfiles. Signed-off-by: Erik Skultety Reviewed-by: Andrea Bolognani --- ci/helper | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/ci/helper b/ci/helper index

[libvirt PATCH v4 4/6] ci: helper: Rewrite image listing to Python

2021-03-18 Thread Erik Skultety
The corresponding Bash script is dropped. After this patch's rewrite, the Makefile's original image listing target remains intact only to notify the user to use the Python helper instead. Signed-off-by: Erik Skultety Reviewed-by: Andrea Bolognani --- ci/Makefile | 12

[libvirt PATCH v4 3/6] ci: Introduce a util module

2021-03-18 Thread Erik Skultety
With the gradual rewrite of the Makefile to the 'helper' script will require helper functions that would better live in a separate util module. Signed-off-by: Erik Skultety Reviewed-by: Andrea Bolognani --- ci/util.py | 40 1 file changed, 40

[libvirt PATCH v4 0/6] ci: helper: Rewrite image listing in Python and add stale Docker image checker

2021-03-18 Thread Erik Skultety
since v3: - more formatting changes as requested per review comments - get_registry_stale_images was simplified according to the comments - class attributes were also converted to private in [6/6] v1: https://listman.redhat.com/archives/libvir-list/2021-February/msg00641.ht= ml v2:

[libvirt PATCH v4 1/6] ci: helper: Use the ArgumentDefaultsHelpFormatter help formatter

2021-03-18 Thread Erik Skultety
This help formatter class reports the defaults we use for options taking an argument. Signed-off-by: Erik Skultety Reviewed-by: Andrea Bolognani --- ci/helper | 5 + 1 file changed, 5 insertions(+) diff --git a/ci/helper b/ci/helper index 73a3f729da..8f34f4b59d 100755 --- a/ci/helper +++

Re: [libvirt PATCH v3 6/6] ci: helper: Convert private methods to Python common naming practice

2021-03-18 Thread Erik Skultety
On Thu, Mar 18, 2021 at 12:09:19PM +0100, Andrea Bolognani wrote: > On Thu, 2021-03-18 at 09:09 +0100, Erik Skultety wrote: > > As documented at [1], the common practice wrt to private > > s/wrt to/with respect to/ > > > def parse(self): > > return self.parser.parse_args() > >

Re: [libvirt PATCH v3 5/6] ci: util: Add a registry checker for stale images

2021-03-18 Thread Erik Skultety
... > > +def get_registry_stale_images(registry_uri: str, > > + supported_distros: List[str]) -> Dict[str, > > int]: > > +""" > > +Check the GitLab image registry for images that we no longer support > > and > > +which should be deleted. > > + > > +

[PATCH v7 00/11] Configurable policy for handling deprecated interfaces

2021-03-18 Thread Markus Armbruster
New option -compat lets you configure what to do when deprecated interfaces get used. This is intended for testing users of the management interfaces. It is experimental. -compat deprecated-input= configures what to do when deprecated input is received. Available policies: * accept: Accept

Re: [libvirt PATCH 02/38] virxml: Add virXMLPropYesNo

2021-03-18 Thread Pavel Hrdina
On Thu, Mar 18, 2021 at 09:00:41AM +0100, Tim Wiederhake wrote: > Convenience function to return value of a yes / no attribute. > > Does not use virTristateBoolTypeFromString to disallow "default". > > Signed-off-by: Tim Wiederhake > --- > src/util/virxml.c | 37

Re: [libvirt PATCH 02/38] virxml: Add virXMLPropYesNo

2021-03-18 Thread Daniel P . Berrangé
On Thu, Mar 18, 2021 at 04:03:17PM +0100, Michal Privoznik wrote: > On 3/18/21 9:00 AM, Tim Wiederhake wrote: > > Convenience function to return value of a yes / no attribute. > > > > Does not use virTristateBoolTypeFromString to disallow "default". > > > > Signed-off-by: Tim Wiederhake > > ---

Re: [libvirt PATCH 00/38] Refactor XML parsing boilerplate code

2021-03-18 Thread Tim Wiederhake
On Thu, 2021-03-18 at 16:03 +0100, Michal Privoznik wrote: > On 3/18/21 9:00 AM, Tim Wiederhake wrote: > > (...) > > 10 files changed, 314 insertions(+), 663 deletions(-) > > > > Reviewed-by: Michal Privoznik > > Nice cleanup! > > And if you agree with my suggestions in 01-02/38 (suggestion

Re: [PATCH v6 00/10] Configurable policy for handling deprecated interfaces

2021-03-18 Thread Markus Armbruster
This series needs fixups to not break --disable-system --disable-tools builds. It's not much (see appended diff), but enough to make me respin it as v7. I'll respin the pull request, too. diff --git a/include/qapi/compat-policy.h b/include/qapi/compat-policy.h index b8c6638156..1083f95122

Re: [libvirt PATCH 02/38] virxml: Add virXMLPropYesNo

2021-03-18 Thread Michal Privoznik
On 3/18/21 9:00 AM, Tim Wiederhake wrote: Convenience function to return value of a yes / no attribute. Does not use virTristateBoolTypeFromString to disallow "default". Signed-off-by: Tim Wiederhake --- src/util/virxml.c | 37 + src/util/virxml.h | 4

Re: [libvirt PATCH 01/38] virStorageAdapterFCHost: Fix comment

2021-03-18 Thread Michal Privoznik
On 3/18/21 9:00 AM, Tim Wiederhake wrote: Signed-off-by: Tim Wiederhake --- src/conf/storage_adapter_conf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/conf/storage_adapter_conf.h b/src/conf/storage_adapter_conf.h index 4c7da7c8d9..93879acb6e 100644 ---

Re: [libvirt PATCH 00/38] Refactor XML parsing boilerplate code

2021-03-18 Thread Michal Privoznik
On 3/18/21 9:00 AM, Tim Wiederhake wrote: This series replaces some recurring boilerplate code in src/conf/ regarding the extraction of a virTristate(Switch|Bool) XML attribute. The boilerplate code looks roughly like this, g_autofree char *str = NULL; if (str = virXMLPropString(node,

Re: [libvirt PATCH 06/38] domain_conf: Use virXMLProp(OnOff|YesNo) in virDomainDeviceInfoParseXML

2021-03-18 Thread Michal Privoznik
On 3/18/21 9:00 AM, Tim Wiederhake wrote: Signed-off-by: Tim Wiederhake --- src/conf/domain_conf.c | 21 + 1 file changed, 9 insertions(+), 12 deletions(-) Had to rebase this, because meanwhile I pushed another patch that touched this area. diff --git

Re: [PATCH v2 0/2] XML non-virtio video device validation

2021-03-18 Thread Michal Privoznik
On 3/10/21 5:42 PM, Kristina Hanicova wrote: Kristina Hanicova (2): move virDomainCheckVirtioOptionsAreAbsent a few lines forward XML validate that non-virtio video devices have none virtio options src/conf/domain_validate.c | 60 -- 1 file changed,

Re: [PATCH 0/2] refactoring conf for virDomainDeviceInfoParseXML to use XPath

2021-03-18 Thread Michal Privoznik
On 3/12/21 1:44 PM, Kristina Hanicova wrote: Kristina Hanicova (2): conf: Propagate xmlXPathContextPtr into virDomainDeviceInfoParseXML() refactoring virDomainDeviceInfoParseXML to use XPath src/conf/domain_conf.c | 116 + 1 file changed, 49

Re: [PATCH] vm : forbid to start a removing vm

2021-03-18 Thread Michal Privoznik
On 3/11/21 2:13 AM, Hogan Wang wrote: From: Zhuang Shengen When a vm is doing migration phase confirm, and then start it concurrently, it will lead to the vm out of libvirtd control. Cause Analysis: 1. thread1 migrate vm out. 2. thread2 start the migrating vm. 3. thread1 remove vm from domain

Re: [PATCH v2] bhyve: add support

2021-03-18 Thread Michal Privoznik
On 3/16/21 1:20 PM, Roman Bogorodskiy wrote: Implement "" support for bhyve driver. As there are not really lot of options, try to find "BHYVE_UEFI.fd" firmware which is installed by the sysutils/uefi-edk2-bhyve FreeBSD port. If not found, just use the first found firmware in the firmwares

[libvirt PATCH 7/9] conf: use switch in virDomainDefParseBootOptions

2021-03-18 Thread Pavel Hrdina
The original code used a lot of conditions and was not that obvious when each XML bits are parsed. Signed-off-by: Pavel Hrdina --- src/conf/domain_conf.c | 42 ++ 1 file changed, 26 insertions(+), 16 deletions(-) diff --git a/src/conf/domain_conf.c

[libvirt PATCH 5/9] conf: introduce virDomainDefParseBootLoaderOptions

2021-03-18 Thread Pavel Hrdina
Extract the code to it's own function. Signed-off-by: Pavel Hrdina --- src/conf/domain_conf.c | 42 +++--- 1 file changed, 27 insertions(+), 15 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 03985b6687..f6e8d5180a 100644 ---

[libvirt PATCH 4/9] conf: introduce virDomainDefParseBootFirmwareOptions

2021-03-18 Thread Pavel Hrdina
Extract the code to it's own function. Signed-off-by: Pavel Hrdina --- src/conf/domain_conf.c | 39 +++ 1 file changed, 27 insertions(+), 12 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 4876fe61bb..03985b6687 100644 ---

[libvirt PATCH 6/9] conf: introduce virDomainDefParseBootAcpiOptions

2021-03-18 Thread Pavel Hrdina
Extract the code to it's own function. Signed-off-by: Pavel Hrdina --- src/conf/domain_conf.c | 79 -- 1 file changed, 45 insertions(+), 34 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index f6e8d5180a..14a2c818d6 100644 ---

[libvirt PATCH 9/9] qemu: implement support for firmware auto-selection feature filtering

2021-03-18 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- src/qemu/qemu_firmware.c | 40 +++ ...re-efi-no-enrolled-keys.x86_64-latest.args | 49 ++ .../os-firmware-efi-no-enrolled-keys.xml | 25 ++ tests/qemuxml2argvtest.c | 1 +

[libvirt PATCH 8/9] conf: introduce support for firmware auto-selection feature filtering

2021-03-18 Thread Pavel Hrdina
When the firmware auto-selection was introduced it always picked first usable firmware based on the JSON descriptions on the host. It is possible to add/remove/change the JSON files but it will always be for the whole host. This patch introduces support for configuring the auto-selection per VM

[libvirt PATCH 3/9] conf: introduce virDomainDefParseBootKernelOptions

2021-03-18 Thread Pavel Hrdina
Extract the code to it's own function. Signed-off-by: Pavel Hrdina --- src/conf/domain_conf.c | 18 +- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 31b908d8fe..4876fe61bb 100644 --- a/src/conf/domain_conf.c

[libvirt PATCH 2/9] conf: introduce virDomainDefParseBootInitOptions

2021-03-18 Thread Pavel Hrdina
Extract the code to it's own function. Signed-off-by: Pavel Hrdina --- src/conf/domain_conf.c | 109 +++-- 1 file changed, 61 insertions(+), 48 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 47756ff0be..31b908d8fe 100644 ---

[libvirt PATCH 0/9] improve firmware auto-selection

2021-03-18 Thread Pavel Hrdina
Cleanup the parser code and implement firmware feature filtering support to allow users to modify firmware auto-selection behavior per VM. More details in PATCH 08. Pavel Hrdina (9): docs: improve description of secure attribute for loader element conf: introduce

[libvirt PATCH 1/9] docs: improve description of secure attribute for loader element

2021-03-18 Thread Pavel Hrdina
The original text was not explaining what this attribute actually controls and could have been interpreted as a control switch for the Secure boot feature in firmwares. Signed-off-by: Pavel Hrdina --- docs/formatdomain.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git

Re: [libvirt PATCH] nodedev: Don't crash when exiting before init is done

2021-03-18 Thread Michal Privoznik
On 3/16/21 11:27 PM, Jonathon Jongsma wrote: If libvirtd is terminated before the node driver finishes initialization, it can crash with a backtrace similar to the following: Stack trace of thread 1922933: #0 0x7f8515178774 g_hash_table_find (libglib-2.0.so.0) #1

Re: [PATCH] virxml: Fix possible memory leak in virXMLNodeContentString()

2021-03-18 Thread Michal Privoznik
On 3/17/21 6:01 PM, Kristina Hanicova wrote: Previously, if xml node passed to the virXMLNodeContentString() was not of type XML_ELEMENT_NODE, @ret could have caused a memory leak because xmlNodeGetContent() works for other types of nodes as well. Signed-off-by: Kristina Hanicova ---

Re: [libvirt PATCH v3 6/6] ci: helper: Convert private methods to Python common naming practice

2021-03-18 Thread Andrea Bolognani
On Thu, 2021-03-18 at 09:09 +0100, Erik Skultety wrote: > As documented at [1], the common practice wrt to private s/wrt to/with respect to/ > def parse(self): > return self.parser.parse_args() Shouldn't this change be applied to Parser.parser... > def run(self): >

Re: [libvirt PATCH v3 5/6] ci: util: Add a registry checker for stale images

2021-03-18 Thread Andrea Bolognani
On Thu, 2021-03-18 at 09:09 +0100, Erik Skultety wrote: > +def check_stale_images(self): > +if self.args.check_stale != "yes" or self.args.quiet: > +return I would prefer it if this check were to be performed in the action_refresh() method to decide whether or not

Re: [PATCH] NEWS: Document domain memory dirty rate APIs

2021-03-18 Thread Michal Privoznik
On 3/18/21 10:00 AM, Hao Wang wrote: Signed-off-by: Hao Wang --- NEWS.rst | 11 +++ 1 file changed, 11 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index bd40373a80..df35044ef0 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -13,6 +13,17 @@ v7.2.0 (unreleased) * **New features** +

Re: [libvirt PATCH v2 4/6] ci: Introduce a util module

2021-03-18 Thread Andrea Bolognani
On Wed, 2021-03-17 at 18:40 +0100, Erik Skultety wrote: > One more thing, what is the Python 3. acceptance policy for scripts? I > mean we expect the scripts to work with 3.X as we declare on libvirt.org, but > f-strings for example are 3.6+ and 3.9 essentially makes the typing module > deprecated

[PULL 13/13] block: remove support for using "file" driver with block/char devices

2021-03-18 Thread Daniel P . Berrangé
The 'host_device' and 'host_cdrom' drivers must be used instead. Reviewed-by: Eric Blake Signed-off-by: Daniel P. Berrangé --- block/file-posix.c | 17 ++--- docs/system/deprecated.rst | 7 --- docs/system/removed-features.rst | 7 +++

[PULL 12/13] block: remove 'dirty-bitmaps' field from 'BlockInfo' struct

2021-03-18 Thread Daniel P . Berrangé
The same data is available in the 'BlockDeviceInfo' struct. Reviewed-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Daniel P. Berrangé --- block/qapi.c| 5 - docs/system/deprecated.rst | 13 -

[PULL 11/13] block: remove dirty bitmaps 'status' field

2021-03-18 Thread Daniel P . Berrangé
The same information is available via the 'recording' and 'busy' fields. Reviewed-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Daniel P. Berrangé --- block/dirty-bitmap.c | 38 docs/system/deprecated.rst | 7 - docs/system/removed-features.rst | 7 +

[PULL 10/13] block: remove 'encryption_key_missing' flag from QAPI

2021-03-18 Thread Daniel P . Berrangé
This has been hardcoded to "false" since 2.10.0, since secrets required to unlock block devices are now always provided up front instead of using interactive prompts. Reviewed-by: Eric Blake Reviewed-by: Thomas Huth Signed-off-by: Daniel P. Berrangé --- block/qapi.c | 1 -

[PULL 09/13] hw/scsi: remove 'scsi-disk' device

2021-03-18 Thread Daniel P . Berrangé
The 'scsi-hd' and 'scsi-cd' devices provide suitable alternatives. Reviewed-by: Thomas Huth Signed-off-by: Daniel P. Berrangé --- docs/system/deprecated.rst | 9 - docs/system/removed-features.rst | 6 hw/i386/pc.c | 1 - hw/scsi/scsi-disk.c |

[PULL 08/13] hw/ide: remove 'ide-drive' device

2021-03-18 Thread Daniel P . Berrangé
The 'ide-hd' and 'ide-cd' devices provide suitable alternatives. Reviewed-by: Thomas Huth Signed-off-by: Daniel P. Berrangé --- docs/qdev-device-use.txt | 2 +- docs/system/deprecated.rst | 6 - docs/system/removed-features.rst | 8 +++ hw/i386/pc.c

[PULL 07/13] chardev: reject use of 'wait' flag for socket client chardevs

2021-03-18 Thread Daniel P . Berrangé
This only makes sense conceptually when used with listener chardevs. Reviewed-by: Marc-André Lureau Signed-off-by: Daniel P. Berrangé --- chardev/char-socket.c| 12 docs/system/deprecated.rst | 6 -- docs/system/removed-features.rst | 6 ++ 3 files

[PULL 06/13] machine: remove 'arch' field from 'query-cpus-fast' QMP command

2021-03-18 Thread Daniel P . Berrangé
Reviewed-by: Thomas Huth Signed-off-by: Daniel P. Berrangé --- docs/system/deprecated.rst | 6 - docs/system/removed-features.rst | 6 + hw/core/machine-qmp-cmds.c | 41 qapi/machine.json| 22 - 4 files

[PULL 05/13] machine: remove 'query-cpus' QMP command

2021-03-18 Thread Daniel P . Berrangé
The newer 'query-cpus-fast' command avoids side effects on the guest execution. Note that some of the field names are different in the 'query-cpus-fast' command. Reviewed-by: Wainer dos Santos Moschetta Tested-by: Wainer dos Santos Moschetta Signed-off-by: Daniel P. Berrangé ---

[PULL 04/13] migrate: remove QMP/HMP commands for speed, downtime and cache size

2021-03-18 Thread Daniel P . Berrangé
The generic 'migrate_set_parameters' command handle all types of param. Only the QMP commands were documented in the deprecations page, but the rationale for deprecating applies equally to HMP, and the replacements exist. Furthermore the HMP commands are just shims to the QMP commands, so

[PULL 02/13] monitor: raise error when 'pretty' option is used with HMP

2021-03-18 Thread Daniel P . Berrangé
This is only semantically useful for QMP. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Daniel P. Berrangé --- docs/system/deprecated.rst | 7 --- docs/system/removed-features.rst | 6 ++ monitor/monitor.c| 4 ++-- qemu-options.hx | 5 +++--

[PULL 03/13] monitor: remove 'query-events' QMP command

2021-03-18 Thread Daniel P . Berrangé
The code comment suggests removing QAPIEvent_(str|lookup) symbols too, however, these are both auto-generated as standard for any enum in QAPI. As such it they'll exist whether we use them or not. Reviewed-by: Eric Blake Reviewed-by: Thomas Huth Signed-off-by: Daniel P. Berrangé ---

[PULL 01/13] ui, monitor: remove deprecated VNC ACL option and HMP commands

2021-03-18 Thread Daniel P . Berrangé
The VNC ACL concept has been replaced by the pluggable "authz" framework which does not use monitor commands. Reviewed-by: Thomas Huth Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Daniel P. Berrangé --- docs/system/deprecated.rst | 16 --- docs/system/removed-features.rst | 12

[PULL v2 00/13] misc patches removing deprecated features

2021-03-18 Thread Daniel P . Berrangé
The following changes since commit 571d413b5da6bc6f1c2aaca8484717642255ddb0: Merge remote-tracking branch 'remotes/mcayland/tags/qemu-openbios-20210316' into staging (2021-03-17 21:02:37 +) are available in the Git repository at: https://gitlab.com/berrange/qemu

[PATCH] NEWS: Document domain memory dirty rate APIs

2021-03-18 Thread Hao Wang
Signed-off-by: Hao Wang --- NEWS.rst | 11 +++ 1 file changed, 11 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index bd40373a80..df35044ef0 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -13,6 +13,17 @@ v7.2.0 (unreleased) * **New features** + * qemu: Implement domain memory dirty rate

Re: [PATCH v7 0/7] migration/dirtyrate: Introduce APIs for getting domain memory dirty rate

2021-03-18 Thread Hao Wang
Sure. I'll post NEWS.rst information soon, and really appreciate your help! Best Regards, Hao On 2021/3/18 15:49, Michal Privoznik wrote: > On 3/16/21 1:32 PM, Hao Wang wrote: >> Hao Wang (7): >>    migration/dirtyrate: Introduce virDomainStartDirtyRateCalc API >>    migration/dirtyrate:

Re: [libvirt PATCH v2 6/6] ci: util: Add a registry checker for stale images

2021-03-18 Thread Erik Skultety
... > Another thing I'm not a fan of is having the message start at column > zero instead of being aligned along with the rest of the code... > textwrap.dedent() could help here, although it'd be a little annoying > to use because we want the image details to be indented and we can't > know the

[libvirt PATCH v3 1/6] ci: helper: Use the ArgumentDefaultsHelpFormatter help formatter

2021-03-18 Thread Erik Skultety
This help formatter class reports the defaults we use for options taking an argument. Signed-off-by: Erik Skultety Reviewed-by: Andrea Bolognani --- ci/helper | 5 + 1 file changed, 5 insertions(+) diff --git a/ci/helper b/ci/helper index 73a3f729da..8f34f4b59d 100755 --- a/ci/helper +++

[libvirt PATCH v3 4/6] ci: helper: Rewrite image listing to Python

2021-03-18 Thread Erik Skultety
The corresponding Bash script is dropped. After this patch's rewrite, the Makefile's original image listing target remains intact only to notify the user to use the Python helper instead. Signed-off-by: Erik Skultety Reviewed-by: Andrea Bolognani --- ci/Makefile | 12

[libvirt PATCH v3 3/6] ci: Introduce a util module

2021-03-18 Thread Erik Skultety
With the gradual rewrite of the Makefile to the 'helper' script will require helper functions that would better live in a separate util module. Signed-off-by: Erik Skultety Reviewed-by: Andrea Bolognani --- ci/util.py | 40 1 file changed, 40

[libvirt PATCH v3 6/6] ci: helper: Convert private methods to Python common naming practice

2021-03-18 Thread Erik Skultety
As documented at [1], the common practice wrt to private attributes/methods naming is to prefix them with an underscore. [1] https://docs.python.org/3/tutorial/classes.html#private-variables Signed-off-by: Erik Skultety --- ci/helper | 68 +++

[libvirt PATCH v3 0/6] ci: helper: Rewrite image listing in Python and add stale Docker image checker

2021-03-18 Thread Erik Skultety
since v2: - dropped original patch 1 renaming ci-help to help in Makefile - changed the --quiet cmdline option to be tied to the refresh cmd only - urrlib imports fixed - improved on Python type hinting - improved util functions docstrings - replaced all tabs in formatted

[libvirt PATCH v3 2/6] ci: helper: Introduce --quiet

2021-03-18 Thread Erik Skultety
Offer an option to silence all output to stdout, e.g. when generating dockerfiles/varsfiles. Signed-off-by: Erik Skultety Reviewed-by: Andrea Bolognani --- ci/helper | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/ci/helper b/ci/helper index

[libvirt PATCH v3 5/6] ci: util: Add a registry checker for stale images

2021-03-18 Thread Erik Skultety
This function checks whether there are any stale Docker images in the registry that can be purged. Since we're pulling available container images from our GitLab registry with the 'list-images' action, it could happen that we'd list old (already unsupported) images and make them available for the

[libvirt PATCH 35/38] network_conf: Use virXMLProp(OnOff|YesNo) in virNetworkForwardNatDefParseXML

2021-03-18 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/conf/network_conf.c | 15 ++- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c index 4cf4aa4840..93972a544a 100644 --- a/src/conf/network_conf.c +++ b/src/conf/network_conf.c @@

[libvirt PATCH 37/38] storage_adapter_conf: Use virXMLProp(OnOff|YesNo) in virStorageAdapterParseXMLFCHost

2021-03-18 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/conf/storage_adapter_conf.c | 17 + 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/src/conf/storage_adapter_conf.c b/src/conf/storage_adapter_conf.c index 77ecb8d5f2..96e6c733d0 100644 --- a/src/conf/storage_adapter_conf.c +++

[libvirt PATCH 38/38] storage_conf: Use virXMLProp(OnOff|YesNo) in virStoragePoolDefParseSource

2021-03-18 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/conf/storage_conf.c | 16 +--- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c index 2e07c81f8a..7dc528b103 100644 --- a/src/conf/storage_conf.c +++ b/src/conf/storage_conf.c @@

[libvirt PATCH 24/38] domain_conf: Use virXMLProp(OnOff|YesNo) in virDomainShmemDefParseXML

2021-03-18 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/conf/domain_conf.c | 13 ++--- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 0c4f7ab879..a1aefdf0bf 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -14413,17

[libvirt PATCH 29/38] domain_conf: Use virXMLProp(OnOff|YesNo) in virDomainFeaturesDefParse

2021-03-18 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/conf/domain_conf.c | 138 ++--- 1 file changed, 48 insertions(+), 90 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 39f171ba74..4f020714bc 100644 --- a/src/conf/domain_conf.c +++

[libvirt PATCH 23/38] domain_conf: Use virXMLProp(OnOff|YesNo) in virDomainMemballoonDefParseXML

2021-03-18 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/conf/domain_conf.c | 18 ++ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index fe35a3960e..0c4f7ab879 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@

[libvirt PATCH 36/38] numa_conf: Use virXMLProp(OnOff|YesNo) in virDomainNumaDefParseXML

2021-03-18 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/conf/numa_conf.c | 13 ++--- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/conf/numa_conf.c b/src/conf/numa_conf.c index 64b93fd7d1..d16a44c955 100644 --- a/src/conf/numa_conf.c +++ b/src/conf/numa_conf.c @@ -1079,17 +1079,8 @@

[libvirt PATCH 08/38] domain_conf: Use virXMLProp(OnOff|YesNo) in virDomainDiskSourceNVMeParse

2021-03-18 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/conf/domain_conf.c | 13 - 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 55920e7a7d..e3e38ae30d 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -8428,7

[libvirt PATCH 34/38] device_conf: Use virXMLProp(OnOff|YesNo) in virPCIDeviceAddressParseXML

2021-03-18 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/conf/device_conf.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/conf/device_conf.c b/src/conf/device_conf.c index 714ac50762..ee248648bd 100644 --- a/src/conf/device_conf.c +++ b/src/conf/device_conf.c @@ -214,7 +214,7

[libvirt PATCH 22/38] domain_conf: Use virXMLProp(OnOff|YesNo) in virDomainAudioDefParseXML

2021-03-18 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/conf/domain_conf.c | 14 ++ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 6559c3d2f8..fe35a3960e 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -14025,23

[libvirt PATCH 33/38] backup_conf: Use virXMLProp(OnOff|YesNo) in virDomainBackupDefParse

2021-03-18 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/conf/backup_conf.c | 16 ++-- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/src/conf/backup_conf.c b/src/conf/backup_conf.c index 8560f3bf2e..3a1863d2c3 100644 --- a/src/conf/backup_conf.c +++ b/src/conf/backup_conf.c @@ -234,8

[libvirt PATCH 25/38] domain_conf: Use virXMLProp(OnOff|YesNo) in virDomainPerfEventDefParseXML

2021-03-18 Thread Tim Wiederhake
Signed-off-by: Tim Wiederhake --- src/conf/domain_conf.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index a1aefdf0bf..c020bf9124 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -15496,7

  1   2   >