diff --git a/nexus/src/app/sagas/instance_update/destroyed.rs b/nexus/src/app/sagas/instance_update/destroyed.rs index 263acf26ded..eaf45f1dba0 100644 --- a/nexus/src/app/sagas/instance_update/destroyed.rs +++ b/nexus/src/app/sagas/instance_update/destroyed.rs @@ -7,6 +7,7 @@ use super::NexusActionContext; use super::NexusSaga; use crate::app::sagas::declare_saga_actions; use crate::app::sagas::ActionError; +use chrono::Utc; use nexus_db_model::Generation; use nexus_db_model::Instance; use nexus_db_model::InstanceRuntimeState; @@ -256,6 +257,7 @@ async fn siud_update_instance( propolis_id: None, nexus_state: InstanceState::NoVmm, gen: Generation(instance.runtime_state.gen.0.next()), + time_updated: Utc::now(), ..instance.runtime_state }; diff --git a/nexus/src/app/sagas/instance_update/migration.rs b/nexus/src/app/sagas/instance_update/migration.rs index bae8ce7590f..c382fbf30b7 100644 --- a/nexus/src/app/sagas/instance_update/migration.rs +++ b/nexus/src/app/sagas/instance_update/migration.rs @@ -8,6 +8,7 @@ use crate::app::db::model::Instance; use crate::app::db::model::Migration; use crate::app::db::model::MigrationState; use crate::app::sagas::declare_saga_actions; +use chrono::Utc; use nexus_db_queries::db::lookup::LookupPath; use nexus_db_queries::{authn, authz}; use omicron_common::api::external::Error; @@ -85,6 +86,7 @@ async fn sium_update_instance_record( let mut new_runtime = instance.runtime().clone(); new_runtime.gen = Generation(new_runtime.gen.next()); + new_runtime.time_updated = Utc::now(); // Determine how to update the instance record to reflect the current // migration state.