Re: [libvirt] [PATCH v2 1/1] vz: Fix error messages in libvirt log caused by unhadled events

2015-06-24 Thread Nikolay Shirokovskiy
On 23.06.2015 13:26, Mikhail Feoktistov wrote: > If the configuration of the instance has been modified, for example added > disk or network device, then hypervisor > sends event with prlIssuerType = PIE_DISPATCHER and EventType = > PET_DSP_EVT_VM_CONFIG_CHANGED > We should handle this event in

[libvirt] [PATCH 3/3] vz: implement connection close notification

2015-06-24 Thread Nikolay Shirokovskiy
Reuse virConnectCloseCallback to implement connection close event functions. Thus we automatically meet multi-thread requirements on unregistering/notification. Signed-off-by: Nikolay Shirokovskiy --- daemon/remote.c|2 +- src/remote/remote_driver.c |3 ++- src/vz

[libvirt] driver level connection close event

2015-06-24 Thread Nikolay Shirokovskiy
Notify of connection close event from parallels driver (possibly) wrapped in the remote driver. Discussion. In 1 and 2 patch we forced to some decisions because we don't have a weak reference mechanics. 1 patch. --- virConnectCloseCallback is introduced because we can not reference the c

[libvirt] [PATCH 2/3] daemon: relay connection close event related functions

2015-06-24 Thread Nikolay Shirokovskiy
we impose some multi-thread requirements on drivers implementations. This is the same approach as in for example remoteDispatchConnectDomainEventRegister. Signed-off-by: Nikolay Shirokovskiy --- daemon/libvirtd.h|1 + daemon/remote.c | 87

[libvirt] [PATCH 1/3] remote: move connection close callback to driver level

2015-06-24 Thread Nikolay Shirokovskiy
iring event on close initiated by client. I'm not sure where callback object should be so it stays in datatype.c Signed-off-by: Nikolay Shirokovskiy --- src/datatypes.c| 112 +--- src/datatypes.h| 21 ++-- src/driver-hy

Re: [libvirt] [PATCH v2 1/3] vz: add net dev statistiscs

2015-06-26 Thread Nikolay Shirokovskiy
On 25.06.2015 17:51, Dmitry Guryanov wrote: > On 06/18/2015 12:28 PM, Nikolay Shirokovskiy wrote: >> From: Nikolay Shirokovskiy >> >> Populate counters SDK currenly supports: >> rx_bytes >> rx_packets >> tx_bytes >> tx_packets >&

Re: [libvirt] [PATCH v2 3/3] vz: add memory statistics

2015-06-26 Thread Nikolay Shirokovskiy
On 25.06.2015 20:36, Dmitry Guryanov wrote: > On 06/18/2015 12:28 PM, Nikolay Shirokovskiy wrote: >> From: Nikolay Shirokovskiy >> >> Implemented counters: >> VIR_DOMAIN_MEMORY_STAT_SWAP_IN >> VIR_DOMAIN_MEMORY_STAT_SWAP_OUT >&g

[libvirt] [PATCH v3 1/4] vz: add net dev statistiscs

2015-06-26 Thread Nikolay Shirokovskiy
From: Nikolay Shirokovskiy Populate counters SDK currenly supports: rx_bytes rx_packets tx_bytes tx_packets Comments. Use vzDomObjFromDomainRef/virDomainObjEndAPI pair to get domain object as we use prlsdkGetStatsParam that can release domain object lock and thus we need a reference in

[libvirt] [PATCH v3 3/4] vz: add vcpu statistics

2015-06-26 Thread Nikolay Shirokovskiy
From: Nikolay Shirokovskiy Comments. Replace vzDomObjFromDomain/virObjectUnlock pair to vzDomObjFromDomainRef/virDomainObjEndAPI as we use prlsdkGetStatsParam. See previous statistics comments. Signed-off-by: Nikolay Shirokovskiy --- src/vz/vz_driver.c |6 -- src/vz/vz_sdk.c

[libvirt] [PATCH v3 4/4] vz: add memory statistics

2015-06-26 Thread Nikolay Shirokovskiy
From: Nikolay Shirokovskiy Implemented counters: VIR_DOMAIN_MEMORY_STAT_SWAP_IN VIR_DOMAIN_MEMORY_STAT_SWAP_OUT VIR_DOMAIN_MEMORY_STAT_MINOR_FAULT VIR_DOMAIN_MEMORY_STAT_MAJOR_FAULT VIR_DOMAIN_MEMORY_STAT_AVAILABLE VIR_DOMAIN_MEMORY_STAT_ACTUAL_BALLOON VIR_DOMAIN_MEMORY_STAT_UNUSED

[libvirt] [PATCH v3 0/4] vz: add statistics

2015-06-26 Thread Nikolay Shirokovskiy
Add vz statistics for network, cpu and memory. CHANGES from v1. subject prefix changed from 'parallels' to 'vz' CHANGES from v2. 1. Concering all patches - most of implementation details are moved to vz_sdk.c. Reason is that first this makes other subsystems statistics to be on par with block dev

[libvirt] [PATCH v3 2/4] vz: cleanup, make in par net device lookup functions

