Commit Graph

1204 Commits

Author SHA1 Message Date
hasheddan
efe3747c22
Wait for resources owned by pod to be cleaned up in ephemeral volume tests
sig-storage tests that delete pods need to wait for owned resources to
also be cleaned up before returning in the case that resources such as
ephemeral inline volumes are being used. This was previously implemented
by modifying the pod delete call of the e2e framework, which negatively
impacted other tests. This was reverted and now the logic has been moved
to StopPodAndDependents, which is local to the sig-storage tests.

Signed-off-by: hasheddan <georgedanielmangum@gmail.com>
2020-07-22 17:52:19 -05:00
Kubernetes Prow Robot
a1a2f8c5f8
Merge pull request #93225 from hasheddan/storage-panic
Return error instead of panic if container index outside bounds
2020-07-21 09:15:15 -07:00
hasheddan
4e4d629af7
Return error instead of panic if container index outside bounds
Adds check for index out of bounds error instead of panic when passing
container to kubectl exec.

Signed-off-by: hasheddan <georgedanielmangum@gmail.com>
2020-07-19 10:04:53 -05:00
Jordan Liggitt
9d83ca4b02 Deflake GCEPD namespace deletion test 2020-07-18 15:32:02 -04:00
Kubernetes Prow Robot
c46c1c043e
Merge pull request #91742 from jingxu97/June/wintests
Fix subPath tests for Windows
2020-07-13 23:29:21 -07:00
Kubernetes Prow Robot
d2f4cc032b
Merge pull request #92841 from chethanv28/fix-typo-e2e-tests
Fix typo in vsphere e2e test names
2020-07-11 20:56:33 -07:00
Kubernetes Prow Robot
780f7f0ce9
Merge pull request #92555 from AndiLi99/AndiLi99/snapshot_tests
Refactor tests in snapshottable and fix #73625
2020-07-11 20:55:35 -07:00
Kubernetes Prow Robot
42ae2003dd
Merge pull request #92805 from chethanv28/fix-e2e-test-vsphere_utils
Fix vsphere util method - disksAreAttached
2020-07-10 15:42:51 -07:00
Kubernetes Prow Robot
2613cbc2a7
Merge pull request #92802 from divyenpatel/fix-e2e-test-vsphere_volume_datastore
fixed e2e test vsphere_volume_datastore.go
2020-07-10 15:42:41 -07:00
Kubernetes Prow Robot
0cb7e320a5
Merge pull request #92784 from pohly/generic-ephemeral-inline-volumes
generic ephemeral inline volumes
2020-07-10 15:41:46 -07:00
Patrick Ohly
2468a24b7a GenericEphemeralVolume: E2E test
This extends the existing "ephemeral volume" tests to also cover
generic ephemeral inline volumes. They get instantiated for all
drivers (CSI and others) which support persistent volume provisioning,
for several different filesystems.

Configuring the number of inline volumes via a flag with a computed
name had been identified as problematic before and now gets removed
because re-using the tests as a stress test with a higher number of
volumes should be added and configured separately.
2020-07-09 23:29:24 +02:00
Jing Xu
31db94c848 Fix subPath tests for Windows
Windows test for subPath is failing due to an issue related to
removeUnusedContainers calls. After image is changed to Agnhost, it
automatically has a args by default. However, there are places to use
container commands instead of args and causing issues.

This is the first step to fix this issue. Next plan to replace
busybox used in Linux with Agnhost which can work for both linux and
windows.

