Re: [libvirt] [PATCH v2 0/7] extend virsh domstate to show additional information

2019-03-26 Thread Bjoern Walk
Bjoern Walk [2019-03-25, 09:04AM +0100]: > This patch series introduces the ability to save additional information > for the domain state and exposes this information in virsh domstate. > > For example in the case of QEMU guest panic events, we can provide additional > information like the crash

Re: [libvirt] [PATCH v5 09/20] backup: Implement backup APIs for remote driver

2019-03-26 Thread Eric Blake
On 3/6/19 11:47 PM, Eric Blake wrote: > The remote code generator had to be taught about the new > virDomainCheckpointPtr type, at which point the remote driver > code for backups can be generated. > > Signed-off-by: Eric Blake > --- Question for Dan: > + /** > + * @generate: both > +

Re: [libvirt] [PATCH v6 8/9] backup: Introduce virDomainBackup APIs

2019-03-26 Thread Eric Blake
On 3/26/19 1:13 PM, Eric Blake wrote: TL;DR: After more thought, I'm reluctant to make a domain job an opaque type. I'm also leaning towards withdrawing virDomainListJobIds() from the set of APIs I'm proposing for 5.2, on the grounds that with a documented magic job id of '0' that means "the

Re: [libvirt] [PATCH v6 0/9] Incremental backups, focus on API

2019-03-26 Thread Eric Blake
On 3/26/19 12:41 PM, Peter Krempa wrote: > On Tue, Mar 26, 2019 at 01:13:44 -0500, Eric Blake wrote: >> I'm fairly confident that these API are ready to go (that is, I've got >> qemu code in the wings to implement these API for the qemu driver, as >> demonstrated at last KVM forum, and it

Re: [libvirt] [PATCH v6 8/9] backup: Introduce virDomainBackup APIs

2019-03-26 Thread Eric Blake
On 3/26/19 12:08 PM, Daniel P. Berrangé wrote: > On Tue, Mar 26, 2019 at 01:13:52AM -0500, Eric Blake wrote: >> Introduce a few more new public APIs related to incremental backups. >> This builds on the previous notion of a checkpoint (without an >> existing checkpoint, the new API is a full

Re: [libvirt] [PATCH v6 7/9] backup: Introduce virDomainCheckpoint APIs

2019-03-26 Thread Eric Blake
On 3/26/19 11:55 AM, Daniel P. Berrangé wrote: > On Tue, Mar 26, 2019 at 01:13:51AM -0500, Eric Blake wrote: >> Introduce a bunch of new public APIs related to backup checkpoints. >> Checkpoints are modeled heavily after virDomainSnapshotPtr (both >> represent a point in time of the guest),

Re: [libvirt] [PATCH v6 0/9] Incremental backups, focus on API

2019-03-26 Thread Peter Krempa
On Tue, Mar 26, 2019 at 01:13:44 -0500, Eric Blake wrote: > I'm fairly confident that these API are ready to go (that is, I've got > qemu code in the wings to implement these API for the qemu driver, as > demonstrated at last KVM forum, and it shouldn't be too hard to add > support in the test

Re: [libvirt] [PATCH v2 10/14] qemu_hotplug: new function qemuDomainRemoveAuditDevice()

2019-03-26 Thread Laine Stump
On 3/26/19 12:58 PM, Ján Tomko wrote: On Mon, Mar 25, 2019 at 01:24:32PM -0400, Laine Stump wrote: This function can be called with a virDomainDevicePtr and whether or not the removal was successful, and it will call the appropriate virDomainAudit*() function with the appropriate args for

Re: [libvirt] [PATCH v3 2/2] m4: Add warning when running QEMU as root

2019-03-26 Thread Daniel P . Berrangé
On Tue, Mar 26, 2019 at 06:01:49PM +0100, Andrea Bolognani wrote: > Running QEMU as root is a pretty bad idea, so try to make the > user aware of that as part of the configure summary. > > Signed-off-by: Andrea Bolognani > --- > m4/virt-driver-qemu.m4 | 7 ++- > 1 file changed, 6

Re: [libvirt] [PATCH v3 1/2] m4: Run QEMU under a distro-specific user when possible

2019-03-26 Thread Daniel P . Berrangé
On Tue, Mar 26, 2019 at 06:01:48PM +0100, Andrea Bolognani wrote: > Our current defaults are root:wheel on FreeBSD and macOS, root:root > everywhere else. > > Looking at what downstream distributions actually do, we can see that > these defaults are overriden the vast majority of the time, with a

Re: [libvirt] [PATCH v6 9/9] backup: Document nuances between different state capture APIs

2019-03-26 Thread Daniel P . Berrangé
On Tue, Mar 26, 2019 at 01:13:53AM -0500, Eric Blake wrote: > Now that various new API have been added, it is worth a landing page > that gives an overview of capturing various pieces of guest state, and > which APIs are best suited to which tasks. > > Signed-off-by: Eric Blake > Reviewed-by:

Re: [libvirt] [PATCH v6 5/9] backup: Document new XML for checkpoints

2019-03-26 Thread Daniel P . Berrangé
On Tue, Mar 26, 2019 at 01:13:49AM -0500, Eric Blake wrote: > Prepare for new checkpoint APIs by describing the XML that will > represent a checkpoint. The checkpoint XML is modeled heavily after > virDomainSnapshotPtr. (See the docs for more details). > > Add testsuite coverage for some minimal

Re: [libvirt] [PATCH v6 6/9] backup: Document new XML for backups

2019-03-26 Thread Daniel P . Berrangé
On Tue, Mar 26, 2019 at 01:13:50AM -0500, Eric Blake wrote: > Prepare for new backup APIs by describing the XML that will represent > a backup. The XML resembles snapshots and checkpoints in being able > to select actions for a set of disks, but has other differences. It > can support both push

Re: [libvirt] [PATCH v6 4/9] backup: Introduce virDomainCheckpointPtr

2019-03-26 Thread Daniel P . Berrangé
On Tue, Mar 26, 2019 at 01:13:48AM -0500, Eric Blake wrote: > Prepare for introducing a bunch of new public APIs related to > backup checkpoints by first introducing a new internal type > and errors associated with that type. Checkpoints are modeled > heavily after virDomainSnapshotPtr (both

Re: [libvirt] [PATCH v6 3/9] snapshot: Various doc tweaks

2019-03-26 Thread Daniel P . Berrangé
On Tue, Mar 26, 2019 at 01:13:47AM -0500, Eric Blake wrote: > Since I was copying this text to form checkpoint XML and API > documentation, I might as well make improvements along the way. Most > of these changes are based on reviews of the checkpoint docs. > > Among other things: grammar tweaks,

Re: [libvirt] [PATCH v6 2/9] Revert "snapshot: Add virDomainSnapshotObjListFormat"

2019-03-26 Thread Daniel P . Berrangé
On Tue, Mar 26, 2019 at 01:13:46AM -0500, Eric Blake wrote: > This reverts commit 86c0ed6f70268dfa7c3bba95a0ba96fcfe2ab039, and > subsequent refactorings of the function into new files. There are no > callers of this function - I had originally proposed it for > implementing a new bulk snapshot

Re: [libvirt] [PATCH v6 1/9] Revert "snapshot: Add virDomainSnapshotObjListParse"

2019-03-26 Thread Daniel P . Berrangé
On Tue, Mar 26, 2019 at 01:13:45AM -0500, Eric Blake wrote: > This reverts commit 1b57269cbcfcfe998a065c0c9f0f8db408710d87, and > subsequent refactorings of the function into new files. There are no > callers of this function - I had originally proposed it for > implementing a new bulk snapshot

Re: [libvirt] [PATCH v6 8/9] backup: Introduce virDomainBackup APIs

2019-03-26 Thread Daniel P . Berrangé
On Tue, Mar 26, 2019 at 01:13:52AM -0500, Eric Blake wrote: > Introduce a few more new public APIs related to incremental backups. > This builds on the previous notion of a checkpoint (without an > existing checkpoint, the new API is a full backup, differing from > virDomainBlockCopy in the point

[libvirt] [PATCH v3 0/2] m4: Run QEMU under a distro-specific user when possible

2019-03-26 Thread Andrea Bolognani
Changes from [v2]: * add explicit fallback to root:root for unrecognized operating systems; * provide logging to help users understand why they ended up with root:root in the first place. Changes from [v1]: * use distro-specific user and group; * warn the user if they are

Re: [libvirt] [PATCH v2 13/14] qemu_hotplug: delay sending DEVICE_REMOVED event until after *all* teardown

2019-03-26 Thread Ján Tomko
On Tue, Mar 26, 2019 at 01:15:33PM +0100, Peter Krempa wrote: On Mon, Mar 25, 2019 at 13:24:35 -0400, Laine Stump wrote: +return -1; +} +info = NULL; /* to prevent accidental use later */ // this is bridge [1] + switch ((virDomainDeviceType)dev->type) { ACK with the

