Re: [libvirt] [PATCH v2 00/10] hyperv: add support for Hyper-V 2012 and newer.

2017-04-03 Thread Dawid Zamirski
On Tue, 2017-04-04 at 00:11 +0200, Matthias Bolte wrote: > 2017-04-02 6:50 GMT+02:00 Dawid Zamirski : > > Hello, > > > > This is v2 with all the code review feedback addressed. Please see > > the > > cover letter in v1 here: > >

[libvirt] [PATCH v3 02/12] hyperv: introduce hypervWmiClassInfo struct.

2017-04-03 Thread Dawid Zamirski
This struct is to be used to carry all the information necessary to issue wsman requests for given WMI class. Those will be defined by the generator code (as lists) so that they are handy for the driver code to "extract" needed info depending on which hyper-v we're connected to. For example:

[libvirt] [PATCH v3 06/12] hyperv: update generator input file.

2017-04-03 Thread Dawid Zamirski
Adds defintiions for "v2" WMI class variants that are needed by the driver to handle both hyperv 2008 and 2012+ --- src/hyperv/hyperv_wmi_generator.input | 239 +- 1 file changed, 206 insertions(+), 33 deletions(-) diff --git

[libvirt] [PATCH v3 10/12] hyperv: add hypervInitConnection.

2017-04-03 Thread Dawid Zamirski
This function detects hyperv version by issuing a simple query using "v2" namespace and falling back to "v1". --- src/hyperv/hyperv_driver.c | 92 -- 1 file changed, 56 insertions(+), 36 deletions(-) diff --git a/src/hyperv/hyperv_driver.c

[libvirt] [PATCH v3 03/12] hyperv: update hypervObject struct.

2017-04-03 Thread Dawid Zamirski
Currently named as hypervObjecUnified to keep code compilable/functional until all bits are in place. This struct is a result of unserializing WMI request response. Therefore, it needs to be able to deal with different "versions" of the same WMI class. To accomplish this, the "data" member was

[libvirt] [PATCH v3 01/12] hyperv: store WMI version in hypervPrivate.

2017-04-03 Thread Dawid Zamirski
Hyper-V 2012+ uses a new "v2" version of Msvm_* WMI classes so we will store that info in hypervPrivate so that it is easily accessbile in the driver API callbacks and handled accordingly. --- src/hyperv/hyperv_private.h | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git

[libvirt] [PATCH v3 07/12] hyperv: update wmi code generator.

2017-04-03 Thread Dawid Zamirski
This patch updates the code generator that outputs C headers and code for WMI classes. It has been updated to handle multiple versions (or namespaces) of the same class which were introduced with Hyperv 2012+ --- src/hyperv/hyperv_wmi_generator.py | 385 +++-- 1

[libvirt] [PATCH v3 05/12] hyperv: make hypervEnumAndPull use hypervWqlQuery

2017-04-03 Thread Dawid Zamirski
This enables this function to handle "v1" and "v2" WMI requests. Since this commit and the ones that follow should be squashed on previous one: * rename hypervObjectUnified -> hypervObject as we've already broken compilation here so there's no point in keeping those in parallel anymore. * do

[libvirt] [PATCH v3 04/12] hyperv: add hypervWqlQuery struct.

2017-04-03 Thread Dawid Zamirski
Since this is the last commit that will compile in the series, the remaining patches should be squashed into this one - they are kept separate only for code review purposes. This struct is to be passed to enumerate-and-pull wsman request (to run "Select" queries) and provides the

[libvirt] [PATCH v3 08/12] hyperv: add helper for getting WMI class lists.

2017-04-03 Thread Dawid Zamirski
Those used to be auto-generated and are hand-written now intead. The reason being that those are not very useful and better replacements are in order once the driver itself implements more of the API and common patterns start to emerge. --- src/Makefile.am | 2 -

[libvirt] [PATCH v3 12/12] news: update for Hyper-V 2012+ support.

2017-04-03 Thread Dawid Zamirski
--- docs/news.xml | 11 +++ 1 file changed, 11 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index 9c0dcfd..39631c3 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -37,6 +37,17 @@ + + + The libvirt Hyper-V driver now supports Hyper-V

[libvirt] [PATCH v3 00/12] hyperv: add support for Hyper-V 2012 and newer.

2017-04-03 Thread Dawid Zamirski
Changes since v2[1]: * address the issue with incorrect request URI used in invoke * update driver doc * add news entry [1] https://www.redhat.com/archives/libvir-list/2017-April/msg00018.html Dawid Zamirski (12): hyperv: store WMI version in hypervPrivate. hyperv: introduce