I also mark two subPath tests as LinuxOnly. I think they are not ready
for windows yet. Before they were passing due to wrong reason. The tests
checks failed container status but the contain fails due to other
reasons than what we expected.
2020-07-09 11:14:17 -07:00
Andi Li
b64f05b70a Change expected content to string constant. Cleanup DeleteAndWaitSnapshot
Use the correct format specifier
2020-07-09 16:30:16 +00:00
Kubernetes Prow Robot
d9b084a9d1
Merge pull request #89629 from fatedier/subpath
Modified subpath configmap mount fails when container restarts
2020-07-09 09:06:32 -07:00
Kubernetes Prow Robot
94a08e159a
Merge pull request #92387 from pohly/csi-storage-capacity
CSI storage capacity check
2020-07-09 00:04:59 -07:00
Andi Li
913f626adb Add data semantics test for volume snapshots
The test steps are as follows:
1. Write some data
2. Take a snapshot
3. Write more data
4. Create a new volume from snapshot
5. Validate data is the old data
2020-07-08 18:45:54 +00:00
Andi Li
9b0dff7686 Refactor snapshottable and provisioning tests
1. Use ginkgo before each to do common setup
2. Use volume resource to create SC, PV, PVC and handle cleanup
3. Add SnapshotResource to handle creating and cleanup of VS, VSC, VSClass
4. Add test pattern for deletion policy: Delete vs Retain
5. Use test pattern to determine test behaviour
6. Add test pattern for preprovisioned snapshot (not implemented)

