Commit Graph

84 Commits (ca1e47065b82b6609cfb026876225a2681c89b36)

Author SHA1 Message Date
Kubernetes Prow Robot 73c1e35491
Merge pull request #76174 from msau42/slow-e2es
Mark slow storage e2es
2019-04-04 19:37:19 -07:00
Michelle Au ce7ac63916 Mark slow storage e2es 2019-04-04 18:01:22 -07:00
Kenichi Omichi 542b07cd6a Use framework.ExpectNoError() for e2e/storage
The e2e test framework has ExpectNoError() for readable test code.
This replaces Expect(err).NotTo(HaveOccurred()) with it for e2e/storage.
2019-04-02 16:20:35 +00:00
Kubernetes Prow Robot d99979f8b5
Merge pull request #75015 from cofyc/fix73168-disable-temporarily
Disable "should set different fsGroup for second pod if first pod is deleted" temporarily
2019-03-06 04:46:10 -08:00
Yecheng Fu 05fe7094d5 Disable "should set different fsGroup for second pod if first pod is deleted" test temporarily 2019-03-06 10:46:17 +08:00
Yecheng Fu a81b351670 Update persistent_volumes-local.go to use utils.HostExec/utils.LocalTestResourceManager.
This simplifies the code and makes it more maintainable.
2019-03-02 20:38:20 +08:00
Yecheng Fu 1bfd3838e2 Add new e2e test for local PV "Pods sharing a single local PV [Serial]" 2019-02-28 17:22:23 +08:00
Claudiu Belu 00e2582c67 Adds Windows-related Networking tests
Creating pods with HostNetwork is not currently supported on
Windows Kubelet, and thus, ones without HostNetwork are created instead.
2019-02-06 15:58:18 -08:00
Yecheng Fu 1660a0d260 Fix bug 2019-01-29 11:42:18 +08:00
Yecheng Fu 513ae63bf6 Add a new stress test to replace old provisioner stress test 2019-01-23 13:49:41 +08:00
Yecheng Fu b7a33511e5 Clean up local volum provisioner e2e tests 2019-01-23 11:02:12 +08:00
Yecheng Fu e3bca51a57 Do not check events in e2e tests
events can be throttled and should not be used to validate failure
conditions in e2e tests
2019-01-22 18:24:29 +08:00
Jordan Liggitt fd9e9b01b1 Remove uses of extensions/v1beta1 clients 2018-12-19 11:18:53 -05:00
Weibin Lin 842bd1e1ec update deployment, daemonset, replicaset, statefulset to apps/v1 2018-12-19 10:46:45 -05:00
Matthew Wong 0c671b1211 Remove [Feature:BlockVolume] everywhere 2018-11-16 13:38:59 -05:00
Davanum Srinivas 43f523d405
Switch to sigs.k8s.io/yaml from ghodss/yaml
Change-Id: Ic72b5131bf441d159012d67a6a3d87088d0e6d31
2018-11-07 13:17:32 -05:00
k8s-ci-robot 5fdad5c19f
Merge pull request #68771 from liyongxin/master
typo fix from utilites to utilities
2018-11-03 16:50:28 -07:00
k8s-ci-robot 25b3ec6c62
Merge pull request #68908 from msau42/add-slow
Move storage tests that take longer than 2 minutes to slow suite
2018-09-26 22:59:23 -07:00
Michelle Au b1594f3cd1 Move storage tests that take longer than 2 minutes to slow suite 2018-09-20 15:29:00 -07:00
David Zhu 0698354f61 Add privileged test pod security policy to local volume provisioner test service account 2018-09-18 14:25:31 -07:00
Yongxin Li 6a98ce78e4 typo fix from utilites to utilities
Signed-off-by: Yongxin Li <yxli@alauda.io>
2018-09-18 13:52:04 +08:00
Michelle Au 07ebe323fa Fix gce localssd pv tests 2018-09-05 18:25:47 -07:00
Michelle Au 8091c7975b Integration and e2e tests 2018-09-04 16:30:14 -07:00
NickrenREN 5bc823f141 fix and update local volume e2es 2018-09-03 13:35:23 +08:00
Tim Pepper 91b0ecc006 storage e2e test: remove race when setting up loopback device
CI has shown occasional failures stemming from an -EBUSY when
test/e2e/storage/persistent_volumes-local.go aka "PersistentVolumes-local"
attempts to do losetup.

Looking at the code, it has a clear race between querying the current
free loopback device and later explicitly attempting to loopback setup a
file at the queried device node.  Losetup nowadays includes the logic to
handle this for the user, if the '-f' option is used instead of naming
the desired target loopback device explicitly.  It is safe to presume
a suitable losetup is present as the '-f' option is used elsewhere in
the test, and it is safe to not record the allocated device, as it is
already queried on the fly elsewhere in the test ahead of other commands
which need to know an already created loopback device's node name.

