Skip to content

Commit

Permalink
Actually add the networking service
Browse files Browse the repository at this point in the history
  • Loading branch information
karencfv committed Feb 12, 2024
1 parent 2f790f4 commit 7d9fca0
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions sled-agent/src/services.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1708,27 +1708,30 @@ impl ServiceManager {
let Some(info) = self.inner.sled_info.get() else {
return Err(Error::SledAgentNotReady);
};
let datalink = installed_zone.get_control_vnic_name();
let gateway = &info.underlay_address.to_string();
let listen_addr = &underlay_address.to_string();
let listen_port = &CRUCIBLE_PORT.to_string();

let nw_setup_service = Self::zone_network_setup_install(
info,
&installed_zone,
listen_addr,
)?;

let dataset_name = DatasetName::new(
dataset.pool_name.clone(),
DatasetKind::Crucible,
)
.full_name();
let uuid = &Uuid::new_v4().to_string();
let config = PropertyGroupBuilder::new("config")
.add_property("datalink", "astring", datalink)
.add_property("gateway", "astring", gateway)
.add_property("dataset", "astring", &dataset_name)
.add_property("listen_addr", "astring", listen_addr)
.add_property("listen_port", "astring", listen_port)
.add_property("uuid", "astring", uuid)
.add_property("store", "astring", "/data");

let profile = ProfileBuilder::new("omicron")
.add_service(nw_setup_service)
.add_service(disabled_ssh_service)
.add_service(
ServiceBuilder::new("oxide/crucible/agent")
Expand Down Expand Up @@ -1759,18 +1762,21 @@ impl ServiceManager {
return Err(Error::SledAgentNotReady);
};

let datalink = installed_zone.get_control_vnic_name();
let gateway = &info.underlay_address.to_string();
let listen_addr = &underlay_address.to_string();
let listen_port = &CRUCIBLE_PANTRY_PORT.to_string();

let nw_setup_service = Self::zone_network_setup_install(
info,
&installed_zone,
listen_addr,
)?;

let config = PropertyGroupBuilder::new("config")
.add_property("datalink", "astring", datalink)
.add_property("gateway", "astring", gateway)
.add_property("listen_addr", "astring", listen_addr)
.add_property("listen_port", "astring", listen_port);

let profile = ProfileBuilder::new("omicron")
.add_service(nw_setup_service)
.add_service(disabled_ssh_service)
.add_service(
ServiceBuilder::new("oxide/crucible/pantry")
Expand Down

0 comments on commit 7d9fca0

Please sign in to comment.