]> xenbits.xensource.com Git - libvirt.git/commitdiff
libxl: Advertise support for VIR_MIGRATE_CHANGE_PROTECTION
authorJim Fehlig <jfehlig@suse.com>
Wed, 12 Jul 2023 21:15:08 +0000 (15:15 -0600)
committerJim Fehlig <jfehlig@suse.com>
Thu, 13 Jul 2023 14:28:50 +0000 (08:28 -0600)
The libxl driver has basic support for VIR_MIGRATE_CHANGE_PROTECTION
by starting and stopping modify jobs in the begin/confirm and prepare/finish
phases of migration, but it doesn't advertise that support. This can result
in unterminated jobs because the migration logic skips phases of migration
when the VIR_MIGRATE_CHANGE_PROTECTION feature is absent. Ensure jobs are
terminated properly by advertising support for VIR_MIGRATE_CHANGE_PROTECTION.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
src/libxl/libxl_driver.c
src/libxl/libxl_migration.h

index d99bc37bf6ac378af37a4de992d4a2b186cc0d48..2644d1400aa370e918915c47f755a7a43807742f 100644 (file)
@@ -5846,8 +5846,8 @@ libxlConnectSupportsFeature(virConnectPtr conn, int feature)
     case VIR_DRV_FEATURE_MIGRATION_V3:
     case VIR_DRV_FEATURE_MIGRATION_PARAMS:
     case VIR_DRV_FEATURE_MIGRATION_P2P:
-        return 1;
     case VIR_DRV_FEATURE_MIGRATE_CHANGE_PROTECTION:
+        return 1;
     case VIR_DRV_FEATURE_MIGRATION_DIRECT:
     case VIR_DRV_FEATURE_MIGRATION_OFFLINE:
     case VIR_DRV_FEATURE_MIGRATION_V1:
index 078510c672cbf913098ac4a5a29a86c352b76d86..19b68d08b77410071e059befb394cc053e78a4b5 100644 (file)
@@ -28,7 +28,8 @@
      VIR_MIGRATE_TUNNELLED | \
      VIR_MIGRATE_PERSIST_DEST | \
      VIR_MIGRATE_UNDEFINE_SOURCE | \
-     VIR_MIGRATE_PAUSED)
+     VIR_MIGRATE_PAUSED | \
+     VIR_MIGRATE_CHANGE_PROTECTION)
 
 /* All supported migration parameters and their types. */
 #define LIBXL_MIGRATION_PARAMETERS \