Skip to content

Conversation

@leust
Copy link

@leust leust commented May 29, 2025

The source volume/snapshot was locked while the new volume was creating, preventing other volumes from being created in parallel from the same source. This was to prevent the source from being deleted while the volume is being created from it.

We move that lock from the manager upper to the API layer until the volume reaches the 'creating' state, then the lock is released.

The delete_snapshot / delete_volume will check the DB if there are volumes creating from it before proceeding with the deletion.

The caveat is that, if a volume is stuck in 'creating', it will still prevent the source from being deleted.

Change-Id: I8be26242474a2b4eba676978b533f8cad40e292b

The source volume/snapshot was locked while the new volume was
creating, preventing other volumes from being created in parallel
from the same source. This was to prevent the source from being
deleted while the volume is being created from it.

We move that lock from the manager upper to the API layer until the
volume reaches the 'creating' state, then the lock is released.

The delete_snapshot / delete_volume will check the DB if there are
volumes creating from it before proceeding with the deletion.

The caveat is that, if a volume is stuck in 'creating', it will
still prevent the source from being deleted.

Change-Id: I8be26242474a2b4eba676978b533f8cad40e292b
@hemna
Copy link

hemna commented Jul 23, 2025

So the current API is that if the lock is in place, that the delete volume just waits to acquire the lock and doesn't report an error in the API. We should try and maintain that, so there is no change to the API response.

@leust
Copy link
Author

leust commented Jul 23, 2025

In this case I think is easier to introduce a new API microversion for supporting parallelism in cloning.

I don't see a good solution for how to wait for all clone operations to finish, apart from looking into the database, which might lead to inconsistencies.

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.

3 participants