Commit Graph

75 Commits

Author SHA1 Message Date
David Porter
c5a1f0188b
test: Add node e2e test to verify static pod termination
Add node e2e test to verify that static pods can be started after a
previous static pod with the same config temporarily failed termination.

The scenario is:

1. Static pod is started
2. Static pod is deleted
3. Static pod termination fails (internally `syncTerminatedPod` fails)
4. At later time, pod termination should succeed
5. New static pod with the same config is (re)-added
6. New static pod is expected to start successfully

To repro this scenario, setup a pod using a NFS mount. The NFS server is
stopped which will result in volumes failing to unmount and
`syncTerminatedPod` to fail. The NFS server is later started, allowing
the volume to unmount successfully.

xref:

1. https://github.com/kubernetes/kubernetes/pull/113145#issuecomment-1289587988
2. https://github.com/kubernetes/kubernetes/pull/113065
3. https://github.com/kubernetes/kubernetes/pull/113093

Signed-off-by: David Porter <david@porter.me>
2023-03-03 10:00:48 -06:00
Patrick Ohly
41f23f52d0 test: fix ginkgolinter issues
All of these issues were reported by https://github.com/nunnatsa/ginkgolinter.
Fixing these issues is useful (several expressions get simpler, using
framework.ExpectNoError is better because it has additional support for
failures) and a necessary step for enabling that linter in our golangci-lint
invocation.
2023-02-22 19:36:05 +01:00
Patrick Ohly
9df3e2a47a e2e: replace WaitForPodToDisappear with WaitForPodNotFoundInNamespace
WaitForPodToDisappear was always called such that it listed all pods, which
made it less efficient than trying to get just the one pod it was checking for.

Being able to customize the poll interval in practice wasn't useful, therefore
it can be replaced with WaitForPodNotFoundInNamespace.
2023-02-06 15:39:12 +01:00
Antonio Ojea
7f5ae1c0c1
Revert "e2e: wait for pods with gomega" 2023-02-06 12:08:22 +01:00
Patrick Ohly
6eea1b2efa e2e: replace WaitForPodToDisappear with WaitForPodNotFoundInNamespace
WaitForPodToDisappear was always called such that it listed all pods, which
made it less efficient than trying to get just the one pod it was checking for.

Being able to customize the poll interval in practice wasn't useful, therefore
it can be replaced with WaitForPodNotFoundInNamespace.
2023-01-31 13:01:39 +01:00
Patrick Ohly
2f6c4f5eab e2e: use Ginkgo context
All code must use the context from Ginkgo when doing API calls or polling for a
change, otherwise the code would not return immediately when the test gets
aborted.
2022-12-16 20:14:04 +01:00
Patrick Ohly
2695ed6a0a e2e: add missing error checks
Not checking for some error conditions must have been an oversight.
2022-12-14 07:39:51 +01:00
Patrick Ohly
8168434f0c e2e storage: explain why cleanup is done inside the function
This code must run during the test and thus cannot be moved into DeferCleanup.
2022-12-14 07:39:51 +01:00
Jan Safranek
3fdd4ca7a4 Fix subpath disruptive tests
Add volumePath parameter to all disruptive checks, so subpath tests can use
"/test-volume" and disruptive tests can use "/mnt/volume1" for their
respective Pods.
2022-11-11 14:03:33 +01:00
Kubernetes Prow Robot
3e06830f2d
Merge pull request #109924 from mauriciopoppe/provisioning-sync
Use sync in e2e storage provisioning tests
2022-10-17 15:49:17 -07:00
Patrick Ohly
5614a9d064 e2e framework: eliminate interim sub packages
The "todo" packages were necessary while moving code around to avoid hitting
cyclic dependencies. Now that any sub package can depend on the framework, they
are no longer needed and the code can be moved into the normal sub packages.
2022-10-06 08:16:47 +02:00
Patrick Ohly
a46fea53e6 e2e framework: move pod exec and create into sub package 2022-10-06 08:16:47 +02:00
Patrick Ohly
2c8ef492ae e2e framework: move kubectl and pod helper code 2022-10-06 08:16:47 +02:00
Humble Chirammal
c2a7bfd6b4 removal of glusterfs in-tree driver code from the source
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2022-09-13 20:11:50 +05:30
Davanum Srinivas
9bbf01bae9
Remove references to openstack and cinder
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-08-22 16:43:14 -04:00
Kubernetes Prow Robot
15d290f280
Merge pull request #111521 from wongma7/ephemeralcopy
Clear ephemeral container resources field when creating one in volume test
2022-08-04 07:51:50 -07:00
Matthew Wong
6390281a1c Clear ephemeral container resources field when creating one in volume test 2022-07-28 15:47:14 -07:00
Lee Verberne
d238e67ba6 Remove EphemeralContainers feature-gate checks 2022-07-26 02:55:30 +02:00
Dave Chen
857458cfa5 update ginkgo from v1 to v2 and gomega to 1.19.0
- update all the import statements
- run hack/pin-dependency.sh to change pinned dependency versions
- run hack/update-vendor.sh to update go.mod files and the vendor directory
- update the method signatures for custom reporters

