From 1d634cefcd072e93f951ea520a01cda3eee8ec23 Mon Sep 17 00:00:00 2001 From: Benjamin Naecker Date: Thu, 4 Aug 2022 23:01:55 +0000 Subject: [PATCH] Start dpd with Nexus-provided listen address --- package-manifest.toml | 4 ++-- sled-agent/src/services.rs | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/package-manifest.toml b/package-manifest.toml index 9b02790ccb..d89c31e895 100644 --- a/package-manifest.toml +++ b/package-manifest.toml @@ -148,5 +148,5 @@ zone = true # 3. Use type = "manual" instead of the "prebuilt" type = "prebuilt" repo = "dendrite" -commit = "e752af977c167fa64625231a74bedcbfa5457008" -sha256 = "ddb7c271f4d4b68332adc69b32f90e728f07b1395e01cffd7e71230c2c648c63" +commit = "d76d206b93d0126eae973490a6d38df868bcbe27" +sha256 = "e4cebf6a68b8640f1af1a66fe32b15f87917aea335ccda440ead92ea515e3757" diff --git a/sled-agent/src/services.rs b/sled-agent/src/services.rs index 19efed5b70..bc5cbfa26c 100644 --- a/sled-agent/src/services.rs +++ b/sled-agent/src/services.rs @@ -14,6 +14,7 @@ use crate::illumos::zone::AddressRequest; use crate::params::{ServiceEnsureBody, ServiceRequest, ServiceType}; use crate::zone::Zones; use omicron_common::address::Ipv6Subnet; +use omicron_common::address::DENDRITE_PORT; use omicron_common::address::NEXUS_INTERNAL_PORT; use omicron_common::address::OXIMETER_PORT; use omicron_common::address::RACK_PREFIX; @@ -579,6 +580,8 @@ impl ServiceManager { } ServiceType::Dendrite { asic } => { info!(self.log, "Setting up dendrite service"); + + let address = service.addresses[0]; running_zone .run_cmd(&[ crate::illumos::zone::SVCCFG, @@ -592,6 +595,23 @@ impl ServiceManager { err, })?; + running_zone + .run_cmd(&[ + crate::illumos::zone::SVCCFG, + "-s", + &smf_name, + "setprop", + &format!( + "config/address=[{}]:{}", + address, DENDRITE_PORT, + ), + ]) + .map_err(|err| Error::ZoneCommand { + intent: "set dendrite API server listen address" + .to_string(), + err, + })?; + running_zone .run_cmd(&[ crate::illumos::zone::SVCCFG,