Commit Graph

618 Commits (dbe669aeb1095d0d4c5c7fc58154a1bb52158c0f)

Author SHA1 Message Date
Patrick Ohly ecc0c4e4b4 e2e/storage: enable concurrent writes for gcepd
The driver should support multiple pods using the same volume on the
same node.
2019-02-12 09:21:50 +01:00
Patrick Ohly 03d352f7aa e2e/storage: test usage of volume in multiple pods at once
This is a special case that both kubelet and the volume driver should
support, because users might expect it. One Kubernetes mechanism to
deploy pods like this is via pod affinity.

However, strictly speaking the CSI spec does not allow this usage
mode (see https://github.com/container-storage-interface/spec/pull/150) and
there is an on-going debate to enable it (see
https://github.com/container-storage-interface/spec/issues/178). Therefore
this test gets skipped unless explicitly enabled for a driver.

CSI drivers which create a block device for a remote volume in
NodePublishVolume fail this test. They have to make the volume
available in NodeStageVolume and then in NodePublishVolume merely do a
bind mount (as for example in
https://github.com/kubernetes-sigs/gcp-compute-persistent-disk-csi-driver/blob/master/pkg/gce-pd-csi-driver/node.go#L150).
2019-02-12 09:21:50 +01:00
Patrick Ohly ca42cf4993 e2e/storage: test provisioned volume on multiple nodes
Whether the read test after writing was done on the same node was
random for drivers that weren't locked onto a single node. Now it is
deterministic: it always happens on the same node.

The case with reading on another node is covered separately for test
configurations that support it (not locked onto a single node, more
than one node in the test cluster).

As before, the TestConfig.ClientNodeSelector is ignored by the
provisioning testsuite.
2019-02-12 09:21:50 +01:00
Patrick Ohly 54d8f1648f e2e/storage: improve PV checking
TestDynamicProvisioning had multiple ways of choosing additional
checks:
- the PvCheck callback
- the builtin write/read check controlled by a boolean
- the snapshot testing

Complicating matters further, that builtin write/read test had been
more customizable with new fields `NodeSelector` and
`ExpectUnschedulable` which were only set by one particular test (see
https://github.com/kubernetes/kubernetes/pull/70941).

That is confusing and will only get more confusing when adding more
checks in the future. Therefore the write/read check is now a separate
function that must be enabled explicitly by tests that want to run it.
The snapshot checking is also defined only for the snapshot test.

The test that expects unschedulable pods now also checks for that
particular situation itself. Instead of testing it with two pods (the
behavior from the write/read check) that both fail to start, only a
single unschedulable pod is created.

Because node name, node selector and the `ExpectUnschedulable` were
only used for checking, it is possible to simplify `StorageClassTest`
by removing all of these fields.

Expect(err).NotTo(HaveOccurred()) is an anti-pattern in Ginkgo testing
because a test failure doesn't explain what failed (see
https://github.com/kubernetes/kubernetes/issues/34059). We avoid it
now by making the check function itself responsible for checking
errors and including more information in those checks.
2019-02-09 14:20:17 +01:00
Patrick Ohly 5b8826b610 e2e/storage: use different names for test pods
When the provisioning test gets stuck, the log fills up with messages
about waiting for a certain pod to run. Now the pod names are
pvc-[volume-tester|snapshot]-[writer|reader] plus the random
number appended by Kubernetes. This makes it easier to see where the
test is stuck.
2019-02-09 14:20:17 +01:00
Patrick Ohly e92bdd14cc e2e/storage: remove unnecessary empty string checks
There is no need to check for empty strings, we can also directly
initialize structs with the value. The end result is the same when the
value is empty (empty string in the struct).
2019-02-09 14:20:17 +01:00
Patrick Ohly 315266b25e e2e: refine snapshot test
This addresses the two remaining change requests from
https://github.com/kubernetes/kubernetes/pull/69036:
- replace "csi-hostpath-v0" name check with capability
  check (cleaner that way)
- add feature tag to "should create snapshot with defaults" because
  that is an alpha feature

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
2019-02-09 14:20:17 +01:00
Patrick Ohly f8536e8e42 e2e: fix snapshot skip test
Even if snapshots are supported by the driver interface, the driver or
suite might still want to skip a particular test, so those checks
still need to be executed.
2019-02-09 14:19:37 +01:00
Kubernetes Prow Robot 8f7ccf8d4c
Merge pull request #69036 from wackxu/snapshottest
add e2e test for snapshot
2019-02-08 13:14:04 -08:00
Kubernetes Prow Robot 54a578d3a1
Merge pull request #72012 from yeya24/patch-1
fix typos lable -> label
2019-02-08 10:36:05 -08:00
Kubernetes Prow Robot b50c643be0
Merge pull request #73540 from rlenferink/patch-5
Updated OWNERS files to include link to docs
2019-02-08 09:05:56 -08:00
Kubernetes Prow Robot eac19a3ab9
Merge pull request #73616 from dims/move-part-of-kubelet-apis-well-known-lables
move pkg/kubelet/apis/well_known_labels.go to staging/src/k8s.io/api/core/v1/
2019-02-07 19:44:34 -08:00
Kubernetes Prow Robot 3dedf4b7f6
Merge pull request #73525 from cofyc/fix71237-intree
Implement localDriver with various local volume types
2019-02-06 10:44:37 -08:00
Yecheng Fu aa87e4b57c Implement localDriver 2019-02-06 12:28:28 +08:00
Kubernetes Prow Robot 9384e93dc1
Merge pull request #73749 from wongma7/subpath-init-write-multiple
Fix multiple subpaths e2e: read/write in same container
2019-02-05 13:57:02 -08:00
Davanum Srinivas b975573385
move pkg/kubelet/apis/well_known_labels.go to staging/src/k8s.io/api/core/v1/
Co-Authored-By: Weibin Lin <linweibin1@huawei.com>

Change-Id: I163b2f2833e6b8767f72e2c815dcacd0f4e504ea
2019-02-05 13:39:07 -05:00
Matthew Wong 613d8bb8ea Fix multiple subpaths e2e: read/write in same container 2019-02-05 10:55:27 -05:00
Kubernetes Prow Robot 641b2adcd3
Merge pull request #73318 from wongma7/subpath-init-write
Do writes in init container before trying reads
2019-02-04 18:28:14 -08:00
Roy Lenferink b43c04452f Updated OWNERS files to include link to docs 2019-02-04 22:33:12 +01:00
Kubernetes Prow Robot 1a0a841abe
Merge pull request #73204 from bclau/tests/adds-linuxonly-tag
Adds [LinuxOnly] tag to conformance tests that cannot be run on Windows
2019-02-04 09:36:09 -08:00
Claudiu Belu 5daa08878f Adds [LinuxOnly] tag to conformance tests that cannot be run on Windows
Some of the tests cannot pass using Windows nodes due to various reasons:

- seLinuxOptions are not supported on Windows.
- Running as an UID / GID is not supported on Windows.
- file permissions work differently on Windows, and they cannot be set in
  the same manner as on Linux.
- individual files cannot be mounted in Windows Containers.
- Cannot create container using Linux image (e.g.: alpine) on Windows.

Because of this, it has been decided to use the "[LinuxOnly]" tag for the
tests which cannot run on Windows because of the mentioned reasons. This way,
when running tests using Windows nodes, those tests can simply be skipped by
adding the "[LinuxOnly]" tag to the ginkgo.skip argument.
2019-02-01 11:42:42 -08:00
xushiwei 7280fcef5c address reviewer comments 2019-02-01 16:34:16 +08:00
xushiwei 3410d435ed add snapshot e2e 2019-01-30 19:04:45 +08:00
Kubernetes Prow Robot 819dcaaa17
Merge pull request #73446 from cofyc/fix73419
Fix local pv stress tests
2019-01-29 10:12:17 -08:00
Kubernetes Prow Robot b6701153b5
Merge pull request #70823 from mkimuram/issue/70822
Fix volumes e2e test to check fsType
2019-01-28 21:51:31 -08:00
Yecheng Fu 1660a0d260 Fix bug 2019-01-29 11:42:18 +08:00
Matthew Wong 9f5a799213 Do writes in init container before trying reads 2019-01-28 15:42:14 -05:00
Yecheng Fu 513ae63bf6 Add a new stress test to replace old provisioner stress test 2019-01-23 13:49:41 +08:00
Masaki Kimura b152d435ae Update fsType parameter for csi v1.0 provisioner 2019-01-23 05:26:55 +00:00
Masaki Kimura 30ad1028eb Move xfs test skip logic from driver to testsuites 2019-01-23 05:17:06 +00:00
Masaki Kimura 398bf3929f Skip XFS test for csi gce-pd driver on COS 2019-01-23 05:15:24 +00:00
Masaki Kimura b767dbdeb5 Fix volumes e2e test to check fsType 2019-01-23 05:12:37 +00: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
Jan Safranek 9ed73a948c Pass the test if event is not delivered 2019-01-21 17:03:10 +01:00
mrIncompetent cf7a8935af Use actual node hostname during test "EmptyDir Wrapper Volume, ConfigMap volumes, no race" 2019-01-16 14:39:00 +01:00
Cheng Xing 9864628c76 CSI topology e2e - fix space in Feature tag 2019-01-15 10:47:14 -08:00
Cheng Xing 12ece9dacb CSI topology e2e tests 2019-01-11 18:36:06 -08:00
Kubernetes Prow Robot 5acac9b3e2
Merge pull request #70439 from jsafrane/worlload-test
CSI: Add test for passing Pod information in NodePublish call
2019-01-07 12:08:51 -08:00
Jan Safranek e1556c1549 Fix hostpath driver name 2019-01-04 17:26:24 +01:00
Kubernetes Prow Robot a103bddc2a
Merge pull request #72354 from globervinodhn/conformance-slow
Remove SLOW tag from Probing container and EmptyDir Wrapper Volume
2019-01-03 20:21:53 -08:00
Michelle Au 6279515914 Add e2e test for removing the subpath directory 2019-01-03 16:35:54 -08:00
Kubernetes Prow Robot 47f2f7a53a
Merge pull request #72410 from pohly/storage-gcepd-config-fix
e2e/storage: reset driver config in the test suite
2019-01-03 15:51:44 -08:00
Tara Gu fb324249c2 Add test case for validate container cannot write to readonly volumes 2019-01-03 15:24:31 -05:00
Jan Safranek d617dcb1e0 CSI: Add test for passing Pod information in NodePublish call 2019-01-02 16:11:41 +01:00
globervinodhn b3217cc624 Remove SLOW tag from KUBEDESCRIBE and SIGDESCRIBE
Remove SLOW tag and update description for KUBEDESCRIBE(Probing container) and SIGDESCRIBE(EmptyDir Wrapper Volume)

Remove slow references for tests that execute below 5 minutes
2018-12-31 13:13:11 +05:30
Patrick Ohly 98ba1d8519 e2e/storage: reset driver config in the test suite
PR #70862 made each driver responsible for resetting its config, but
as it turned out, one place was missed in that PR: the in-tree gcepd
sets a node selector. Not resetting that caused other tests to fail
randomly depending on test execution order.

Now the test suite resets the config by taking a copy after setting up
the driver and restoring that copy before each test.

Long term the intention is to separate the entire test config from the
static driver info (https://github.com/kubernetes/kubernetes/issues/72288),
but for now resetting the config is the fastest way to fix the test flake.

Fixes: #72378
2018-12-28 22:44:09 +01:00
Patrick Ohly ac8ac8ee6c e2e: update bazel BUILD files
Generated via hack/update-bazel.sh.
2018-12-21 10:30:10 +01:00
Patrick Ohly 3253e9ab6b e2e/storage: refactor test config
Exposing framework.VolumeTestConfig as part of the testsuite package
API was confusing because it was unclear which of the values in it
really have an effect. How it was set also was a bit awkward: a test
driver had a copy that had to be overwritten at test runtime and then
might have been updated and/or overwritten again by the driver.

Now testsuites has its own test config structure. It contains the
values that might have to be set dynamically at runtime. Instead of
overwriting a copy of that struct inside the test driver, the test
driver takes some common defaults (specifically, the framework pointer
and the prefix) when it gets initialized and then manages its own
copy. For example, the hostpath driver has to lock the pods to a
single node.

framework.VolumeTestConfig is still used internally and test drivers
can decide to run tests with a fully populated instance if needed (for
example, after setting up an NFS server).
2018-12-21 10:30:06 +01:00
Patrick Ohly dfcf2ca345 e2e/storage: separate generic testsuites from specific drivers
This makes it possible to use the testsuites package out-of-tree
without pulling in unnecessary dependencies and code (in
test/e2e/storage/vsphere) that defines tests that are not wanted in a
custom test suite.
2018-12-20 13:41:48 +01:00