mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-25 22:15:20 +00:00
Clarify semantics of virDomainMigrate{,ToURI}2
Commit 5d784bd6d7b19314b0908aec6b46bfe377aeba42 was a nice attempt to clarify the semantics by requiring domain name from dxml to either match original name or dname. However, setting dxml domain name to dname doesn't really work since destination host needs to know the original domain name to be able to use it in migration cookies. This patch requires domain name in dxml to match the original domain name. The change should be safe and backward compatible since migration would fail just a bit later in the process.
This commit is contained in:
parent
a5f8a01abb
commit
5e31e71365
@ -5188,8 +5188,8 @@ error:
|
|||||||
* if @dxml would cause any guest-visible changes. Pass NULL
|
* if @dxml would cause any guest-visible changes. Pass NULL
|
||||||
* if no changes are needed to the XML between source and destination.
|
* if no changes are needed to the XML between source and destination.
|
||||||
* @dxml cannot be used to rename the domain during migration (use
|
* @dxml cannot be used to rename the domain during migration (use
|
||||||
* @dname for that purpose). Domain name in @dxml must either match the
|
* @dname for that purpose). Domain name in @dxml must match the
|
||||||
* original domain name or @dname if it was specified.
|
* original domain name.
|
||||||
*
|
*
|
||||||
* Returns the new domain object if the migration was successful,
|
* Returns the new domain object if the migration was successful,
|
||||||
* or NULL in case of error. Note that the new domain object
|
* or NULL in case of error. Note that the new domain object
|
||||||
|
@ -1046,11 +1046,9 @@ char *qemuMigrationBegin(struct qemud_driver *driver,
|
|||||||
VIR_DOMAIN_XML_INACTIVE)))
|
VIR_DOMAIN_XML_INACTIVE)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (STRNEQ(def->name, vm->def->name) &&
|
if (STRNEQ(def->name, vm->def->name)) {
|
||||||
STRNEQ_NULLABLE(def->name, dname)) {
|
|
||||||
qemuReportError(VIR_ERR_INVALID_ARG, "%s",
|
qemuReportError(VIR_ERR_INVALID_ARG, "%s",
|
||||||
_("target domain name doesn't match source name"
|
_("target domain name doesn't match source name"));
|
||||||
" nor destination name"));
|
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user