[libvirt] [PATCH v3 1/2] m4: Run QEMU under a distro-specific user when possible

2019-03-26 Thread Andrea Bolognani
Our current defaults are root:wheel on FreeBSD and macOS, root:root everywhere else. Looking at what downstream distributions actually do, we can see that these defaults are overriden the vast majority of the time, with a number of variations showing up in the wild: * qemu:qemu -> Used by

[libvirt] [PATCH v3 2/2] m4: Add warning when running QEMU as root

2019-03-26 Thread Andrea Bolognani
Running QEMU as root is a pretty bad idea, so try to make the user aware of that as part of the configure summary. Signed-off-by: Andrea Bolognani --- m4/virt-driver-qemu.m4 | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/m4/virt-driver-qemu.m4 b/m4/virt-driver-qemu.m4

Re: [libvirt] [PATCH v2 1/2] m4: Run QEMU under a distro-specific user when possible

2019-03-26 Thread Andrea Bolognani
On Tue, 2019-03-26 at 16:20 +, Daniel P. Berrangé wrote: > On Tue, Mar 26, 2019 at 05:06:15PM +0100, Andrea Bolognani wrote: > > +# Try to integrate gracefully with downstream packages by running QEMU > > +# processes under the same user and group they would > > +case $(grep ^ID=

