diff --git a/nexus/db-queries/src/db/queries/instance.rs b/nexus/db-queries/src/db/queries/instance.rs index c8bb6a7e091..fcaa83cc325 100644 --- a/nexus/db-queries/src/db/queries/instance.rs +++ b/nexus/db-queries/src/db/queries/instance.rs @@ -109,14 +109,10 @@ pub struct InstanceAndVmmUpdateResult { /// indicates whether the row was updated. `None` if the VMM was not found. pub vmm_status: Option, - /// `Some(status)` if the inbound migration was found; the wrapped `UpdateStatus` - /// indicates whether the row was updated. `None` if the inbound migration - /// was not found, or no migration update was performed. + /// Indicates whether a migration-in update was performed. pub migration_in_status: RecordUpdateStatus, - /// `Some(status)` if the outbound migration was found; the wrapped `UpdateStatus` - /// indicates whether the row was updated. `None` if the inbound migration - /// was not found, or no migration update was performed. + /// Indicates whether a migration-out update was performed. pub migration_out_status: RecordUpdateStatus, } diff --git a/nexus/src/app/sagas/snapshot_create.rs b/nexus/src/app/sagas/snapshot_create.rs index 8061c4c81d4..2510a6f4148 100644 --- a/nexus/src/app/sagas/snapshot_create.rs +++ b/nexus/src/app/sagas/snapshot_create.rs @@ -2210,7 +2210,7 @@ mod test { &Duration::from_secs(5), &Duration::from_secs(300), ) - .await.expect("instance did not advance to NoVmm after 400 seconds"); + .await.expect("instance did not advance to NoVmm after 300 seconds"); test_helpers::instance_delete_by_name( cptestctx, INSTANCE_NAME, diff --git a/nexus/tests/integration_tests/instances.rs b/nexus/tests/integration_tests/instances.rs index c46bafa5088..633d19b5dd8 100644 --- a/nexus/tests/integration_tests/instances.rs +++ b/nexus/tests/integration_tests/instances.rs @@ -838,11 +838,6 @@ async fn test_instance_migrate(cptestctx: &ControlPlaneTestContext) { assert_eq!(migration.target_state, MigrationState::Pending.into()); assert_eq!(migration.source_state, MigrationState::Pending.into()); - // Explicitly simulate the migration action on the target. Simulated - // migrations always succeed. The state transition on the target is - // sufficient to move the instance back into a Running state (strictly - // speaking no further updates from the source are required if the target - // successfully takes over). instance_simulate_migration_source( cptestctx, nexus, @@ -851,6 +846,10 @@ async fn test_instance_migrate(cptestctx: &ControlPlaneTestContext) { migration_id, ) .await; + // TODO(eliza): it would be nice to single-step both simulated sled agents + // through each migration phase and assert that we see all the intermediate + // states, instead of just letting them run straight to completion... + // Ensure that both sled agents report that the migration has completed. instance_simulate_on_sled(cptestctx, nexus, original_sled, instance_id) .await;