Chris Henzie
70eddfefec
Ensure goroutines exit in CSI attacher tests
...
The reason for adding an expectedVolumeHost field is to prevent a
channel read from hanging when a test fails prior to creating the
VolumeAttachment watch.
2021-01-06 16:11:50 -08:00
Chris Henzie
f098ada9d1
Extract watch reactor out of test CSI plugin constructor
2021-01-06 16:11:50 -08:00
Chris Henzie
195a5af23b
Make volume attachment watch timeout configurable for csiAttacher
2021-01-06 16:11:39 -08:00
Chris Henzie
b4e3f272b9
Remove unused waitSleepTime field in csiAttacher
2021-01-06 15:45:56 -08:00
Chris Henzie
9d8f994d4e
Separate test Kubelet and AttachDetach VolumeHost types
...
fakeVolumeHost previously implemented both the KubeletVolumeHost and
AttachDetachVolumeHost interfaces. This design makes it difficult to test the
CSIAttacher since it behaves differently depending on what type of
VolumeHost is supplied.
2020-12-17 15:17:04 -08:00
Kubernetes Prow Robot
2b4be7bb5f
Merge pull request #88759 from andyzhangx/csi-dir-fix
...
feat: ignore mount dir check in csi node stage/publish
2020-11-09 16:08:40 -08:00
Jan Safranek
55ffd9d5fc
Add unit test for staging path creation
2020-11-09 19:22:25 +01:00
knight42
469f59a52a
test(csi): deflake TestAttacherWithCSIDriver
...
Signed-off-by: knight42 <anonymousknight96@gmail.com >
2020-09-03 22:39:40 +08:00
Jayasekhar Konduru
2a89577659
CSI: Modify VolumeAttachment check to use Informer/Cache
...
Change-Id: Ie70c8b6657c67eefbf13042f36d56ca84a2e42bb
2020-06-11 10:34:09 -07:00
Christian Huffman
c6fd25d100
Updated CSIDriver references
2020-03-06 08:21:26 -05: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
danielqsj
5bc0e26c19
unify alias of api errors under pkg and staging
2019-12-26 16:42:28 +08:00
Hemant Kumar
4b8e552a88
Use typed errors for special casing volume progress
...
Use typed errors rather than operation status for
indicating operation progress
2019-12-04 14:48:30 -05:00
Hemant Kumar
cdbd3ba5c2
Change interface of SetUp function
2019-12-02 12:09:38 -05:00
Hemant Kumar
db9ac38592
Change signature of MountDevice function and remove MountDeviceWithStatusTracking
2019-12-02 12:09:38 -05:00
Hemant Kumar
57019e0628
Add tests for verifying in-progress state
2019-12-02 12:09:38 -05:00
David Zhu
21f7060c8f
Plumb test state through to fake volume host creation for error handling
2019-11-18 14:45:01 -08:00
David Zhu
1a47bf54e2
De-race some CSI unit tests that were initializing the plugin manager…ger (and plugins) twice. Set some const variables earlier to support node info manager initialization and wait for initialization to complete before finishing plugin setup.
2019-11-15 11:23:32 -08:00
Kubernetes Prow Robot
494d4cb841
Merge pull request #79005 from cwdsuzhou/June/remove_recursion_detach
...
Remove recursion in waitForVolumeDetachmentInternal
2019-09-10 14:29:01 -07:00
caiweidong
28dc53f727
Remove recursion in waitForVolumeDetachmentInternal
2019-08-28 11:18:23 +08: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
Ted Yu
f4fbfcb46a
Remove recursion in csiAttacher#waitForVolumeAttachmentInternal
2019-07-23 14:29:24 -07:00
caiweidong
8789143062
Fix csi attacher unit tests using t.Run()
2019-07-22 15:42:31 +08:00
David Zhu
831cd29f4e
Add passthrough for MountOptions for NodeStageVolume for CSI
2019-07-16 16:17:47 -07:00
Mucahit Kurt
db1c07750a
unit tests for the volume plugin name that's used inside GeneratedUnmapVolumeFunc for csi migration on/off scenarios
...
Signed-off-by: Mucahit Kurt <mucahitkurt@gmail.com >
2019-06-11 08:32:25 +03:00
Hemant Kumar
0ab6bdfa36
Wait for waitforattach goroutine before exiting
...
This test suite fails in weird ways without waiting for the
goroutine
2019-05-21 09:57:47 -04:00
Andrew Kim
c919139245
update import of generic featuregate code from k8s.io/apiserver/pkg/util/feature -> k8s.io/component-base/featuregate
2019-05-08 10:01:50 -04:00
Shintaro Murakami
f8e81337da
Do not generate unnecessary goroutine
2019-04-23 16:22:14 +09:00
Vladimir Vivien
b138e6d1e2
CSI - Surfaces klog flags; common tests aggregation
2019-04-12 15:38:06 -04:00
Vladimir Vivien
cfafde983b
Volume AttachablePlugin.CanAttach() now returns both bool and error
2019-04-08 16:53:22 -04:00
Xing Yang
000ab86788
Move CSIDriver Lister to the controller
2019-04-05 12:20:11 -07:00
Michelle Au
ab6a2530fb
return empty devicepath for csi attach
2019-03-27 17:28:21 -07:00
Kubernetes Prow Robot
4bd421502e
Merge pull request #75211 from wongma7/csi-attacher-test-flake
...
Fix unit test volumeattachments watch not working
2019-03-20 00:55:14 -07:00
Matthew Wong
cfea406c1c
Fix unit test volumeattachments watch not working
2019-03-08 15:20:31 -05:00
Vladimir Vivien
923ad369c8
CSI Inline Volume - Kubelet/Driver code impl
2019-03-08 12:40:09 -05:00
Xing Yang
6265f4f78c
CSINodeInfo/CSIDriver controller changes
...
This is the 2nd PR to move CSINodeInfo/CSIDriver APIs to
v1beta1 core storage APIs. It includes controller side changes.
It depends on the PR with API changes:
https://github.com/kubernetes/kubernetes/pull/73883
2019-03-04 16:41:58 -08:00
Andrew Kim
01933b02a3
replace usage of v1beta1 VolumeAttachments with v1
2019-02-27 15:42:12 -05:00
David Zhu
5dde1df1cd
Migration shim logic for Persistent Volumes for Attach/Detach
2019-02-14 17:04:23 -08:00
Vladimir Vivien
0a653b3b80
Adds method CanAttach() to check plugin attachability
2019-02-08 08:04:15 -05:00
Michelle Au
974d47ecf8
Remove devicePath dependency for CSI volumes
2018-11-16 15:40:35 -08:00
Davanum Srinivas
954996e231
Move from glog to klog
...
- Move from the old github.com/golang/glog to k8s.io/klog
- klog as explicit InitFlags() so we add them as necessary
- we update the other repositories that we vendor that made a similar
change from glog to klog
* github.com/kubernetes/repo-infra
* k8s.io/gengo/
* k8s.io/kube-openapi/
* github.com/google/cadvisor
- Entirely remove all references to glog
- Fix some tests by explicit InitFlags in their init() methods
Change-Id: I92db545ff36fcec83afe98f550c9e630098b3135
2018-11-10 07:50:31 -05:00
Cheng Xing
4ca39ef0ed
Consolidated CSIDriver logic under CSIDriverRegistry flag
2018-09-10 13:34:40 -07:00
Jan Safranek
32ae639edf
Add unit tests for pod information in NodePublish
...
Some refactoring of CSI tests was necessary.
2018-09-05 21:20:01 -04:00
Jan Safranek
f1cef9bde4
Add e2e test for skipping attach
2018-09-05 10:35:54 -04:00
Jan Safranek
f474b54447
Add unit tests for skipping attach
2018-09-05 10:15:43 -04:00
Cao Shufeng
a9525c8c0a
fix unit test TestAttacherUnmountDevice
...
Before this test such command fails:
```
make test WHAT=k8s.io/kubernetes/pkg/volume/csi KUBE_TEST_ARGS='-run ^TestAttacherUnmountDevice$'
```
2018-06-29 10:20:45 +08:00
Cao Shufeng
65ead1950f
run test TestAttacherMountDevice in temp directory
2018-06-28 17:18:23 +08:00
Jan Safranek
9069efe73a
Fix cleanup of volume metadata json file.
...
Create the json file with metadata as the last item, when everything
else is ready, so we don't need to clean up the file in all error cases
in this function.
2018-06-21 18:43:22 +02:00
Jan Safranek
acad9d89fa
Fix UnmountDevice with deleted pod.
...
When a pod is deleted, kubelet can't read VolumeAttachment objects. It
should cache all information in a json file.
2018-06-07 17:05:16 +02:00