2015-06-26 Thread Nikolay Shirokovskiy
Make net device lookup by mac return sdk handle instead of quite ephemeral enumeration index. After this change there is no need anymore in special function of removing device by enumeration index. Signed-off-by: Nikolay Shirokovskiy --- src/vz/vz_sdk.c | 77

Re: [libvirt] [PATCH 1/6] vz: add migration backbone code

2015-07-15 Thread Nikolay Shirokovskiy
. Better introduce vz specific driver function to get the token and use direct scheme. On 13.07.2015 15:28, nshirokovs...@virtuozzo.com wrote: > From: Nikolay Shirokovskiy > > This patch makes basic vz migration possible. For example by virsh: > virsh -c vz:///system migrate $NAME v

Re: [libvirt] [PATCH v2 0/3] driver level connection close event

2015-07-16 Thread Nikolay Shirokovskiy
Guys, please take a look. On 25.06.2015 14:31, nshirokovs...@virtuozzo.com wrote: > Notify of connection close event from parallels driver (possibly) wrapped in > the remote driver. > > Changes from v1: > 1. fix comment style issues > 2. remove spurious whitespaces > 3. move rpc related part from

Re: [libvirt] [PATCH v2 0/7] vz: add migration support

2015-08-24 Thread Nikolay Shirokovskiy
On 24.07.2015 13:49, Dmitry Guryanov wrote: > On 07/17/2015 03:55 PM, nshirokovs...@virtuozzo.com wrote: >> NOTE that minimal command to migrate vz domain is like next: >> >> virsh -c vz:///system migrate 200 vz+ssh://shiny0/system -p2p --live >> --persistent >> --compressed >> >> Difference fro

Re: [libvirt] [PATCH v3 2/5] vz: add migration backbone code

2015-08-25 Thread Nikolay Shirokovskiy
On 25.08.2015 18:42, Dmitry Guryanov wrote: > On 08/25/2015 12:04 PM, nshirokovs...@virtuozzo.com wrote: >> From: Nikolay Shirokovskiy >> >> This patch makes basic vz migration possible. For example by virsh: >>virsh -c vz:///system migrate --direct $NAME

Re: [libvirt] [PATCH v3 4/5] vz: support misc migration options

2015-08-25 Thread Nikolay Shirokovskiy
On 25.08.2015 18:54, Dmitry Guryanov wrote: > On 08/25/2015 12:04 PM, nshirokovs...@virtuozzo.com wrote: >> From: Nikolay Shirokovskiy >> >> Migration API has a lot of options. This patch intention is to provide >> support for those options that can be trivially suppo

Re: [libvirt] [PATCH v3 2/5] vz: add migration backbone code

2015-08-26 Thread Nikolay Shirokovskiy
On 25.08.2015 20:28, Dmitry Guryanov wrote: > On 08/25/2015 07:18 PM, Daniel P. Berrange wrote: >> On Tue, Aug 25, 2015 at 12:04:14PM +0300, nshirokovs...@virtuozzo.com wrote: >>> From: Nikolay Shirokovskiy >>> >>> This patch makes basic vz migration possible

[libvirt] [PATCH] migration: remove direct migration dependency on version1 of driver

2015-08-27 Thread Nikolay Shirokovskiy
From: Nikolay Shirokovskiy Direct migration should work if *perform3 is present but *perform is not. This is situation when driver migration is implemented after new version of driver function is introduced. We should not be forced to support old version too as its parameter space is subspace of

Re: [libvirt] [PATCH v3 2/5] vz: add migration backbone code

2015-08-28 Thread Nikolay Shirokovskiy
On 27.08.2015 13:34, Daniel P. Berrange wrote: > On Tue, Aug 25, 2015 at 12:04:14PM +0300, nshirokovs...@virtuozzo.com wrote: >> From: Nikolay Shirokovskiy >> >> This patch makes basic vz migration possible. For example by virsh: >> virsh -c vz:///system migrate

Re: [libvirt] [PATCH] migration: remove direct migration dependency on version1 of driver

2015-08-28 Thread Nikolay Shirokovskiy
On 28.08.2015 08:54, Michal Privoznik wrote: > On 27.08.2015 12:23, Nikolay Shirokovskiy wrote: >> From: Nikolay Shirokovskiy >> >> Direct migration should work if *perform3 is present but *perform >> is not. This is situation when driver migration is implemented >

Re: [libvirt] [PATCH] migration: remove direct migration dependency on version1 of driver

2015-08-31 Thread Nikolay Shirokovskiy
On 28.08.2015 19:04, Michal Privoznik wrote: > On 28.08.2015 11:29, Nikolay Shirokovskiy wrote: >> >> >> On 28.08.2015 08:54, Michal Privoznik wrote: >>> On 27.08.2015 12:23, Nikolay Shirokovskiy wrote: >>>> From: Nikolay Shirokovskiy >>> nshi

Re: [libvirt] [PATCH v3 2/5] vz: add migration backbone code

2015-08-31 Thread Nikolay Shirokovskiy
On 28.08.2015 19:37, Daniel P. Berrange wrote: > On Fri, Aug 28, 2015 at 12:18:30PM +0300, Nikolay Shirokovskiy wrote: >> >> >> On 27.08.2015 13:34, Daniel P. Berrange wrote: >>> On Tue, Aug 25, 2015 at 12:04:14PM +0300, nshirokovs...@virtuozzo.com wrote: &

