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

Reset FCP assignements of deleted VM #845

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Bischoff
Copy link
Contributor

@Bischoff Bischoff commented Nov 23, 2024

PLEASE DO NOT MERGE IMMEDIATELY

This PR was tested to work, but I'd like expert advice before merging it.
My code might be very naive, or even incorrect.


With current code when you:

  1. create a VM guest
  2. attach a disk via AttachVolume() to that guest
  3. forget to detach it via DetachVolume()
  4. delete the instance

then the disk stays counted as attached to the deleted instance.

If you recreate the instance, then AttachVolume() will skip the dedication, because it considers that the disk is already dedicated to the instance, while it is not.

This PR resets the FCP records in database for the deleted instance at time of deletion.

@Bischoff Bischoff force-pushed the free-fcp-of-deleted-vm branch from 6832cfe to 7412ab0 Compare November 23, 2024 18:17
@Bischoff Bischoff force-pushed the free-fcp-of-deleted-vm branch from 7412ab0 to 44e838b Compare November 23, 2024 18:20
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.

1 participant