Skip to content

Commit

Permalink
fix(controller): unmap volume from given node id instead of all nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
arcln committed Mar 4, 2020
1 parent d37fafc commit 51e719e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/controller/attacher.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ func (driver *Driver) ControllerUnpublishVolume(ctx context.Context, req *csi.Co
return nil, err
}

klog.Infof("unmapping volume %s from all initiators", req.GetVolumeId())
_, status, err := driver.dothillClient.UnmapVolume(req.GetVolumeId(), "")
klog.Infof("unmapping volume %s from initiator %s", req.GetVolumeId(), req.GetNodeId())
_, status, err := driver.dothillClient.UnmapVolume(req.GetVolumeId(), req.GetNodeId())
if err != nil {
if status != nil && status.ReturnCode == unmapFailedErrorCode {
klog.Info("unmap failed, assuming volume is already unmapped")
Expand Down

0 comments on commit 51e719e

Please sign in to comment.