From 540752d0a1e7875c2a15ce96b28ab376431f58a3 Mon Sep 17 00:00:00 2001 From: Jan Safranek Date: Wed, 30 Aug 2017 15:34:49 +0200 Subject: [PATCH] Fix iSCSI WaitForAttach not mounting a volume WaitForAttach failed consistently with this error: Heuristic determination of mount point failed:stat /var/lib/kubelet/plugins/kubernetes.io/iscsi/iface-default/10.128.0.3:3260-iqn.2003-01.org.linux-iscsi.f21.x8664:sn.4b0aae584f7c-lun-0: no such file or directory We should ignore "no such file or directory" eror, the directory is created just few lines below. --- pkg/volume/iscsi/iscsi_util.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/volume/iscsi/iscsi_util.go b/pkg/volume/iscsi/iscsi_util.go index 6053d1633a0..471e2bb035f 100644 --- a/pkg/volume/iscsi/iscsi_util.go +++ b/pkg/volume/iscsi/iscsi_util.go @@ -300,7 +300,7 @@ func (util *ISCSIUtil) AttachDisk(b iscsiDiskMounter) (string, error) { // mount it globalPDPath := b.manager.MakeGlobalPDName(*b.iscsiDisk) notMnt, err := b.mounter.IsLikelyNotMountPoint(globalPDPath) - if err != nil { + if err != nil && !os.IsNotExist(err) { return "", fmt.Errorf("Heuristic determination of mount point failed:%v", err) } if !notMnt {