Skip to content

Commit

Permalink
Small fixes after a merge
Browse files Browse the repository at this point in the history
  • Loading branch information
karencfv committed Jan 17, 2024
1 parent eb66427 commit 7e10a22
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions sled-agent/src/services.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1783,6 +1783,7 @@ impl ServiceManager {
ZoneArgs::Omicron(OmicronZoneConfigLocal {
zone:
OmicronZoneConfig {
id,
zone_type: OmicronZoneType::Oximeter { .. },
underlay_address,
..
Expand All @@ -1796,14 +1797,13 @@ impl ServiceManager {
// Configure the Oximeter service.
let datalink = installed_zone.get_control_vnic_name();
let gateway = &info.underlay_address.to_string();
assert_eq!(request.zone.addresses.len(), 1);
let address = SocketAddr::new(
IpAddr::V6(request.zone.addresses[0]),
IpAddr::V6(*underlay_address),
OXIMETER_PORT,
);
let listen_addr = &address.ip().to_string();
let listen_port = &address.port().to_string();
let id = &request.zone.id.to_string();
let id = &id.to_string();

let oximeter_config = PropertyGroupBuilder::new("config")
.add_property("datalink", "astring", datalink)
Expand Down Expand Up @@ -2182,14 +2182,6 @@ impl ServiceManager {
// service is enabled.
smfh.refresh()?;
}

OmicronZoneType::Oximeter { address } => {
info!(self.inner.log, "Setting up oximeter service");
smfh.setprop("config/id", zone_config.zone.id)?;
smfh.setprop("config/address", address.to_string())?;
smfh.refresh()?;
}

OmicronZoneType::BoundaryNtp {
ntp_servers,
dns_servers,
Expand Down Expand Up @@ -3729,6 +3721,7 @@ mod test {
const GLOBAL_ZONE_BOOTSTRAP_IP: Ipv6Addr = Ipv6Addr::LOCALHOST;
const SWITCH_ZONE_BOOTSTRAP_IP: Ipv6Addr = Ipv6Addr::LOCALHOST;

// Change here
const EXPECTED_ZONE_NAME_PREFIX: &str = "oxz_oximeter";
const EXPECTED_PORT: u16 = 12223;

Expand Down

0 comments on commit 7e10a22

Please sign in to comment.