[sled-agent] Remove chicken switch and always destroy orphaned Omicron datasets #8895
+8,429
−214
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The main point of this PR is that the sled-agent config reconciler now always attempts to destroy datasets it believes have been expunged instead of defaulting to reporting them unless an operator has toggled a chicken switch. (See the comments on
datasets_destroy_orphans()
for details; this is pretty specific to only destroy datasets whose names we understand.) We wanted to ship "report only" in R16 and then confirm during upgrades that this wasn't showing any surprises; now that R16 is out the door we can turn this on all the time.This also (starts to? attempts to?) removes the sled-agent API endpoints for interacting with the chicken switches. The openapi xtask yelled at me for this, so instead I followed the guide for removing endpoints. This was almost entirely painless, except that I'd already (locally) committed the change to remove the endpoints mixed in with other things, so I had to dig back out the endpoints and the types they used. Kudos to all involved for the tooling and instructions here!
Closes #6177. Closes #7312 (no longer needed). Closes #7313.
Edit: The diff stat here is laughably misleading; the API change means we have to check another full copy of the sled-agent API document, which is ~8000 lines. The changes here are a couple hundred lines.