mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-09 16:00:22 +00:00
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 <madhupr007@gmail.com>
This commit is contained in:
parent
31c7c95fdb
commit
787ba69089
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user