Skip to content

Commit

Permalink
you have to actually update the timestamps
Browse files Browse the repository at this point in the history
  • Loading branch information
hawkw committed Jun 24, 2024
1 parent 2f91464 commit f66236d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions nexus/src/app/sagas/instance_update/destroyed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
};

Expand Down
2 changes: 2 additions & 0 deletions nexus/src/app/sagas/instance_update/migration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit f66236d

Please sign in to comment.