Skip to content

Commit

Permalink
Bugfix: ignore not connected error in NodeUnpublishVolume (#3445)
Browse files Browse the repository at this point in the history
* ignore not connected error in NodeUnpublishVolume

Signed-off-by: wangshulin <wangshulin@smail.nju.edu.cn>

* fix check nil error

Signed-off-by: wangshulin <wangshulin@smail.nju.edu.cn>

* simplify error judgment

Signed-off-by: wangshulin <wangshulin@smail.nju.edu.cn>

---------

Signed-off-by: wangshulin <wangshulin@smail.nju.edu.cn>
  • Loading branch information
wangshli authored Sep 11, 2023
1 parent 52499cc commit 3e8ba24
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/csi/plugins/nodeserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,8 @@ func (ns *nodeServer) NodeUnpublishVolume(ctx context.Context, req *csi.NodeUnpu
glog.V(3).Infof("NodeUnpublishVolume: targetPath %s has been cleaned up, so it doesn't need to be unmounted", targetPath)
return &csi.NodeUnpublishVolumeResponse{}, nil
}
if err != nil {
if err != nil && !errors.Is(err, syscall.ENOTCONN) {
// if error is "transport endpoint is not connected", ingore and do umount
return nil, errors.Wrapf(err, "NodeUnpublishVolume: stat targetPath %s error %v", targetPath, err)
}

Expand Down

0 comments on commit 3e8ba24

Please sign in to comment.