Commit Graph

90 Commits

Author SHA1 Message Date
Shihang Zhang
d2859cd89b plumb service account token down to csi driver 2020-11-12 09:26:43 -08:00
Kubernetes Prow Robot
0bb732842a
Merge pull request #95971 from chrishenzie/e2e-stress-snapshots
Add E2E stress test suite for creation / deletion of VolumeSnapshot resources
2020-11-05 14:25:03 -08:00
Chris Henzie
fb6bc4f8b0 E2E stress test suite for VolumeSnapshots
Introduces a new test suite that creates and deletes many
VolumeSnapshots simultaneously to test snapshottable storage plugins
under load.
2020-11-05 08:58:13 -08:00
shahra
e95af138b5 Volume snapshot e2e test to validate
VolumeSnapshotContent and PVC finalizer
2020-11-04 14:08:24 -08:00
Kubernetes Prow Robot
ac6447c76f
Merge pull request #94318 from gnufied/fix-namespace-deletion
Prevent deletion  of namespace again
2020-09-10 10:46:03 -07:00
Hemant Kumar
c4ce420667 Prevent deletion of namespace again 2020-09-09 11:22:08 -04:00
Kubernetes Prow Robot
f6d169c7ca
Merge pull request #93120 from msau42/e2e-export
Export WaitForCSIDriverRegistrationOnAllNodes
2020-08-28 06:34:53 -07:00
Jiawei Wang
76b4973b42 Wait for mock CSI Driver bringup to perform e2e test
In our current mock CSI driver e2e test, we are not waiting
for the CSI driver register successfully to perform test
including provision PVC. This can lead to timeout when the
csi driver takes longer to register the socket.

This change adds the waiting part so that the system will
wait for up to 10 minutes for the driver to be ready. This
normally won't take this long. However, under a resource
constraint environment it can take longer than expected time.

https://github.com/kubernetes/kubernetes/issues/93358
2020-08-10 11:03:35 -07:00
Michelle Au
10a8c195a1 Export WaitForCSIDriverRegistrationOnAllNodes to be used by external csi driver repos
Change-Id: Ie61430b1050a778d8ba98177e0c995ff2553f9cd
2020-07-15 16:53:37 -07:00
Patrick Ohly
567ce87aee CSIStorageCapacity: E2E test with mock driver
We can create CSIStorageCapacity objects manually, therefore we don't
need the updated external-provisioner for these tests.
2020-07-08 08:02:26 +02:00
Hemant Kumar
74be9f04fa Ensure CleanupActionHandle always completes
The way gingko handles interrupts is:
 - It starts running AfterSuite hooks in a separate goroutine (this includes cleanupAction hooks)
 - Once AfterSuite hook is done executing it calls
   os.Exit(1) on test suite.