[libvirt] [PATCH v3 11/12] hyperv: update driver documentation.

2017-04-03 Thread Dawid Zamirski
--- docs/drvhyperv.html.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/drvhyperv.html.in b/docs/drvhyperv.html.in index 7acf86f..e87d8cb 100644 --- a/docs/drvhyperv.html.in +++ b/docs/drvhyperv.html.in @@ -5,7 +5,7 @@ Microsoft Hyper-V hypervisor driver

[libvirt] [PATCH v3 09/12] hyperv: port rest of the driver to new stucts.

2017-04-03 Thread Dawid Zamirski
basically s/data->/data.common->/ Because the data member of hypervObject is a union, get the data via the "common" member everywhere - existing driver does not require special handling for v1 vs v2 separately. --- src/hyperv/hyperv_driver.c | 76 +++---

Re: [libvirt] [PATCH 0/5] qemu: fix individual vcpu hotplug code

2017-04-03 Thread John Ferlan
On 03/31/2017 07:52 AM, Peter Krempa wrote: > Resolve a few corner cases which would create invalid configurations or > produce > bad error messages. > > Peter Krempa (5): > qemu: hotplug: Iterate over vcpu 0 in individual vcpu hotplug code > qemu: hotplug: Fix formatting strings in >

Re: [libvirt] [PATCH 4/5] qemu: hotplug: Add validation for coldplug of individual vcpus

2017-04-03 Thread John Ferlan
On 03/31/2017 07:52 AM, Peter Krempa wrote: > Validate that users don't try to disable vcpu 0 and reject attempt to > modify a vcpu to the state it is currently in. > --- > src/qemu/qemu_hotplug.c | 36 > 1 file changed, 36 insertions(+) > > diff --git

Re: [libvirt] [PATCH v2 00/10] hyperv: add support for Hyper-V 2012 and newer.

2017-04-03 Thread Matthias Bolte
2017-04-02 6:50 GMT+02:00 Dawid Zamirski : > Hello, > > This is v2 with all the code review feedback addressed. Please see the > cover letter in v1 here: > https://www.redhat.com/archives/libvir-list/2017-March/msg01624.html > > Changes in v2: > * checked each patch with make

Re: [libvirt] [PATCH v3 09/10] hyperv: port rest of the driver to new stucts.

2017-04-03 Thread Matthias Bolte
2017-04-03 19:00 GMT+02:00 Dawid Zamirski : > basically s/data->/data.common->/ > > Because the data member of hypervObject is a union, get the data via > the "common" member everywhere - existing driver does not require > special handling for v1 vs v2 separately. > --- > > In

Re: [libvirt] [PATCH v2] virNetDevIPCheckIPv6ForwardingCallback fixes

2017-04-03 Thread John Ferlan
On 03/28/2017 10:00 AM, Cédric Bosdonnat wrote: > Add check for more than one RTA_OIF, even though this is rather > unlikely. > > Get rid of the buggy switch / break as this code won't need to > handle more attributes. > > Use VIR_WARNINGS_NO_CAST_ALIGN to fix impossible to fix >

[libvirt] [PATCH v3 09/10] hyperv: port rest of the driver to new stucts.

2017-04-03 Thread Dawid Zamirski
basically s/data->/data.common->/ Because the data member of hypervObject is a union, get the data via the "common" member everywhere - existing driver does not require special handling for v1 vs v2 separately. --- In v3: * solved conflict with recently pushed 5683b21309

Re: [libvirt] [PATCH 2/2] news: Allow empty elements

2017-04-03 Thread Daniel P. Berrange
On Thu, Mar 30, 2017 at 03:45:27PM +0200, Andrea Bolognani wrote: > Creating dummy elements was a workaround for the > HTML DTD not allowing empty elements, but we can do > better by tweaking the the XSLT stylesheet. > --- > docs/news-html.xsl| 8 +--- > docs/news.xml | 9

[libvirt] [PATCH 2/3] qemu: Initialize 'data' argument

2017-04-03 Thread John Ferlan
Initialize stack variable to {0} Signed-off-by: John Ferlan --- src/qemu/qemu_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index e1ad243..388af4f 100644 --- a/src/qemu/qemu_driver.c +++

[libvirt] [PATCH 1/3] tests: Pass BlockIOThrottle arguments by reference not value

2017-04-03 Thread John Ferlan
Pass the data by reference rather than everything on the stack. Signed-off-by: John Ferlan --- tests/qemumonitorjsontest.c | 38 +++--- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/tests/qemumonitorjsontest.c

