[RBD] Clone v2: Image is unusable if deletion fails
Recently cinder has utilized Ceph clone v2 support for its
RBD backend, since then if you attempt to delete an image from
glance that has a dependent volume, all future uses of that
image will fail in error state. Despite the fact that image
itself is still inside of Ceph/Glance. This issue is reproducible
if you are using ceph client version greater than 'luminous'
To resolve this issue glance RBD driver now checks whether snapshot
of original image has any external references before deleting/removing
it's snapshot and returns 409 Conflict response if it has any.
NOTE: To check this dependency glance osd needs 'read' access to
cinder and nova side RBD pool.
Reviewed: https:/ /review. opendev. org/c/openstack /glance_ store/+ /819481 /opendev. org/openstack/ glance_ store/commit/ 3d221ec529862d4 3ab303644e74ee9 ad6ce8cd40
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit 3d221ec529862d4 3ab303644e74ee9 ad6ce8cd40
Author: Abhishek Kekane <email address hidden>
Date: Fri Nov 26 14:58:23 2021 +0000
[RBD] Clone v2: Image is unusable if deletion fails
Recently cinder has utilized Ceph clone v2 support for its
RBD backend, since then if you attempt to delete an image from
glance that has a dependent volume, all future uses of that
image will fail in error state. Despite the fact that image
itself is still inside of Ceph/Glance. This issue is reproducible
if you are using ceph client version greater than 'luminous'
To resolve this issue glance RBD driver now checks whether snapshot
of original image has any external references before deleting/removing
it's snapshot and returns 409 Conflict response if it has any.
NOTE: To check this dependency glance osd needs 'read' access to
cinder and nova side RBD pool.
Closes-Bug: #1954883 /review. opendev. org/c/openstack /devstack- plugin- ceph/+/ 819476 8b6f89ce46abbe1 28c678c90e7
Depends-on: https:/
Change-Id: If30b7bd7acac14