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) (kubernetes#1675)

* [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

Co-authored-by: Alexis Ries <42094254+alexisries@users.noreply.github.com>
  • Loading branch information
gman0 and m-k8s authored Nov 2, 2021
1 parent a6a2bea commit 4f6a931
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 4f6a931

Please sign in to comment.