mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-10 14:57:42 +00:00
migration: remove direct migration dependency on version1 of driver
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 newer one.
This commit is contained in:
parent
341216a0af
commit
cba522caf7
@ -3425,16 +3425,15 @@ virDomainMigrateDirect(virDomainPtr domain,
|
|||||||
NULLSTR(xmlin), flags, NULLSTR(dname), NULLSTR(uri),
|
NULLSTR(xmlin), flags, NULLSTR(dname), NULLSTR(uri),
|
||||||
bandwidth);
|
bandwidth);
|
||||||
|
|
||||||
if (!domain->conn->driver->domainMigratePerform) {
|
|
||||||
virReportUnsupportedError();
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Perform the migration. The driver isn't supposed to return
|
/* Perform the migration. The driver isn't supposed to return
|
||||||
* until the migration is complete.
|
* until the migration is complete.
|
||||||
*/
|
*/
|
||||||
if (VIR_DRV_SUPPORTS_FEATURE(domain->conn->driver, domain->conn,
|
if (VIR_DRV_SUPPORTS_FEATURE(domain->conn->driver, domain->conn,
|
||||||
VIR_DRV_FEATURE_MIGRATION_V3)) {
|
VIR_DRV_FEATURE_MIGRATION_V3)) {
|
||||||
|
if (!domain->conn->driver->domainMigratePerform3) {
|
||||||
|
virReportUnsupportedError();
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
VIR_DEBUG("Using migration protocol 3");
|
VIR_DEBUG("Using migration protocol 3");
|
||||||
/* dconn URI not relevant in direct migration, since no
|
/* dconn URI not relevant in direct migration, since no
|
||||||
* target libvirtd is involved */
|
* target libvirtd is involved */
|
||||||
@ -3450,6 +3449,10 @@ virDomainMigrateDirect(virDomainPtr domain,
|
|||||||
dname,
|
dname,
|
||||||
bandwidth);
|
bandwidth);
|
||||||
} else {
|
} else {
|
||||||
|
if (!domain->conn->driver->domainMigratePerform) {
|
||||||
|
virReportUnsupportedError();
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
VIR_DEBUG("Using migration protocol 2");
|
VIR_DEBUG("Using migration protocol 2");
|
||||||
if (xmlin) {
|
if (xmlin) {
|
||||||
virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, "%s",
|
virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, "%s",
|
||||||
|
Loading…
Reference in New Issue
Block a user