]> git.ipfire.org Git - thirdparty/libvirt.git/commit
vz: fix destination domain synchronization
authorNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
Wed, 8 Jun 2016 07:17:22 +0000 (10:17 +0300)
committerMaxim Nestratov <mnestratov@virtuozzo.com>
Mon, 18 Jul 2016 19:21:40 +0000 (22:21 +0300)
commiteb2fe4eb4a4edd8679f657ec3f7f9b1325ad1012
tree6072b6f41aaada030bd5d6c55a0d0b7dbbcd24ee
parente126352e932f9f014b250901415ca140d872f53c
vz: fix destination domain synchronization

Adding domain to domain list on preparation step is not correct.
First domain is not fully constructed - domain definition is
missing. Second we can't use VIR_MIGRATE_PARAM_DEST_XML parameter
to parse definition as vz sdk can patch it by itself. Let's add/remove
domain on finish step. This is for synchronization purpose only so domain
is present/absent on destination after migration completion. Actually
domain object will probably be created right after actual vz sdk
migration start by vz sdk domain defined event.

We can not and should not sync domain cache on error path in finish step
of migration. We can not as we really don't know what is the reason of
cancelling and we should not as user should not make assumptions on
state on error path. What we should do is cleaning up temporary migration
state that is induced on prepare step but we don't have one. Thus
cancellation should be noop.

Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
Signed-off-by: Maxim Nestratov <mnestratov@virtuozzo.com>
src/vz/vz_driver.c
src/vz/vz_sdk.c
src/vz/vz_sdk.h