Re: [libvirt] [PATCH] migration: remove direct migration dependency on version1 of driver

2015-08-31 Thread Nikolay Shirokovskiy
On 31.08.2015 12:05, Michal Privoznik wrote: > On 31.08.2015 10:42, Nikolay Shirokovskiy wrote: >> >> >> On 28.08.2015 19:04, Michal Privoznik wrote: >>> On 28.08.2015 11:29, Nikolay Shirokovskiy wrote: >>>> >>>> >>>> On 2

Re: [libvirt] [PATCH v3 2/5] vz: add migration backbone code

2015-09-02 Thread Nikolay Shirokovskiy
On 01.09.2015 17:21, Daniel P. Berrange wrote: > On Mon, Aug 31, 2015 at 11:40:55AM +0300, Nikolay Shirokovskiy wrote: >> >> >> On 28.08.2015 19:37, Daniel P. Berrange wrote: >>> On Fri, Aug 28, 2015 at 12:18:30PM +0300, Nikolay Shirokovskiy wrote: >>>&g

[libvirt] [PATCH v4 4/6] vz: support migration uri

2015-09-02 Thread Nikolay Shirokovskiy
Signed-off-by: Nikolay Shirokovskiy --- src/vz/vz_driver.c | 58 --- 1 files changed, 54 insertions(+), 4 deletions(-) diff --git a/src/vz/vz_driver.c b/src/vz/vz_driver.c index 2760e63..e8b198a 100644 --- a/src/vz/vz_driver.c +++ b/src/vz

[libvirt] [PATCH v4 6/6] vz: cleanup: define vz format of uuids

2015-09-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

[libvirt] [PATCH v4 1/6] vz: save session uuid on login

2015-09-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 |

[libvirt] [PATCH v4 0/6] vz: add migration support

2015-09-02 Thread Nikolay Shirokovskiy
NOTE that minimal command to migrate vz domain is like next: virsh -c vz:///system migrate 200 vz+ssh://shiny0/system --p2p --live --compressed --persistent --undefinesource ==Difference from v1: 1. Patch is quite different. First patchset implements migration thru managed migration scheme. T

[libvirt] [PATCH v4 5/6] vz: support misc migration options

2015-09-02 Thread Nikolay Shirokovskiy
compatibility can not be easily resolved as for 'compressed' option as this option depends on classifying of shared/non-shared for disks which is done inside vz. vz: implement misc migration options Signed-off-by: Nikolay Shirokovskiy Conflicts: src/vz/vz_driver.c --- sr

[libvirt] [PATCH v4 2/6] vz: add migration backbone code

2015-09-02 Thread Nikolay Shirokovskiy
x27;t implement it as a direct migration. The reason is that we want to leverage rich libvirt authentication abilities we lack in vz sdk. We can do it because vz sdk can use tokens to factor out authentication from migration command. Signed-off-by: Nikolay Shirokovskiy --- src/vz/vz_driver.c |

[libvirt] [PATCH v4 3/6] vz: support domain rename on migrate

2015-09-02 Thread Nikolay Shirokovskiy
From: nshirokovs...@virtuozzo.com Signed-off-by: Nikolay Shirokovskiy --- src/vz/vz_driver.c | 12 ++-- src/vz/vz_sdk.c| 16 +--- src/vz/vz_sdk.h|5 - 3 files changed, 23 insertions(+), 10 deletions(-) diff --git a/src/vz/vz_driver.c b/src/vz

Re: [libvirt] [PATCH v4 5/6] vz: support misc migration options

2015-09-04 Thread Nikolay Shirokovskiy
On 03.09.2015 20:04, Daniel P. Berrange wrote: > On Wed, Sep 02, 2015 at 03:09:26PM +0300, Nikolay Shirokovskiy wrote: >> From: nshirokovs...@virtuozzo.com >> >> Migration API has a lot of options. This patch intention is to provide >> support for those options that

Re: [libvirt] [PATCH v4 2/6] vz: add migration backbone code

2015-09-04 Thread Nikolay Shirokovskiy
On 03.09.2015 19:45, Daniel P. Berrange wrote: > On Wed, Sep 02, 2015 at 03:09:23PM +0300, Nikolay Shirokovskiy wrote: >> From: nshirokovs...@virtuozzo.com >> >> This patch makes basic vz migration possible. For example by virsh: >> >> virsh -c vz:///system m

Re: [libvirt] [PATCH v4 5/6] vz: support misc migration options

2015-09-04 Thread Nikolay Shirokovskiy
On 04.09.2015 11:44, Daniel P. Berrange wrote: > On Fri, Sep 04, 2015 at 10:42:00AM +0300, Nikolay Shirokovskiy wrote: >> >> >> On 03.09.2015 20:04, Daniel P. Berrange wrote: >>> On Wed, Sep 02, 2015 at 03:09:26PM +0300, Nikolay Shirokovskiy wrote: >>

Re: [libvirt] [PATCH v4 2/6] vz: add migration backbone code

