Re: [libvirt] [PATCH 17/16] snapshot: Store qemu snapshot state in bulk

2019-03-25 Thread Eric Blake
On 3/25/19 12:19 PM, Daniel P. Berrangé wrote: > On Fri, Mar 22, 2019 at 01:07:04PM -0500, Eric Blake wrote: >> [keeping context, because of adding Dan in cc] >>> To some degree we could be 'stuck with' the model for snapshots, but >>> that doesn't mean checkpoints couldn't make use of some newer

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

2019-03-25 Thread Laine Stump
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, but not *all* of it. As a result, an application may receive and

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

2019-03-25 Thread Laine Stump
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 remove the duplicated code from all the prep functions. The code to

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

2019-03-25 Thread Laine Stump
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 nothing, if that's appropriate). This permits generalizing some

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

2019-03-25 Thread Laine Stump
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 obvious, move the cases for those two device types to the top of

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

2019-03-25 Thread Laine Stump
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 be merged into qemuDomainDetachControllerDevice(), which is in

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

2019-03-25 Thread Laine Stump
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 function, and call it directly. Signed-off-by: Laine Stump ---

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

2019-03-25 Thread Laine Stump
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 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git

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

2019-03-25 Thread Laine Stump
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 to qemuDomainUpdateDeviceList() with two calls to it immediately

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

2019-03-25 Thread Laine Stump
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 calls them all. qemuhotplugtest.c is the only place any of these

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

2019-03-25 Thread Laine Stump
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 qemuDomainDetachPrep*(), where * is the name of that device's data member in the

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

2019-03-25 Thread Laine Stump
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 qemuDomainDetachDeviceLive() instead of all the subordinate functions.

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

2019-03-25 Thread Laine Stump
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 device, where all hostside teardown is delayed until we receive the

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

2019-03-25 Thread Laine Stump
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 follow. Signed-off-by: Laine Stump --- Change from V1: Eliminate

[libvirt] [PATCH v2 00/14] qemu_hotplug: refactor device detach functions to fix one serious and other minor bugs

2019-03-25 Thread Laine Stump
V1: https://www.redhat.com/archives/libvir-list/2019-March/msg01455.html I pushed patches 01-12, since they were acked, and pushing them leaves the code in no worse state than it was before (all tests still pass). There are 4 new patches in V2, created as a result of Peter asking for patches to

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

2019-03-25 Thread Laine Stump
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 corrects that omission. Signed-off-by: Laine Stump --- NEW PATCH in

Re: [libvirt] [PATCH 18/16] snapshot: Consolidate writing snapshot state to disk

2019-03-25 Thread Daniel P . Berrangé
On Fri, Mar 22, 2019 at 10:49:04AM -0400, John Ferlan wrote: > > > On 3/20/19 5:32 PM, Eric Blake wrote: > > Remove a now-unused parameter from qemuDomainSnapshotWriteMetadata(). > > Then, instead of calling it after every individual change to a given > > snapshot, call it only once at the end

Re: [libvirt] [PATCH 17/16] snapshot: Store qemu snapshot state in bulk

2019-03-25 Thread Daniel P . Berrangé
On Fri, Mar 22, 2019 at 01:07:04PM -0500, Eric Blake wrote: > [keeping context, because of adding Dan in cc] > > To some degree we could be 'stuck with' the model for snapshots, but > > that doesn't mean checkpoints couldn't make use of some newer > > functionality that stores everything in one

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

2019-03-25 Thread Daniel P . Berrangé
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 09:14:38AM +0100, Erik Skultety wrote: > > > > You're missing: > > > > -

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

2019-03-25 Thread Martin Kletzander
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 09:14:38AM +0100, Erik Skultety wrote: > You're missing: > - commit message explaining the change > - Your full name as author > - compliance with

Re: [libvirt] [PATCH v2] news: Document kernel requirements for virtual networks

2019-03-25 Thread Daniel P . Berrangé
On Mon, Mar 25, 2019 at 11:34:42AM +0100, Michal Privoznik wrote: > After 7431b3eb9a05068e4b libvirt requires "filter", "nat" and > "mangle" tables to exist for both IPv4 and IPv6. This fact was > missed in the news.xml and since we don't have any better place > to advertise that let's update old

[libvirt] [PATCH v2] news: Document kernel requirements for virtual networks

2019-03-25 Thread Michal Privoznik
After 7431b3eb9a05068e4b libvirt requires "filter", "nat" and "mangle" tables to exist for both IPv4 and IPv6. This fact was missed in the news.xml and since we don't have any better place to advertise that let's update old news. This was refined in 686803a1a2e and since that is not released yet

Re: [libvirt] [PATCH] news: Document kernel requirements for virtual networks

2019-03-25 Thread Daniel P . Berrangé
On Sat, Mar 23, 2019 at 07:17:16AM +0100, Michal Prívozník wrote: > On 3/17/19 3:36 PM, John Ferlan wrote: > > > > > > On 3/11/19 8:25 AM, Michal Privoznik wrote: > >> After 7431b3eb9a05068e4b libvirt requires "filter", "nat" and > >> "mangle" tables to exist for both IPv4 and IPv6. This fact

Re: [libvirt] [PATCH 0/5] snapshot coverage in 'make check'

2019-03-25 Thread Michal Privoznik
On 3/24/19 5:01 AM, Eric Blake wrote: Given that my recent snapshot changes introduced two separate bugs, both of which were fairly easy to reproduce with the test:///default driver, but neither of which caused 'make check' to alert me to the problems, it's high time I submit a test, including