Re: [libvirt] [PATCH v2 10/14] qemu_hotplug: new function qemuDomainRemoveAuditDevice()

2019-03-26 Thread Ján Tomko
On Mon, Mar 25, 2019 at 01:24:32PM -0400, Laine Stump wrote: This function can be called with a virDomainDevicePtr and whether or not the removal was successful, and it will call the appropriate virDomainAudit*() function with the appropriate args for whatever type of device it's given (or do

Re: [libvirt] [PATCH v6 7/9] backup: Introduce virDomainCheckpoint APIs

2019-03-26 Thread Daniel P . Berrangé
On Tue, Mar 26, 2019 at 01:13:51AM -0500, Eric Blake wrote: > Introduce a bunch of new public APIs related to backup checkpoints. > Checkpoints are modeled heavily after virDomainSnapshotPtr (both > represent a point in time of the guest), although a snapshot exists > with the intent of rolling

Re: [libvirt] [PATCH v6 2/9] Revert "snapshot: Add virDomainSnapshotObjListFormat"

2019-03-26 Thread Ján Tomko
On Tue, Mar 26, 2019 at 01:13:46AM -0500, Eric Blake wrote: This reverts commit 86c0ed6f70268dfa7c3bba95a0ba96fcfe2ab039, and subsequent refactorings of the function into new files. There are no callers of this function - I had originally proposed it for implementing a new bulk snapshot API,

Re: [libvirt] [PATCH v6 1/9] Revert "snapshot: Add virDomainSnapshotObjListParse"

2019-03-26 Thread Ján Tomko
On Tue, Mar 26, 2019 at 01:13:45AM -0500, Eric Blake wrote: This reverts commit 1b57269cbcfcfe998a065c0c9f0f8db408710d87, and subsequent refactorings of the function into new files. There are no callers of this function - I had originally proposed it for implementing a new bulk snapshot API,

[libvirt] [jenkins-ci PATCH v2 2/2] Stop running `make check` against osinfo-db on CentOS 7

2019-03-26 Thread Fabiano Fidêncio
osinfo-db tests are Python3 only. Signed-off-by: Fabiano Fidêncio --- guests/playbooks/build/projects/osinfo-db.yml | 13 + jenkins/projects/osinfo-db.yaml | 9 + 2 files changed, 22 insertions(+) diff --git a/guests/playbooks/build/projects/osinfo-db.yml

[libvirt] [jenkins-ci PATCH v2 1/2] guests: Update test dependencies for osinfo-db

2019-03-26 Thread Fabiano Fidêncio
The new dependencies are: - python3 - python3-lxml - python3-pytest - python3-requests xmllint has been removed in favour of a own crafted test using python3-lxml Signed-off-by: Fabiano Fidêncio --- guests/vars/projects/osinfo-db.yml | 5 - 1 file changed, 4 insertions(+), 1 deletion(-)

Re: [libvirt] [PATCH v2 2/2] m4: Add warning when running QEMU as root

2019-03-26 Thread Ján Tomko
On Tue, Mar 26, 2019 at 04:24:00PM +, Daniel P. Berrangé wrote: On Tue, Mar 26, 2019 at 05:06:16PM +0100, Andrea Bolognani wrote: Running QEMU as root is a pretty bad idea, so try to make the user aware of that as part of the configure summary. Signed-off-by: Andrea Bolognani ---

Re: [libvirt] [PATCH v2 2/2] m4: Add warning when running QEMU as root

2019-03-26 Thread Daniel P . Berrangé
On Tue, Mar 26, 2019 at 05:06:16PM +0100, Andrea Bolognani wrote: > Running QEMU as root is a pretty bad idea, so try to make the > user aware of that as part of the configure summary. > > Signed-off-by: Andrea Bolognani > --- > m4/virt-driver-qemu.m4 | 7 ++- > 1 file changed, 6

Re: [libvirt] [PATCH v2 1/2] m4: Run QEMU under a distro-specific user when possible

2019-03-26 Thread Daniel P . Berrangé
On Tue, Mar 26, 2019 at 05:06:15PM +0100, Andrea Bolognani wrote: > Our current defaults are root:wheel on FreeBSD and macOS, root:root > everywhere else. > > Looking at what downstream distributions actually do, we can see that > these defaults are overriden the vast majority of the time, with a

[libvirt] [PATCH v2 2/2] m4: Add warning when running QEMU as root

