[libvirt] [PATCH] Reject migration with both --live and --offline when migration requested from other clients/API.

2016-03-02 Thread Nitesh Konkar
--- src/libvirt-domain.c | 21 + 1 file changed, 21 insertions(+) diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index 9491845..6a5034e 100644 --- a/src/libvirt-domain.c +++ b/src/libvirt-domain.c @@ -3616,6 +3616,13 @@ virDomainMigrate(virDomainPtr domain,

Re: [libvirt] [PATCH v3] This patch gives an error when migration is attempted with both --live and --offline options.

2016-03-02 Thread Nitesh Konkar
Hello Michal, As far as I understand, the migration when requested from any of the APIs, would still succeed with both flags specified at once. Sending a follow up patch. Warm Regards, Nitesh Konkar. -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir

[libvirt] [PATCH] util: Cleanup error path for virPolkitAgentCreate

2016-03-02 Thread John Ferlan
More fallout from changing to using virPolkitAgent and handling error paths. Needed to clear the 'cmd' once stored and of course add the virCommandFree(cmd) in the error: label. Signed-off-by: John Ferlan --- Found by coverity... Pushed as trivial... src/util/virpolkit.c | 2 ++ 1 file change

[libvirt] [PATCH 09/10] secret: Use the hashed virSecretObjList

2016-03-02 Thread John Ferlan
This patch replaces most of the guts of secret_driver.c with recently added secret_conf.c APIs in order manage secret lists and objects using the hashed virSecretObjList* lookup API's. Signed-off-by: John Ferlan --- src/conf/secret_conf.h | 3 +- src/libvirt_private.syms | 9 + src/sec

[libvirt] [PATCH 08/10] secret: Introduce virSecretObjListGetUUIDs

2016-03-02 Thread John Ferlan
Add function to return counted listed of uuids to from the hashed secrets object list. This will replace the guts of secretConnectListSecrets. Signed-off-by: John Ferlan --- src/conf/secret_conf.c | 53 +- src/conf/secret_conf.h | 6 ++ 2 file

[libvirt] [PATCH 10/10] secret: Move and rename secretLoadAllConfigs

2016-03-02 Thread John Ferlan
Move to secret_conf.c and rename to virSecretLoadAllConfigs. Also includes moving/renaming the supporting virSecretLoad, virSecretLoadValue, and virSecretLoadValidateUUID. Signed-off-by: John Ferlan --- src/conf/secret_conf.c | 175 + src/conf/secr

[libvirt] [PATCH 03/10] secret: Add hashed virSecretObj and virSecretObjList

2016-03-02 Thread John Ferlan
Add definitions and infrastucture required for a hashed virSecretObj and virSecretObjList including the class, object, lock setup, and disposal API's. Nothing will call these yet. This infrastructure will replace the forward linked list logic within the secret_driver. Signed-off-by: John Ferlan

[libvirt] [PATCH 02/10] Add secretObjFromSecret

2016-03-02 Thread John Ferlan
Signed-off-by: John Ferlan --- src/secret/secret_driver.c | 45 + 1 file changed, 21 insertions(+), 24 deletions(-) diff --git a/src/secret/secret_driver.c b/src/secret/secret_driver.c index b07cc6f..8c1f79a 100644 --- a/src/secret/secret_driver.c +++

[libvirt] [PATCH 01/10] secret: Move virSecretObj to secret_conf.h

2016-03-02 Thread John Ferlan
To support being able to create a hashed secrets list, move the virSecretObj to secret_conf.h so that secret_conf.c can at least find the definition. Signed-off-by: John Ferlan --- src/conf/secret_conf.h | 13 - src/secret/secret_driver.c | 11 --- 2 files changed, 12 ins

[libvirt] [PATCH 07/10] secret: Introduce virSecretObjListExport

2016-03-02 Thread John Ferlan
Add function to return a "match" filtered list of secret objects. This function replaces the guts of secretConnectListAllSecrets. Need to also move and make global virSecretUsageIDForDef since it'll be used by both secret_driver.c and secret_conf.c Signed-off-by: John Ferlan --- src/conf/secret

[libvirt] [PATCH 05/10] secret: Introduce virSecretObjListAdd* and virSecretObjListRemove

2016-03-02 Thread John Ferlan
Add the functions to add/remove elements from the hashed secret obj list. These will replace secret_driver functions secretAssignDef and secretObjRemove. The virSecretObjListAddLocked will perform the necessary lookups and decide whether to replace an existing hash entry or create a new one. This

[libvirt] [PATCH 04/10] secret: Introduce virSecretObjListFindBy{UUID|Usage} support

2016-03-02 Thread John Ferlan
New API's including unlocked and Locked versions in order to be able to use in either manner. Support for searching hash object lists instead of linked lists will replace existing secret_driver functions secretFindByUUID and secretFindByUsage Signed-off-by: John Ferlan --- src/conf/secret_conf.

[libvirt] [PATCH 06/10] secret: Introduce virSecretObjListNumOfSecrets

2016-03-02 Thread John Ferlan
Add function to count the hashed secret obj list with filters. This will replace the guts of secret_driver's secretConnectNumOfSecrets. Signed-off-by: John Ferlan --- src/conf/secret_conf.c | 44 src/conf/secret_conf.h | 7 +++ 2 files changed, 5

[libvirt] [PATCH 00/10] Convert secret driver to use hashed object

2016-03-02 Thread John Ferlan
This series replaces the usage of linked list in secret driver with a hashed object list as was suggested in the review in the last patch of the previous secret driver changes series: http://www.redhat.com/archives/libvir-list/2016-February/msg01274.html Patch 1 - starts the ball rolling Patch 2

[libvirt] [PATCH] send default USB controller in xml to destination during migration on PPC64

2016-03-02 Thread Shivaprasad G Bhat
The default USB controller is not sent to destination as the older versions of libvirt(0.9.4 or earlier as I see in commit log of 409b5f54) didn't support them. For some archs where the support started much later can safely send the USB controllers without this worry. For now, changing the checks t

[libvirt] [PATCH v3 1/2] lxc: reuse virDomainObjUpdateModificationImpact

2016-03-02 Thread Nikolay Shirokovskiy
Signed-off-by: Nikolay Shirokovskiy --- src/lxc/lxc_driver.c | 75 +--- 1 file changed, 6 insertions(+), 69 deletions(-) diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c index 3c6c839..ef48812 100644 --- a/src/lxc/lxc_driver.c +++ b/src/lxc

[libvirt] [PATCH v3 2/2] libxl: reuse virDomainObjUpdateModificationImpact

2016-03-02 Thread Nikolay Shirokovskiy
Original current flag expansion does not filter out non _CONFIG and _LIVE flags explicitly but they are prohibited earlier by virCheckFlags. Signed-off-by: Nikolay Shirokovskiy --- src/libxl/libxl_driver.c | 63 +--- 1 file changed, 6 insertions(+), 57

[libvirt] [PATCH v3 0/2] cleanup resolving persistent/running/current flags

2016-03-02 Thread Nikolay Shirokovskiy
Changes from version2 = 1. Already ACKed or PUSHed patches are dropped. 2. Patch of reusing virDomainObjUpdateModificationImpact is splitted into lxc and libxl and compilation is fixed. Nikolay Shirokovskiy (2): lxc: reuse virDomainObjUpdateModificationImpact libxl: reus

[libvirt] [PATCH v3 12/14] qemu: Handle post-copy migration failures

2016-03-02 Thread Jiri Denemark
When migration fails in the post-copy mode, it's impossible to just kill the destination domain and resume the source since the source no longer contains current guest state. Let's mark domains on both sides as VIR_DOMAIN_PAUSED_POSTCOPY_FAILED to let the upper layer decide what to do with them. S

[libvirt] [PATCH v3 09/14] virsh: Add --postcopy-after-precopy option to migrate

2016-03-02 Thread Jiri Denemark
From: Cristian Klein Signed-off-by: Cristian Klein Signed-off-by: Jiri Denemark --- Notes: Version 3: - no change Version 2: - implement --postcopy-after-precopy entirely in virsh tools/virsh-domain.c | 35 +++ tools/virsh.pod | 9 ++

[libvirt] [PATCH v3 07/14] virsh: Add support for post-copy migration

2016-03-02 Thread Jiri Denemark
From: Cristian Klein Signed-off-by: Cristian Klein Signed-off-by: Jiri Denemark --- Notes: Version 3: - no change Version 2: - no change tools/virsh-domain.c | 55 tools/virsh.pod | 11 ++- 2 files changed

[libvirt] [PATCH v3 14/14] qemu: Add flags to qemuMigrationWaitForCompletion

2016-03-02 Thread Jiri Denemark
The function already takes two bool arguments, switching to flags makes it a lot easier to read. Especially in case we need to add another boolean in the future. Signed-off-by: Jiri Denemark --- Notes: Version 3: - no change Version 2: - moved to the end of the series since

[libvirt] [PATCH v3 06/14] qemu: Implement virDomainMigrateStartPostCopy

2016-03-02 Thread Jiri Denemark
From: Cristian Klein Signed-off-by: Cristian Klein Signed-off-by: Jiri Denemark --- Notes: Version 3: - no change Version 2: - no change src/qemu/qemu_domain.c| 1 + src/qemu/qemu_domain.h| 1 + src/qemu/qemu_driver.c| 58 +++

[libvirt] [PATCH v3 11/14] qemu: Refactor qemuProcessRecoverMigration

2016-03-02 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- Notes: Version 3: - no change Version 2: - no change src/qemu/qemu_process.c | 206 ++-- 1 file changed, 110 insertions(+), 96 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_pro

[libvirt] [PATCH v3 00/14] Implement post-copy migration

2016-03-02 Thread Jiri Denemark
(See "Add public APIs for post-copy migration" patch for more details about post-copy migration.) Post-copy support was originally written by Cristian Klein in 2014, but no one touched the series since then. Some patches in this series are modified versions of the old patches from Cristian, some p

[libvirt] [PATCH v3 05/14] qemu: Add support for VIR_MIGRATE_POSTCOPY flag

2016-03-02 Thread Jiri Denemark
From: Cristian Klein Signed-off-by: Cristian Klein Signed-off-by: Jiri Denemark --- Notes: Version 3: - no change Version 2: - no change src/qemu/qemu_migration.c | 76 +++ src/qemu/qemu_migration.h | 3 +- 2 files changed, 78

[libvirt] [PATCH v3 13/14] qemu: Refuse to abort migration in post-copy mode

2016-03-02 Thread Jiri Denemark
In post-copy mode none of the hosts has a complete guest state and rolling back migration is impossible. Thus aborting it would be equivalent to destroying the domain. Signed-off-by: Jiri Denemark --- Notes: Version 3: - no change Version 2: - no change src/qemu/qemu_drive

[libvirt] [PATCH v3 10/14] qemu: Don't kill running migrated domain on daemon restart

2016-03-02 Thread Jiri Denemark
When destination libvirtd is restarted during migration in Finish phase just after the point we started guest CPUs, we should not kill the domain. Signed-off-by: Jiri Denemark --- Notes: Version 3: - no change Version 2: - no change src/qemu/qemu_process.c | 10 +++---

[libvirt] [PATCH v3 08/14] virsh: Configurable migrate --timeout action

2016-03-02 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- Notes: Version 3: - no change Version 2: - no change tools/virsh-domain.c | 62 +--- tools/virsh.pod | 15 - 2 files changed, 64 insertions(+), 13 deletions(-) diff --git a/to

[libvirt] [PATCH v3 02/14] Add public APIs for post-copy migration

2016-03-02 Thread Jiri Denemark
From: Cristian Klein To use post-copy one has to start the migration with VIR_MIGRATE_POSTCOPY flag and, while migration is in progress, call virDomainMigrateStartPostCopy() to switch from pre-copy to post-copy. Signed-off-by: Cristian Klein Signed-off-by: Jiri Denemark --- Notes: Version

[libvirt] [PATCH v3 03/14] qemu: Handle postcopy-active migration state

2016-03-02 Thread Jiri Denemark
Migration enters "postcopy-active" state after QEMU switches to post-copy and pauses guest CPUs. From libvirt's point of view this state is similar to "completed" because we need to transfer guest execution to the destination host. Signed-off-by: Jiri Denemark --- Notes: Version 3: - rem

[libvirt] [PATCH v3 01/14] Add event and state details for post-copy

2016-03-02 Thread Jiri Denemark
VIR_DOMAIN_EVENT_SUSPENDED_POSTCOPY and VIR_DOMAIN_PAUSED_POSTCOPY are used on the source host once migration enters post-copy mode (which means the domain gets paused on the source. After the destination host takes over the execution of the domain, its virtual CPUs are resumed and the domain enter

[libvirt] [PATCH v3 04/14] qemu: Add QMP functions for post-copy migration

2016-03-02 Thread Jiri Denemark
From: Cristian Klein Signed-off-by: Cristian Klein Signed-off-by: Jiri Denemark --- Notes: The migration capability is called x-postcopy-ram in QEMU, which means it's still considered experimental. The main reason for it is to make sure the feature is complete from libvirt's point

[libvirt] [PATCH v6 0/5] vz: add migration support

2016-03-02 Thread Nikolay Shirokovskiy
Difference from v5 == 1. managed case is implemented 2. p2p follows managed migration flow now 3. 'vz: fix const correctness case' is needed to implement managed case. 4. misc options that are always on for vz (--live, --compressed) are not required to be set explicitly. 5. --offl

[libvirt] [PATCH v6 3/5] vz: implement managed migration

2016-03-02 Thread Nikolay Shirokovskiy
The newest version of migration protocol - version 3 with parameters is implemented. Supported flags is VIR_MIGRATE_PAUSED only. Supported parameters are VIR_MIGRATE_PARAM_URI and VIR_MIGRATE_PARAM_DEST_NAME. VIR_MIGRATE_PARAM_DEST_XML is in VZ_MIGRATION_PARAMETERS for technical onyl reasons. Si

[libvirt] [PATCH v6 2/5] vz: fix const correctness case

2016-03-02 Thread Nikolay Shirokovskiy
Signed-off-by: Nikolay Shirokovskiy --- src/vz/vz_utils.c | 2 +- src/vz/vz_utils.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vz/vz_utils.c b/src/vz/vz_utils.c index a1ddad0..f56cbdf 100644 --- a/src/vz/vz_utils.c +++ b/src/vz/vz_utils.c @@ -137,7 +137,7 @@ vzGetO

[libvirt] [PATCH v6 4/5] vz: implement p2p migration

2016-03-02 Thread Nikolay Shirokovskiy
Peer to peer migration is implemented just as in managed case. Basically it is copy paste from managed case but with all the branches that are not applied to vz removed. Signed-off-by: Nikolay Shirokovskiy --- src/vz/vz_driver.c | 139 - 1 file

[libvirt] [PATCH v6 1/5] vz: save session uuid on login

2016-03-02 Thread Nikolay Shirokovskiy
This session uuid acts as authN token for different multihost vz operations one of which is migration. Unfortunately we can't get it from server at any time thus we need to save it at login. Signed-off-by: Nikolay Shirokovskiy --- src/vz/vz_sdk.c | 39 +-- s

[libvirt] [PATCH v6 5/5] vz: cleanup: define vz format of uuids

2016-03-02 Thread Nikolay Shirokovskiy
vz puts uuids into curly braces. Simply introduce new contstant to reflect this and get rid of magic +2 in code. Signed-off-by: Nikolay Shirokovskiy --- src/vz/vz_sdk.c | 12 ++-- src/vz/vz_utils.h | 2 ++ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/vz/vz_sdk.c

Re: [libvirt] Enhancement: Random Clock Offset

2016-03-02 Thread Daniel P. Berrange
On Wed, Mar 02, 2016 at 11:09:20AM +0100, Martin Kletzander wrote: > On Tue, Mar 01, 2016 at 07:51:48PM +, ban...@openmailbox.org wrote: > >For better system anonymity (to decouple VM OS timestamps leaked in > >traffic from host ones) a feature can be added to the clock offset > >variable to se

Re: [libvirt] Enhancement: Random Clock Offset

2016-03-02 Thread Martin Kletzander
On Tue, Mar 01, 2016 at 07:51:48PM +, ban...@openmailbox.org wrote: For better system anonymity (to decouple VM OS timestamps leaked in traffic from host ones) a feature can be added to the clock offset variable to select randomly from a specified range of seconds from instead of a fixed num

Re: [libvirt] [PATCH] datatypes.c: Replace 'close' with 'closeData'

2016-03-02 Thread Michal Privoznik
On 01.03.2016 17:43, Michal Privoznik wrote: > Older compilers fail to see that 'close' is not used a function > rather than a variable and produce the following error: > > cc1: warnings being treated as errors > ../../src/datatypes.c: In function 'virConnectCloseCallbackDataReset': > ../../src/da