Skip to content

Commit

Permalink
sled-agent-sim and docs need update for IPv6 requirement (#919)
Browse files Browse the repository at this point in the history
  • Loading branch information
davepacheco authored Apr 14, 2022
1 parent 2ebef75 commit dc7c229
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
4 changes: 1 addition & 3 deletions docs/how-to-run-simulated.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
7 changes: 4 additions & 3 deletions sled-agent/src/bin/sled-agent-sim.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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,
Expand All @@ -67,15 +68,15 @@ 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()
},
log: ConfigLogging::StderrTerminal { level: ConfigLoggingLevel::Info },
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(),
},
};

Expand Down

0 comments on commit dc7c229

Please sign in to comment.