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

Draft
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 2 times, most recently from 7412ab0 to 44e838b Compare November 23, 2024 18:20
@Bischoff Bischoff force-pushed the free-fcp-of-deleted-vm branch from 44e838b to 21e9af1 Compare January 24, 2025 11:21
@Bischoff Bischoff marked this pull request as draft January 24, 2025 11:22
@mfriesenegger mfriesenegger force-pushed the free-fcp-of-deleted-vm branch from 21e9af1 to bf6c209 Compare January 31, 2025 17:23
@Bischoff Bischoff force-pushed the free-fcp-of-deleted-vm branch from bf6c209 to 327fe8c Compare February 10, 2025 11:05
@Bischoff Bischoff self-assigned this Feb 10, 2025
Signed-off-by: Eric Bischoff <ebischoff@suse.com>
@Bischoff Bischoff force-pushed the free-fcp-of-deleted-vm branch from 327fe8c to dcf7056 Compare February 11, 2025 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant