提交 6c6fbac7 编写于 作者: J Jim Fehlig

Fix migration in xend driver

Upstream xen has changed parameters to the migration operation
several times over the past 18 months.  Changeset 17553 removed
the resouce parameter,  Changesets 17709, 17753, and 20326 added
ssl, node, and change_home_server parameters respectively.

Fortunately, testing has revealed that xend will fail the
operation if a parameter is missing but happily honor it if
unknown parameters are provided.  Thus all currently supported
parameters can be provided, satisfying current xend but not
regressing older versions.
上级 515378b3
......@@ -4553,15 +4553,21 @@ xenDaemonDomainMigratePerform (virDomainPtr domain,
DEBUG("hostname = %s, port = %s", hostname, port);
/* Make the call. */
/* Make the call.
* NB: xend will fail the operation if any parameters are
* missing but happily accept unknown parameters. This works
* to our advantage since all parameters supported and required
* by current xend can be included without breaking older xend.
*/
ret = xend_op (domain->conn, domain->name,
"op", "migrate",
"destination", hostname,
"live", live,
"port", port,
"node", "-1",
"ssl", "0",
"resource", "0", /* required, xend ignores it */
"node", "-1", /* xen-unstable c/s 17753 */
"ssl", "0", /* xen-unstable c/s 17709 */
"change_home_server", "0", /* xen-unstable c/s 20326 */
"resource", "0", /* removed by xen-unstable c/s 17553 */
NULL);
VIR_FREE (hostname);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册