-
Notifications
You must be signed in to change notification settings - Fork 68
Closed
Labels
Sled AgentRelated to the Per-Sled Configuration and ManagementRelated to the Per-Sled Configuration and Management
Milestone
Description
The omicron-dev tool runs an in-process simulated sled agent that shares a configuration with the integration tests' configuration:
omicron/nexus/test-utils/src/lib.rs
Lines 220 to 249 in 5d39727
| pub async fn start_sled_agent( | |
| log: Logger, | |
| nexus_address: SocketAddr, | |
| id: Uuid, | |
| update_directory: &Path, | |
| ) -> Result<sim::Server, String> { | |
| let config = sim::Config { | |
| id, | |
| sim_mode: sim::SimMode::Explicit, | |
| nexus_address, | |
| dropshot: ConfigDropshot { | |
| bind_address: SocketAddr::new(Ipv6Addr::LOCALHOST.into(), 0), | |
| request_body_max_bytes: 1024 * 1024, | |
| ..Default::default() | |
| }, | |
| // TODO-cleanup this is unused | |
| log: ConfigLogging::StderrTerminal { level: ConfigLoggingLevel::Debug }, | |
| storage: sim::ConfigStorage { | |
| zpools: vec![], | |
| ip: IpAddr::from(Ipv6Addr::LOCALHOST), | |
| }, | |
| updates: sim::ConfigUpdates { | |
| zone_artifact_path: update_directory.to_path_buf(), | |
| }, | |
| }; | |
| let (server, _rack_init_request) = | |
| sim::Server::start(&config, &log).await?; | |
| Ok(server) | |
| } |
This configuration specifies that the simulation should run in Explicit mode. In this mode, simulated objects like instances need to be poked explicitly (by calling the right simulated agent endpoint) to transition between states. For local development purposes, where there's a user playing around with the simulation instead of a test that's poking objects to generate state transitions, it would be nice if the simulation ran in Auto mode to match sled-agent-sim's default behavior.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Sled AgentRelated to the Per-Sled Configuration and ManagementRelated to the Per-Sled Configuration and Management