Signed-off-by: Dave Chen <dave.chen@arm.com>
2022-07-08 10:44:46 +08:00
Mauricio Poppe
34f078d7f4 Use sync in provisioning tests 2022-05-09 21:10:33 +00:00
Alexis MacAskill
8102bbe05a skip parallel volume cloning test for gce pd and fix disk not ready error for gce pd 2021-12-01 17:49:48 +00:00
Kubernetes Prow Robot
18104ecf1f
Merge pull request #105405 from verb/1.23-ec-beta
Promote EphemeralContainers to beta
2021-10-20 09:24:10 -07:00
Lee Verberne
ba649b97b7 Add ephemeral container checks to volume e2e tests 2021-10-19 23:02:09 -04:00
elbehery
04ad18ce44 Run storage hostpath e2e test client pod as privileged
hostPath volume plugin creates a directory within /tmp on host machine, to be mounted as volume.
inject-pod writes content to the volume, and a client-pod tried the read the contents and verify.
when SELinux is enabled on the host, client-pod can not read the content, with permission denied.
running the client-pod as privileged, so that it can access the volume content, even when SEinux is enabled on the host.
2021-10-18 15:06:20 +02:00
Diego Goytia
de969ae2bf Testing GenerateReadBlockCmd for enabling block volume tests. 2021-09-24 18:50:21 +00:00
Mauricio Poppe
6583b05f07 replace more powershell commands with /bin/sh in volume/fixtures.go 2021-06-22 18:27:55 +00:00
Mauricio Poppe
7aa8a497df replaced usage of powershell commands with linux commands 2021-06-22 18:27:55 +00:00
Mauricio Poppe
f0d7e9c9d1 undo windows compatibility changes because the linux commands work 2021-06-22 18:27:54 +00:00
Mauricio Poppe
54070a6628 Enable another test in windows, use a /bin/sh command instead of a PS one 2021-06-22 18:27:53 +00:00
Mauricio Poppe
ee34cd640a enable gcpdcsi multivolume tests with windows nodes 2021-06-22 18:27:50 +00:00
Mauricio Poppe
7455b1ae94 update ephemeral volume tests with windows 2021-03-25 00:13:52 +00:00
Mauricio Poppe
5d9053014e Update tests to use common pod functions from framework/pod/utils.go 2021-03-11 07:25:56 +00:00
Jiawei Wang
988563f8f5 Extract testsuite api to a separate package
Extract TestSuite, TestDriver, TestPattern, TestConfig
and VolumeResource, SnapshotVolumeResource from testsuite
package and put them into a new package called api.

