Skip to content

Commit

Permalink
[sled agent] fail requests for non-NTP zones if time is not synchroni…
Browse files Browse the repository at this point in the history
…zed (#4778)

Fixes #4776
  • Loading branch information
smklein authored Jan 10, 2024
1 parent 9eba46d commit 42c0c8a
Show file tree
Hide file tree
Showing 3 changed files with 200 additions and 28 deletions.
9 changes: 8 additions & 1 deletion sled-agent/src/bootstrap/pre_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ use crate::long_running_tasks::{
spawn_all_longrunning_tasks, LongRunningTaskHandles,
};
use crate::services::ServiceManager;
use crate::services::TimeSyncConfig;
use crate::sled_agent::SledAgent;
use crate::storage_monitor::UnderlayAccess;
use camino::Utf8PathBuf;
Expand Down Expand Up @@ -127,12 +128,18 @@ impl BootstrapAgentStartup {
let global_zone_bootstrap_ip =
startup_networking.global_zone_bootstrap_ip;

let time_sync = if let Some(true) = config.skip_timesync {
TimeSyncConfig::Skip
} else {
TimeSyncConfig::Normal
};

let service_manager = ServiceManager::new(
&base_log,
ddm_admin_localhost_client.clone(),
startup_networking,
sled_mode,
config.skip_timesync,
time_sync,
config.sidecar_revision.clone(),
config.switch_zone_maghemite_links.clone(),
long_running_task_handles.storage_manager.clone(),
Expand Down
Loading

0 comments on commit 42c0c8a

Please sign in to comment.