These changes are made to consolidate common setup steps and stop resource
leaks by waiting for objects to be deleted.
2020-07-08 18:45:54 +00:00
Patrick Ohly
30f93802a7 storage capacity: check pod events to finish negative tests faster
By creating CSIStorageCapacity objects in advance, we get the
FailedScheduling pod event if (and only if!) the test is expected to
fail because of insufficient or missing capacity. We can use that as
indicator that waiting for pod start can be stopped early. However,
because we might not get to see the event under load, we still need
the timeout.
2020-07-08 08:02:26 +02:00
Patrick Ohly
bd0579103a e2e storage: dead code removal and cleanup
Setting testParameters.scName had no effect because
StorageClassTest.StorageClassName isn't used anywhere. Instead, the
storage class name is generated dynamically.
2020-07-08 08:02:26 +02: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
Chethan Venkatesh
3e19a33cea Fix typo in vsphere e2e tests 2020-07-06 11:39:26 -07:00
Chethan Venkatesh
5849f1681c Fix vsphere util method - disksAreAttached 2020-07-04 19:33:36 -07:00
Divyen Patel
950ed79e41 fixed e2e test vsphere_volume_datastore.go 2020-07-04 16:56:27 -07:00
Kubernetes Prow Robot
9e70d6f805
Merge pull request #91738 from jsafrane/fix-iscsi-metadata
iscsi: don't write json medata file when the volume is already mounted.
2020-07-04 16:06:48 -07:00
fatedier
78b5003e88 update e2e test 2020-07-03 20:31:00 +08:00
Patrick Ohly
8f55fad7bb e2e pod logs: use hierarchical directory structure
When using the entire test name as file name, the name became too
long (> 256 characters, which wasn't supported by all file systems)
and the artifact directory got cluttered.

The original reason (a limitation in Gubernator) no longer applies
because Spyglass is used now for log viewing.
2020-07-01 16:01:18 +02:00
Aaron Crickenberger
28768166f5 decouple testfiles from framework
This drops testfiles.ReadOrDie and updated testfiles.Exists to return an
error, forcing the caller to decide whether to call framework.Fail or do
something else.

It makes for a slightly less friendly API, but also means the package is
decoupled from framework again, as per the comments at the top of the
file
2020-06-29 14:54:09 -07:00
Kubernetes Prow Robot
ed67d43ea4
Merge pull request #92530 from mattcary/metricsload
Avoid grabbing metrics when they're not validated
2020-06-26 11:49:46 -07:00
Kubernetes Prow Robot
5ff5dbb07c
Merge pull request #92497 from oomichi/vsphere
nit: Fix invokeStaleDummyVMTestWithStoragePolicy()
2020-06-26 00:08:04 -07:00
Kenichi Omichi
176c8e219f Avoid DeprecatedMightBeMasterNode() in e2e metrics
As its name, DeprecatedMightBeMasterNode is deprecated.
In e2e metrics, the function was used for knowing master node name to
get metrics from kube-scheduler and kube-controller-manager pods.
This make e2e metrics get these metrics directly by getting those pod
names without calling DeprecatedMightBeMasterNode().
2020-06-25 23:08:24 +00:00
Kenichi Omichi
d964569e1e nit: Fix invokeStaleDummyVMTestWithStoragePolicy()
There were nits in invokeStaleDummyVMTestWithStoragePolicy() like
- The error message didn't contain necessary space
- IsVMPresent() can return an error, but lack of the error handling
- IsVMPresent() returns true/false, but didn't use ExpectEqual() and
  less code readability

This fixes those things.
2020-06-25 04:49:39 +00:00
Matthew Cary
028176deb2 Avoid grabbing metrics when they're not validated
Change-Id: I0dd23b993b1bbc4908341d092c485566b9725c7a
2020-06-25 02:01:53 +00:00
Kenichi Omichi
5edf15ea97 Use worker nodes for WaitForStableCluster()
WaitForStableCluster() checks all pods run on worker nodes, and the
function used to refer master nodes to skip checking controller plane
pods.
GetMasterAndWorkerNodes() was used for getting master nodes, but the
implementation is not good because it usesDeprecatedMightBeMasterNode().

This makes WaitForStableCluster() refer worker nodes directly to avoid
using GetMasterAndWorkerNodes().
2020-06-24 15:21:12 +00:00
Kubernetes Prow Robot
f8705f22f8
Merge pull request #89705 from ggriffiths/add_snapshot_retainpolicy_e2e_test
Add VolumeSnapshot retain policy test and test for snapshot delete
2020-06-19 11:35:59 -07:00
Kubernetes Prow Robot
0bb640c25a
Merge pull request #92205 from mrunalp/fix_host_path_socket_tests
test: Start a pod with nc instead of execing a background command
2020-06-18 06:03:31 -07:00
Grant Griffiths
e1f0e4cd9f Add retain policy test and refactor snapshottable tests
Signed-off-by: Grant Griffiths <grant@portworx.com>
2020-06-17 19:53:53 -07:00
Mrunal Patel
7643b64050 test: Start a pod with nc instead of execing a background command
The behavior for exec'ing a backgrounded command is not specified
with CRI so modify the test to run the command directly instead
of using exec.

Signed-off-by: Mrunal Patel <mpatel@redhat.com>
2020-06-16 17:30:31 -07:00
Fabio Bertinatto
8d644092ed Create pod to force volume provisioning in storage e2e test
Otherwise, tests can fail if the default StorageClass
is configured with late binding.
2020-06-10 08:45:41 +02:00
Jan Safranek
62b7516b63 Add e2e test for read-only volume used by multiple pods 2020-06-08 09:38:11 +02:00
lixiaobing1
2d66e7ecd3 another:Replace framework.Failf with ExpectNoError 2020-06-05 16:43:22 +08:00
Kubernetes Prow Robot
64bba294ae
Merge pull request #91741 from oomichi/nit-ExpectError
Replace framework.Failf with ExpectNoError
2020-06-04 13:53:05 -07:00
Kubernetes Prow Robot
1925eb81ac
Merge pull request #91689 from gnufied/fix-after-suite-race
Ensure CleanupActionHandle always completes
2020-06-04 10:51:15 -07:00
Kenichi Omichi
0ebaae88b1 Replace framework.Failf with ExpectNoError 2020-06-03 20:16:12 +00:00
Kubernetes Prow Robot
f2e3154a14
Merge pull request #91642 from huffmanca/update-azure-e2e
Adjust Azure e2e binding mode
2020-06-03 05:44:32 -07: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
Christian Huffman
7a55d3978c Adjust Azure e2e binding mode 2020-06-01 14:55:46 -04:00
Jordan Liggitt
c9638d54d0 Defer ginkgo recovers 2020-06-01 11:02:41 -04:00
Davanum Srinivas
b1742f19ef
Switch kube-controller-manager to distroless image
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-05-21 22:33:54 -04:00
Kubernetes Prow Robot
bded41a817
Merge pull request #90689 from aojea/nfsv6
add ipv6 support to the e2e nfs tests
2020-05-21 03:30:36 -07:00
Kubernetes Prow Robot
0e8a2d2244
Merge pull request #90793 from pohly/flaky-mount-volume-calls
mock e2e test: reduce flakiness by not testing all calls
2020-05-19 15:22:19 -07:00