mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-03-06 15:39:29 +00:00
rbd: return gRPC code Aborted
when the RBD-image is in-use on delete
According to the error scheme documented in the CSI specification, the Aborted error code should be initiate retries, whereas the Internal error code does not require this behaviour. When an RBD-image is still in-use, it can not be removed. The DeleteVolume procedure should be retried and will succeed once the RBD-image is not in-use anymore. Fixes: #5166 Signed-off-by: Niels de Vos <ndevos@ibm.com>
This commit is contained in:
parent
ac8cda5e37
commit
43b150f14d
@ -1067,7 +1067,7 @@ func cleanupRBDImage(ctx context.Context,
|
||||
if inUse {
|
||||
log.ErrorLog(ctx, "rbd %s is still being used", rbdVol)
|
||||
|
||||
return nil, status.Errorf(codes.Internal, "rbd %s is still being used", rbdVol.RbdImageName)
|
||||
return nil, status.Errorf(codes.Aborted, "rbd %s is still being used", rbdVol.RbdImageName)
|
||||
}
|
||||
|
||||
// delete the temporary rbd image created as part of volume clone during
|
||||
|
Loading…
Reference in New Issue
Block a user