Skip to content

Commit fe0c5c7

Browse files
authoredFeb 20, 2024
[smf] Use new zone network config service (#1096)
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.
1 parent 3d48060 commit fe0c5c7

File tree

5 files changed

+13
-85
lines changed

5 files changed

+13
-85
lines changed
 

‎agent/agent_method_script.sh

-43
This file was deleted.

‎agent/smf/agent.xml

+7-3
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,13 @@
1313
<service_fmri value='svc:/milestone/multi-user' />
1414
</dependency>
1515

16+
<dependency name='zone_network_setup' grouping='require_all' restart_on='none'
17+
type='service'>
18+
<service_fmri value='svc:/oxide/zone-network-setup:default' />
19+
</dependency>
20+
1621
<exec_method type='method' name='start'
17-
exec='/opt/oxide/lib/svc/manifest/crucible/agent.sh'
22+
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}'
1823
timeout_seconds='30'
1924
/>
2025

@@ -25,11 +30,10 @@
2530
</property_group>
2631

2732
<property_group name='config' type='application'>
28-
<propval name='datalink' type='astring' value='unknown' />
29-
<propval name='gateway' type='astring' value='unknown' />
3033
<propval name='dataset' type='astring' value='' />
3134
<propval name='listen_addr' type='astring' value='127.0.0.1' />
3235
<propval name='listen_port' type='astring' value='17000' />
36+
<!-- TODO: Are 'uuid' and 'nexus' being used? -->
3337
<propval name='uuid' type='astring' value='' />
3438
<propval name='nexus' type='astring' value='127.0.0.1:12221' />
3539
<propval name='portbase' type='astring' value='19000' />

‎package-manifest.toml

-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ source.rust.release = true
66
source.paths = [
77
{ from = "agent/smf", to = "/var/svc/manifest/site/crucible" },
88
{ from = "agent/downstairs_method_script.sh", to = "/opt/oxide/lib/svc/manifest/crucible/downstairs.sh" },
9-
{ from = "agent/agent_method_script.sh", to = "/opt/oxide/lib/svc/manifest/crucible/agent.sh" }
109
]
1110
output.type = "zone"
1211

@@ -17,6 +16,5 @@ source.rust.binary_names = ["crucible-pantry"]
1716
source.rust.release = true
1817
source.paths = [
1918
{ from = "pantry/smf/pantry.xml", to = "/var/svc/manifest/site/crucible/pantry.xml" },
20-
{ from = "pantry/pantry_method_script.sh", to = "/opt/oxide/lib/svc/manifest/crucible/pantry.sh" }
2119
]
2220
output.type = "zone"

‎pantry/pantry_method_script.sh

-34
This file was deleted.

‎pantry/smf/pantry.xml

+6-3
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,13 @@
1313
<service_fmri value='svc:/milestone/multi-user' />
1414
</dependency>
1515

16+
<dependency name='zone_network_setup' grouping='require_all' restart_on='none'
17+
type='service'>
18+
<service_fmri value='svc:/oxide/zone-network-setup:default' />
19+
</dependency>
20+
1621
<exec_method type='method' name='start'
17-
exec='/opt/oxide/lib/svc/manifest/crucible/pantry.sh'
22+
exec='/opt/oxide/pantry/bin/crucible-pantry run -l [%{config/listen_addr}]:%{config/listen_port}'
1823
timeout_seconds='30'
1924
/>
2025

@@ -25,8 +30,6 @@
2530
</property_group>
2631

2732
<property_group name='config' type='application'>
28-
<propval name='datalink' type='astring' value='unknown' />
29-
<propval name='gateway' type='astring' value='unknown' />
3033
<propval name='listen_addr' type='astring' value='127.0.0.1' />
3134
<propval name='listen_port' type='astring' value='17000' />
3235
</property_group>

0 commit comments

Comments
 (0)