Skip to content

Commit

Permalink
bump dendrite/maghemite to main, updates for new dendrite api
Browse files Browse the repository at this point in the history
  • Loading branch information
rcgoodfellow committed Nov 4, 2023
1 parent c13f450 commit 15b0545
Show file tree
Hide file tree
Showing 11 changed files with 69 additions and 37 deletions.
2 changes: 2 additions & 0 deletions common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,5 @@ impl slog::KV for FileKv {
)
}
}

pub const OMICRON_DPD_TAG: &str = "omicron";
2 changes: 1 addition & 1 deletion nexus/src/app/sagas/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ macro_rules! declare_saga_actions {
};
}

pub(crate) const NEXUS_DPD_TAG: &str = "nexus";
use omicron_common::OMICRON_DPD_TAG as NEXUS_DPD_TAG;

pub(crate) use __action_name;
pub(crate) use __emit_action;
Expand Down
22 changes: 18 additions & 4 deletions nexus/src/app/sagas/switch_port_settings_apply.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,6 @@ pub(crate) fn api_to_dpd_port_settings(
settings: &SwitchPortSettingsCombinedResult,
) -> Result<PortSettings, String> {
let mut dpd_port_settings = PortSettings {
tag: NEXUS_DPD_TAG.into(),
links: HashMap::new(),
v4_routes: HashMap::new(),
v6_routes: HashMap::new(),
Expand All @@ -195,6 +194,7 @@ pub(crate) fn api_to_dpd_port_settings(
LinkSettings {
params: LinkCreate {
autoneg: false,
lane: Some(LinkId(0)),
kr: false,
fec: match l.fec {
SwitchLinkFec::Firecode => PortFec::Firecode,
Expand Down Expand Up @@ -286,7 +286,13 @@ async fn spa_ensure_switch_port_settings(
})?;

retry_until_known_result(log, || async {
dpd_client.port_settings_apply(&port_id, &dpd_port_settings).await
dpd_client
.port_settings_apply(
&port_id,
Some(NEXUS_DPD_TAG),
&dpd_port_settings,
)
.await
})
.await
.map_err(|e| match e {
Expand Down Expand Up @@ -334,7 +340,9 @@ async fn spa_undo_ensure_switch_port_settings(
Some(id) => id,
None => {
retry_until_known_result(log, || async {
dpd_client.port_settings_clear(&port_id).await
dpd_client
.port_settings_clear(&port_id, Some(NEXUS_DPD_TAG))
.await
})
.await
.map_err(|e| external::Error::internal_error(&e.to_string()))?;
Expand All @@ -358,7 +366,13 @@ async fn spa_undo_ensure_switch_port_settings(
})?;

retry_until_known_result(log, || async {
dpd_client.port_settings_apply(&port_id, &dpd_port_settings).await
dpd_client
.port_settings_apply(
&port_id,
Some(NEXUS_DPD_TAG),
&dpd_port_settings,
)
.await
})
.await
.map_err(|e| external::Error::internal_error(&e.to_string()))?;
Expand Down
12 changes: 9 additions & 3 deletions nexus/src/app/sagas/switch_port_settings_clear.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

use super::switch_port_settings_apply::select_dendrite_client;
use super::NexusActionContext;
use super::{NexusActionContext, NEXUS_DPD_TAG};
use crate::app::sagas::retry_until_known_result;
use crate::app::sagas::switch_port_settings_apply::{
api_to_dpd_port_settings, apply_bootstore_update, bootstore_update,
Expand Down Expand Up @@ -154,7 +154,7 @@ async fn spa_clear_switch_port_settings(
let dpd_client = select_dendrite_client(&sagactx).await?;

retry_until_known_result(log, || async {
dpd_client.port_settings_clear(&port_id).await
dpd_client.port_settings_clear(&port_id, Some(NEXUS_DPD_TAG)).await
})
.await
.map_err(|e| ActionError::action_failed(e.to_string()))?;
Expand Down Expand Up @@ -197,7 +197,13 @@ async fn spa_undo_clear_switch_port_settings(
.map_err(ActionError::action_failed)?;

retry_until_known_result(log, || async {
dpd_client.port_settings_apply(&port_id, &dpd_port_settings).await
dpd_client
.port_settings_apply(
&port_id,
Some(NEXUS_DPD_TAG),
&dpd_port_settings,
)
.await
})
.await
.map_err(|e| external::Error::internal_error(&e.to_string()))?;
Expand Down
18 changes: 9 additions & 9 deletions package-manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ source.repo = "maghemite"
# `tools/maghemite_openapi_version`. Failing to do so will cause a failure when
# building `ddm-admin-client` (which will instruct you to update
# `tools/maghemite_openapi_version`).
source.commit = "f1d36b9e7fc1a1be98149bf38ee46776bbc94381"
source.commit = "82aa17646265449ee0ede9410208e510fa4a5877"
# The SHA256 digest is automatically posted to:
# https://buildomat.eng.oxide.computer/public/file/oxidecomputer/maghemite/image/<commit>/maghemite.sha256.txt
source.sha256 = "d871406ed926571efebdab248de08d4f1ca6c31d4f9a691ce47b186474165c57"
Expand All @@ -438,7 +438,7 @@ source.repo = "maghemite"
# `tools/maghemite_openapi_version`. Failing to do so will cause a failure when
# building `ddm-admin-client` (which will instruct you to update
# `tools/maghemite_openapi_version`).
source.commit = "f1d36b9e7fc1a1be98149bf38ee46776bbc94381"
source.commit = "82aa17646265449ee0ede9410208e510fa4a5877"
# The SHA256 digest is automatically posted to:
# https://buildomat.eng.oxide.computer/public/file/oxidecomputer/maghemite/image/<commit>/mg-ddm.sha256.txt
source.sha256 = "85ec05a8726989b5cb0a567de6b0855f6f84b6f3409ac99ccaf372be5821e45d"
Expand All @@ -453,7 +453,7 @@ source.repo = "maghemite"
# `tools/maghemite_openapi_version`. Failing to do so will cause a failure when
# building `ddm-admin-client` (which will instruct you to update
# `tools/maghemite_openapi_version`).
source.commit = "f1d36b9e7fc1a1be98149bf38ee46776bbc94381"
source.commit = "82aa17646265449ee0ede9410208e510fa4a5877"
# The SHA256 digest is automatically posted to:
# https://buildomat.eng.oxide.computer/public/file/oxidecomputer/maghemite/image/<commit>/mg-ddm.sha256.txt
source.sha256 = "1badd6adfece0a1b661f7efb9a2ca65e471f45cf9c8ecbd72b228ca174311e31"
Expand All @@ -473,8 +473,8 @@ only_for_targets.image = "standard"
# 2. Copy dendrite.tar.gz from dendrite/out to omicron/out
source.type = "prebuilt"
source.repo = "dendrite"
source.commit = "4dde713fb58a0342622c4619ecfd0d6eafa421d6"
source.sha256 = "843f53b6a41b08abefa0c8fdac4ab75088c7e2ee816a9d827ebf9b84fc955947"
source.commit = "559fad2f379900a05ced410944353c1d19100390"
source.sha256 = "ce14c1f0481b13ce47a25386a3b1e49d9570f4c1c31cad3f13c14f75b130dafa"
output.type = "zone"
output.intermediate_only = true

Expand All @@ -498,8 +498,8 @@ only_for_targets.image = "standard"
# 2. Copy the output zone image from dendrite/out to omicron/out
source.type = "prebuilt"
source.repo = "dendrite"
source.commit = "4dde713fb58a0342622c4619ecfd0d6eafa421d6"
source.sha256 = "77f77ec95d26d0b8e26e790be81c77b414378a35da77d4e46874a9b7ca55001e"
source.commit = "559fad2f379900a05ced410944353c1d19100390"
source.sha256 = "1a1246e2e596f36182eb6a5e402c272d0cd91aab351c5289cc4a29cb822c8888"
output.type = "zone"
output.intermediate_only = true

Expand All @@ -516,8 +516,8 @@ only_for_targets.image = "standard"
# 2. Copy dendrite.tar.gz from dendrite/out to omicron/out/dendrite-softnpu.tar.gz
source.type = "prebuilt"
source.repo = "dendrite"
source.commit = "4dde713fb58a0342622c4619ecfd0d6eafa421d6"
source.sha256 = "467be11b2ceab363d02c9b657c60cae2b7c5e42837f75beb1e615fe4d189dc09"
source.commit = "559fad2f379900a05ced410944353c1d19100390"
source.sha256 = "b9ff0f7f9e6193f4fa0aff77f7ec80f726f431ce1024a88021f207beb9079793"
output.type = "zone"
output.intermediate_only = true

Expand Down
25 changes: 15 additions & 10 deletions sled-agent/src/bootstrap/early_networking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ use omicron_common::backoff::{
retry_notify, retry_policy_local, BackoffError, ExponentialBackoff,
ExponentialBackoffBuilder,
};
use omicron_common::OMICRON_DPD_TAG;
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};
use slog::Logger;
Expand Down Expand Up @@ -403,7 +404,7 @@ impl<'a> EarlyNetworkSetup<'a> {
let dpd = DpdClient::new(
&format!("http://[{}]:{}", switch_zone_underlay_ip, DENDRITE_PORT),
dpd_client::ClientState {
tag: "early_networking".to_string(),
tag: OMICRON_DPD_TAG.into(),
log: self.log.new(o!("component" => "DpdClient")),
},
);
Expand Down Expand Up @@ -432,13 +433,17 @@ impl<'a> EarlyNetworkSetup<'a> {
"Configuring default uplink on switch";
"config" => #?dpd_port_settings
);
dpd.port_settings_apply(&port_id, &dpd_port_settings)
.await
.map_err(|e| {
EarlyNetworkSetupError::Dendrite(format!(
"unable to apply uplink port configuration: {e}"
))
})?;
dpd.port_settings_apply(
&port_id,
Some(OMICRON_DPD_TAG),
&dpd_port_settings,
)
.await
.map_err(|e| {
EarlyNetworkSetupError::Dendrite(format!(
"unable to apply uplink port configuration: {e}"
))
})?;

info!(self.log, "advertising boundary services loopback address");

Expand All @@ -462,10 +467,9 @@ impl<'a> EarlyNetworkSetup<'a> {
"failed to parse `BOUNDARY_SERVICES_ADDR` as `Ipv6Addr`: {e}"
))
})?,
tag: "rss".into(),
tag: OMICRON_DPD_TAG.into(),
};
let mut dpd_port_settings = PortSettings {
tag: "rss".into(),
links: HashMap::new(),
v4_routes: HashMap::new(),
v6_routes: HashMap::new(),
Expand All @@ -488,6 +492,7 @@ impl<'a> EarlyNetworkSetup<'a> {
kr: false,
fec: convert_fec(&port_config.uplink_port_fec),
speed: convert_speed(&port_config.uplink_port_speed),
lane: Some(LinkId(0)),
},
//addrs: vec![addr],
addrs,
Expand Down
4 changes: 2 additions & 2 deletions tools/dendrite_openapi_version
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
COMMIT="4dde713fb58a0342622c4619ecfd0d6eafa421d6"
SHA2="544ab42ccc7942d8ece9cdc80cd85d002bcf9d5646a291322bf2f79087ab6df0"
COMMIT="559fad2f379900a05ced410944353c1d19100390"
SHA2="82437c74afd4894aa5b9ea800d5777793e8777fe87471321dd22ad1a1c9c9ef3"
6 changes: 3 additions & 3 deletions tools/dendrite_stub_checksums
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
CIDL_SHA256_ILLUMOS="843f53b6a41b08abefa0c8fdac4ab75088c7e2ee816a9d827ebf9b84fc955947"
CIDL_SHA256_LINUX_DPD="bab6f1ed0598ed827299e0700aed61e11c2350d23220829948b9a76835a0c04f"
CIDL_SHA256_LINUX_SWADM="645faf8a93bcae9814b2f116bccd66a54763332b56220e93b66316c853ce13d2"
CIDL_SHA256_ILLUMOS="ce14c1f0481b13ce47a25386a3b1e49d9570f4c1c31cad3f13c14f75b130dafa"
CIDL_SHA256_LINUX_DPD="d7da0aaed4e824a8e98b1a39e9ee41ad934ce38b0faa140ab4e7e2ca8c194e4e"
CIDL_SHA256_LINUX_SWADM="0449383a57468aec3b5a4ad26962cfc9e9a121bd13e777329e8a70767e6d9aae"
2 changes: 1 addition & 1 deletion tools/maghemite_ddm_openapi_version
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
COMMIT="f1d36b9e7fc1a1be98149bf38ee46776bbc94381"
COMMIT="82aa17646265449ee0ede9410208e510fa4a5877"
SHA2="9737906555a60911636532f00f1dc2866dc7cd6553beb106e9e57beabad41cdf"
2 changes: 1 addition & 1 deletion tools/maghemite_mg_openapi_version
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
COMMIT="f1d36b9e7fc1a1be98149bf38ee46776bbc94381"
COMMIT="82aa17646265449ee0ede9410208e510fa4a5877"
SHA2="b3f55fe24e54530fdf96c22a033f9edc0bad9c0a5e3344763a23e52b251d5113"
11 changes: 8 additions & 3 deletions wicketd/src/preflight_check/uplink.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ use omicron_common::api::internal::shared::PortFec as OmicronPortFec;
use omicron_common::api::internal::shared::PortSpeed as OmicronPortSpeed;
use omicron_common::api::internal::shared::RackNetworkConfig;
use omicron_common::api::internal::shared::SwitchLocation;
use omicron_common::OMICRON_DPD_TAG;
use schemars::JsonSchema;
use serde::Deserialize;
use serde::Serialize;
Expand Down Expand Up @@ -185,7 +186,11 @@ fn add_steps_for_single_local_uplink_preflight_check<'a>(

// Create and configure the link.
match dpd_client
.port_settings_apply(&port_id, &port_settings)
.port_settings_apply(
&port_id,
Some(OMICRON_DPD_TAG),
&port_settings,
)
.await
{
Ok(_response) => {
Expand Down Expand Up @@ -714,8 +719,8 @@ fn add_steps_for_single_local_uplink_preflight_check<'a>(
dpd_client
.port_settings_apply(
&port_id,
Some(OMICRON_DPD_TAG),
&PortSettings {
tag: WICKETD_TAG.to_string(),
links: HashMap::new(),
v4_routes: HashMap::new(),
v6_routes: HashMap::new(),
Expand Down Expand Up @@ -758,7 +763,6 @@ fn build_port_settings(
};

let mut port_settings = PortSettings {
tag: WICKETD_TAG.to_string(),
links: HashMap::new(),
v4_routes: HashMap::new(),
v6_routes: HashMap::new(),
Expand All @@ -777,6 +781,7 @@ fn build_port_settings(
kr: false,
fec,
speed,
lane: Some(LinkId(0)),
},
},
);
Expand Down

0 comments on commit 15b0545

Please sign in to comment.