Skip to content

Commit 692c215

Browse files
committed
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 <[email protected]>
1 parent 3515b1a commit 692c215

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/hostpath/nodeserver.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ func (ns *nodeServer) NodePublishVolume(ctx context.Context, req *csi.NodePublis
133133
return nil, status.Error(codes.InvalidArgument, "cannot publish a non-mount volume as mount volume")
134134
}
135135

136-
notMnt, err := mount.New("").IsLikelyNotMountPoint(targetPath)
136+
notMnt, err := mount.New("").IsNotMountPoint(targetPath)
137137
if err != nil {
138138
if os.IsNotExist(err) {
139139
if err = os.MkdirAll(targetPath, 0750); err != nil {

0 commit comments

Comments
 (0)