From 51e719ea50a9c6de47a3c1fb0c7101ca8918f8f8 Mon Sep 17 00:00:00 2001 From: Arthur Chaloin Date: Wed, 4 Mar 2020 14:47:21 +0100 Subject: [PATCH] fix(controller): unmap volume from given node id instead of all nodes --- pkg/controller/attacher.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/controller/attacher.go b/pkg/controller/attacher.go index 3d390fdb..431c2733 100644 --- a/pkg/controller/attacher.go +++ b/pkg/controller/attacher.go @@ -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")