From 692c215f6e6a138cbae11ae97e66ec7c183f3d88 Mon Sep 17 00:00:00 2001 From: Mucahit Kurt Date: Tue, 1 Oct 2019 21:48:10 +0300 Subject: [PATCH] use isNotMountPoint instead of isNotLikelyMountPoint to keep idempotent behaviour of the driver because later method can't detect bind mounts. Signed-off-by: Mucahit Kurt --- pkg/hostpath/nodeserver.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/hostpath/nodeserver.go b/pkg/hostpath/nodeserver.go index 05ee3dc1b..da8e7a245 100644 --- a/pkg/hostpath/nodeserver.go +++ b/pkg/hostpath/nodeserver.go @@ -133,7 +133,7 @@ func (ns *nodeServer) NodePublishVolume(ctx context.Context, req *csi.NodePublis return nil, status.Error(codes.InvalidArgument, "cannot publish a non-mount volume as mount volume") } - notMnt, err := mount.New("").IsLikelyNotMountPoint(targetPath) + notMnt, err := mount.New("").IsNotMountPoint(targetPath) if err != nil { if os.IsNotExist(err) { if err = os.MkdirAll(targetPath, 0750); err != nil {