Skip to content

Commit

Permalink
[smf] Use new zone network config service (#1096)
Browse files Browse the repository at this point in the history
oxidecomputer/omicron#4677 implements a new zone network configuration setup service so control plane services don't have to set this up themselves. This PR updates crucible to use said services.
  • Loading branch information
karencfv authored Feb 20, 2024
1 parent 3d48060 commit fe0c5c7
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 85 deletions.
43 changes: 0 additions & 43 deletions agent/agent_method_script.sh

This file was deleted.

10 changes: 7 additions & 3 deletions agent/smf/agent.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,13 @@
<service_fmri value='svc:/milestone/multi-user' />
</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/lib/svc/manifest/crucible/agent.sh'
exec='/opt/oxide/crucible/bin/crucible-agent run -D /opt/oxide/crucible/bin/crucible-downstairs --dataset %{config/dataset} -l [%{config/listen_addr}]:%{config/listen_port} -P %{config/portbase} -p %{config/downstairs_prefix} -s %{config/snapshot_prefix}'
timeout_seconds='30'
/>

Expand All @@ -25,11 +30,10 @@
</property_group>

<property_group name='config' type='application'>
<propval name='datalink' type='astring' value='unknown' />
<propval name='gateway' type='astring' value='unknown' />
<propval name='dataset' type='astring' value='' />
<propval name='listen_addr' type='astring' value='127.0.0.1' />
<propval name='listen_port' type='astring' value='17000' />
<!-- TODO: Are 'uuid' and 'nexus' being used? -->
<propval name='uuid' type='astring' value='' />
<propval name='nexus' type='astring' value='127.0.0.1:12221' />
<propval name='portbase' type='astring' value='19000' />
Expand Down
2 changes: 0 additions & 2 deletions package-manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ source.rust.release = true
source.paths = [
{ from = "agent/smf", to = "/var/svc/manifest/site/crucible" },
{ from = "agent/downstairs_method_script.sh", to = "/opt/oxide/lib/svc/manifest/crucible/downstairs.sh" },
{ from = "agent/agent_method_script.sh", to = "/opt/oxide/lib/svc/manifest/crucible/agent.sh" }
]
output.type = "zone"

Expand All @@ -17,6 +16,5 @@ source.rust.binary_names = ["crucible-pantry"]
source.rust.release = true
source.paths = [
{ from = "pantry/smf/pantry.xml", to = "/var/svc/manifest/site/crucible/pantry.xml" },
{ from = "pantry/pantry_method_script.sh", to = "/opt/oxide/lib/svc/manifest/crucible/pantry.sh" }
]
output.type = "zone"
34 changes: 0 additions & 34 deletions pantry/pantry_method_script.sh

This file was deleted.

9 changes: 6 additions & 3 deletions pantry/smf/pantry.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,13 @@
<service_fmri value='svc:/milestone/multi-user' />
</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/lib/svc/manifest/crucible/pantry.sh'
exec='/opt/oxide/pantry/bin/crucible-pantry run -l [%{config/listen_addr}]:%{config/listen_port}'
timeout_seconds='30'
/>

Expand All @@ -25,8 +30,6 @@
</property_group>

<property_group name='config' type='application'>
<propval name='datalink' type='astring' value='unknown' />
<propval name='gateway' type='astring' value='unknown' />
<propval name='listen_addr' type='astring' value='127.0.0.1' />
<propval name='listen_port' type='astring' value='17000' />
</property_group>
Expand Down

0 comments on commit fe0c5c7

Please sign in to comment.