2019-03-26 Thread Andrea Bolognani
Running QEMU as root is a pretty bad idea, so try to make the user aware of that as part of the configure summary. Signed-off-by: Andrea Bolognani --- m4/virt-driver-qemu.m4 | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/m4/virt-driver-qemu.m4 b/m4/virt-driver-qemu.m4

[libvirt] [PATCH v2 0/2] m4: Run QEMU under a distro-specific user when possible

2019-03-26 Thread Andrea Bolognani
Changes from [v1]: * use distro-specific user and group; * warn the user if they are going to be running QEMU as root. [v1] https://www.redhat.com/archives/libvir-list/2019-March/msg01707.html Andrea Bolognani (2): m4: Run QEMU under a distro-specific user when possible m4: Add warning

[libvirt] [PATCH v2 1/2] m4: Run QEMU under a distro-specific user when possible

2019-03-26 Thread Andrea Bolognani
Our current defaults are root:wheel on FreeBSD and macOS, root:root everywhere else. Looking at what downstream distributions actually do, we can see that these defaults are overriden the vast majority of the time, with a number of variations showing up in the wild: * qemu:qemu -> Used by

Re: [libvirt] [PATCH] m4: Change default QEMU credentials to qemu:qemu

2019-03-26 Thread Daniel P . Berrangé
On Tue, Mar 26, 2019 at 04:20:02PM +0100, Pavel Hrdina wrote: > On Tue, Mar 26, 2019 at 01:36:14PM +, Daniel P. Berrangé wrote: > > On Tue, Mar 26, 2019 at 02:30:00PM +0100, Pavel Hrdina wrote: > > > On Tue, Mar 26, 2019 at 01:20:46PM +, Daniel P. Berrangé wrote: > > > > On Tue, Mar 26,

Re: [libvirt] [PATCH] m4: Change default QEMU credentials to qemu:qemu

2019-03-26 Thread Pavel Hrdina
On Tue, Mar 26, 2019 at 01:36:14PM +, Daniel P. Berrangé wrote: > On Tue, Mar 26, 2019 at 02:30:00PM +0100, Pavel Hrdina wrote: > > On Tue, Mar 26, 2019 at 01:20:46PM +, Daniel P. Berrangé wrote: > > > On Tue, Mar 26, 2019 at 12:49:28PM +0100, Andrea Bolognani wrote: > > > > Our current

Re: [libvirt] [PATCH] virQEMUDriverPtr parameters clean up in function qemuExtTPMStart() in /src/qemu/qemu_tpm.c

2019-03-26 Thread Daniel P . Berrangé
On Tue, Mar 26, 2019 at 03:40:12PM +0100, Martin Kletzander wrote: > On Mon, Mar 25, 2019 at 03:48:59PM +, Daniel P. Berrangé wrote: > > On Mon, Mar 25, 2019 at 04:12:34PM +0100, Martin Kletzander wrote: > > > On Mon, Mar 25, 2019 at 10:03:31AM +0100, Peter Krempa wrote: > > > > On Mon, Mar

Re: [libvirt] [PATCH] virQEMUDriverPtr parameters clean up in function qemuExtTPMStart() in /src/qemu/qemu_tpm.c

2019-03-26 Thread Martin Kletzander
On Mon, Mar 25, 2019 at 03:48:59PM +, Daniel P. Berrangé wrote: On Mon, Mar 25, 2019 at 04:12:34PM +0100, Martin Kletzander wrote: On Mon, Mar 25, 2019 at 10:03:31AM +0100, Peter Krempa wrote: > On Mon, Mar 25, 2019 at 09:15:23 +0100, Erik Skultety wrote: > > On Mon, Mar 25, 2019 at

Re: [libvirt] [PATCH] m4: Change default QEMU credentials to qemu:qemu

2019-03-26 Thread Andrea Bolognani
On Tue, 2019-03-26 at 13:37 +, Daniel P. Berrangé wrote: > On Tue, Mar 26, 2019 at 02:30:33PM +0100, Andrea Bolognani wrote: > > > If we want to change this, we must ensure that we honour the distro > > > specific user/group names you show above, and fallback to root/root > > > for distros we

Re: [libvirt] [PATCH v2 11/14] qemu_hotplug: audit *all* auditable device types in qemuDomainRemoveAuditDevice

2019-03-26 Thread Laine Stump
On 3/26/19 8:52 AM, Peter Krempa wrote: On Mon, Mar 25, 2019 at 13:24:33 -0400, Laine Stump wrote: Although all hotpluggable devices other than lease, controller, watchdof, and vsock can be audited, and *are* audited when an unplug is successful, only disk, net, and hostdev were actually being

Re: [libvirt] [PATCH v2 03/14] qemu_hotplug: pull qemuDomainUpdateDeviceList out of qemuDomainDetachDeviceLive

