Re: [libvirt] [PATCH RFC v2 1/5] conf: add net device prefix to capabilities

2016-02-04 Thread Daniel P. Berrange
On Wed, Feb 03, 2016 at 09:40:33PM +, Joao Martins wrote: > In the reverted commit d2e5538b1, the libxl driver was changed to copy > interface names autogenerated by libxl to the corresponding network def > in the domain's virDomainDef object. The copied name is freed when the > domain

Re: [libvirt] [PATCH v3] systemd: Modernize machine naming

2016-02-04 Thread Martin Kletzander
On Thu, Feb 04, 2016 at 01:37:29PM +0100, Pavel Hrdina wrote: On Thu, Feb 04, 2016 at 11:40:36AM +0100, Martin Kletzander wrote: [...] @@ -290,12 +306,15 @@ virCgroupValidateMachineGroup(virCgroupPtr group, tmp++; if (STRNEQ(tmp, name) && +STRNEQ_NULLABLE(tmp,

[libvirt] [PATCH v3] systemd: Modernize machine naming

2016-02-04 Thread Martin Kletzander
So, systemd-machined has this philosophy that machine names are like hostnames and hence should follow the same rules. But we always allowed international characters in domain names. Thus we need to modify the machine name we are passing to systemd. In order to change some machine names that we

Re: [libvirt] [PATCH RFC v2 3/5] conf: add caps to virDomainDefFormat*

2016-02-04 Thread Daniel P. Berrange
On Wed, Feb 03, 2016 at 09:40:35PM +, Joao Martins wrote: > And use the newly added caps->host.netprefix (if it exists) for > interface names that match the autogenerated target names. > > Signed-off-by: Joao Martins > --- > src/bhyve/bhyve_driver.c| 9

Re: [libvirt] [PATCH RFC v2 5/5] libxl: set net device prefix

2016-02-04 Thread Daniel P. Berrange
On Wed, Feb 03, 2016 at 09:40:37PM +, Joao Martins wrote: > Use the newly added virCapabilitiesSetNetPrefix to set > the network prefix for the driver. This in return will > be use by NetDefFormat() and NetDefParseXML() routines > to free any interface name that start with the registered >

Re: [libvirt] [PATCH RFC v2 4/5] conf: add caps to virDomainSaveConfig

2016-02-04 Thread Daniel P. Berrange
On Wed, Feb 03, 2016 at 09:40:36PM +, Joao Martins wrote: > virDomainSaveConfig calls virDomainDefFormat which was setting the caps > to NULL, thus keeping the old behaviour (i.e. not looking at > netprefix). This patch adds the virCapsPtr to the function and allows > the configuration to be

Re: [libvirt] [PATCH v3] systemd: Modernize machine naming

2016-02-04 Thread Pavel Hrdina
On Thu, Feb 04, 2016 at 11:40:36AM +0100, Martin Kletzander wrote: [...] > @@ -290,12 +306,15 @@ virCgroupValidateMachineGroup(virCgroupPtr group, > tmp++; > > if (STRNEQ(tmp, name) && > +STRNEQ_NULLABLE(tmp, machinename) && > STRNEQ(tmp, partname) &&

Re: [libvirt] [PATCH] libxl: support feature

2016-02-04 Thread Joao Martins
On 02/04/2016 01:41 AM, Jim Fehlig wrote: > On 02/03/2016 02:20 PM, Joao Martins wrote: >> >> On 02/03/2016 04:12 AM, Jim Fehlig wrote: >>> Even though the libxl driver advertises in capabilities, >>> it is ignored when set in domXML. Enable hap in the >>> libxl_domain_create_info struct when

Re: [libvirt] [PATCH v3 4/4] logical: Display thin lv's found in a libvirt managed volume group

2016-02-04 Thread Ján Tomko
On Wed, Feb 03, 2016 at 03:51:30PM -0500, John Ferlan wrote: > > > On 02/03/2016 03:23 AM, Ján Tomko wrote: > > On Tue, Feb 02, 2016 at 11:14:01AM -0500, John Ferlan wrote: > >> > >> > >> On 02/02/2016 08:30 AM, Pavel Hrdina wrote: > >>> On Tue, Feb 02, 2016 at 09:11:51AM +0100, Ján Tomko wrote:

Re: [libvirt] [PATCH RFC v2 2/5] conf: add prefix in virDomainNetDefParseXML

2016-02-04 Thread Daniel P. Berrange
On Wed, Feb 03, 2016 at 09:40:34PM +, Joao Martins wrote: > And use the newly added caps->host.netprefix for free interface > names that match the autogenerated target names. > > Signed-off-by: Joao Martins > --- > src/conf/domain_conf.c | 11 +-- > 1 file

[libvirt] [PATCH] conf: add caps to virDomainSnapshotDefFormat

2016-02-04 Thread Joao Martins
The virDomainSnapshotDefFormat calls into virDomainDefFormat, so should be providing a non-NULL virCapsPtr instance. On the qemu driver we change qemuDomainSnapshotWriteMetadata to also include caps since it calls virDomainSnapshotDefFormat. Signed-off-by: Joao Martins

Re: [libvirt] [PATCH] libxl: support feature

2016-02-04 Thread Joao Martins
On 02/04/2016 06:22 PM, Jim Fehlig wrote: > On 02/04/2016 05:54 AM, Joao Martins wrote: >> >> On 02/04/2016 01:41 AM, Jim Fehlig wrote: >>> On 02/03/2016 02:20 PM, Joao Martins wrote: On 02/03/2016 04:12 AM, Jim Fehlig wrote: > Even though the libxl driver advertises in capabilities,

Re: [libvirt] [PATCH v3 7/8] daemon: add connection close rpc

2016-02-04 Thread Nikolay Shirokovskiy
On 04.02.2016 18:33, Daniel P. Berrange wrote: > On Mon, Feb 01, 2016 at 03:40:20PM +0300, Nikolay Shirokovskiy wrote: >> remoteConnectUnregisterCloseCallback is not quite good. >> if it is given a callback function different from that >> was registered before then local part will fail silently.

[libvirt] [PATCH] bhyve: fix build

2016-02-04 Thread Roman Bogorodskiy
Fix build fail introduced as a side effect of commit d239a54. Pushed under the build breaker rule. --- src/bhyve/bhyve_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bhyve/bhyve_driver.c b/src/bhyve/bhyve_driver.c index 337a29e..f486f86 100644 ---

[libvirt] [PATCH 1/4] vol: Add new elements to _virStorageVolSource for thin lv

2016-02-04 Thread John Ferlan
A thin lv doesn't have any extents defined - rather it uses a concept of a "thin-pool" in order to describe it's source. In order to allow that to be displayed properly in a future patch, add a new 'thin_pool' name that can be used by a future patch to store the name of the source thin_pool name

[libvirt] [PATCH 0/4] Display thin lv's from a logical vg

2016-02-04 Thread John Ferlan
While I know not the preferred mechanism for Jan, these patches provide a means to display thin lv data from a volume group including the source thin-pool name and thin-pool capacity. Since a thin-pool and a thin lv are just members of the vg, it just feels natural to display whatever is in the

[libvirt] [PATCH 3/4] logical: Add thin-pool look-aside list

2016-02-04 Thread John Ferlan
During processing of the extents found in a pool, we have historically ignored the thin-pool which means any thin lv found in the pool would also be ignored. This can start to change now - we can save aside the name and capacity of any thin-pool's found so that we can use that when we find a thin

[libvirt] [PATCH 2/4] logical: Add capability to get the thin pool name

2016-02-04 Thread John Ferlan
Since a future patch will start displaying thin logical volumes for a logical volume group thin-pool, add the ability to fetch the name of the thin-pool. This is accomplished by adding 'pool_lv' to the list of regex's and when a "thin" lv segtype (groups[4]) is found, we can store the thin-pool

[libvirt] [PATCH 4/4] logical: Display thin lv's found in a libvirt managed volume group

2016-02-04 Thread John Ferlan
Modify the regex for the 'devices' (a/k/a 'extents') from "(\\S+)" (e.g., 1 or more) to "(\\S*)" (e.g., zero or more). Then for any "thin" lv's found, mark the volume as a sparse volume so that the volume wipe algorithm doesn't work. Since a "thin" segtype has no devices, this will result in any

[libvirt] [PATCH 11/11] conf: Move and optimize disk target duplicity checking

2016-02-04 Thread Peter Krempa
Move the logic from virDomainDiskDefDstDuplicates into virDomainDiskDefCheckDuplicateInfo so that we don't have to loop multiple times through the array of disks. Since the original function was called in qemuBuildDriveDevStr, it was actually called for every single disk which was quite wasteful.

[libvirt] [PATCH 05/11] qemu: hotplug: Extract common code to qemuDomainAttachDeviceDiskLive

2016-02-04 Thread Peter Krempa
Target uniqueness check was duplicated in all of the three workers called from it. Extract it to the parent. --- src/qemu/qemu_hotplug.c | 35 +-- 1 file changed, 9 insertions(+), 26 deletions(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index

[libvirt] [PATCH 03/11] qemu: hotplug: Break up if/else statement into switch

2016-02-04 Thread Peter Krempa
--- src/qemu/qemu_hotplug.c | 24 ++-- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 0101063..43f686c 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -818,19 +818,31 @@

[libvirt] [PATCH 08/11] qemu: process: Reorder operations on early VM startup

2016-02-04 Thread Peter Krempa
Retrieval of the driver capabilities as well as emulator capabilities does not require the complete qemuProcessStop to be executed on failure. --- src/qemu/qemu_process.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/qemu/qemu_process.c

[libvirt] [PATCH 06/11] conf: Extract code that checks disk serial/wwn conflict

2016-02-04 Thread Peter Krempa
Put it into a separate function that can be called on two disk def pointers. --- src/conf/domain_conf.c | 42 -- 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 55e7ed9..2ef6609 100644

[libvirt] [PATCH 04/11] qemu: hotplug: Use more common 'cleanup' label in qemuDomainAttachDeviceDiskLive

2016-02-04 Thread Peter Krempa
--- src/qemu/qemu_hotplug.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 43f686c..fa83c6e 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -779,20 +779,20 @@

[libvirt] [PATCH 02/11] qemu: hotplug: Remove unnecessary variable

2016-02-04 Thread Peter Krempa
--- src/qemu/qemu_hotplug.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index b456fed..0101063 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -773,13 +773,12 @@

Re: [libvirt] [PATCH RFC v2 3/5] conf: add caps to virDomainDefFormat*

2016-02-04 Thread Joao Martins
On 02/04/2016 11:14 AM, Daniel P. Berrange wrote: > On Wed, Feb 03, 2016 at 09:40:35PM +, Joao Martins wrote: >> And use the newly added caps->host.netprefix (if it exists) for >> interface names that match the autogenerated target names. >> >> Signed-off-by: Joao Martins

[libvirt] [PATCH 07/11] qemu: hotplug: Check duplicate disk serial/wwn on hotplug too

2016-02-04 Thread Peter Krempa
We do the check on VM start, but the user could still hotplug a disk with a conflicting serial or WWN. Reuse the checker function to fix the issue. --- src/conf/domain_conf.c | 2 +- src/conf/domain_conf.h | 3 +++ src/libvirt_private.syms | 1 + src/qemu/qemu_hotplug.c | 3 +++ 4 files

[libvirt] [PATCH 00/11] Fix disk dst/wwn/serial checks in hotplug case

2016-02-04 Thread Peter Krempa
Peter Krempa (11): qemu: hotplug: Use typecasted switch qemu: hotplug: Remove unnecessary variable qemu: hotplug: Break up if/else statement into switch qemu: hotplug: Use more common 'cleanup' label in qemuDomainAttachDeviceDiskLive qemu: hotplug: Extract common code to

[libvirt] [PATCH 10/11] tests: Integrate startup checks to qemuxml2argvtest

2016-02-04 Thread Peter Krempa
Some of the tests that are not a part of qemuBuildCommandLine were not executed in the test suite. We can now reuse qemuProcessStartValidate to integrate these tests. --- tests/qemuxml2argvtest.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git

Re: [libvirt] [PATCH RFC v2 0/5] conf: add net device prefix capability

2016-02-04 Thread Daniel P. Berrange
On Wed, Feb 03, 2016 at 09:40:32PM +, Joao Martins wrote: > Hey, > > Back in the pre 1.3.0 release [0] we had a regression when migrating > domains in libxl (introduced by the reverted commit d2e5538b1). > > The chosen solution to address this problem was to introduce a > capability to be

[libvirt] [PATCH] conf: add caps to virDomainObjFormat/SaveStatus

2016-02-04 Thread Daniel P. Berrange
The virDomainObjFormat and virDomainSaveStatus methods both call into virDomainDefFormat, so should be providing a non-NULL virCapsPtr instance. Signed-off-by: Daniel P. Berrange --- src/bhyve/bhyve_process.c | 15 +++-- src/conf/domain_conf.c | 10 +

Re: [libvirt] [PATCH RFC v2 3/5] conf: add caps to virDomainDefFormat*

2016-02-04 Thread Daniel P. Berrange
On Thu, Feb 04, 2016 at 12:57:30PM +, Joao Martins wrote: > > > On 02/04/2016 11:14 AM, Daniel P. Berrange wrote: > >> diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h > >> index 0141009..6ae2e1b 100644 > >> --- a/src/conf/domain_conf.h > >> +++ b/src/conf/domain_conf.h > >> @@

Re: [libvirt] [PATCH v3 4/4] logical: Display thin lv's found in a libvirt managed volume group

2016-02-04 Thread John Ferlan
On 02/04/2016 04:53 AM, Ján Tomko wrote: > On Wed, Feb 03, 2016 at 03:51:30PM -0500, John Ferlan wrote: >> >> >> On 02/03/2016 03:23 AM, Ján Tomko wrote: >>> On Tue, Feb 02, 2016 at 11:14:01AM -0500, John Ferlan wrote: On 02/02/2016 08:30 AM, Pavel Hrdina wrote: > On Tue, Feb

Re: [libvirt] [PATCH v3 3/8] virConnectCloseCallbackData: factor out callback disarming

2016-02-04 Thread Daniel P. Berrange
On Mon, Feb 01, 2016 at 03:40:16PM +0300, Nikolay Shirokovskiy wrote: > --- > src/datatypes.c | 31 --- > 1 file changed, 16 insertions(+), 15 deletions(-) ACK Regards, Daniel -- |: http://berrange.com -o-http://www.flickr.com/photos/dberrange/ :| |:

Re: [libvirt] [PATCH 1/3] Revert "systemd: Escape only needed characters for machined"

2016-02-04 Thread Martin Kletzander
On Wed, Feb 03, 2016 at 09:31:50PM +0100, Andrea Bolognani wrote: On Wed, 2016-02-03 at 14:07 +0100, Pavel Hrdina wrote: On Tue, Feb 02, 2016 at 09:22:47PM +0100, Martin Kletzander wrote: > This reverts commit 0e0149ce91d84f40b98acf4c4bb0da6e29b9c15c. >  > That commit was added to comply with

Re: [libvirt] [PATCH v3 1/3] libxl: add p2p migration

2016-02-04 Thread Jim Fehlig
On 02/03/2016 12:36 PM, Joao Martins wrote: > > On 02/02/2016 11:41 PM, Jim Fehlig wrote: >> Also, if the connection dies, how are we informed about that? >> Would that be done via the connect close callback that was removed in this >> version? It is not clear to me how errors on the dconn

[libvirt] [PATCH 09/11] qemu: process: Extract pre-start checks into a function

2016-02-04 Thread Peter Krempa
When starting a qemu process there are certain checks done to ensure that the configuration makes sense. Extract them into a separate function so that they can be reused in the test code. --- src/qemu/qemu_migration.c | 2 +- src/qemu/qemu_process.c | 41

[libvirt] [PATCH 01/11] qemu: hotplug: Use typecasted switch

2016-02-04 Thread Peter Krempa
Remove the default case since all cases are covered. --- src/qemu/qemu_hotplug.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index f8db960..b456fed 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c

Re: [libvirt] [PATCH v3 1/8] factor out virConnectCloseCallbackDataPtr methods

2016-02-04 Thread Daniel P. Berrange
On Mon, Feb 01, 2016 at 03:40:14PM +0300, Nikolay Shirokovskiy wrote: > Signed-off-by: Nikolay Shirokovskiy > --- > po/POTFILES.in | 1 + > src/datatypes.c| 75 > ++ > src/datatypes.h|

Re: [libvirt] [PATCH v3 6/8] close callback: move it to driver

2016-02-04 Thread Daniel P. Berrange
On Mon, Feb 01, 2016 at 03:40:19PM +0300, Nikolay Shirokovskiy wrote: > Signed-off-by: Nikolay Shirokovskiy > --- > src/datatypes.c| 31 ++ > src/datatypes.h| 1 + > src/driver-hypervisor.h| 12 >

[libvirt] [PATCH] Fix build after recent patches

2016-02-04 Thread Peter Krempa
Few build breaking mistakes in less-popular parts of our code. --- Pushed under the build-breaker rule. src/security/security_apparmor.c | 2 +- src/xenapi/xenapi_driver.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/security/security_apparmor.c

Re: [libvirt] [PATCH RFC 2/8] Introduce virStream{Recv,Send}Offset

2016-02-04 Thread Lee Schermerhorn
On Mon, 2016-02-01 at 14:49 +, Daniel P. Berrange wrote: > On Fri, Jan 29, 2016 at 02:26:53PM +0100, Michal Privoznik wrote: > > When dealing with sparse files we need to be able to jump over > > holes as there's no added value in reading/writing them. For > > that, we need new set of send

Re: [libvirt] [PATCH v3 2/8] virConnectCloseCallbackData: fix connection object refcount

2016-02-04 Thread Daniel P. Berrange
On Mon, Feb 01, 2016 at 03:40:15PM +0300, Nikolay Shirokovskiy wrote: > We have reference to connection object in virConnectCloseCallbackData > object thus we have to refcount it. Obviously we have problems > in dispose and call functions. Let's fix it. > > Signed-off-by: Nikolay Shirokovskiy

Re: [libvirt] [PATCH v3 1/7] qemu migration: factor out setting migration option

2016-02-04 Thread Jiri Denemark
On Thu, Jan 28, 2016 at 10:04:27 +0300, Nikolay Shirokovskiy wrote: > Signed-off-by: Nikolay Shirokovskiy > --- > src/qemu/qemu_migration.c | 138 > ++ > 1 file changed, 28 insertions(+), 110 deletions(-) > > diff --git

Re: [libvirt] [PATCH v3 4/8] close callback API: remove unnecessary locks

2016-02-04 Thread Daniel P. Berrange
On Mon, Feb 01, 2016 at 03:40:17PM +0300, Nikolay Shirokovskiy wrote: > closeCallback pointer is immutable (set on connection object creation) > and self-locking. > --- > src/libvirt-host.c | 10 -- > 1 file changed, 10 deletions(-) ACK Regards, Daniel -- |: http://berrange.com

Re: [libvirt] [PATCH v3 5/8] virConnectCloseCallbackDataDispose: remove unnecessary locks

2016-02-04 Thread Daniel P. Berrange
On Mon, Feb 01, 2016 at 03:40:18PM +0300, Nikolay Shirokovskiy wrote: > We don't need locks in dispose functions as they can only > be run in one thread for given object. > --- > src/datatypes.c | 8 +--- > 1 file changed, 1 insertion(+), 7 deletions(-) ACK Regards, Daniel -- |:

Re: [libvirt] [PATCH v3 8/8] vz: implement connection close notification

2016-02-04 Thread Daniel P. Berrange
On Mon, Feb 01, 2016 at 03:40:21PM +0300, Nikolay Shirokovskiy wrote: > Signed-off-by: Nikolay Shirokovskiy > --- > src/vz/vz_driver.c | 39 +++ > src/vz/vz_sdk.c| 4 > src/vz/vz_utils.h | 3 +++ > 3 files changed, 46

Re: [libvirt] [PATCH v3 7/8] daemon: add connection close rpc

2016-02-04 Thread Daniel P. Berrange
On Mon, Feb 01, 2016 at 03:40:20PM +0300, Nikolay Shirokovskiy wrote: > remoteConnectUnregisterCloseCallback is not quite good. > if it is given a callback function different from that > was registered before then local part will fail silently. On > the other hand we can not gracefully handle this

Re: [libvirt] [PATCH] libxl: support feature

2016-02-04 Thread Jim Fehlig
On 02/04/2016 05:54 AM, Joao Martins wrote: > > On 02/04/2016 01:41 AM, Jim Fehlig wrote: >> On 02/03/2016 02:20 PM, Joao Martins wrote: >>> On 02/03/2016 04:12 AM, Jim Fehlig wrote: Even though the libxl driver advertises in capabilities, it is ignored when set in domXML. Enable hap in

Re: [libvirt] [PATCH v3 3/7] qemu monitor: add multithread compress parameters accessors

2016-02-04 Thread Jiri Denemark
On Thu, Jan 28, 2016 at 10:04:29 +0300, Nikolay Shirokovskiy wrote: > From: ShaoHe Feng > > Current compression does not use all range of parameter values > so let's use some of them as 'unspecified' values. These > values will be used to mark parameters that were not

Re: [libvirt] [PATCH] conf: add caps to virDomainObjFormat/SaveStatus

2016-02-04 Thread Joao Martins
On 02/04/2016 02:52 PM, Daniel P. Berrange wrote: > The virDomainObjFormat and virDomainSaveStatus methods > both call into virDomainDefFormat, so should be providing > a non-NULL virCapsPtr instance. > > Signed-off-by: Daniel P. Berrange > --- > src/bhyve/bhyve_process.c

Re: [libvirt] [PATCH] logical: Clarify pieces of lvs regex

2016-02-04 Thread Andrea Bolognani
On Wed, 2016-02-03 at 16:49 -0500, John Ferlan wrote: > Rather than have a unwieldy regex string - split it up into its components > each having it's own #define and then combine in a different #define > > Signed-off-by: John Ferlan > --- >