From 165b8d13d1bdcbc73598c0c26962de5e6394872a Mon Sep 17 00:00:00 2001 From: Madhu Rajanna Date: Tue, 18 Aug 2020 10:22:36 +0530 Subject: [PATCH] cephfs: fix lock release in volumeDelete currently the lock is not released which is taken on the request name. this is causing issues when the subvolume is requested for delete. Signed-off-by: Madhu Rajanna (cherry picked from commit 787ba690894b46b3b270f6683efac2ea33391b91) --- internal/cephfs/controllerserver.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/cephfs/controllerserver.go b/internal/cephfs/controllerserver.go index f0061bd5f..4a1ecd773 100644 --- a/internal/cephfs/controllerserver.go +++ b/internal/cephfs/controllerserver.go @@ -331,7 +331,7 @@ func (cs *ControllerServer) DeleteVolume(ctx context.Context, req *csi.DeleteVol if acquired := cs.VolumeLocks.TryAcquire(volOptions.RequestName); !acquired { return nil, status.Errorf(codes.Aborted, util.VolumeOperationAlreadyExistsFmt, volOptions.RequestName) } - defer cs.VolumeLocks.Release(string(volID)) + defer cs.VolumeLocks.Release(volOptions.RequestName) // Deleting a volume requires admin credentials cr, err := util.NewAdminCredentials(secrets)