Skip to content

[sled agent] Create and use self-assembling zones for storage zones#1902

Merged
smklein merged 35 commits into
mainfrom
self-assembling-zones
Apr 21, 2023
Merged

[sled agent] Create and use self-assembling zones for storage zones#1902
smklein merged 35 commits into
mainfrom
self-assembling-zones

Conversation

@smklein

@smklein smklein commented Nov 1, 2022

Copy link
Copy Markdown
Collaborator

Part of #1898
Relies on oxidecomputer/crucible#498

Converts Crucible, Cockroach, and Clickhouse to be (mostly) self-assembling.

I'm happy to proceed and convert the rest of the zones we're launching using a similar format, if we like how this looks.

Fixes #2886

Major changes:
- Uninstallation now collects all Zpool and Zone based datasets,
prompts the user, and destroys them during the uninstall process.
- Adds a "-f / --force" option to "omicron-package", allowing
callers to skip the new confirmation prompt.
- Adds a "deactivate" command to "omicron-package". This allows
callers to remove Zones and disable services, but does not delete
durable configurations and storage. A caller should be able to
call "deactivate" -> "activate" -> "deactivate" repeatedly without
losing durable state.

Minor changes:
- Updates documentation for omicron-package
- Improves handling of addresses deleted from
  `cleanup_networking_resources`, especially in cases of duplicates
- Rename "filesystem" to "dataset" in functions where it's more
  appropriate to be generic in the context of ZFS.

Fixes #1884

Part of #1119
Part of #1313
Base automatically changed from uninstall-zfs to main November 1, 2022 19:21
@smklein smklein requested a review from ahl November 7, 2022 14:45
Comment thread smf/clickhouse/method_script.sh Outdated
Comment on lines +13 to +15
ipadm show-addr "$DATALINK/linklocal" || ipadm create-addr -t -T addrconf "$DATALINK/linklocal"
ipadm show-addr "$DATALINK/omicron6" || ipadm create-addr -t -T static -a "$LISTEN_ADDR" "$DATALINK/omicron6"
route get -inet6 default -inet6 "$GATEWAY" || route add -inet6 default -inet6 "$GATEWAY"

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

These lines, and the SMF svcprops to set them, could probably exist as a separate service for the zone?

The big question for me is "where should this service live" - all zones would use it, so should it be built-in to the Omicron-branded zone?

@smklein

smklein commented Nov 7, 2022

Copy link
Copy Markdown
Collaborator Author

For more context on this PR, see https://drive.google.com/file/d/185bFxdvDo_1aA5-T5ywp9t3ZCJbc52B7/view , in particular, at the 32:20 timestamp

@smklein

smklein commented Mar 7, 2023

Copy link
Copy Markdown
Collaborator Author

Friendly ping - this is kinda a pain to keep rebasing.

@smklein

smklein commented Apr 19, 2023

Copy link
Copy Markdown
Collaborator Author

One more request on this - having self-assembling zones would really simplify some of the internal-to-sled config management I'm trying to do.

@jclulow jclulow left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This is looking pretty good! Mostly nits and polish to sort out, I think. Thanks for doing this, I think it's a great step in the right direction for zone/service configuration!

Comment thread sled-agent/src/profile.rs Outdated
Comment thread sled-agent/src/services.rs Outdated
Comment thread smf/cockroachdb/manifest.xml Outdated
Comment thread smf/cockroachdb/manifest.xml Outdated
Comment thread smf/cockroachdb/manifest.xml Outdated
Comment thread smf/clickhouse/method_script.sh
Comment thread smf/clickhouse/manifest.xml Outdated
Comment thread smf/clickhouse/manifest.xml Outdated
Comment thread smf/clickhouse/manifest.xml Outdated
Comment thread smf/clickhouse/manifest.xml Outdated
@smklein smklein mentioned this pull request Apr 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Convert Crucible Pantry to be self-assembling

2 participants