[libvirt] [PATCH 0/3] A couple of Coverity found issues

2017-04-03 Thread John Ferlan
There's more, but many are false positives and there's also a couple more that I have to think more deeply about... John Ferlan (3): tests: Pass BlockIOThrottle arguments by reference not value qemu: Initialize 'data' argument qemu: Fix resource leak in qemuDomainAddChardevTLSObjects error

[libvirt] [PATCH 3/3] qemu: Fix resource leak in qemuDomainAddChardevTLSObjects error path

2017-04-03 Thread John Ferlan
On any failure, call virJSONValueFree for the *Props. Signed-off-by: John Ferlan --- src/qemu/qemu_migration.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 87d7dcd..852d85b 100644

Re: [libvirt] [PATCH v2 5/5] storage: gluster: Use volume name as "" field in the XML

2017-04-03 Thread Andrea Bolognani
On Thu, 2017-03-30 at 17:12 +0200, Peter Krempa wrote: [...] > +if (netfs) { > +src->format = VIR_STORAGE_POOL_NETFS_GLUSTERFS; > +src->dir = volname; > +} else { > +src->name = volname; > + > +if (VIR_STRDUP(src->dir, "/") < 0) > +   

Re: [libvirt] [PATCH v2 4/5] storage: Fix XPath for looking up gluster volume name

2017-04-03 Thread Andrea Bolognani
On Thu, 2017-03-30 at 17:12 +0200, Peter Krempa wrote: > Use the relative lookup specifier rather than the global one. Otherwise > only the first name would be looked up. Add a test case to cover the > scenario. > > Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1436574 ACK -- Andrea

Re: [libvirt] [PATCH v2 2/5] storage: util: Split out the gluster volume extraction code into new function

2017-04-03 Thread Andrea Bolognani
On Mon, 2017-04-03 at 16:38 +0200, Peter Krempa wrote: > > > +int virStorageUtilGlusterExtractPoolSources(const char *host, > > > +const char *xml, > > > +virStoragePoolSourceListPtr > > > list, > > > +

Re: [libvirt] [PATCH v2 3/5] test: Introduce testing of virStorageUtilGlusterExtractPoolSources

2017-04-03 Thread Andrea Bolognani
On Thu, 2017-03-30 at 17:12 +0200, Peter Krempa wrote: [...] > @@ -352,7 +354,7 @@ test_programs += nwfilterxml2firewalltest >  endif WITH_NWFILTER >  >  if WITH_STORAGE > -test_programs += storagevolxml2argvtest > +test_programs += storagevolxml2argvtest virstorageutiltest Since you have to

Re: [libvirt] [PATCH] qemu: Add device id for mediated devices on qemu command line

2017-04-03 Thread Peter Krempa
On Mon, Apr 03, 2017 at 16:12:17 +0200, Erik Skultety wrote: > Like all devices, add the 'id' option for mdevs as well. Patch also > adjusts the test accordingly. > > Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1438431 > > Signed-off-by: Erik Skultety > --- >

Re: [libvirt] [PATCH v2 2/5] storage: util: Split out the gluster volume extraction code into new function

2017-04-03 Thread Peter Krempa
On Mon, Apr 03, 2017 at 16:20:26 +0200, Andrea Bolognani wrote: > On Thu, 2017-03-30 at 17:12 +0200, Peter Krempa wrote: > [...] > > @@ -93,6 +93,10 @@ int virStorageBackendDeleteLocal(virConnectPtr conn, > >  int virStorageBackendRefreshLocal(virConnectPtr conn, > >

Re: [libvirt] [PATCH v2 2/5] storage: util: Split out the gluster volume extraction code into new function

2017-04-03 Thread Andrea Bolognani
On Thu, 2017-03-30 at 17:12 +0200, Peter Krempa wrote: [...] > @@ -93,6 +93,10 @@ int virStorageBackendDeleteLocal(virConnectPtr conn, >  int virStorageBackendRefreshLocal(virConnectPtr conn, >virStoragePoolObjPtr pool); >  > +int

Re: [libvirt] [PATCH v2 0/2] Fix possible use-after-free when sending event message

2017-04-03 Thread John Ferlan
On 03/27/2017 12:47 PM, John Ferlan wrote: > v1: https://www.redhat.com/archives/libvir-list/2017-March/msg01228.html > > Change since v1, add the derefFcn as an argument to the renamed macro > (not quite sure how I missed that originally. > > John Ferlan (2): > daemon: Rework

[libvirt] [PATCH] qemu: Add device id for mediated devices on qemu command line

2017-04-03 Thread Erik Skultety
Like all devices, add the 'id' option for mdevs as well. Patch also adjusts the test accordingly. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1438431 Signed-off-by: Erik Skultety --- src/qemu/qemu_command.c | 3 ++-

Re: [libvirt] [PATCH 0/5] Split out network object into its own module

2017-04-03 Thread John Ferlan
ping? Laine only had a question about the altered format for network_conf.h files. I don't think there's been enough change to cause any merge conflicts with top of tree, but I can repost if necessary. I have a few more ready to roll as well in the continuing effort to make a common driver

Re: [libvirt] [PATCH v2 1/5] storage: util: Add boolean differentiating between gluster lookup type

2017-04-03 Thread Andrea Bolognani
On Thu, 2017-03-30 at 17:12 +0200, Peter Krempa wrote: > The native gluster pool source list data differs from the data used for > attaching gluster volumes as netfs pools. Currently the only difference > was the format. Since native pools don't use it and later there will be > more difference add

Re: [libvirt] [libvirt-perl][PATCH 2/3] Add virDomainSetBlockThreshold API

2017-04-03 Thread Michal Privoznik
On 04/03/2017 12:17 PM, Daniel P. Berrange wrote: On Wed, Mar 29, 2017 at 03:56:28PM +0200, Michal Privoznik wrote: Signed-off-by: Michal Privoznik --- Changes| 1 + Virt.xs| 12 lib/Sys/Virt/Domain.pm | 9 + 3 files

Re: [libvirt] [libvirt-perl][PATCH 2/3] Add virDomainSetBlockThreshold API

2017-04-03 Thread Daniel P. Berrange
On Wed, Mar 29, 2017 at 03:56:28PM +0200, Michal Privoznik wrote: > Signed-off-by: Michal Privoznik > --- > Changes| 1 + > Virt.xs| 12 > lib/Sys/Virt/Domain.pm | 9 + > 3 files changed, 22 insertions(+) > > diff --git

Re: [libvirt] [libvirt-perl][PATCH 3/3] Add VIR_MIGRATE_TLS constant

2017-04-03 Thread Daniel P. Berrange
On Wed, Mar 29, 2017 at 03:56:29PM +0200, Michal Privoznik wrote: > Signed-off-by: Michal Privoznik > --- > Changes| 1 + > Virt.xs| 1 + > lib/Sys/Virt/Domain.pm | 7 +++ > 3 files changed, 9 insertions(+) ACK Regards, Daniel -- |:

Re: [libvirt] [libvirt-perl][PATCH 1/3] Add block threshold event

2017-04-03 Thread Daniel P. Berrange
On Wed, Mar 29, 2017 at 03:56:27PM +0200, Michal Privoznik wrote: > Signed-off-by: Michal Privoznik > --- > Changes| 1 + > Virt.xs| 48 > lib/Sys/Virt/Domain.pm | 6 ++ >

Re: [libvirt] [PATCH] storage: Fix capacity value for LUKS encrypted volumes

2017-04-03 Thread Daniel P. Berrange
On Fri, Mar 24, 2017 at 10:56:38AM -0400, John Ferlan wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1371892 > > The 'capacity' value (e.g. guest logical size) for a LUKS volume is > smaller than the 'physical' value of the file in the file system, so > we need to account for that. > >

[libvirt] [PATCH v2 2/2] Debug: Report VM errors more concisely.

2017-04-03 Thread Prerna Saxena
Current logs: error : qemuProcessFindDomainDiskByAlias:411 : internal error: no disk found with alias ide0-0-0 There is no way to find which VM was seeing this error. Makes debugging very hard, and the message itself is no good. Signed-off-by: Prerna Saxena ---

[libvirt] [PATCH v2 1/2] Debug: Add DEBUG messages for when a client has opened/closed connection.

2017-04-03 Thread Prerna Saxena
While tracing connections from a remote client, it helps to keep track of the connection lifecycle. Messages such as the following : error : virNetSocketReadWire:1574 : End of file while reading data: Input/output error are rather unhelpful. They do not indicate if the client had earlier asked

[libvirt] [PATCH v2 0/2] Augment debug messages.

2017-04-03 Thread Prerna Saxena
This is a v2 of the previous set of debug enhancements posted at : https://www.redhat.com/archives/libvir-list/2017-March/msg00959.html Changelog: - 1) Patch 1/3 : virNetSocketGetFD() is reverted to its old state, and only new DEBUG messages are introduced. 2) Patch 2/3 : Dropped, per

Re: [libvirt] [PATCH V3] util: Add more virsysfs functions for handling resctrl sysfs

2017-04-03 Thread Martin Kletzander
On Mon, Apr 03, 2017 at 09:29:37AM +0200, Erik Skultety wrote: On Fri, Mar 31, 2017 at 12:59:33PM +0200, Martin Kletzander wrote: On Fri, Mar 31, 2017 at 12:28:26PM +0200, Erik Skultety wrote: > > #define VIR_SYSFS_VALUE_MAXLEN 8192 > > #define SYSFS_SYSTEM_PATH "/sys/devices/system" > >

Re: [libvirt] [PATCH v2] virNetDevIPCheckIPv6ForwardingCallback fixes

2017-04-03 Thread Cedric Bosdonnat
Hi all, Has that one been forgotten? On Tue, 2017-03-28 at 16:00 +0200, Cédric Bosdonnat wrote: > Add check for more than one RTA_OIF, even though this is rather > unlikely. > > Get rid of the buggy switch / break as this code won't need to > handle more attributes. > > Use

[libvirt] [PATCH 2/5] qemu: Turn qemuDomainLogContext into virObject

2017-04-03 Thread Marc Hartmayer
This way qemuDomainLogContextRef() and qemuDomainLogContextFree() is no longer needed. The naming qemuDomainLogContextFree() was also somewhat misleading. Additionally, it's easier to turn qemuDomainLogContext in a self-locking object. Signed-off-by: Marc Hartmayer

[libvirt] [PATCH 4/5] qemu: remove ATTRIBUTE_UNUSED in qemuProcessHandleMonitorEOF

2017-04-03 Thread Marc Hartmayer
This attribute is not needed here, since @mon is in use. Signed-off-by: Marc Hartmayer Reviewed-by: Bjoern Walk --- src/qemu/qemu_process.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_process.c

[libvirt] [PATCH 5/5] refactoring: Use the return value of virObjectRef directly

2017-04-03 Thread Marc Hartmayer
Use the return value of virObjectRef directly. This way, it's easier for another reader to identify the reason why the additional reference is required. Signed-off-by: Marc Hartmayer Reviewed-by: Bjoern Walk --- src/datatypes.c

[libvirt] [PATCH 3/5] qemu: Implement qemuMonitorRegister()

2017-04-03 Thread Marc Hartmayer
Implement qemuMonitorRegister() as there is already a qemuMonitorUnregister() function. This way it may be easier to understand the code paths. Signed-off-by: Marc Hartmayer Reviewed-by: Bjoern Walk --- src/qemu/qemu_monitor.c | 38

[libvirt] [PATCH 1/5] qemu: Fix two use-after-free situations

2017-04-03 Thread Marc Hartmayer
There were multiple race conditions that could lead to segmentation faults. The first precondition for this is qemuProcessLaunch must fail sometime shortly after starting the new QEMU process. The second precondition for the segmentation faults is that the new QEMU process dies - or to be more

[libvirt] [PATCH 0/5] Use-after-free fix and cleanups

2017-04-03 Thread Marc Hartmayer
While looking at a use-after-free situation going through how the QEMU monitor is set up I noticed some things. These cleanups and the fix for the use-after-free are the result of that. Marc Hartmayer (5): qemu: Fix two use-after-free situations qemu: Turn qemuDomainLogContext into virObject

Re: [libvirt] [PATCH V3] util: Add more virsysfs functions for handling resctrl sysfs

2017-04-03 Thread Erik Skultety
On Fri, Mar 31, 2017 at 12:59:33PM +0200, Martin Kletzander wrote: > On Fri, Mar 31, 2017 at 12:28:26PM +0200, Erik Skultety wrote: > > > #define VIR_SYSFS_VALUE_MAXLEN 8192 > > > #define SYSFS_SYSTEM_PATH "/sys/devices/system" > > > +#define SYSFS_RESCTRL_PATH "/sys/fs/resctrl" > > > > > >

Re: [libvirt] Live attaching a disk to a VM fails with apparmor enabled

2017-04-03 Thread Guido Günther
On Thu, Mar 30, 2017 at 03:00:06PM +, Frank Schreuder wrote: > Hello Guido, > > I have great news. I'm able to successfully live attach a disk to a running > VM with a loaded apparmor profile. > > My setup: > Debian 8 > Kernel 4.9.11 > Libvirt 3.1.0 > Apparmor 2.10 from Debian backports >