Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 69 additions & 17 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@ members = [
anyhow = "1.0.102"
# The omicron commit voxel is pinned to. Bumping this rev is the new-omicron
# motion; build.rs surfaces it to voxel image create. Keep both revs identical.
rack-init-config = { git = "https://github.com/oxidecomputer/omicron", rev = "2e55f4ddac2fe51fc37e9a70e0619a013509750f" }
wicketd-commission-types-versions = { git = "https://github.com/oxidecomputer/omicron", rev = "2e55f4ddac2fe51fc37e9a70e0619a013509750f" }
wicketd-commission-client = { git = "https://github.com/oxidecomputer/omicron", rev = "2e55f4ddac2fe51fc37e9a70e0619a013509750f" }
rack-init-config = { git = "https://github.com/oxidecomputer/omicron", rev = "c6b42fc64ad6b4ed2c14f2932b97b7b8234f9e78" }
wicketd-commission-types-versions = { git = "https://github.com/oxidecomputer/omicron", rev = "c6b42fc64ad6b4ed2c14f2932b97b7b8234f9e78" }
wicketd-commission-client = { git = "https://github.com/oxidecomputer/omicron", rev = "c6b42fc64ad6b4ed2c14f2932b97b7b8234f9e78" }
# Unnumbered BGP peer type rack-init-config does not re-export yet.
sled-agent-types = { git = "https://github.com/oxidecomputer/omicron", rev = "c6b42fc64ad6b4ed2c14f2932b97b7b8234f9e78" }
clap = { version = "4.6.1", features = ["derive", "env"] }
expectorate = "1.2.0"
# Our crates use only #[tokio::main] + tokio::time; libfalcon pulls its own
Expand Down
1 change: 1 addition & 0 deletions voxel/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ voxel-config = { path = "../voxel-config" }
rack-init-config.workspace = true
wicketd-commission-types-versions.workspace = true
wicketd-commission-client.workspace = true
sled-agent-types.workspace = true
# Reshape the generated config-rss.toml into wicketd's RSS config JSON for
# `launch --wicket-setup` (drive setup through wicketd).
toml = "0.9"
Expand Down
3 changes: 2 additions & 1 deletion voxel/src/commission.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ fn uplink_port(
asn: p.peer_asn,
port: p.port.clone(),
addr: types::UserSpecifiedRouterPeerAddr::Unnumbered,
src_addr: None,
router_lifetime: types::RouterLifetimeConfig::new(
p.router_lifetime,
)
Expand Down Expand Up @@ -343,7 +344,7 @@ pub(crate) async fn drive(
.await
.map_err(|e| anyhow!("upload cert: {e}"))?;
client
.post_rss_config_key(&types::PrivateKeyPem(key))
.post_rss_config_key(&types::PrivateKeyPem(key.into()))
.await
.map_err(|e| anyhow!("upload key: {e}"))?;
client
Expand Down
12 changes: 3 additions & 9 deletions voxel/src/cpbuild.rs
Original file line number Diff line number Diff line change
Expand Up @@ -483,9 +483,8 @@ async fn create_cp_tuf(
std::fs::copy(&phase1, host_dir.join("phase1-gimlet.rom"))
.context("stage host phase 1 rom")?;

// The standard-image sled-agent hardwires scrimlet = tofino ASIC at
// compile time (bootstrap/pre_server.rs sled_mode_from_config); softnpu
// scrimlets need a switch-softnpu build staged over the phase 2 one.
// The phase 2 sled-agent detects softnpu scrimlets at runtime, so this is
// an override: a sled-agent package staged over the phase 2 one.
if let Some(pkg) = sled_agent {
let dir = cargo_bay.join("gz/sled-agent");
std::fs::remove_dir_all(&dir)
Expand All @@ -505,12 +504,7 @@ async fn create_cp_tuf(
cargo_bay.join("gz/sled-agent.xml"),
)
.context("stage the softnpu sled-agent SMF manifest")?;
eprintln!("[voxel] staged softnpu sled-agent from {pkg}");
} else {
eprintln!(
"[voxel] WARN: no --sled-agent; the phase 2 sled-agent cannot \
run softnpu scrimlets"
);
eprintln!("[voxel] staged sled-agent from {pkg}");
}

// --- 3. pinned single files from the omicron repo ------------------------
Expand Down
7 changes: 3 additions & 4 deletions voxel/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -253,10 +253,9 @@ enum ImageCmd {
/// phase 2 payload, switch zone recomposed for softnpu.
#[arg(long, value_name = "REPO_ZIP")]
from_tuf: Option<Utf8PathBuf>,
/// With --from-tuf: an omicron-sled-agent package tar built with
/// switch-softnpu, staged in place of the phase 2 sled-agent. The
/// standard-image binary hardwires scrimlet = tofino ASIC, so softnpu
/// scrimlets need this build.
/// With --from-tuf: an omicron-sled-agent package tar staged in place
/// of the phase 2 sled-agent, for trying a sled-agent build. The
/// phase 2 one detects softnpu scrimlets at runtime.
#[arg(long, value_name = "PKG_TAR", requires = "from_tuf")]
sled_agent: Option<Utf8PathBuf>,
},
Expand Down
9 changes: 4 additions & 5 deletions voxel/src/net.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,7 @@ async fn serial_bounded_caps<T>(
}
if hard > soft {
eprintln!(
"[voxel] {what}: no answer from the serial console after {}s. Waiting up to {}s \
rather than cancelling, since a cancelled exec wedges the console.",
"[voxel] {what}: no serial console answer after {}s; waiting up to {}s",
soft.as_secs(),
hard.as_secs()
);
Expand Down Expand Up @@ -361,8 +360,8 @@ pub(crate) fn wait_external_reachable(
}
warn!(
log,
"{label}: external network not reachable after ~{}s (dns {dns_ip}) - the rack is up but \
its external path may still be converging; retry `voxel route` or `dig {dns_zone} SOA @{dns_ip}`",
"{label}: external network not reachable after {}s (dns {dns_ip}); \
it may still be converging: voxel route, or dig {dns_zone} SOA @{dns_ip}",
ATTEMPTS * SPACING.as_secs() as u32
);
}
Expand Down Expand Up @@ -482,7 +481,7 @@ pub(crate) async fn set_external_route(
} else {
warn!(
d.log,
"route {} -> {} not confirmed: {}{} - run: route add {} {}",
"route {} -> {} not confirmed: {}{}; run: route add {} {}",
prefix,
ip,
String::from_utf8_lossy(&add.stdout).trim(),
Expand Down
4 changes: 2 additions & 2 deletions voxel/src/rack.rs
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ pub(crate) async fn cmd_launch(
Err(e) if attempt < BOOT_ATTEMPTS => {
warn!(
topo.runner.log,
"boot attempt {attempt}/{BOOT_ATTEMPTS} failed ({e}); tearing down + retrying"
"boot attempt {attempt}/{BOOT_ATTEMPTS} failed ({e}); retrying"
);
let _ = teardown(&topo.runner, name);
std::thread::sleep(std::time::Duration::from_secs(3));
Expand Down Expand Up @@ -419,7 +419,7 @@ pub(crate) async fn cmd_launch(
// settled past its startup dendrite restart.
info!(
d.log,
"rack{}: booted, left pre-RSS (unclaimed - multirack join not yet supported)",
"rack{}: booted, left uninitialized (no multirack join yet)",
rack + 1
);
continue;
Expand Down
Loading