2019-03-26 Thread Laine Stump
On 3/26/19 3:45 AM, Peter Krempa wrote: On Mon, Mar 25, 2019 at 13:24:25 -0400, Laine Stump wrote: qemuDomainDetachDeviceLive() is called from two places in qemu_driver.c, and qemuDomainUpdateDeviceList() is called from the end of qemuDomainDetachDeviceLive(), which is now in qemu_hotplug.c

Re: [libvirt] [PATCH v2 08/14] qemu_hotplug: standardize the names/args/calling of qemuDomainDetach*()

2019-03-26 Thread Laine Stump
On 3/26/19 8:40 AM, Peter Krempa wrote: On Mon, Mar 25, 2019 at 13:24:30 -0400, Laine Stump wrote: Most of these functions will soon contain only some setup for detaching the device, not the detach code proper (since that code is identical for these devices). Their device specific functions are

[libvirt] Planning for next release

2019-03-26 Thread Daniel Veillard
It's time to get a new release out. Simplest would be to enter freeze tomorrow, then we can plan an RC2 by Friday, and if everything looks good have the release on time next Monday. Hope this works for everybody, thanks, Daniel -- Daniel Veillard | Red Hat Developers Tools

Re: [libvirt] [PATCH] m4: Change default QEMU credentials to qemu:qemu

2019-03-26 Thread Daniel P . Berrangé
On Tue, Mar 26, 2019 at 02:30:33PM +0100, Andrea Bolognani wrote: > On Tue, 2019-03-26 at 13:20 +, Daniel P. Berrangé wrote: > > On Tue, Mar 26, 2019 at 12:49:28PM +0100, Andrea Bolognani wrote: > > > Our current defaults are root:wheel on FreeBSD and macOS, root:root > > > everywhere else. >

Re: [libvirt] [PATCH] m4: Change default QEMU credentials to qemu:qemu

2019-03-26 Thread Daniel P . Berrangé
On Tue, Mar 26, 2019 at 02:30:00PM +0100, Pavel Hrdina wrote: > On Tue, Mar 26, 2019 at 01:20:46PM +, Daniel P. Berrangé wrote: > > On Tue, Mar 26, 2019 at 12:49:28PM +0100, Andrea Bolognani wrote: > > > Our current defaults are root:wheel on FreeBSD and macOS, root:root > > > everywhere else.

Re: [libvirt] [PATCH] m4: Change default QEMU credentials to qemu:qemu

2019-03-26 Thread Andrea Bolognani
On Tue, 2019-03-26 at 13:20 +, Daniel P. Berrangé wrote: > On Tue, Mar 26, 2019 at 12:49:28PM +0100, Andrea Bolognani wrote: > > Our current defaults are root:wheel on FreeBSD and macOS, root:root > > everywhere else. > > > > Looking at what downstream distributions actually do, we can see

Re: [libvirt] [PATCH] m4: Change default QEMU credentials to qemu:qemu

2019-03-26 Thread Pavel Hrdina
On Tue, Mar 26, 2019 at 01:20:46PM +, Daniel P. Berrangé wrote: > On Tue, Mar 26, 2019 at 12:49:28PM +0100, Andrea Bolognani wrote: > > Our current defaults are root:wheel on FreeBSD and macOS, root:root > > everywhere else. > > > > Looking at what downstream distributions actually do, we can

Re: [libvirt] [PATCH] m4: Change default QEMU credentials to qemu:qemu

2019-03-26 Thread Daniel P . Berrangé
On Tue, Mar 26, 2019 at 12:49:28PM +0100, Andrea Bolognani wrote: > Our current defaults are root:wheel on FreeBSD and macOS, root:root > everywhere else. > > Looking at what downstream distributions actually do, we can see that > these defaults are overriden the vast majority of the time, with a

Re: [libvirt] [PATCH v2 14/14] qemu_hotplug: don't shutdown net device until the guest has released it

2019-03-26 Thread Peter Krempa
On Mon, Mar 25, 2019 at 13:24:36 -0400, Laine Stump wrote: > For [some unknown reason, possibly/probably pure chance], Net devices > have been taken offline and their bandwidth tc rules cleared as the > very first operation when detaching the device. This is contrary to > every other type of

Re: [libvirt] [PATCH v2 12/14] qemu_hotplug: consolidate all common detach code in qemuDomainDetachDeviceLive

2019-03-26 Thread Peter Krempa
On Mon, Mar 25, 2019 at 13:24:34 -0400, Laine Stump wrote: > Now that all the qemuDomainDetachPrep*() functions look nearly > identical at the end, we can put one copy of that identical code in > qemuDomainDetachDeviceLive() at the point after the individual prep > functions have been called, and

Re: [libvirt] [PATCH v2 11/14] qemu_hotplug: audit *all* auditable device types in qemuDomainRemoveAuditDevice

2019-03-26 Thread Peter Krempa
On Mon, Mar 25, 2019 at 13:24:33 -0400, Laine Stump wrote: > Although all hotpluggable devices other than lease, controller, > watchdof, and vsock can be audited, and *are* audited when an unplug > is successful, only disk, net, and hostdev were actually being audited > on failure. > > This patch

