Skip to content

Commit 72b2e24

Browse files
committed
[smf] Use new zone network config service
1 parent e71b10d commit 72b2e24

File tree

5 files changed

+30
-86
lines changed

5 files changed

+30
-86
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

+17-3
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,36 @@
11
[package.crucible]
22
service_name = "crucible"
3+
only_for_targets.image = "standard"
4+
source.type = "composite"
5+
source.packages = [ "crucible-svc.tar.gz", "zone-network-setup.tar.gz" ]
6+
output.type = "zone"
7+
8+
[package.crucible-svc]
9+
service_name = "crucible-svc"
310
source.type = "local"
411
source.rust.binary_names = ["crucible-agent", "crucible-downstairs"]
512
source.rust.release = true
613
source.paths = [
714
{ from = "agent/smf", to = "/var/svc/manifest/site/crucible" },
815
{ 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" }
1016
]
1117
output.type = "zone"
18+
output.intermediate_only = true
1219

1320
[package.crucible-pantry]
14-
service_name = "pantry"
21+
service_name = "crucible-pantry"
22+
only_for_targets.image = "standard"
23+
source.type = "composite"
24+
source.packages = [ "crucible-pantry-svc.tar.gz", "zone-network-setup.tar.gz" ]
25+
output.type = "zone"
26+
27+
[package.crucible-pantry-svc]
28+
service_name = "pantry-svc"
1529
source.type = "local"
1630
source.rust.binary_names = ["crucible-pantry"]
1731
source.rust.release = true
1832
source.paths = [
1933
{ 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" }
2134
]
2235
output.type = "zone"
36+
output.intermediate_only = true

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)