The ultimate goal here is to make the testsuites as clean
as possible. And only testsuites in the package.
2020-12-10 11:12:51 -08:00
Fabio Bertinatto
c82626f96f e2e: use custom timeouts in all storage E2E tests 2020-12-02 15:57:58 -03:00
Jing Xu
56373aa10d Update storage test suits for Windows
Update storage test suits to enable some tests on Windows

Change-Id: I1f596bb9f7a0f41ae398aec43406ee5c753cdce3
2020-11-11 15:22:47 -08:00
Jing Xu
de7eb94388 Modify storage snapshottable and disruptive test for Windows
Update snapshottable and disable disruptive test for Windows

Change-Id: I9d6beb25078c1941e405bf61545caae30326ddd1
2020-11-09 16:54:29 -08:00
Hemant Kumar
20934d7e50 Create service for gluster endpoint
Creating an endpoint without a service can cause endpoint to disappear

https://github.com/kubernetes/kubernetes/issues/12964
2020-07-30 16:34:11 -04:00
Antonio Ojea
26a00f9032
add ipv6 support to the e2e nfs tests
nfs mount command need to use the IP enclosed with square brackets
if is an IPv6 address
2020-05-03 11:06:10 +02:00
Mike Danese
c58e69ec79 automated refactor 2020-03-05 14:59:46 -08:00
Jan Safranek
98b9c7b5e8 Fix GCE PD snapshot flakiness
It takes more than 5 minutes to restore a GCE PD snapshot + run a pod with
it. Therefore TestVolumeClientSlow is introduced.
2020-03-04 12:39:13 +01:00
Patrick Ohly
d71829a1fc e2e: avoid setting NodeName for CSI driver deployments
We don't want to set the name directly because then starting the pod
can fail when the node is temporarily out of resources
(https://github.com/kubernetes/kubernetes/issues/87855).

For CSI driver deployments, we have three options:
- modify the pod spec with custom code, similar
  to how the NodeSelection utility code does it
- add variants of SetNodeSelection and SetNodeAffinity which
  work with a pod spec instead of a pod
- change their parameter from pod to pod spec and then use
  them also when patching a pod spec

The last approach is used here because it seems more general. There
might be other cases in the future where there's only a pod spec that
needs to be modified.
2020-02-26 10:33:29 +01:00
Kubernetes Prow Robot
5cf65077ad
Merge pull request #88016 from jsafrane/wait-for-pod-deletion
Delete pod in volume tests
2020-02-18 22:40:38 -08:00
Jan Safranek
528adbefe4 Remove client cleanup from TestCleanup
All tests remove the test client pod, usually in TestVolumeClient.
Rename TestCleanup to TestServerCleanup.
In addition, remove few calls to Test(Server)Cleanup that do not do anything
useful (server pod is not used in these tests).
2020-02-13 09:55:53 +01:00
Michelle Au
d9184b75c9 Convert volume.TestConfig to use NodeSelection
Change-Id: I6adbb53b65e4a4f7e220fc0d91a26dc6bc135c36
2020-02-11 21:13:42 -08:00
Jan Safranek
2430c48c10 Delete pod in volume tests
All storage e2e tests should delete pods they use so we can identify issues
on volume cleanup easily.
2020-02-11 12:54:38 +01:00
Mike Danese
25651408ae generated: run refactor 2020-02-08 12:30:21 -05:00
Mike Danese
3aa59f7f30 generated: run refactor 2020-02-07 18:16:47 -08:00
tanjunchen
b60703c172 test/e2e/framework:refactor generateWriteBlockCmd due to the same function 2020-01-14 21:58:27 +08:00
clarklee92
7171f9a7f4 move funs of framework/volume to e2e/storage
Signed-off-by: clarklee92 <clarklee1992@hotmail.com>
2019-12-31 18:43:08 +08:00
danielqsj
fc738cbb1d unify alias of api errors under test 2019-12-26 16:40:45 +08:00