Skip to content

Commit

Permalink
[manila-csi-plugin] ControllerExpandVolume: fix bad key for deleting …
Browse files Browse the repository at this point in the history
…from pendingVolumes (kubernetes#1667)

* [manila-csi-plugin] in ControllerExpandVolume fix bad key for pendingVolumes.Delete

/closes kubernetes#1666

* [manila-csi-plugin] use share.Name to identify volumes in pendingVolumes.Delete
  • Loading branch information
m-k8s authored Oct 13, 2021
1 parent b746b5d commit 6191877
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/csi/manila/controllerserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ func (cs *controllerServer) ControllerExpandVolume(ctx context.Context, req *csi
}

// Check for pending operations on this volume
if _, isPending := pendingVolumes.LoadOrStore(req.GetVolumeId(), true); isPending {
if _, isPending := pendingVolumes.LoadOrStore(share.Name, true); isPending {
return nil, status.Errorf(codes.Aborted, "volume %s is already being processed", share.Name)
}
defer pendingVolumes.Delete(share.Name)
Expand Down

0 comments on commit 6191877

Please sign in to comment.