This patch should result in less flakes for this test case.

Signed-off-by: Tim Pepper <tpepper@vmware.com>
2018-08-10 15:28:50 -07:00
Manjunath A Kumatagi 1f7f33aaa4 Update the nginx image from hub.docker.com 2018-08-04 05:19:53 +05:30
stewart-yu 736694e6ad fix wrong output in e2e log 2018-07-28 14:39:12 +08:00
Kubernetes Submit Queue bb4bdd08a9
Merge pull request #63877 from AdamDang/patch-9
Automatic merge from submit-queue (batch tested with PRs 63877, 64559, 65952). 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>.

Typo fix in the returned message: dynamicly->dynamically

Line 541: a typo in the returned message: 
dynamicly->dynamically
2018-07-16 17:00:02 -07:00
Yecheng Fu c3715da13f Add local volume pod affinity tests. 2018-07-08 02:36:49 +00:00
Yecheng Fu 1fbc5babb5 Prepare local volumes via hostexec pod. 2018-06-26 13:18:55 +08:00
Yecheng Fu df0f108a02 Fixes fsGroup check in local volume in containerized kubelet. Except
this, it also fixes fsGroup check when volume source is a normal
directory whether kubelet is running on the host or in a container.
2018-05-23 10:41:42 +08:00
AdamDang cf50026886
Typo fix in the returen message: dynamicly->dynamically
dynamicly->dynamically
2018-05-16 01:18:43 +08:00
Yecheng Fu a84ebb5193 PR #62903 changed error string GetMountRefs() returned, which broke test
`should fail due to non-existent path`.
Remove error string check to fix test.
2018-05-03 16:33:28 +08:00
Kubernetes Submit Queue 186dd7beb1
Merge pull request #62903 from cofyc/fixfsgroupcheckinlocal
Automatic merge from submit-queue (batch tested with PRs 62657, 63278, 62903, 63375). 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>.

Add more volume types in e2e and fix part of them.

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

- Add dir-link/dir-bindmounted/dir-link-bindmounted/bockfs volume types for e2e tests.
- Fix fsGroup related e2e tests partially.
- Return error if we cannot resolve volume path.
  - Because we should not fallback to volume path, if it's a symbolic link, we may get wrong results.

To safely set fsGroup on local volume, we need to implement these two methods correctly for all volume types both on the host and in container:

- get volume path kubelet can access
  - paths on the host and in container are different
- get mount references
  - for directories, we cannot use its mount source (device field) to identify mount references, because directories on same filesystem have same mount source (e.g. tmpfs), we need to check filesystem's major:minor and directory root path on it

Here is current status:

| | (A) volume-path (host) | (B) volume-path (container) | (C) mount-refs (host) | (D) mount-refs (container) |
| --- | --- | --- | --- | --- |
| (1) dir | OK | FAIL | FAIL | FAIL |
| (2) dir-link | OK | FAIL | FAIL | FAIL |
| (3) dir-bindmounted | OK | FAIL | FAIL | FAIL |
| (4) dir-link-bindmounted | OK | FAIL | FAIL | FAIL |
| (5) tmpfs| OK | FAIL | FAIL | FAIL |
| (6) blockfs| OK | FAIL | OK | FAIL |
| (7) block| NOTNEEDED | NOTNEEDED | NOTNEEDED | NOTNEEDED |
| (8) gce-localssd-scsi-fs| NOTTESTED | NOTTESTED | NOTTESTED | NOTTESTED |

