Skip to content
Merged
Changes from 5 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
22 changes: 21 additions & 1 deletion sled-agent/src/services.rs
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,9 @@ impl ServiceManager {
Error::ZoneCommand { intent: "Adding Route".to_string(), err }
})?;

// TODO: Related to
// https://github.com/oxidecomputer/omicron/pull/1124 , should we
// avoid importing this manifest?
debug!(self.log, "importing manifest");

running_zone
Expand All @@ -267,6 +270,23 @@ impl ServiceManager {
let smf_name = format!("svc:/system/illumos/{}", service.name);
let default_smf_name = format!("{}:default", smf_name);

// Ensure the IPv6 traffic can be routed to this non-global zone.
//
// This is particularly important for accessing Nexus' external
// interface from off-device.
running_zone
.run_cmd(&["/usr/sbin/routeadm", "-e", "ipv6-forwarding"])
.map_err(|err| Error::ZoneCommand {
intent: "enabling IPv6 forwarding".to_string(),
err,
})?;
running_zone
.run_cmd(&["/usr/sbin/routeadm", "-e", "ipv6-routing", "-u"])
.map_err(|err| Error::ZoneCommand {
intent: "enabling IPv6 routing".to_string(),
err,
})?;

match service.name.as_str() {
"internal-dns" => {
info!(self.log, "Setting up internal-dns service");
Expand Down Expand Up @@ -469,7 +489,7 @@ mod test {
wait_ctx.expect().return_once(|_, _| Ok(()));
// Import the manifest, enable the service
let execute_ctx = crate::illumos::execute_context();
execute_ctx.expect().times(3).returning(|_| {
execute_ctx.expect().times(5).returning(|_| {
Ok(std::process::Output {
status: std::process::ExitStatus::from_raw(0),
stdout: vec![],
Expand Down