Commit Graph

55 Commits

Author SHA1 Message Date
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
Vladimir Vivien
d6d396215e CSI fix for gRPC conn leak, test updates 2018-05-31 23:05:41 -04:00
Kubernetes Submit Queue
70caf33969
Merge pull request #63303 from jsafrane/fix-csi-attach-error
Automatic merge from submit-queue (batch tested with PRs 64102, 63303, 64150, 63841). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Return attach error to A/D controller.

The plugin should not wait with errors for WaitForAttach, WaitForAttach runs on nodes, not in A/D controller.

**Which issue(s) this PR fixes**
Fixes #63300

~~Work in progress, missing testing.~~

**Release note**:

```release-note
NONE
```

/sig storage
@saad-ali @vladimirvivien
2018-05-23 04:53:17 -07:00
Jan Safranek
a884a00d30 Fix CSI volume detach when the volume is already detached.
"NotFound" error should be treated as successful detach.
2018-05-04 12:22:15 +02:00
Jan Safranek
71e4449e17 Return attach error to A/D controller.
WaitForAttach runs on nodes, not in A/D controller.
2018-04-30 17:19:12 +02:00
Kubernetes Submit Queue
b692b7159a
Merge pull request #62590 from mlmhl/csi_test
Automatic merge from submit-queue (batch tested with PRs 62590, 62818, 63015, 62922, 63000). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fix some bugs inside CSI volume plugin unit test TestAttacherMountDevice

**What this PR does / why we need it**:

Fix two bugs inside CSI volume plugin unit test `TestAttacherMountDevice`.

**Release note**:

```release-note
None
```
2018-04-24 14:22:10 -07:00
linyouchong
0050bcfc9e fix csi data race in csi_attacher_test.go 2018-04-19 10:44:11 +08:00
mlmhl
123ba1b429 fix some bugs inside csi unit test TestAttacherMountDevice 2018-04-15 10:35:27 +08:00
jianglingxia
89340a5948 Add UT Test to TestAttacherUnmountDevice 2018-03-21 09:33:31 +08:00
David Zhu
cbd18965fd Added MountDevice/UnmountDevice pass-through to NodeStageVolume/NodeUnstageVolume for CSI Volume Plugin. Added related unit tests. Vendored CSI Spec to HEAD 2018-02-26 14:50:32 -08:00
linyouchong
ddf4c2d62c fix TODO:change to a api-server watch 2018-02-02 17:41:45 +08:00