diff --git a/docs/how-to-run-simulated.adoc b/docs/how-to-run-simulated.adoc index 039cc0d662..5b21e9df09 100644 --- a/docs/how-to-run-simulated.adoc +++ b/docs/how-to-run-simulated.adoc @@ -122,9 +122,7 @@ Nexus can also serve the web console. Instructions for generating the static ass + [source,text] ---- -$ cargo run --bin=sled-agent-sim -- $(uuidgen) 127.0.0.1:12345 127.0.0.1:12221 -... -Jun 02 12:21:50.989 INFO listening, local_addr: 127.0.0.1:12345, component: dropshot +$ cargo run --bin=sled-agent-sim -- $(uuidgen) [::1]:12345 127.0.0.1:12221 ---- . `oximeter` is similar to `nexus`, requiring a configuration file. You can use `oximeter/collector/config.toml`, and the whole thing can be run with: diff --git a/sled-agent/src/bin/sled-agent-sim.rs b/sled-agent/src/bin/sled-agent-sim.rs index 61adec0ce5..4aa2553301 100644 --- a/sled-agent/src/bin/sled-agent-sim.rs +++ b/sled-agent/src/bin/sled-agent-sim.rs @@ -15,6 +15,7 @@ use omicron_sled_agent::sim::{ run_server, Config, ConfigStorage, ConfigZpool, SimMode, }; use std::net::SocketAddr; +use std::net::SocketAddrV6; use structopt::StructOpt; use uuid::Uuid; @@ -44,7 +45,7 @@ struct Args { uuid: Uuid, #[structopt(name = "SA_IP:PORT", parse(try_from_str))] - sled_agent_addr: SocketAddr, + sled_agent_addr: SocketAddrV6, #[structopt(name = "NEXUS_IP:PORT", parse(try_from_str))] nexus_addr: SocketAddr, @@ -67,7 +68,7 @@ async fn do_run() -> Result<(), CmdError> { sim_mode: args.sim_mode, nexus_address: args.nexus_addr, dropshot: ConfigDropshot { - bind_address: args.sled_agent_addr, + bind_address: args.sled_agent_addr.into(), request_body_max_bytes: 1024 * 1024, ..Default::default() }, @@ -75,7 +76,7 @@ async fn do_run() -> Result<(), CmdError> { storage: ConfigStorage { // Create 10 "virtual" U.2s, with 1 TB of storage. zpools: vec![ConfigZpool { size: 1 << 40 }; 10], - ip: args.sled_agent_addr.ip(), + ip: (*args.sled_agent_addr.ip()).into(), }, };