[libvirt] [PATCH] spec: Move ldconfig calls from -client to -libs

2019-03-25 Thread Andrea Bolognani
ldconfig needs to be called after installing or uninstalling shared libraries. For a very long time, libvirt didn't have a separate package containing just the shared libraries, and so it shipped them in the same one as the clients. Since commit 70b4f0e719cd, however, shared libraries have been

Re: [libvirt] [PATCH v3 1/1] domain_conf: check device address before attach

2019-03-25 Thread Michal Privoznik
On 3/15/19 10:06 PM, Daniel Henrique Barboza wrote: In a case where we want to hotplug the following disk: (...) In a QEMU guest that has a single OS disk, as follows: (...) What happens is that the existing guest disk will receive the ID 'scsi0-0-0-0' due to how

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

2019-03-25 Thread Peter Krempa
On Mon, Mar 25, 2019 at 09:15:23 +0100, Erik Skultety wrote: > On Mon, Mar 25, 2019 at 09:14:38AM +0100, Erik Skultety wrote: > > You're missing: > > - commit message explaining the change > > - Your full name as author > > - compliance with developer certificate of origin, see [1]

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

2019-03-25 Thread Ján Tomko
On Sat, Mar 23, 2019 at 08:34:42PM +0400, Humaid wrote: --- src/qemu/qemu_tpm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_tpm.c b/src/qemu/qemu_tpm.c index 835a9caf46..b60e443f14 100644 --- a/src/qemu/qemu_tpm.c +++ b/src/qemu/qemu_tpm.c @@ -834,16

[libvirt] [PATCH libvirt-python v2] Implement virDomainGetStateParams API

2019-03-25 Thread Bjoern Walk
From: Marc Hartmayer This patch adds the Python binding for the virDomainGetStateParams API. The Python side can be generated automatically, the C side cannot. Reviewed-by: Boris Fiuczynski Signed-off-by: Marc Hartmayer Signed-off-by: Bjoern Walk --- Patch series for libvirt is here:

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

2019-03-25 Thread Erik Skultety
On Mon, Mar 25, 2019 at 09:14:38AM +0100, Erik Skultety wrote: > You're missing: > - commit message explaining the change > - Your full name as author > - compliance with developer certificate of origin, see [1] > > On Sat, Mar 23, 2019 at 08:34:42PM +0400, Humaid wrote: > > --- > >

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

2019-03-25 Thread Erik Skultety
You're missing: - commit message explaining the change - Your full name as author - compliance with developer certificate of origin, see [1] On Sat, Mar 23, 2019 at 08:34:42PM +0400, Humaid wrote: > --- > src/qemu/qemu_tpm.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff

[libvirt] [PATCH v2 2/7] qemu: domain: store and update panic info

2019-03-25 Thread Bjoern Walk
Let's store additional state information in the hypervisor-specific private data to virDomainObj. For now, just consider panic state in QEMU domains for which additional information is available from the guest crash event handler. Reviewed-by: Boris Fiuczynski Signed-off-by: Bjoern Walk ---

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

2019-03-25 Thread Bjoern Walk
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 reason or register state of the domain. This

[libvirt] [PATCH v2 7/7] news: add entry for virDomainGetStateParams

2019-03-25 Thread Bjoern Walk
Reviewed-by: Boris Fiuczynski Signed-off-by: Bjoern Walk --- docs/news.xml | 11 +++ 1 file changed, 11 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index 5c3028e1..09617d6a 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -35,6 +35,17 @@ + + +

[libvirt] [PATCH v2 1/7] qemu: monitor: move event data structure to domain

2019-03-25 Thread Bjoern Walk
In order to later process the event data, we need to be able to access it over the lifetime of the domain. So, as an initial step, let's move the event data structure and utility functions to qemu_domain.[ch] and rename them appropriately to make it accessible for other users. Reviewed-by: Boris

[libvirt] [PATCH v2 4/7] remote: implement remoteDomainGetStateParams

2019-03-25 Thread Bjoern Walk
Implement the API function virDomainGetStateParams for the remote driver and wire up the remote protocol. Reviewed-by: Boris Fiuczynski Signed-off-by: Bjoern Walk --- src/remote/remote_daemon_dispatch.c | 50 + src/remote/remote_driver.c | 44

[libvirt] [PATCH v2 3/7] lib: introduce virDomainGetStateParams function

2019-03-25 Thread Bjoern Walk
This API function extends the virDomainGetState function by returning additional state information as a dictionary of typed parameters. Reviewed-by: Boris Fiuczynski Signed-off-by: Bjoern Walk --- include/libvirt/libvirt-domain.h | 76 src/driver-hypervisor.h

[libvirt] [PATCH v2 6/7] virsh: domstate: report detailed state if available

2019-03-25 Thread Bjoern Walk
Add a new parameter to virsh domstate, --info, to report additional information for the domain state, e.g. for a QEMU guest running a S390 domain: virsh # domstate --info guest-1 crashed (panicked: s390: core='0' psw-mask='0x000200018000' \ psw-addr='0x0010f146'

[libvirt] [PATCH v2 5/7] qemu: implement qemuDomainGetStateParams

2019-03-25 Thread Bjoern Walk
Implement the API function virDomainGetStateParams for the QEMU hypervisor driver. Reviewed-by: Boris Fiuczynski Signed-off-by: Bjoern Walk --- src/qemu/qemu_driver.c | 118 + 1 file changed, 118 insertions(+) diff --git a/src/qemu/qemu_driver.c