[nexus] Expunge disk internal API, omdb commands#5994
Merged
Conversation
sunshowers
approved these changes
Jul 5, 2024
jgallagher
approved these changes
Jul 9, 2024
andrewjstone
approved these changes
Jul 10, 2024
andrewjstone
left a comment
Contributor
There was a problem hiding this comment.
Sorry for the delay! Looks awesome :)
This was referenced Jul 11, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Provides an internal API to remove disks, and wires it into omdb. Additionally, expands omdb commands for visibility.
omdb db physical-diskscan be used to view all "control plane physical disks". This is similar to, but distinct from, theomdb db inventory physical-diskscommand, as it reports control plane disks that have been adopted in the control plane. This command is necessary for identifying the UUID of the associated control plane object, which is not observable via inventory.omdb nexus sleds expunge-diskcan be used to expunge a physical disk from a sled. This relies on many prior patches to operate correctly, but with the combination of: [sled-agent] Stop self-managing physical disks #5987, [Sled Agent] Expunged disks are not in use after omicron_physical_disks_ensure #5965, Allow Nexus to specify Zone filesystem location #5931, Expunge zones when their transient filesystem pools are expunged #5952, [reconfigurator] Only place Crucible zones on provisionable zpools #5601, [nexus] Remove zones on expunged disks #5599, we can observe the following behavior: expunging a disk leads to all "users" of that disk (zone filesystems, datasets, zone bundles, etc) being removed.I tested this PR on a4x2 using the following steps:
This is a major part of #4719
Fixes #5370