Re: [libvirt] [PATCH 0/2] qemu: Assume presence of 'set_password' and 'expire_password'

2019-03-26 Thread Andrea Bolognani
On Tue, 2019-03-26 at 13:03 +0100, Peter Krempa wrote: > Remove some dead code. > > Peter Krempa (2): > qemu: Assume that 'set_password' and 'expire_password' are supported > qemu: monitor: Remove unused qemuMonitor(JSON)SetVNCPassword > > src/qemu/qemu_hotplug.c | 20

Re: [libvirt] [PATCH v2 10/14] qemu_hotplug: new function qemuDomainRemoveAuditDevice()

2019-03-26 Thread Peter Krempa
On Mon, Mar 25, 2019 at 13:24:32 -0400, Laine Stump wrote: > This function can be called with a virDomainDevicePtr and whether or > not the removal was successful, and it will call the appropriate > virDomainAudit*() function with the appropriate args for whatever type > of device it's given (or

Re: [libvirt] [PATCH v2 09/14] qemu_hotplug: rename Chr and Lease Detach functions

2019-03-26 Thread Peter Krempa
On Mon, Mar 25, 2019 at 13:24:31 -0400, Laine Stump wrote: > qemuDomainDetachDeviceChr and qemuDomainDetachDeviceLease are more > consistent with each other. > > Signed-off-by: Laine Stump > --- > > NEW PATCH in V2 (previously was part of 08/14) > > src/qemu/qemu_hotplug.c | 12 ++-- >

Re: [libvirt] [PATCH v2 08/14] qemu_hotplug: standardize the names/args/calling of qemuDomainDetach*()

2019-03-26 Thread Peter Krempa
On Mon, Mar 25, 2019 at 13:24:30 -0400, Laine Stump wrote: > Most of these functions will soon contain only some setup for > detaching the device, not the detach code proper (since that code is > identical for these devices). Their device specific functions are all > being renamed to

Re: [libvirt] [PATCH 2/2] qemu: monitor: Remove unused qemuMonitor(JSON)SetVNCPassword

2019-03-26 Thread Ján Tomko
On Tue, Mar 26, 2019 at 01:03:04PM +0100, Peter Krempa wrote: Signed-off-by: Peter Krempa --- src/qemu/qemu_monitor.c | 15 --- src/qemu/qemu_monitor.h | 2 -- src/qemu/qemu_monitor_json.c | 25 - src/qemu/qemu_monitor_json.h | 2 --

Re: [libvirt] [PATCH 1/2] qemu: Assume that 'set_password' and 'expire_password' are supported

2019-03-26 Thread Ján Tomko
On Tue, Mar 26, 2019 at 01:03:03PM +0100, Peter Krempa wrote: They were added in qemu commit 7572150c189c6553c2448334116ab717680de66d released in v0.14.0. Signed-off-by: Peter Krempa --- src/qemu/qemu_hotplug.c | 20 src/qemu/qemu_monitor.c | 1 -

Re: [libvirt] [PATCH v2 13/14] qemu_hotplug: delay sending DEVICE_REMOVED event until after *all* teardown

2019-03-26 Thread Peter Krempa
On Mon, Mar 25, 2019 at 13:24:35 -0400, Laine Stump wrote: > The VIR_DOMAIN_EVENT_ID_DEVICE_REMOVED event is sent after qemu has > responded to a device_del command with a DEVICE_DELETED event. Before > queuing the event, *some* of the final teardown of the device's > trappings in libvirt is done,

[libvirt] [PATCH 2/2] qemu: monitor: Remove unused qemuMonitor(JSON)SetVNCPassword

2019-03-26 Thread Peter Krempa
Signed-off-by: Peter Krempa --- src/qemu/qemu_monitor.c | 15 --- src/qemu/qemu_monitor.h | 2 -- src/qemu/qemu_monitor_json.c | 25 - src/qemu/qemu_monitor_json.h | 2 -- tests/qemumonitorjsontest.c | 2 -- 5 files changed, 46 deletions(-) diff

[libvirt] [PATCH 0/2] qemu: Assume presence of 'set_password' and 'expire_password'

2019-03-26 Thread Peter Krempa
Remove some dead code. Peter Krempa (2): qemu: Assume that 'set_password' and 'expire_password' are supported qemu: monitor: Remove unused qemuMonitor(JSON)SetVNCPassword src/qemu/qemu_hotplug.c | 20 --- src/qemu/qemu_monitor.c | 16

[libvirt] [PATCH 1/2] qemu: Assume that 'set_password' and 'expire_password' are supported

2019-03-26 Thread Peter Krempa
They were added in qemu commit 7572150c189c6553c2448334116ab717680de66d released in v0.14.0. Signed-off-by: Peter Krempa --- src/qemu/qemu_hotplug.c | 20 src/qemu/qemu_monitor.c | 1 - src/qemu/qemu_monitor_json.c | 12 3 files changed, 33