- This PR uses `nsenter ... readlink` to resolve path in container as @msau42  @jsafrane [suggested](https://github.com/kubernetes/kubernetes/pull/61489#pullrequestreview-110032850). This fixes B1:B6 and D6, , the rest will be addressed in https://github.com/kubernetes/kubernetes/pull/62102.
- C5:D5 marked `FAIL` because `tmpfs` filesystems can share same mount source, we cannot rely on it to check mount references. e2e tests passes due to we use unique mount source string in tests.
- A7:D7 marked `NOTNEEDED` because we don't set fsGroup on block devices in local plugin. (TODO: Should we set fsGroup on block device?)
- A8:D8 marked `NOTTESTED` because I didn't test it, I leave it to `pull-kubernetes-e2e-gce`. I think it should be same as `blockfs`.

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-05-02 20:13:11 -07:00
Yecheng Fu 3748197876 Add more volume types in e2e and fix part of them.
- Add dir-link/dir-bindmounted/dir-link-bindmounted/blockfs volume types for e2e
tests.
- Return error if we cannot resolve volume path.
- Add GetFSGroup/GetMountRefs methods for mount.Interface.
- Fix fsGroup related e2e tests partially.
2018-05-02 10:31:42 +08:00
Yecheng Fu 27e2e32b00 Use shorter timeout if possible.
- Add PodStartShortTimeout and ClaimProvisionShortTimeout constants.
- Change framework.PodStartTimeout to framework.PodStartShortTimeout in
  persistent_volumes-local.go. Busybox image is very small, no need to
  wait for a long time.
2018-04-19 10:07:59 +08:00
Yecheng Fu 55ef18ad42 Report events to apiserver in local volume plugin.
- Add VolumeHost.GetEventRecorder() method
- Add related e2e tests
2018-04-18 11:19:36 +08:00
Michelle Au bf70c0af4e Set slave mount propagation for local provisioner 2018-04-11 10:28:06 -07:00
Kubernetes Submit Queue 66ecee9cc0
Merge pull request #61402 from lcfang/test0319
Automatic merge from submit-queue (batch tested with PRs 61402, 61143, 61427, 60592). 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>.

delete some unused code

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

delete some unused code

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-03-27 15:33:07 -07:00
Kubernetes Submit Queue af22cc80e3
Merge pull request #61019 from ianchakeres/e2e-lv-prov-bind-disc
Automatic merge from submit-queue (batch tested with PRs 61644, 61624, 61743, 61019, 61287). 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 that does not create PV for discovered non-bind-mounted filesystem.

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

For v2+ of the [local volume provisioner](https://github.com/kubernetes-incubator/external-storage/tree/master/local-volume) non-bind mounted filesystems in a discovery directory will no longer result in local PVs. This change was put in place to handle the non-atomic nature of other methods of adding directories (e.g. https://github.com/kubernetes-incubator/external-storage/issues/482).

This PR tests this change in behavior, and it validates that non-bind mounted directories within a discovery directory do NOT result in a local PV.

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

**Special notes for your reviewer**:

This test can be executed using the following commands:
```
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'
```

If you get the logs from a local volume provisioner pod, you will see the following log messages:
```
$ kubectl logs local-volume-provisioner-94ddb -n e2e-tests-persistent-local-volumes-test-6ls4z
<snip>
I0311 19:01:30.350504       1 controller.go:73] Controller started
E0311 19:01:30.350849       1 discovery.go:172] Path "/mnt/local-storage/notbindmount" is not an actual mountpoint
```


**Release note**:
```release-note
NONE
```
2018-03-27 06:41:20 -07:00
lcfang a3c1dfba24 delete some unused code 2018-03-27 09:45:53 +08:00
Ian Chakeres 6e53b1a313 Added e2e test for local-volume provisioner that does not create PV for discovered non-bind-mounted filesystem.
Inspect daemonset provisioner logs for validation.

The logs are examined for the log lines showing that the provisioner discovered the directories and did NOT create a local PV.

This commit also adds SkipUnlessProvider supports SSH, which is required for local PV e2e tests.
2018-03-24 06:22:18 -07:00
Ian Chakeres 42a605510d Updated e2e lv-provisioner image to v2.1.0 2018-03-23 06:32:01 -07:00
Ian Chakeres 06462e91c8 Added e2e test for local volume provisioner discovery of new mountpoints while running. 2018-03-11 16:52:33 -07:00
Michelle Au c4851c06d7 Cap max number of nodes to use for local PV e2e tests 2018-03-02 11:54:50 -08:00
Kubernetes Submit Queue a274a7c2ad
Merge pull request #60436 from msau42/local-e2e-stress
Automatic merge from submit-queue (batch tested with PRs 59310, 60424, 60308, 60436, 60020). 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>.

Reduce number of pods created for local PV stress test

**What this PR does / why we need it**:
Local PV stress test is flaking.  Failed runs show that test is timing out at 47/50 pods.  Reduce the number of pods created by the test so that it's not so close to the max timeout.

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #

**Special notes for your reviewer**:
I'll need to investigate further to see why processing the pods is so slow and ways to speed it up.  But for now, try to reduce flaking.

**Release note**:

```release-note
NONE
```
2018-02-27 07:11:51 -08:00
Michelle Au 7def517dd3 Reduce number of pods created for local PV stress test 2018-02-26 10:00:59 -08:00
Ian Chakeres 4812f9e5d8 Added local storage e2e test for VolumeMode: block
VolumeMode block requires alpha feature-gate BlockVolume=true

Added VolumeMode to e2e test framework for pv and pvc
Added volumeDevices to e2e test framework for block volumes
2018-02-25 16:39:09 -08:00
Michelle Au 3ce5388128 Add Local PV stress test 2018-02-23 17:43:06 -08:00
Michelle Au c7884550b2 Add VolumeNodeAffinity to PersistentVolumeSpec 2018-02-16 17:54:10 -08:00