1. volume/flows/manager/create_volume.py:_create_from_image_download() creates a volume, then
2. calls volume_utils.copy_image_to_volume(), which
a. fetches the image,
b. deletes the volume, and
c. runs `rbd import`.
If a snapshot of the volume got created between 1 and 2b (e.g. by rbd mirror), 2b will fail. So I think we need one of these solutions:
1. Instead of creating a volume and immediately deleting it, let's not create it in the first place.
2. Is there a way to delete a volume and all its snapshot in an atomic way?
3. Can we force the deletion of a volume even if it has snapshots?
IMHO this is a bug in https:/ /opendev. org/openstack/ cinder . And I agree with the previous analysis:
1. volume/ flows/manager/ create_ volume. py:_create_ from_image_ download( ) creates a volume, then utils.copy_ image_to_ volume( ), which
2. calls volume_
a. fetches the image,
b. deletes the volume, and
c. runs `rbd import`.
If a snapshot of the volume got created between 1 and 2b (e.g. by rbd mirror), 2b will fail. So I think we need one of these solutions:
1. Instead of creating a volume and immediately deleting it, let's not create it in the first place.
2. Is there a way to delete a volume and all its snapshot in an atomic way?
3. Can we force the deletion of a volume even if it has snapshots?