[libvirt] [PATCH] vz: fixed migration in p2p mode

dom xml generated on begin step should be passed to perform step in VIR_MIGRATE_PARAM_DEST_XML parameter. Otherwise 'XML error: failed to parse xml document' is raised on destination host as dom xml is NULL. Signed-off-by: Pavel Glushchak <pglushchak@virtuozzo.com> --- src/vz/vz_driver.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/vz/vz_driver.c b/src/vz/vz_driver.c index b7c37bb..b2c3e31 100644 --- a/src/vz/vz_driver.c +++ b/src/vz/vz_driver.c @@ -3199,6 +3199,7 @@ vzDomainMigratePerformP2P(virDomainObjPtr dom, virConnectPtr dconn = NULL; virTypedParameterPtr params = NULL; int ret = -1; + int maxparams = nparams; if (virTypedParamsCopy(¶ms, orig_params, nparams) < 0) return -1; @@ -3210,6 +3211,10 @@ vzDomainMigratePerformP2P(virDomainObjPtr dom, &cookieout, &cookieoutlen))) goto done; + if (virTypedParamsAddString(¶ms, &nparams, &maxparams, + VIR_MIGRATE_PARAM_DEST_XML, dom_xml) < 0) + goto done; + cookiein = cookieout; cookieinlen = cookieoutlen; cookieout = NULL; -- 1.8.3.1

14-Nov-16 18:20, Pavel Glushchak пишет:
dom xml generated on begin step should be passed to perform step in VIR_MIGRATE_PARAM_DEST_XML parameter. Otherwise 'XML error: failed to parse xml document' is raised on destination host as dom xml is NULL.
Signed-off-by: Pavel Glushchak <pglushchak@virtuozzo.com> --- src/vz/vz_driver.c | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/src/vz/vz_driver.c b/src/vz/vz_driver.c index b7c37bb..b2c3e31 100644 --- a/src/vz/vz_driver.c +++ b/src/vz/vz_driver.c @@ -3199,6 +3199,7 @@ vzDomainMigratePerformP2P(virDomainObjPtr dom, virConnectPtr dconn = NULL; virTypedParameterPtr params = NULL; int ret = -1; + int maxparams = nparams;
if (virTypedParamsCopy(¶ms, orig_params, nparams) < 0) return -1; @@ -3210,6 +3211,10 @@ vzDomainMigratePerformP2P(virDomainObjPtr dom, &cookieout, &cookieoutlen))) goto done;
+ if (virTypedParamsAddString(¶ms, &nparams, &maxparams, + VIR_MIGRATE_PARAM_DEST_XML, dom_xml) < 0) + goto done; + cookiein = cookieout; cookieinlen = cookieoutlen; cookieout = NULL;
ACKed and pushed. Thanks, Maxim

On Mon, 2016-11-14 at 18:20 +0300, Pavel Glushchak wrote:
dom xml generated on begin step should be passed to perform step in VIR_MIGRATE_PARAM_DEST_XML parameter. Otherwise 'XML error: failed to parse xml document' is raised on destination host as dom xml is NULL. Signed-off-by: Pavel Glushchak <pglushchak@virtuozzo.com> --- src/vz/vz_driver.c | 5 +++++ 1 file changed, 5 insertions(+)
Do you feel like this should be mentioned in the NEWS file? If so, would you mind proposing a suitable (short, high-level) description of the change? Thanks! -- Andrea Bolognani / Red Hat / Virtualization

On 18.11.2016 19:28, Andrea Bolognani wrote:
On Mon, 2016-11-14 at 18:20 +0300, Pavel Glushchak wrote:
dom xml generated on begin step should be passed to perform step in VIR_MIGRATE_PARAM_DEST_XML parameter. Otherwise 'XML error: failed to parse xml document' is raised on destination host as dom xml is NULL.
Signed-off-by: Pavel Glushchak <pglushchak@virtuozzo.com> --- src/vz/vz_driver.c | 5 +++++ 1 file changed, 5 insertions(+)
Do you feel like this should be mentioned in the NEWS file?
If so, would you mind proposing a suitable (short, high-level) description of the change?
Ok, let's add: vz: fixed problem when migration cannot be performed in P2P mode Are you going to add this in the NEWS file yourself?
Thanks!
-- Andrea Bolognani / Red Hat / Virtualization

On Mon, 2016-11-21 at 16:16 +0300, Pavel Glushchak wrote:
On 18.11.2016 19:28, Andrea Bolognani wrote:
On Mon, 2016-11-14 at 18:20 +0300, Pavel Glushchak wrote:
dom xml generated on begin step should be passed to perform step in VIR_MIGRATE_PARAM_DEST_XML parameter. Otherwise 'XML error: failed to parse xml document' is raised on destination host as dom xml is NULL. Signed-off-by: Pavel Glushchak <pglushchak@virtuozzo.com> --- src/vz/vz_driver.c | 5 +++++ 1 file changed, 5 insertions(+) Do you feel like this should be mentioned in the NEWS file? If so, would you mind proposing a suitable (short, high-level) description of the change? Ok, let's add: vz: fixed problem when migration cannot be performed in P2P mode Are you going to add this in the NEWS file yourself?
Thanks for responding. A slight variation of that has now been pushed :) -- Andrea Bolognani / Red Hat / Virtualization
participants (3)
-
Andrea Bolognani
-
Maxim Nestratov
-
Pavel Glushchak