So how cleanupFunc() that runs via defer in test can be interrupted
is:
 - cleanupFunc starts running via defer (or AfterEach hook) but first
   thing that function does is to remove cleanupHandle from
   framework.RemoveCleanupAction.
 - Test suite receives interrupt from user and AfterSuite block
   starts executing
 - remember that while cleanupFunc is running in goroutine#1,
   AfterSuite is running concurrently in goroutine#2.
 - AfterSuite hook has bunch of CleanupActions it needs to run which
   were registered via framework.AddCleanupAction(cleanupFunc) but
   once cleanupFunc starts executing via defer in the test, it will
   remove the cleanupHandle from framework's aftersuite hooks.
 - So if AfterSuite did not had anything to run (because
   those actions were removed via framework.RemoveCleanupAction
   then it will simply go to the last framework.AfterEach action and call os.Exit(1)
 - So if os.Exit(1) is called before cleanupFunc has a chance to finish in defer, it will not complete.
2020-06-02 12:40:32 -04:00
Hemant Kumar
da941d8d3e Create mock CSI driver resources in different namespace 2020-05-13 11:16:00 -04:00
Kubernetes Prow Robot
7f78048594
Merge pull request #90781 from msau42/increase-timeout
Increase timeout waiting for driver to start on nodes
2020-05-06 22:23:08 -07:00
Michelle Au
fc08f74157 Increase timeout waiting for driver to start on nodes to reduce test flakiness
Change-Id: Id553943e4473b387bf0ae14a18a90cb3a1bcd5c1
2020-05-05 18:10:10 -07:00
Michelle Au
6596e20b18 Make stress test parameters configurable
Change-Id: Ia062f3433b6043825a51a54c7c07eb4cdf809631
2020-04-16 14:18:21 -07:00
Patrick Ohly
f117849582 mock tests: ResourceExhausted error handling in external-provisioner
The mock driver gets instructed to return a ResourceExhausted error
for the first CreateVolume invocation via the storage class
parameters.

How this should be handled depends on the situation: for normal
volumes, we just want external-scheduler to retry. For late binding,
we want to reschedule the pod. It also depends on topology support.
2020-04-07 13:09:31 +02:00
Jan Safranek
a4f080861f Test NodeStage error cases
Especially related to "uncertain" global mounts. A large refactoring of CSI
mock tests were necessary:
- to be able to script the driver to return errors as required by the test
- to parse the CSI driver logs to check kubelet called the right CSI calls
2020-04-06 15:03:22 +02:00
drfish
dfab6b637f Update .import-aliases for e2e test framework 2020-03-25 11:40:02 +08:00
Christian Huffman
c6fd25d100 Updated CSIDriver references 2020-03-06 08:21:26 -05:00
Michelle Au
76a4a34dae Pass NodeSelection directly into e2e testsuites so that tests can use them more consistently
Change-Id: I99c8c1d8535a2a2319fbe8216b953c14a56f2763
2020-02-11 20:25:24 -08:00
Mike Danese
3aa59f7f30 generated: run refactor 2020-02-07 18:16:47 -08:00
Kubernetes Prow Robot
14ed35712c
Merge pull request #87168 from misterikkit/timout-err
storage e2e: Add context to timeout errors
2020-01-15 01:22:32 -08:00
Jonathan Basseri
99a015705b storage e2e: Add context to timeout errors
Many times an e2e test fails with an unexpected error,
"timed out waiting for the condition".

Useful information may be in the test logs, but debugging e2e test
failures will be much faster if we add context to errors when they
happen.

This change makes sure we add context to all errors returned from
helpers like wait.Poll().
2020-01-14 11:45:38 -08:00
yuxiaobo
73fb0ab5ec test/e2e/storage:Use e2eskipper package
Signed-off-by: yuxiaobo <yuxiaobogo@163.com>
2020-01-13 14:04:10 +08:00
danielqsj
6596a14d39 add missing alias of api errors under test 2019-12-26 17:29:38 +08:00
Boyil (Elliot) Li
cfa6f83427 Enable snapshottable e2e test for csi pd driver
- add csi pd driver manifests
- modify snapshottable test case
- fix tests of pod has to be created first for delay-binding PVC, otherwise PVC won't be bound
2019-11-15 15:46:48 -08:00
David Zhu
1f2588496d
Revert "Enable snapshot e2e test for csi pd driver" 2019-11-14 19:29:20 -08:00
Boyil (Elliot) Li
f7bba28dab Enable snapshottable e2e test for csi pd driver
- add pd driver manifests
- modify snapshottable test case
2019-11-14 10:27:39 -08:00
Kubernetes Prow Robot
c580a12c8e
Merge pull request #83568 from bertinatto/volume_limits_ga
Promote volume limits to GA
2019-11-12 11:50:22 -08:00
Kubernetes Prow Robot
897ce3073c
Merge pull request #84533 from davidz627/fix/deprecatedPath
Remove plugin watching of deprecated directory and CSI v0 support in accordance with deprecation policy
2019-11-12 04:48:20 -08:00
Fabio Bertinatto
f6de8ab727 Enable volume limits e2e tests for CSI hostpath driver 2019-11-12 09:43:54 +01:00
David Zhu
802fe12803 Remove plugin watching of deprecated directory {kubelet_root_dir}/plugins and support for CSI V0 in accordance with deprecation announcement in https://v1-13.docs.kubernetes.io/docs/setup/release/notes/ 2019-11-11 11:42:58 -08:00
Kubernetes Prow Robot
1d1385af91
Merge pull request #83474 from msau42/topology-ga
CSI Topology ga
2019-11-04 15:28:27 -08:00
clarklee92
78d3d52ac2 Move funcs of create.go to e2e/storage
Signed-off-by: clarklee92 <clarklee1992@hotmail.com>
2019-11-01 13:52:24 +08:00
Michelle Au
2d467ed9d8 Update tests to use v1.CSINode 2019-10-28 13:41:13 -07:00
David Zhu
d1383aa28f Update GCE PD CSI Driver YAMLS to v0.6.0 for testing. Enable Raw Block tests 2019-10-25 15:18:48 -07:00
Dan Winship
6a040438ea Update test/e2e/storage for new GetReadySchedulableNodes stuff 2019-10-09 08:12:56 -04:00
hoyho
23320c958e feat(e2e): refactor hard-coded provision size
test/e2e/storage/testsuites creates volumes dynamically. Initially, the size of those volumes was
hard-coded in the test, which prevented using the tests with storage backends that couldn't support
that hard-coded size
2019-10-08 01:33:19 +08:00
Michelle Au
95c7b42340 add topology e2es to storage testsuite
Change-Id: I1ec4247cef5d477ae2a76136113a4ed5ce30bf44
2019-09-20 12:26:53 -07:00
Mucahit Kurt
f0aa13cd46 skip e2e tests that run on multi node cluster and require node independent volume for the drivers that does not support node independent volumes, like hostpath
Signed-off-by: Mucahit Kurt <mucahitkurt@gmail.com>
2019-09-13 22:49:53 +03:00
carlory
910bd000ff use log functions of core framework in the 'test/e2e/storage/*' 2019-09-06 10:26:16 +08:00
Kubernetes Prow Robot
c4ccb623e8
Merge pull request #80247 from jsafrane/e2e-volume-limits
Add e2e test for CSI volume limits
2019-08-28 18:25:56 -07:00
Patrick Ohly
5088b2ee2f e2e storage: read/write + read-only ephemeral inline volume test, data sharing
The assumption so far was that all drivers support read/write
volumes. That might not necessarily be true, so we have to let the
test driver specify it and then test accordingly.

Another aspect that is worth testing is whether the driver correctly
creates a new volume for each pod even if the volume attributes are
the same. However, drivers are not required to do that, so again we
have to let the test driver specify that.
2019-08-28 12:20:54 +02:00
Patrick Ohly
cf125a2db3 e2e storage: enable testing of ephemeral inline volumes with hostpath CSI driver
We need the 1.2.0 driver for that because that has support for
detecting the volume mode dynamically, and we need to deploy a
CSIDriver object which enables pod info (for the dynamic detection)
and both modes (to satisfy the new mode sanity check).
2019-08-28 12:20:54 +02:00
Patrick Ohly
6c6930a088 e2e storage: synchronize .yaml files with latest upstream releases
This ensures that the files are in sync with:
   hostpath: v1.2.0-rc3
   external-attacher: v2.0.1
   external-provisioner: v1.3.0
   external-resizer: v0.2.0
   external-snapshotter: v1.2.0

driver-registrar/rbac.yaml is obsolete because only
node-driver-registrar is in use now and does not need RBAC rules.

mock/e2e-test-rbac.yaml was not used anywhere.

The README.md files were updated to indicate that these really are
files copied from elsewhere. To avoid the need to constantly edit
these files on each update, <version> is used as placeholder in the URL.
2019-08-28 12:18:36 +02:00
Jan Safranek
90d09919e8 Add e2e test for volume limits
The test creates as many PVs and pods as the driver/plugin reports to support on a
single node.
2019-08-28 10:39:08 +02:00
Fabio Bertinatto
81572e5254 Enable CSI e2e tests for volume expansion 2019-08-27 17:33:41 +02:00
Kubernetes Prow Robot
087aafc18d
Merge pull request #80568 from pohly/ephemeral-mode-check
ephemeral mode check
2019-08-26 11:53:40 -07:00
j-griffith
47facf91b9 Add e2e tests for CSI PVCDataSources
address unit test comments
2019-08-15 13:25:10 -06:00
Patrick Ohly
7bbc06fcd4 storage: check CSIDriver.Spec.VolumeLifecycleModes
Using a "normal" CSI driver for an inline ephemeral volume may have
unexpected and potentially harmful effects when the driver gets a
NodePublishVolume call that it isn't expecting. To prevent that mistake,
driver deployments for a driver that supports such volumes must:
- deploy a CSIDriver object for the driver
- set CSIDriver.Spec.VolumeLifecycleModes such that it contains "ephemeral"

The default for that field is "persistent", so existing deployments
continue to work and are automatically protected against incorrect
usage.

For the E2E tests we need a way to specify the driver mode. The
existing cluster-driver-registrar doesn't support that and also was
deprecated, so we stop using it altogether and instead deploy and
patch a CSIDriver object.
2019-08-13 23:12:52 +02:00