Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[smf] Use new zone network config service #1096

Merged
merged 7 commits into from
Feb 20, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
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' />
Comment on lines 37 to 38
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They might not be used -- I think nexus might have been a relic from before using DNS to find the Nexus address

<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
Loading