2015-09-04 Thread Nikolay Shirokovskiy
On 04.09.2015 11:40, Daniel P. Berrange wrote: > On Fri, Sep 04, 2015 at 10:56:52AM +0300, Nikolay Shirokovskiy wrote: >>>> @@ -1396,6 +1585,9 @@ static virHypervisorDriver vzDriver = { >>>> .domainBlockStatsFlags = vzDomainBlockStatsFlags, /* 1.2.17 */ >

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

2015-09-04 Thread Nikolay Shirokovskiy
NOTE that minimal command to migrate vz domain is like next: virsh -c vz:///system migrate 200 vz+ssh://shiny0/system --p2p --live --compressed --persistent --undefinesource Difference from v4: 1. move preparation of the migration uri from src to dst as dst intended to do it. 2. change hype

[libvirt] [PATCH v5 2/5] vz: add migration backbone code

2015-09-04 Thread Nikolay Shirokovskiy
x27;t implement it as a direct migration. The reason is that we want to leverage rich libvirt authentication abilities we lack in vz sdk. We can do it because vz sdk can use tokens to factor out authentication from migration command. Signed-off-by: Nikolay Shirokovskiy --- src/vz/vz_driver.c |

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

2015-09-04 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 |

[libvirt] [PATCH v5 4/5] vz: support misc migration options

2015-09-04 Thread Nikolay Shirokovskiy
e should refuse to migrate with non-shared disks. Unfortunately this behaviour is incompatible with vz as vz doesn't demand any user awareness of disk sharedness. Signed-off-by: Nikolay Shirokovskiy --- src/vz/vz_driver.c | 100 +-- src/vz/vz_s

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

2015-09-04 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

[libvirt] [PATCH v5 3/5] vz: support domain rename on migrate

2015-09-04 Thread Nikolay Shirokovskiy
From: nshirokovs...@virtuozzo.com Signed-off-by: Nikolay Shirokovskiy --- src/vz/vz_driver.c |9 - src/vz/vz_sdk.c| 16 +--- src/vz/vz_sdk.h|5 - 3 files changed, 21 insertions(+), 9 deletions(-) diff --git a/src/vz/vz_driver.c b/src/vz/vz_driver.c

[libvirt] [PATCH] migration: support all toURI and proto combos

2015-09-08 Thread Nikolay Shirokovskiy
r toURI1. It was odd taking into account that all toURI uses common peer2peer and direct implementation. Signed-off-by: Nikolay Shirokovskiy --- src/libvirt-domain.c | 564 +- 1 files changed, 232 insertions(+), 332 deletions(-) diff --git a/src/li

Re: [libvirt] [PATCH] migration: support all toURI and proto combos

2015-09-08 Thread Nikolay Shirokovskiy
On 08.09.2015 15:14, Jiri Denemark wrote: > On Tue, Sep 08, 2015 at 13:43:09 +0300, Nikolay Shirokovskiy wrote: >> Current implementation of 'toURI' migration interfaces does not support all >> combinations of interface versions and protocol versions. For example >

Re: [libvirt] [PATCH] migration: support all toURI and proto combos

2015-09-09 Thread Nikolay Shirokovskiy
On 09.09.2015 17:13, Daniel P. Berrange wrote: > On Tue, Sep 08, 2015 at 02:14:32PM +0200, Jiri Denemark wrote: >> On Tue, Sep 08, 2015 at 13:43:09 +0300, Nikolay Shirokovskiy wrote: >>> Current implementation of 'toURI' migration interfaces does not support all &

[libvirt] [PATCH v2 0/12] migration: support all toURI and proto combos

2015-09-10 Thread Nikolay Shirokovskiy
Current implementation of 'toURI' migration interfaces does not support all combinations of interface versions and protocol versions. For example 'toURI2' with p2p flag will not migrate if driver supports only v3params proto. This is not convinient as drivers that starts to support migration have

[libvirt] [PATCH v2 12/12] migration: refactor: one return in forURI family functions

2015-09-10 Thread Nikolay Shirokovskiy
May be a matter of a taste but this version with one return point in every function looks simplier to understand and to exetend too. Anyway after such a heavy refactoring a little cleanup will not hurt. Signed-off-by: Nikolay Shirokovskiy --- src/libvirt-domain.c | 61

[libvirt] [PATCH v2 03/12] migration: move implementation check to branches in p2p

2015-09-10 Thread Nikolay Shirokovskiy
: Nikolay Shirokovskiy --- src/libvirt-domain.c | 14 -- 1 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index 07e342f..6f10c74 100644 --- a/src/libvirt-domain.c +++ b/src/libvirt-domain.c @@ -3353,23 +3353,25

[libvirt] [PATCH v2 01/12] migration: refactor: get rid of use_params p2p_full

2015-09-10 Thread Nikolay Shirokovskiy
Common uri check we factor out in different patch for clarity. Aim of this patchset is to unify logic for differet parameters representation so finally we merge this split back thru extensible parameters. Signed-off-by: Nikolay Shirokovskiy --- src/libvirt-domai

[libvirt] [PATCH v2 10/12] migration: refactor: prepare to reuse flag vs feature checks

2015-09-10 Thread Nikolay Shirokovskiy
cases. Signed-off-by: Nikolay Shirokovskiy --- src/libvirt-domain.c | 126 +++-- 1 files changed, 49 insertions(+), 77 deletions(-) diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index f7d0777..483537a 100644 --- a/src/libvirt-domain.c +++

[libvirt] [PATCH v2 08/12] migration: refactor: gather parameters compatibility checks

2015-09-10 Thread Nikolay Shirokovskiy
Checks for migration's parameter set and support by protocol are slightly scattered in code. Let's put it in one place, namely every protocol function should check it's parameter set. Signed-off-by: Nikolay Shirokovskiy --- src/libvirt-

[libvirt] [PATCH v2 06/12] migration: refactor: introduce params version of unmanaged

2015-09-10 Thread Nikolay Shirokovskiy
Let's put main functionality into params version of virDomainMigrateUnmanaged as a preparation step for merging it with virDomainMigratePeer2PeerParams. virDomainMigrateUnmanaged then does nothing more then just adapting arguments. Signed-off-by: Nikolay Shirokovskiy --- src/libvirt-dom

[libvirt] [PATCH v2 02/12] migration: refactor: reuse p2p url check

2015-09-10 Thread Nikolay Shirokovskiy
As promised in previous patch. Signed-off-by: Nikolay Shirokovskiy --- src/libvirt-domain.c | 43 +++ 1 files changed, 23 insertions(+), 20 deletions(-) diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index 1a00485..07e342f 100644 --- a/src

[libvirt] [PATCH v2 11/12] migration: reuse flags vs features checks in toURI family

2015-09-10 Thread Nikolay Shirokovskiy
Looks like it must be done that way and no one will be broken too. Signed-off-by: Nikolay Shirokovskiy --- src/libvirt-domain.c | 81 +++-- 1 files changed, 32 insertions(+), 49 deletions(-) diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c

[libvirt] [PATCH v2 09/12] migration: merge all proto branches into single function

2015-09-10 Thread Nikolay Shirokovskiy
never works thru V3_PARAMS proto. We can't change this aspect without further investigation. Signed-off-by: Nikolay Shirokovskiy --- src/libvirt-domain.c | 53 ++--- 1 files changed, 15 insertions(+), 38 deletions(-) diff --git a/src/libvirt-dom

[libvirt] [PATCH v2 07/12] migration: refactor: extract parameter adaption functions

2015-09-10 Thread Nikolay Shirokovskiy
Extract parametes adapdation and checking which is protocol dependent into designated functions. Leave only branching and common checks in virDomainMigrateUnmanagedParams. Signed-off-by: Nikolay Shirokovskiy --- src/libvirt-domain.c | 84 +- 1

[libvirt] [PATCH v2 04/12] migration: remove direct migration dependency on version1 of driver

2015-09-10 Thread Nikolay Shirokovskiy
From: Michal Privoznik Direct migration should work if *perform3 is present but *perform is not. This is situation when driver migration is implemented after new version of driver function is introduced. We should not be forced to support old version too as its parameter space is subspace of newe

[libvirt] [PATCH v2 05/12] migration: refactor: merge direct and p2p into unmanaged

2015-09-10 Thread Nikolay Shirokovskiy
in miguri and dconnuri is ignored. Signed-off-by: Nikolay Shirokovskiy --- src/libvirt-domain.c | 140 ++ 1 files changed, 39 insertions(+), 101 deletions(-) diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index 15de714..1631944 100644 ---

Re: [libvirt] [PATCH v5 2/5] vz: add migration backbone code

2015-09-11 Thread Nikolay Shirokovskiy
> As mentioned in the previous review, I really want to see VZ > provide the full set of drive callbacks required by the V3 > migration protocol, not just those you happen to need to have > today. ie add Begin, Finish & Confirm. This in turn makes it > quite easy to support non-P2P mode which is

Re: [libvirt] [PATCH v5 2/5] vz: add migration backbone code

2015-09-11 Thread Nikolay Shirokovskiy
On 11.09.2015 12:28, Daniel P. Berrange wrote: > On Fri, Sep 11, 2015 at 12:05:54PM +0300, Nikolay Shirokovskiy wrote: >> >>> As mentioned in the previous review, I really want to see VZ >>> provide the full set of drive callbacks required by the V3 >>> mi

Re: [libvirt] [PATCH v2 0/12] migration: support all toURI and proto combos

2015-09-17 Thread Nikolay Shirokovskiy
On 17.09.2015 17:39, Daniel P. Berrange wrote: > On Thu, Sep 17, 2015 at 01:11:59PM +0100, Daniel P. Berrange wrote: >> On Thu, Sep 10, 2015 at 04:20:12PM +0300, Nikolay Shirokovskiy wrote: >>> Current implementation of 'toURI' migration interfaces does not sup

Re: [libvirt] [PATCH v2 12/12] migration: refactor: one return in forURI family functions

2015-09-18 Thread Nikolay Shirokovskiy
On 17.09.2015 18:22, John Ferlan wrote: > > > On 09/10/2015 09:20 AM, Nikolay Shirokovskiy wrote: >> May be a matter of a taste but this version with one return point in every >> function looks simplier to understand and to exetend too. Anyway after such > > s/e

Re: [libvirt] [PATCH v2 01/12] migration: refactor: get rid of use_params p2p_full

2015-09-18 Thread Nikolay Shirokovskiy
es in patch 2 and perhaps patch 3... > > > On 09/10/2015 09:20 AM, Nikolay Shirokovskiy wrote: >> 'useParams' parameter usage is an example of contol coupling. Most of the >> work > > s/contol/control > >> inside the function is done differently for dif

Re: [libvirt] [PATCH v2 03/12] migration: move implementation check to branches in p2p

2015-09-18 Thread Nikolay Shirokovskiy
On 17.09.2015 01:24, John Ferlan wrote: > > > On 09/10/2015 09:20 AM, Nikolay Shirokovskiy wrote: >> This is more structured code so it will be easier to add branch for _PARAMS >> protocol here. It is not a pure refactoring strictly speaking as we remove >> scen

Re: [libvirt] [PATCH v2 05/12] migration: refactor: merge direct and p2p into unmanaged

2015-09-18 Thread Nikolay Shirokovskiy
On 17.09.2015 02:11, John Ferlan wrote: > > > On 09/10/2015 09:20 AM, Nikolay Shirokovskiy wrote: >> p2p plain and direct function are good candidates for code reuse. Their main >> function is same - to branch among different versions of migration protocol >> an

Re: [libvirt] [PATCH v2 09/12] migration: merge all proto branches into single function

2015-09-18 Thread Nikolay Shirokovskiy
On 17.09.2015 17:32, John Ferlan wrote: > > > On 09/10/2015 09:20 AM, Nikolay Shirokovskiy wrote: >> Finally on this step we get what we were aimed for - toURI{1, 2} (and >> migration{*} APIs too) now can work thru V3_PARAMS protocol. Execution path &

Re: [libvirt] [PATCH v2 11/12] migration: reuse flags vs features checks in toURI family

2015-09-18 Thread Nikolay Shirokovskiy
On 17.09.2015 18:07, John Ferlan wrote: > > > On 09/10/2015 09:20 AM, Nikolay Shirokovskiy wrote: >> Introduce a new function for the check. virDomainMigrateUnmanagedParams is >> not >> a good candidate for this functionality as it is used by migrate family >&g

Re: [libvirt] [PATCH v2 12/12] migration: refactor: one return in forURI family functions

2015-09-18 Thread Nikolay Shirokovskiy
On 17.09.2015 18:22, John Ferlan wrote: > > > On 09/10/2015 09:20 AM, Nikolay Shirokovskiy wrote: >> May be a matter of a taste but this version with one return point in every >> function looks simplier to understand and to exetend too. Anyway after such > > s/e

[libvirt] [PATCH v3 01/14] migration: refactor: get rid of use_params p2p_full

2015-09-18 Thread Nikolay Shirokovskiy
'useParams' parameter usage is an example of control coupling. Most of the work inside the function is done differently except for the uri check. Lets split this function into two, one with extensible parameters set and one with hardcoded parameter set. Signed-off-by: Nikolay Sh

[libvirt] [PATCH v3 03/14] migration: move implementation check to branches in p2p

2015-09-18 Thread Nikolay Shirokovskiy
: Nikolay Shirokovskiy --- src/libvirt-domain.c | 14 -- 1 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index 2e43062..a7d3fbd 100644 --- a/src/libvirt-domain.c +++ b/src/libvirt-domain.c @@ -3339,23 +3339,25

[libvirt] [PATCH v3 08/14] migration: refactor: extract parameter adaption functions

2015-09-18 Thread Nikolay Shirokovskiy
Extract parameter adaptation and checking which is protocol dependent into designated functions. Leave only branching and common checks in virDomainMigrateUnmanagedParams. Signed-off-by: Nikolay Shirokovskiy --- src/libvirt-domain.c | 118 ++ 1

[libvirt] [PATCH v3 04/14] migration: remove direct migration dependency on version1 of driver

2015-09-18 Thread Nikolay Shirokovskiy
From: Michal Privoznik Direct migration should work if *perform3 is present but *perform is not. This is situation when driver migration is implemented after new version of driver function is introduced. We should not be forced to support old version too as its parameter space is subspace of newe

[libvirt] [PATCH v3 06/14] migration: refactor: merge direct and p2p into unmanaged

2015-09-18 Thread Nikolay Shirokovskiy
in miguri and dconnuri is ignored. Signed-off-by: Nikolay Shirokovskiy --- src/libvirt-domain.c | 148 -- 1 files changed, 46 insertions(+), 102 deletions(-) diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index d164782..f52c3bf 100644 ---

[libvirt] [PATCH v3 11/14] migration: refactor: introduce parameter checking function

2015-09-18 Thread Nikolay Shirokovskiy
check for consistensy of flags parameter alone. So it could be refactored further and reused by all migrate functions but for now let it be a matter of a different patchset. Signed-off-by: Nikolay Shirokovskiy --- src/libvirt-domain.c | 83 +++--- 1

[libvirt] [PATCH v3 12/14] migration: reuse parameters check in toURI2 and toURI3

2015-09-18 Thread Nikolay Shirokovskiy
It is *not* a pure refactoring patch as it introduces offline check for older versions. Looks like it must be done that way and no one will be broken too. Signed-off-by: Nikolay Shirokovskiy --- src/libvirt-domain.c | 75 ++ 1 files changed, 15

[libvirt] [PATCH v3 10/14] migration: merge all proto branches into single function

2015-09-18 Thread Nikolay Shirokovskiy
never works thru V3_PARAMS proto. We can't change this aspect without further investigation. Signed-off-by: Nikolay Shirokovskiy --- src/libvirt-domain.c | 56 ++--- 1 files changed, 16 insertions(+), 40 deletions(-) diff --git a/src/libvirt-dom

[libvirt] [PATCH v3 13/14] migration: refactor: one return in forURI family functions

2015-09-18 Thread Nikolay Shirokovskiy
May be a matter of a taste but this version with one return point in every function looks simplier to understand and to extend too. Anyway after such a heavy refactoring a little cleanup will not hurt. Signed-off-by: Nikolay Shirokovskiy --- src/libvirt-domain.c | 61

[libvirt] [PATCH v3 05/14] migration: refactor: rename uri parameter to miguri

2015-09-18 Thread Nikolay Shirokovskiy
We use miguri name for this parameter in other places. So make naming more consitent. Signed-off-by: Nikolay Shirokovskiy --- src/libvirt-domain.c | 12 ++-- 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index 1c6e27b

[libvirt] [PATCH v3 02/14] migration: refactor: reuse p2p url check

2015-09-18 Thread Nikolay Shirokovskiy
Refactor dconnuri local server URI check to common API. Signed-off-by: Nikolay Shirokovskiy --- src/libvirt-domain.c | 44 1 files changed, 24 insertions(+), 20 deletions(-) diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index 697d58d

[libvirt] [PATCH v3 0/14] migration: support all toURI and proto combos

2015-09-18 Thread Nikolay Shirokovskiy
Current implementation of 'toURI' migration interfaces does not support all combinations of interface versions and protocol versions. For example 'toURI2' with p2p flag will not migrate if driver supports only v3params proto. This is not convinient as drivers that starts to support migration have

[libvirt] [PATCH v3 07/14] migration: refactor: introduce params version of unmanaged

2015-09-18 Thread Nikolay Shirokovskiy
Let's put main functionality into params version of virDomainMigrateUnmanaged as a preparation step for merging it with virDomainMigratePeer2PeerParams. virDomainMigrateUnmanaged then does nothing more then just adapting arguments. Signed-off-by: Nikolay Shirokovskiy --- src/libvirt-dom

[libvirt] [PATCH v3 14/14] migration: check dconnuri in p2p mode

2015-09-18 Thread Nikolay Shirokovskiy
Check dconnuri is not null or we will catch nullpointer later. I hope this makes Coverity happy. Signed-off-by: Nikolay Shirokovskiy --- src/libvirt-domain.c |8 ++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index f012f4b

[libvirt] [PATCH v3 09/14] migration: refactor: refactor parameter compatibility checks

2015-09-18 Thread Nikolay Shirokovskiy
Move virDomainMigrateUnmanagedProto* expected params list check into function itself and use common virTypedParamsCheck for this purpose. Signed-off-by: Nikolay Shirokovskiy --- src/libvirt-domain.c | 56 - 1 files changed, 23 insertions(+), 33

Re: [libvirt] [PATCH v3 02/14] migration: refactor: reuse p2p url check

2015-09-30 Thread Nikolay Shirokovskiy
On 25.09.2015 17:12, Jiri Denemark wrote: > On Fri, Sep 18, 2015 at 18:05:40 +0300, Nikolay Shirokovskiy wrote: >> Refactor dconnuri local server URI check to common API. >> >> Signed-off-by: Nikolay Shirokovskiy >> --- >

Re: [libvirt] [PATCH v3 09/14] migration: refactor: refactor parameter compatibility checks

2015-10-01 Thread Nikolay Shirokovskiy
On 30.09.2015 16:38, Jiri Denemark wrote: > On Fri, Sep 18, 2015 at 18:05:47 +0300, Nikolay Shirokovskiy wrote: >> Move virDomainMigrateUnmanagedProto* expected params list check into >> function itself and use common virTypedParamsCheck for this purpose. >> >

Re: [libvirt] [PATCH v3 10/14] migration: merge all proto branches into single function

2015-10-01 Thread Nikolay Shirokovskiy
On 30.09.2015 16:38, Jiri Denemark wrote: > On Fri, Sep 18, 2015 at 18:05:48 +0300, Nikolay Shirokovskiy wrote: >> Finally on this step we get what we were aimed for - toURI{1, 2} (and >> migration{*} APIs too) now can work thru V3_PARAMS protocol. Execution path >>

Re: [libvirt] [PATCH v3 09/14] migration: refactor: refactor parameter compatibility checks

2015-10-01 Thread Nikolay Shirokovskiy
On 01.10.2015 12:30, Jiri Denemark wrote: > On Thu, Oct 01, 2015 at 10:34:49 +0300, Nikolay Shirokovskiy wrote: >> >> >> On 30.09.2015 16:38, Jiri Denemark wrote: >>> On Fri, Sep 18, 2015 at 18:05:47 +0300, Nikolay Shirokovskiy wrote: >>>> Move virDo

[libvirt] [PATCH v4 0/12] migration: support all toURI and proto combos

2015-10-02 Thread Nikolay Shirokovskiy
Current implementation of 'toURI' migration interfaces does not support all combinations of interface versions and protocol versions. For example 'toURI2' with p2p flag will not migrate if driver supports only v3params proto. This is not convinient as drivers that starts to support migration have

[libvirt] [PATCH 02/12] migration: refactor: reuse p2p url check

2015-10-02 Thread Nikolay Shirokovskiy
Refactor dconnuri local server URI check to common API. Signed-off-by: Nikolay Shirokovskiy --- src/libvirt-domain.c | 44 1 files changed, 24 insertions(+), 20 deletions(-) diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index 697d58d

[libvirt] [PATCH 05/12] migration: refactor: rename uri parameter to miguri

2015-10-02 Thread Nikolay Shirokovskiy
We use miguri name for this parameter in other places. So make naming more consitent. Signed-off-by: Nikolay Shirokovskiy --- src/libvirt-domain.c | 12 ++-- 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index 1c6e27b

[libvirt] [PATCH 01/12] migration: refactor: get rid of use_params p2p_full

2015-10-02 Thread Nikolay Shirokovskiy
'useParams' parameter usage is an example of control coupling. Most of the work inside the function is done differently except for the uri check. Lets split this function into two, one with extensible parameters set and one with hardcoded parameter set. Signed-off-by: Nikolay Sh

[libvirt] [PATCH 03/12] migration: move implementation check to branches in p2p

2015-10-02 Thread Nikolay Shirokovskiy
: Nikolay Shirokovskiy --- src/libvirt-domain.c | 14 -- 1 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index 2e43062..a7d3fbd 100644 --- a/src/libvirt-domain.c +++ b/src/libvirt-domain.c @@ -3339,23 +3339,25

[libvirt] [PATCH 10/12] migration: merge all proto branches into single function

2015-10-02 Thread Nikolay Shirokovskiy
never works thru V3_PARAMS proto. We can't change this aspect without further investigation. Signed-off-by: Nikolay Shirokovskiy --- src/libvirt-domain.c | 56 ++--- 1 files changed, 16 insertions(+), 40 deletions(-) diff --git a/src/libvirt-dom

[libvirt] [PATCH 07/12] migration: refactor: introduce params version of unmanaged

2015-10-02 Thread Nikolay Shirokovskiy
Let's put main functionality into params version of virDomainMigrateUnmanaged as a preparation step for merging it with virDomainMigratePeer2PeerParams. virDomainMigrateUnmanaged then does nothing more then just adapting arguments. Signed-off-by: Nikolay Shirokovskiy --- src/libvirt-dom

[libvirt] [PATCH 09/12] migration: refactor: refactor parameter compatibility checks

2015-10-02 Thread Nikolay Shirokovskiy
Move virDomainMigrateUnmanagedProto* expected params list check into function itself and use common virTypedParamsCheck for this purpose. Signed-off-by: Nikolay Shirokovskiy --- src/libvirt-domain.c | 58 + 1 files changed, 25 insertions(+), 33

[libvirt] [PATCH 04/12] migration: remove direct migration dependency on version1 of driver

2015-10-02 Thread Nikolay Shirokovskiy
From: Michal Privoznik Direct migration should work if *perform3 is present but *perform is not. This is situation when driver migration is implemented after new version of driver function is introduced. We should not be forced to support old version too as its parameter space is subspace of newe

[libvirt] [PATCH 11/12] migration: refactor: introduce parameter checking function

2015-10-02 Thread Nikolay Shirokovskiy
nd no one will be broken too. Signed-off-by: Nikolay Shirokovskiy --- src/libvirt-domain.c | 165 - 1 files changed, 67 insertions(+), 98 deletions(-) diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index 2778a15..35dfa3f 100644 ---

[libvirt] [PATCH 06/12] migration: refactor: merge direct and p2p into unmanaged

2015-10-02 Thread Nikolay Shirokovskiy
in miguri and dconnuri is ignored. Signed-off-by: Nikolay Shirokovskiy --- src/libvirt-domain.c | 148 -- 1 files changed, 46 insertions(+), 102 deletions(-) diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index d164782..36db29c 100644 ---

[libvirt] [PATCH 08/12] migration: refactor: extract parameter adaption functions

2015-10-02 Thread Nikolay Shirokovskiy
Extract parameter adaptation and checking which is protocol dependent into designated functions. Leave only branching and common checks in virDomainMigrateUnmanagedParams. Signed-off-by: Nikolay Shirokovskiy --- src/libvirt-domain.c | 118 ++ 1

[libvirt] [PATCH 12/12] migration: check dconnuri in p2p mode

2015-10-02 Thread Nikolay Shirokovskiy
Check dconnuri is not null or we will catch nullpointer later. I hope this makes Coverity happy. Signed-off-by: Nikolay Shirokovskiy --- src/libvirt-domain.c |8 ++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index 35dfa3f

  1   2   3   4   5   6   7   8   9   10   >