mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-14 02:43:36 +00:00
rbd: restart thick-provisioned PVC cloning after aborting
In case cloning a thick-PVC failed during DeepCopy(), the image will exist, but have partial contents. Only when the image has the thick-provisioned metadata set, it has completed DeepCopy(). When the metadata is missing, the image is deleted, and an error is returned to the caller. Kubernetes will automatically retry provisioning on the ABORTED error, and the cloning will get restarted from the beginning. Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
committed by
mergify[bot]
parent
b1045364d9
commit
57d3183cb1
@ -152,8 +152,6 @@ func (rv *rbdVolume) createCloneFromImage(ctx context.Context, parentVol *rbdVol
|
||||
}
|
||||
defer j.Destroy()
|
||||
|
||||
// TODO: if rv exists, delete the image and start over?
|
||||
|
||||
err = rv.doSnapClone(ctx, parentVol)
|
||||
if err != nil {
|
||||
return status.Error(codes.Internal, err.Error())
|
||||
|
Reference in New Issue
Block a user