Skip to content

[nexus] Decommission disks in reconfigurator, clean their DB state#6059

Merged
smklein merged 110 commits into
mainfrom
disk-cleanup
Jul 22, 2024
Merged

[nexus] Decommission disks in reconfigurator, clean their DB state#6059
smklein merged 110 commits into
mainfrom
disk-cleanup

Conversation

@smklein

@smklein smklein commented Jul 12, 2024

Copy link
Copy Markdown
Collaborator

This PR adds the following step to the reconfigurator's execution step: For all disks that are marked expunged, mark them decommissioned. This notably happens after the deploy_disks step of execution.

This PR also adds a background task that looks for all disks that are decommissioned, but have zpools. It deletes these zpools (and their datasets) as long as no regions nor region snapshots are referencing the contained datasets.

Fixes #6051

@smklein smklein marked this pull request as ready for review July 15, 2024 20:57
@smklein smklein requested review from jgallagher and jmpesp July 15, 2024 23:23
Base automatically changed from omdb-disk-expungement to main July 15, 2024 23:55
Comment thread nexus/db-model/src/region.rs
Comment thread nexus/db-queries/src/db/datastore/physical_disk.rs Outdated

@jmpesp jmpesp left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🚀

Comment thread nexus/src/app/background/init.rs Outdated
Comment thread nexus/src/app/background/tasks/decommissioned_disk_cleaner.rs Outdated
Comment thread nexus/src/app/background/tasks/decommissioned_disk_cleaner.rs Outdated
@smklein smklein enabled auto-merge (squash) July 22, 2024 22:55
@smklein smklein merged commit 38575ab into main Jul 22, 2024
@smklein smklein deleted the disk-cleanup branch July 22, 2024 23:33
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.

Cleanup: Zpools rows never die in CRDB

2 participants