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

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

Merged
merged 110 commits into from
Jul 22, 2024

Conversation

smklein
Copy link
Collaborator

@smklein smklein commented Jul 12, 2024

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 jmpesp and jgallagher July 15, 2024 23:23
Base automatically changed from omdb-disk-expungement to main July 15, 2024 23:55
nexus/db-model/src/region.rs Outdated Show resolved Hide resolved
nexus/db-queries/src/db/datastore/physical_disk.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@jmpesp jmpesp left a comment

Choose a reason for hiding this comment

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

🚀

nexus/src/app/background/init.rs Outdated Show resolved Hide resolved
@smklein smklein enabled auto-merge (squash) July 22, 2024 22:55
@smklein smklein merged commit 38575ab into main Jul 22, 2024
22 checks passed
@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