Change:
The local PV provisioner is being updated to discover only real mount points (and not directories), that resolves some other related issues. The related e2e tests using the local PV provisioner need to be updated accordingly.
/assign
/sig storage
FYI:

Discussion:
setupLocalVolumeProvisioner(config) volumePath = path.Join( hostBase, discoveryDir, fmt.Sprintf("vol-%v", string(uuid.NewUUID()))) <ins> setupLocalVolumeProvisionerMountPoint(config, volumePath) </ins> }) AfterEach(func() { <ins> cleanupLocalVolumeProvisionerMountPoint(config, volumePath) </ins> cleanupLocalVolumeProvisioner(config, volumePath) cleanupStorageClass(config) })

kind := schema.GroupKind{Group: "extensions", Kind: "DaemonSet"} framework.WaitForControlledPodsRunning(config.client, config.ns, daemonSetName, kind) <del> By("Creating a directory under discovery path") framework.Logf("creating local volume under path %q", volumePath) mkdirCmd := fmt.Sprintf("mkdir %v -m 777", volumePath) err := framework.IssueSSHCommand(mkdirCmd, framework.TestContext.Provider, config.node0) Expect(err).NotTo(HaveOccurred()) </del> By("Waiting for a PersitentVolume to be created") oldPV, err := waitForLocalPersistentVolume(config.client, volumePath) Expect(err).NotTo(HaveOccurred())

createVolumeConfigMap(config) By("Initializing local volume discovery base path") <del> mkdirCmd := fmt.Sprintf("mkdir %v -m 777", path.Join(hostBase, discoveryDir)) </del> <ins> mkdirCmd := fmt.Sprintf("mkdir -p %v -m 777", path.Join(hostBase, discoveryDir)) </ins> err := framework.IssueSSHCommand(mkdirCmd, framework.TestContext.Provider, config.node0) Expect(err).NotTo(HaveOccurred()) }

By("Cleaning up cluster role binding") deleteClusterRoleBinding(config) <del> By("Removing the test directory") </del> <ins> By("Removing the test discovery directory") </ins> removeCmd := fmt.Sprintf("rm -r %s", path.Join(hostBase, discoveryDir)) err := framework.IssueSSHCommand(removeCmd, framework.TestContext.Provider, config.node0) Expect(err).NotTo(HaveOccurred())

Expect(err).NotTo(HaveOccurred()) } <ins> func setupLocalVolumeProvisionerMountPoint(config *localTestConfig, volumePath string) { By(fmt.Sprintf("Creating local directory at path %q", volumePath)) mkdirCmd := fmt.Sprintf("mkdir %v -m 777", volumePath) err := framework.IssueSSHCommand(mkdirCmd, framework.TestContext.Provider, config.node0) Expect(err).NotTo(HaveOccurred()) By(fmt.Sprintf("Mounting local directory at path %q", volumePath)) mntCmd := fmt.Sprintf("sudo mount --bind %v %v", volumePath, volumePath) err = framework.IssueSSHCommand(mntCmd, framework.TestContext.Provider, config.node0) Expect(err).NotTo(HaveOccurred()) } func cleanupLocalVolumeProvisionerMountPoint(config *localTestConfig, volumePath string) { By(fmt.Sprintf("Unmounting the test mount point from %q", volumePath)) umountCmd := fmt.Sprintf("sudo umount %v", volumePath) err := framework.IssueSSHCommand(umountCmd, framework.TestContext.Provider, config.node0) Expect(err).NotTo(HaveOccurred()) By("Removing the test mount point") removeCmd := fmt.Sprintf("rm -r %s", volumePath) err = framework.IssueSSHCommand(removeCmd, framework.TestContext.Provider, config.node0) } </ins> func createServiceAccount(config *localTestConfig) { serviceAccount := v1.ServiceAccount{ TypeMeta:   metav1.TypeMeta{APIVersion: "v1", Kind: "ServiceAccount"},