Skip to content
Merged
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
16 changes: 8 additions & 8 deletions Cargo.lock

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

10 changes: 5 additions & 5 deletions package-manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -683,10 +683,10 @@ 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 = "26fcf262ba3be2af6156a5a010cd834e18ae42c7"
source.commit = "23b7c04ee23d7303c1f56153fe48d8b04c194265"
# The SHA256 digest is automatically posted to:
# https://buildomat.eng.oxide.computer/public/file/oxidecomputer/maghemite/image/<commit>/mg-ddm-gz.sha256.txt
source.sha256 = "a2551615119859c037564158867f9005e384d0a1f59237b5458c0737a0123d79"
source.sha256 = "d71af76dcd17dd34ed9f36f43dd7033f9488077ba5822e458700d60e0844368d"
output.type = "tarball"

[package.mg-ddm]
Expand All @@ -699,10 +699,10 @@ 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 = "26fcf262ba3be2af6156a5a010cd834e18ae42c7"
source.commit = "23b7c04ee23d7303c1f56153fe48d8b04c194265"
# The SHA256 digest is automatically posted to:
# https://buildomat.eng.oxide.computer/public/file/oxidecomputer/maghemite/image/<commit>/mg-ddm.sha256.txt
source.sha256 = "05da12de94b677498606a6c18b90a7444621d49efe3aeb8a52b52b875fb1e5b8"
source.sha256 = "fab9864652a675a4258cc0900fd71316fb20aefb872a83406d9e048bf4c12c82"
output.type = "zone"
output.intermediate_only = true

Expand All @@ -714,7 +714,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 = "26fcf262ba3be2af6156a5a010cd834e18ae42c7"
source.commit = "23b7c04ee23d7303c1f56153fe48d8b04c194265"
# The SHA256 digest is automatically posted to:
# https://buildomat.eng.oxide.computer/public/file/oxidecomputer/maghemite/image/<commit>/mgd.sha256.txt
source.sha256 = "e46b9d06de9b9760afd46e24bbbbe9a81a5b831cbb8a6a2a7affb9cc727f10ae"
Expand Down
41 changes: 34 additions & 7 deletions sled-agent/src/services.rs
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ enum SwitchService {
Pumpkind { asic: DendriteAsic },
Tfport { pkt_source: String, asic: DendriteAsic },
Uplink,
MgDdm { mode: String },
MgDdm { mode: String, baseboard: Baseboard },
Mgd,
SpSim,
}
Expand Down Expand Up @@ -2888,7 +2888,7 @@ impl ServiceManager {
.add_property_group(mgd_config),
);
}
SwitchService::MgDdm { mode } => {
SwitchService::MgDdm { mode, baseboard } => {
info!(self.inner.log, "Setting up mg-ddm service");

let mut mg_ddm_config = PropertyGroupBuilder::new("config")
Expand All @@ -2897,7 +2897,12 @@ impl ServiceManager {
// We must bind to "::" so the ddmd scrimlet reconciler
// in the global zone can reach the ddm-admin port in
// the switch zone via the underlay network.
.add_property("admin_host", "astring", "::");
.add_property("admin_host", "astring", "::")
.add_property(
"router_id",
"astring",
&switch_zone_ddm_router_id(&baseboard),
);

if let Some(i) = info {
mg_ddm_config = mg_ddm_config
Expand Down Expand Up @@ -3138,7 +3143,10 @@ impl ServiceManager {
SwitchService::Uplink,
SwitchService::Wicketd { baseboard: baseboard.clone() },
SwitchService::Mgd,
SwitchService::MgDdm { mode: "transit".to_string() },
SwitchService::MgDdm {
mode: "transit".to_string(),
baseboard: baseboard.clone(),
},
]
}

Expand All @@ -3153,7 +3161,10 @@ impl ServiceManager {
SwitchService::Uplink,
SwitchService::Wicketd { baseboard: baseboard.clone() },
SwitchService::Mgd,
SwitchService::MgDdm { mode: "transit".to_string() },
SwitchService::MgDdm {
mode: "transit".to_string(),
baseboard: baseboard.clone(),
},
SwitchService::Tfport {
pkt_source: "vioif0".to_string(),
asic,
Expand Down Expand Up @@ -3184,7 +3195,10 @@ impl ServiceManager {
SwitchService::Uplink,
SwitchService::Wicketd { baseboard: baseboard.clone() },
SwitchService::Mgd,
SwitchService::MgDdm { mode: "transit".to_string() },
SwitchService::MgDdm {
mode: "transit".to_string(),
baseboard: baseboard.clone(),
},
SwitchService::Tfport {
pkt_source: "tfpkt0".to_string(),
asic,
Expand Down Expand Up @@ -3601,7 +3615,7 @@ impl ServiceManager {
"refreshed mgd service with new configuration"
)
}
SwitchService::MgDdm { mode } => {
SwitchService::MgDdm { mode, baseboard } => {
info!(self.inner.log, "configuring mg-ddm service");
smfh.delpropvalue_default_instance(
"config/mode",
Expand All @@ -3612,6 +3626,15 @@ impl ServiceManager {
&mode,
"astring",
)?;
smfh.delpropvalue_default_instance(
"config/router_id",
"*",
)?;
smfh.addpropvalue_type_default_instance(
"config/router_id",
&switch_zone_ddm_router_id(&baseboard),
"astring",
)?;
if let Some(info) = self.inner.sled_info.get() {
smfh.setprop_default_instance(
"config/rack_uuid",
Expand Down Expand Up @@ -3867,6 +3890,10 @@ fn internal_dns_addrobj_name(gz_address_index: u32) -> String {
format!("internaldns{gz_address_index}")
}

fn switch_zone_ddm_router_id(baseboard: &Baseboard) -> String {
format!("sw{}", baseboard.identifier())
}

#[cfg(test)]
mod test {
use super::*;
Expand Down
2 changes: 1 addition & 1 deletion tools/maghemite_ddm_openapi_version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
COMMIT="26fcf262ba3be2af6156a5a010cd834e18ae42c7"
COMMIT="23b7c04ee23d7303c1f56153fe48d8b04c194265"
2 changes: 1 addition & 1 deletion tools/maghemite_mg_openapi_version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
COMMIT="26fcf262ba3be2af6156a5a010cd834e18ae42c7"
COMMIT="23b7c04ee23d7303c1f56153fe48d8b04c194265"
4 changes: 2 additions & 2 deletions tools/maghemite_mgd_checksums
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CIDL_SHA256="e46b9d06de9b9760afd46e24bbbbe9a81a5b831cbb8a6a2a7affb9cc727f10ae"
MGD_LINUX_SHA256="7b36358c6603ffd74149ebaf697782067b192b2f60dcc177eb5965c48b702dde"
MG_DDM_SHA256="05da12de94b677498606a6c18b90a7444621d49efe3aeb8a52b52b875fb1e5b8"
DDMD_LINUX_SHA256="43d609ef0f76ef05b8b0264677c36abd8cf54565fbd9e0c93afc135df25dd6ab"
MG_DDM_SHA256="fab9864652a675a4258cc0900fd71316fb20aefb872a83406d9e048bf4c12c82"
DDMD_LINUX_SHA256="df47660e8e4a14edc528fcd402368424b528e2e7b1d6a7d73a12f8d671493d82"
Loading