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

Rename disks when un-deleting and faulting #4681

Merged
merged 4 commits into from
Dec 14, 2023

Conversation

jmpesp
Copy link
Contributor

@jmpesp jmpesp commented Dec 12, 2023

When un-deleting phantom disks and setting them to faulted, use a new name that includes the disk's UUID: this ensures that even if a user created another disk with the same name in the project, the phantom disk can still be un-deleted and faulted, and eventually cleaned up.

Fixes #4673

When un-deleting phantom disks and setting them to faulted, use a new
name that includes the disk's UUID: this ensures that even if a user
created another disk with the same name in the project, the phantom disk
can still be un-deleted and faulted, and eventually cleaned up.

Fixes oxidecomputer#4673
Comment on lines +660 to +663
/// to faulted to ensure that it won't be used. Use the disk's UUID as part
/// of its new name to ensure that even if a user created another disk that
/// shadows this "phantom" disk the original can still be un-deleted and
/// faulted.
Copy link
Collaborator

Choose a reason for hiding this comment

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

It might be worth calling out - no matter how silly - that like, technically the user could be using this name for another too. Seems unlikely though!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're not wrong! added something in 1ac073e

@jmpesp jmpesp enabled auto-merge (squash) December 14, 2023 18:11
@jmpesp jmpesp merged commit b8c8658 into oxidecomputer:main Dec 14, 2023
15 checks passed
@jmpesp jmpesp deleted the rename_undeleted_disks branch December 15, 2023 16:54
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.

Cannot un-delete a disk with the same name
2 participants