Re: [libvirt] [jenkins-ci PATCH] Stop building osinfo-db on CentOS 7

2019-03-26 Thread Andrea Bolognani
On Tue, 2019-03-26 at 11:29 +0100, Fabiano Fidêncio wrote: [...] > jenkins/projects/osinfo-db.yaml | 11 ++- > 1 file changed, 10 insertions(+), 1 deletion(-) You need to update the corresponding file living under guests/playbooks/build/ at the same time. [...] > - project: >

Re: [libvirt] [jenkins-ci PATCH] guests: Update test dependencies for osinfo-db

2019-03-26 Thread Andrea Bolognani
On Tue, 2019-03-19 at 16:33 +0100, Fabiano Fidêncio wrote: > The new dependencies are: > - python3 > - python3-libxml2 > - python3-pytest > - python3-requests > > xmllint has been removed in favour of a own crafted test using > python3-libmlx2 > > Signed-off-by: Fabiano Fidêncio > ---

[libvirt] [PATCH] m4: Change default QEMU credentials to qemu:qemu

2019-03-26 Thread Andrea Bolognani
Our current defaults are root:wheel on FreeBSD and macOS, root:root everywhere else. Looking at what downstream distributions actually do, we can see that these defaults are overriden the vast majority of the time, with a number of variations showing up in the wild: * qemu:qemu -> Used by

[libvirt] [jenkins-ci PATCH] Stop building osinfo-db on CentOS 7

2019-03-26 Thread Fabiano Fidêncio
osinfo-db tests are Python3 only. Signed-off-by: Fabiano Fidêncio --- jenkins/projects/osinfo-db.yaml | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/jenkins/projects/osinfo-db.yaml b/jenkins/projects/osinfo-db.yaml index 87b6748..25a6621 100644 ---

Re: [libvirt] [PATCH] qemufirmwaretest: Produce better message on error

2019-03-26 Thread Andrea Bolognani
On Tue, 2019-03-26 at 09:02 +0100, Michal Privoznik wrote: > If qemuFirmwareFetchConfigs() returned more or less paths than https://66.media.tumblr.com/c9eb5611a9f9c6a5cb7be6d5365afdf9/tumblr_ouaw1xYO8u1ruwssto2_500.gif > expected all that we see is the following error message: > > Expected 5

Re: [libvirt] [PATCH v2 07/14] qemu_hotplug: separate Chr|Lease from other devices in DetachDevice switch

