Merge pull request #61021 from ianchakeres/e2e-lv-prov-mount-disc

Automatic merge from submit-queue (batch tested with PRs 60980, 61273, 60811, 61021, 61367). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Added e2e test for local volume provisioner discovery of new mountpoints while running.

**What this PR does / why we need it**:

This PR adds an e2e test for the local volume provisioner leveraging of the MountPropogation feature (https://github.com/kubernetes/kubernetes/pull/46444) to discover newly created mountpoints. The MountPropogation feature is now in beta (https://github.com/kubernetes/kubernetes/blob/master/pkg/features/kube_features.go#L146).

**Which issue(s) this PR fixes**:
Fixes https://github.com/kubernetes/kubernetes/issues/58416

**Special notes for your reviewer**:

```
KUBE_FEATURE_GATES="BlockVolume=true" NUM_NODES=1 go run hack/e2e.go -- --up

go run hack/e2e.go -- --test --test_args='--ginkgo.focus=PersistentVolumes-local.*Local.*volume.*provisioner'
```

**Release note**:
```release-note
NONE
```
pull/8/head
Kubernetes Submit Queue 2018-03-22 02:08:23 -07:00 committed by GitHub
commit 84ae63022d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 18 additions and 0 deletions

View File

@ -403,6 +403,24 @@ var _ = utils.SIGDescribe("PersistentVolumes-local ", func() {
By("Deleting provisioner daemonset")
deleteProvisionerDaemonset(config)
})
It("should discover dynamicly created local persistent volume mountpoint in discovery directory", func() {
By("Starting a provisioner daemonset")
createProvisionerDaemonset(config)
By("Creating a volume in discovery directory")
dynamicVolumePath := path.Join(config.discoveryDir, fmt.Sprintf("vol-%v", string(uuid.NewUUID())))
setupLocalVolumeProvisionerMountPoint(config, dynamicVolumePath, config.node0)
By("Waiting for the PersistentVolume to be created")
_, err := waitForLocalPersistentVolume(config.client, dynamicVolumePath)
Expect(err).NotTo(HaveOccurred())
By("Deleting provisioner daemonset")
deleteProvisionerDaemonset(config)
By("Deleting volume in discovery directory")
cleanupLocalVolumeProvisionerMountPoint(config, dynamicVolumePath, config.node0)
})
})
Context("StatefulSet with pod anti-affinity", func() {