Skip to content

Commit

Permalink
Switch zone set up should not depend on common networking set up
Browse files Browse the repository at this point in the history
  • Loading branch information
karencfv committed May 3, 2024
1 parent ac5bbbb commit c792fc7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
5 changes: 0 additions & 5 deletions smf/switch_zone_setup/manifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@
<service_fmri value='svc:/milestone/multi-user:default' />
</dependency>

<dependency name='zone_network_setup' grouping='require_all' restart_on='none'
type='service'>
<service_fmri value='svc:/oxide/zone-network-setup:default' />
</dependency>

<exec_method type='method' name='start'
exec='/opt/oxide/zone-setup-cli/bin/zone-setup switch-zone -i %{config/baseboard_info} -l %{config/link_local_links} -z %{config/zone_name} -a %{config/bootstrap_addr} -n %{config/bootstrap_name} -v %{config/bootstrap_vnic} -g %{config/gz_local_link_addr}'
timeout_seconds='300'>
Expand Down
8 changes: 5 additions & 3 deletions zone-setup/src/bin/zone-setup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -940,9 +940,11 @@ async fn common_nw_set_up(
.map_err(|err| CmdError::Failure(anyhow!(err)))?;

for addr in &static_addrs {
info!(&log, "Ensuring static and auto-configured addresses are set on the IP interface"; "data link" => ?datalink, "static address" => ?addr);
Ipadm::create_static_and_autoconfigured_addrs(&datalink, addr)
.map_err(|err| CmdError::Failure(anyhow!(err)))?;
if **addr != Ipv6Addr::LOCALHOST {
info!(&log, "Ensuring static and auto-configured addresses are set on the IP interface"; "data link" => ?datalink, "static address" => ?addr);
Ipadm::create_static_and_autoconfigured_addrs(&datalink, addr)
.map_err(|err| CmdError::Failure(anyhow!(err)))?;
}
}

info!(&log, "Ensuring there is a default route"; "gateway" => ?gateway);
Expand Down

0 comments on commit c792fc7

Please sign in to comment.