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

Add support for 'disabling' physical disks to prevent future allocations #3526

Closed
wants to merge 13 commits into from

Conversation

smklein
Copy link
Collaborator

@smklein smklein commented Jul 7, 2023

Part of #3480

Fixes #5153

openapi/nexus.json Outdated Show resolved Hide resolved
@@ -312,6 +326,9 @@ CREATE TABLE IF NOT EXISTS omicron.public.physical_disk (
-- FK into the Sled table
sled_id UUID NOT NULL,

-- Describes how the control plane manages this disk
state omicron.public.physical_disk_state NOT NULL,

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

TODO(me): add an index to look up all "draining" disks".

Also maybe update the terminology here to match #4719

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Nit: I should use the term "deactivating" here, rather than "draining", because "draining" can refer to cooperative removal (e.g. in the context of draining instances from a sled)

@smklein
Copy link
Collaborator Author

smklein commented Jan 10, 2024

During the update sync, we had an interesting discussion where we floated the following idea: Instead of storing the "State" in the disk itself, what if state was implied by presence in a blueprint?

In this world:

  • A disk that appears in a blueprint is implicitly active
  • A disk that is not in the blueprint is not active (distinguishing between deactivating or inactive is a little more subtle?)

I'm going to explore this space a bit more, since I think it would fundamentally change how the "disk state" is stored in the DB.

@smklein
Copy link
Collaborator Author

smklein commented Apr 1, 2024

Closing in favor of #5335

@smklein smklein closed this Apr 1, 2024
@smklein smklein deleted the disk-disable branch April 1, 2024 21:58
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.

Add notion of physical disk "policy" and "state" to physical disks in the control plane
3 participants