2019-03-26 Thread Peter Krempa
On Mon, Mar 25, 2019 at 13:24:29 -0400, Laine Stump wrote: > The Chr and Lease devices have detach code that is too different from > the other device types to handle with common functionality (which will > soon be added at the end of qemuDomainDetachDeviceLive(). In order to > make this difference

Re: [libvirt] [PATCH v2 06/14] qemu_hotplug: rename dev to match in qemuDomainDetachDeviceLive

2019-03-26 Thread Peter Krempa
On Mon, Mar 25, 2019 at 13:24:28 -0400, Laine Stump wrote: > I'm about to add a second virDomainDeviceDef to this function that > will point to the actual device in the domain object. "dev" is > just a partially filled-in example of what to look for. Naming it > match will make the code easier to

[libvirt] [PATCH] qemufirmwaretest: Produce better message on error

2019-03-26 Thread Michal Privoznik
If qemuFirmwareFetchConfigs() returned more or less paths than expected all that we see is the following error message: Expected 5 paths, got 7 While it is technically correct (the best kind of correct), we can do better: Unexpected path (i=0). Expected /some/path got /some/other/path

Re: [libvirt] [PATCH v2 05/14] qemu_hotplug: make Detach functions called only from qemu_hotplug.c static

2019-03-26 Thread Peter Krempa
On Mon, Mar 25, 2019 at 13:24:27 -0400, Laine Stump wrote: > These are no longer called from qemu_driver.c, since the function that > called them (qemuDomainDetachDeviceLive()) has been moved to > qemu_hotplug.c, and they are no longer called from testqemuhotplug.c > because it now just called

Re: [libvirt] [PATCH v2 04/14] test: replace calls to individual detach functions with one call to main detach

2019-03-26 Thread Peter Krempa
On Mon, Mar 25, 2019 at 13:24:26 -0400, Laine Stump wrote: > The individual qemuDomainDetach*Device() functions will soon be "less > functional", since some of the code that is duplicated in 10 of the 12 > detach functions is going to be moved into the common > qemuDomainDetachDeviceLive(), which

Re: [libvirt] [PATCH v2 03/14] qemu_hotplug: pull qemuDomainUpdateDeviceList out of qemuDomainDetachDeviceLive

2019-03-26 Thread Peter Krempa
On Mon, Mar 25, 2019 at 13:24:25 -0400, Laine Stump wrote: > qemuDomainDetachDeviceLive() is called from two places in > qemu_driver.c, and qemuDomainUpdateDeviceList() is called from the > end of qemuDomainDetachDeviceLive(), which is now in qemu_hotplug.c > > This patch replaces the single call

Re: [libvirt] [PATCH v2 02/14] qemu_hotplug: remove extra function in middle of DetachController call chain

2019-03-26 Thread Peter Krempa
On Mon, Mar 25, 2019 at 13:24:24 -0400, Laine Stump wrote: > qemuDomainDetachDeviceControllerLive() just checks if the controller > type is SCSI, and then either returns failure, or calls > qemuDomainDetachControllerDevice(). > > Instead, lets just check for type != SCSI at the top of the latter

Re: [libvirt] [PATCH v2 01/14] qemu_hotplug: move qemuDomainDetachDeviceLive() to qemu_hotplug.c

2019-03-26 Thread Peter Krempa
On Mon, Mar 25, 2019 at 13:24:23 -0400, Laine Stump wrote: > This function is going to take on some of the functionality of its > subordinate functions, which all live in qemu_hotplug.c. > > qemuDomainDetachDeviceControllerLive() is only called from > qemuDomainDetachDeviceLive() (and will soon

[libvirt] [PATCH v6 4/9] backup: Introduce virDomainCheckpointPtr

2019-03-26 Thread Eric Blake
Prepare for introducing a bunch of new public APIs related to backup checkpoints by first introducing a new internal type and errors associated with that type. Checkpoints are modeled heavily after virDomainSnapshotPtr (both represent a point in time of the guest), although a snapshot exists with

[libvirt] [PATCH v6 7/9] backup: Introduce virDomainCheckpoint APIs

2019-03-26 Thread Eric Blake
Introduce a bunch of new public APIs related to backup checkpoints. Checkpoints are modeled heavily after virDomainSnapshotPtr (both represent a point in time of the guest), although a snapshot exists with the intent of rolling back to that state, while a checkpoint exists to make it possible to

[libvirt] [PATCH v6 2/9] Revert "snapshot: Add virDomainSnapshotObjListFormat"

2019-03-26 Thread Eric Blake
This reverts commit 86c0ed6f70268dfa7c3bba95a0ba96fcfe2ab039, and subsequent refactorings of the function into new files. There are no callers of this function - I had originally proposed it for implementing a new bulk snapshot API, but that proved to be too invasive given RPC limits. I also

[libvirt] [PATCH v6 8/9] backup: Introduce virDomainBackup APIs

2019-03-26 Thread Eric Blake
Introduce a few more new public APIs related to incremental backups. This builds on the previous notion of a checkpoint (without an existing checkpoint, the new API is a full backup, differing from virDomainBlockCopy in the point of time chosen and in operation on multiple disks at once); and also

[libvirt] [PATCH v6 9/9] backup: Document nuances between different state capture APIs

2019-03-26 Thread Eric Blake
Now that various new API have been added, it is worth a landing page that gives an overview of capturing various pieces of guest state, and which APIs are best suited to which tasks. Signed-off-by: Eric Blake Reviewed-by: John Ferlan --- docs/docs.html.in | 5 +

[libvirt] [PATCH v6 6/9] backup: Document new XML for backups

2019-03-26 Thread Eric Blake
Prepare for new backup APIs by describing the XML that will represent a backup. The XML resembles snapshots and checkpoints in being able to select actions for a set of disks, but has other differences. It can support both push model (the hypervisor does the backup directly into the destination

[libvirt] [PATCH v6 5/9] backup: Document new XML for checkpoints

2019-03-26 Thread Eric Blake
Prepare for new checkpoint APIs by describing the XML that will represent a checkpoint. The checkpoint XML is modeled heavily after virDomainSnapshotPtr. (See the docs for more details). Add testsuite coverage for some minimal uses of the XML. Signed-off-by: Eric Blake --- docs/docs.html.in

[libvirt] [PATCH v6 3/9] snapshot: Various doc tweaks

2019-03-26 Thread Eric Blake
Since I was copying this text to form checkpoint XML and API documentation, I might as well make improvements along the way. Most of these changes are based on reviews of the checkpoint docs. Among other things: grammar tweaks, point to a single source of documentation rather than repeating

[libvirt] [PATCH v6 0/9] Incremental backups, focus on API

2019-03-26 Thread Eric Blake
I'm fairly confident that these API are ready to go (that is, I've got qemu code in the wings to implement these API for the qemu driver, as demonstrated at last KVM forum, and it shouldn't be too hard to add support in the test driver to get some 'make check' coverage similar to what I recently

[libvirt] [PATCH v6 1/9] Revert "snapshot: Add virDomainSnapshotObjListParse"

2019-03-26 Thread Eric Blake
This reverts commit 1b57269cbcfcfe998a065c0c9f0f8db408710d87, and subsequent refactorings of the function into new files. There are no callers of this function - I had originally proposed it for implementing a new bulk snapshot API, but that proved to be too invasive given RPC limits. I also