Skip to content

[package] Destroy datasets as a part of uninstallation#1890

Merged
smklein merged 3 commits into
mainfrom
uninstall-zfs
Nov 1, 2022
Merged

[package] Destroy datasets as a part of uninstallation#1890
smklein merged 3 commits into
mainfrom
uninstall-zfs

Conversation

@smklein

@smklein smklein commented Oct 30, 2022

Copy link
Copy Markdown
Collaborator

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

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
@smklein smklein added Sled Agent Related to the Per-Sled Configuration and Management bootstrap services For those occasions where you want the rack to turn on build Building the control plane labels Oct 30, 2022
@smklein smklein requested a review from leftwo October 30, 2022 20:42
@leftwo

leftwo commented Nov 1, 2022

Copy link
Copy Markdown
Contributor

I would like the ability to re-install omicron but not delete durable configurations and storage (I.e. like a developer iterating on the control plane).

Does this preclude that ability? I don't see a way to do that any longer.

@smklein

smklein commented Nov 1, 2022

Copy link
Copy Markdown
Collaborator Author

I would like the ability to re-install omicron but not delete durable configurations and storage (I.e. like a developer iterating on the control plane).

Does this preclude that ability? I don't see a way to do that any longer.

This might be a little hidden, but:

$ cargo run --release -p omicron-package -- help install
Installs the packages and starts the sled-agent. Shortcut for `unpack` and `activate` 

$ cargo run --release -p omicron-package -- help unpack
Unpacks the files created by `package` to an install directory. Issues the `uninstall` command.
 
This command performs uninstallation by default as a safety measure, to ensure that we are
not swapping packages underneath running services, which may result in unexpected behavior.
The "uninstall before unpack" behavior can be disabled by setting the environment variable OMICRON_NO_UNINSTALL.

`unpack` does not actually start any services, but it prepares services to be launched with
the `activate` command.

Setting the environment variable OMICRON_NO_UNINSTALL should do this for you.

@leftwo

leftwo commented Nov 1, 2022

Copy link
Copy Markdown
Contributor

I would like the ability to re-install omicron but not delete durable configurations and storage (I.e. like a developer iterating on the control plane).
Does this preclude that ability? I don't see a way to do that any longer.

This might be a little hidden, but:

$ cargo run --release -p omicron-package -- help install
Installs the packages and starts the sled-agent. Shortcut for `unpack` and `activate` 

$ cargo run --release -p omicron-package -- help unpack
Unpacks the files created by `package` to an install directory. Issues the `uninstall` command.
 
This command performs uninstallation by default as a safety measure, to ensure that we are
not swapping packages underneath running services, which may result in unexpected behavior.
The "uninstall before unpack" behavior can be disabled by setting the environment variable OMICRON_NO_UNINSTALL.

`unpack` does not actually start any services, but it prepares services to be launched with
the `activate` command.

Setting the environment variable OMICRON_NO_UNINSTALL should do this for you.

Ah, yeah. I did not check the help. I saw the unpack -> uninstall dependency and that was why I asked.

@smklein smklein merged commit 1fdfac1 into main Nov 1, 2022
@smklein smklein deleted the uninstall-zfs branch November 1, 2022 19:21
@leftwo leftwo mentioned this pull request Apr 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bootstrap services For those occasions where you want the rack to turn on build Building the control plane Sled Agent Related to the Per-Sled Configuration and Management

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Omicron setup reused dataset from an older version

2 participants