Commit Graph

182 Commits (750881c0ab62a9f59d53582bc33826caa167aa83)

Author SHA1 Message Date
Jordan Liggitt 358c092abe fix storage unit tests leaking feature flag changes 2018-11-16 10:52:52 -05:00
k8s-ci-robot 6fc60428a7
Merge pull request #71020 from saad-ali/updateCSI10
Bump CSI Spec to 1.0.0 and gRPC to 1.13.0
2018-11-16 01:53:21 -08:00
k8s-ci-robot cde4c9ebe1
Merge pull request #68635 from mkimuram/issue/68424
CSI block volume refactor to fix target path
2018-11-15 21:35:42 -08:00
saad-ali 09d3dce38a Update CSI client to pick up CSI v1.0.0 changes 2018-11-15 16:39:59 -08:00
Masaki Kimura 9c56b53390 Fix the comment for csi block pathes to make look the same to filesystem 2018-11-15 23:26:19 +00:00
Masaki Kimura 6d7b5f1d1b Delegate creation of publishPath to driver and allow creating device file directly 2018-11-15 01:14:12 +00:00
Masaki Kimura d8c6fe5202 Change stagingPath to be a directory 2018-11-14 20:53:28 +00:00
Masaki Kimura f0354ad605 Fix for adding block volume support to CSI RBD driver 2018-11-14 19:20:56 +00:00
Michelle Au 498cd61f41 Add volumeattachment status subresource 2018-11-14 14:01:16 +01:00
Deep Debroy 05759a9091 Handle validation of drivers in Spec and Status
Signed-off-by: Deep Debroy <ddebroy@docker.com>
2018-11-13 02:35:30 -08:00
Deep Debroy af73d7bdc1 Add validation of CSINodeInfo before Create/Update calls
Signed-off-by: Deep Debroy <ddebroy@docker.com>
2018-11-13 00:48:56 -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
David Zhu 06f3b26012 Change semantics of driver install and uninstall in CSINodeInfo to use new fields. 2018-11-08 19:45:01 -08:00
David Zhu 4621887037 Updated test files with new fields 2018-11-08 19:45:01 -08:00
k8s-ci-robot af583b1c5f
Merge pull request #70540 from gnufied/fix-csi-attach-limit-node-update
Fix csi attach limit node update
2018-11-02 16:44:30 -07:00
Hemant Kumar 889468b1ab Fix csi volume attach limit 2018-11-02 15:10:31 -04:00
Vladimir Vivien df280251e7 CSI Kubelet Plugin Watcher unregistration 2018-11-01 13:53:55 -04:00
k8s-ci-robot 56796f3bf4
Merge pull request #67898 from NetApp/csi-mount-options
Add support for mount options to CSI drivers
2018-10-30 19:48:20 -07:00
k8s-ci-robot 322d0df3d2
Merge pull request #70053 from gman0/fix-csiclient-lock
CSI client: added missing lock when reading from csiDrivers
2018-10-23 02:08:32 -07:00
k8s-ci-robot 91ac9d50fa
Merge pull request #69371 from pivotal-k8s/fix-well-tested-fake
Add tests for `csiDriverClient`
2018-10-22 18:28:37 -07:00
gman 571ad40fa1 CSI client: added missing lock when reading from csiDrivers 2018-10-20 22:43:17 +02:00
Hannes Hörl 6330cee9ea Add tests for `csiDriverClient`
As #69219 outlines the unit tests in `csi_client_test.go` where not
testing the actual implementation of the `csiDriverClient` but was
testing the fake.

To fix this, we changed the `csiDriverClient` to use a
`nodeClientCreator` which is responsible for creating a new
`NodeClient`, a real one in prod and a fake one in the tests.

The setup of the gRPC connection has been pushed into that creator. The
node client uses that connection; that's transparent to the driver
client. It's the responsibility of the driver client to close the
connection when it is done with the node client. To achieve this, we
have the node client creator return a closer which handles the
connection teardown.

In the tests we now also check if the driver client actually calls
this closer, thus closing the gRPC connection.

Closes: #69219

Co-authored-by: Rosie Bloxsom <rbloxsom@pivotal.io>
Co-authored-by: Maria Ntalla <mntalla@pivotal.io>
2018-10-15 20:55:37 +01:00
Ben Swartzlander 85b224856d Add unit tests for CSI mount options 2018-10-12 12:16:20 -04:00
Ben Swartzlander 65d3beb820 Add support for mount options to CSI drivers 2018-10-11 13:39:19 -04:00
k8s-ci-robot 2d67d782de
Merge pull request #69225 from gnufied/volume-limit-tidy-up
Enable volume limit feature by default
2018-10-02 17:03:32 -07:00
Hemant Kumar 575f79e03e Enable volume limit feature by default
Also add tests for it.
2018-10-01 14:37:45 -04:00
k8s-ci-robot e019addcaa
Merge pull request #68931 from mlmhl/check_volume_attachment
extract volume attachment status checking operation as a common function when attaching a CSI volume
2018-09-29 19:45:06 -07:00
Xing Yang 0a14086792 Return error from NodeGetInfo
This PR checks if NodeGetInfo returns error. If so, it returns
the error. Without this change, it always returns no error (nil)
regardless of whether NodeGetInfo returns error.
2018-09-22 12:00:15 -07:00
mlmhl 2ff6b7e0d8 extract volume attachment status checking operation as a common function when attaching a CSI volume 2018-09-21 19:49:31 +08:00
k8s-ci-robot 9228bec334
Merge pull request #68579 from verult/adc-crd-access
Updating CSI e2e test to create CSI CRDs
2018-09-19 02:00:30 -07:00
Cheng Xing 4ff1e32974 Updating CSI e2e test to create CSI CRDs; storing CRD spec in a common location 2018-09-18 14:25:00 -07:00
Vladimir Vivien e3bc731143 CSI fix for proper fsgroup application to volume 2018-09-14 14:58:18 -04:00
Cheng Xing a8e282e905 Delaying kubeclient and csi client injection into CSI plugin 2018-09-13 14:10:49 -07:00
Cheng Xing 4ca39ef0ed Consolidated CSIDriver logic under CSIDriverRegistry flag 2018-09-10 13:34:40 -07:00
Cheng Xing 94d649b590 Rearranged feature flags 2018-09-07 17:45:27 -07:00
Cheng Xing becc6a9c19 Implemented logic in kubelet for registering node info, including wiring to CSINodeInfo; added unit tests for node updates; updated RBAC, NodeAuthorizer, NodeRestriction. 2018-09-06 19:16:51 -07:00
Renaud Gaubert 78b55eb5bf Updated the CSI pluginwatcher handler 2018-09-06 15:34:46 +02: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 a30fc9ca48 Pass pod information in CSI NodePublish attributes. 2018-09-05 21:02:45 -04:00
Kubernetes Submit Queue ca43f007a3
Merge pull request #67731 from gnufied/fix-csi-attach-limit
Automatic merge from submit-queue (batch tested with PRs 68161, 68023, 67909, 67955, 67731). If you want to cherry-pick this change to another branch, please follow the instructions here: https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md.

Fix csi attach limit

Add support for volume limits for CSI.

xref: https://github.com/kubernetes/community/pull/2051

```release-note
Add support for volume attach limits for CSI volumes
```
2018-09-05 14:51:55 -07: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
Jan Safranek c6c74d6846 Skip attach for non-attachable CSI volumes 2018-09-05 10:15:43 -04:00
Jan Safranek 7c1311bcdb Add CSIDriver lister to CSI plugin
So we don't instantiate a new lister in every SetUpAt() call.
2018-09-05 10:15:43 -04:00
Jan Safranek 7d673cb8f0 Pass new CSI API Client and informer to Volume Plugins 2018-08-31 12:25:59 -07:00
Hemant Kumar 4b17a48def Implement support for updating volume limits
Create a new predicate to count CSI volumes
2018-08-22 19:36:00 -04:00
Kubernetes Submit Queue c5e74d128d
Merge pull request #66884 from NickrenREN/attacher-detacher-refactor
Automatic merge from submit-queue. 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>.

Attacher/Detacher refactor for local storage

Proposal link: https://github.com/kubernetes/community/pull/2438

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

Attacher/Detacher refactor for the plugins which just need to mount device, but do not need to attach, such as local storage plugin.

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #

**Special notes for your reviewer**:

```release-note
Attacher/Detacher refactor for local storage
```

/sig storage
/kind feature
2018-08-15 07:03:48 -07:00
NickrenREN 81e360d20f update volume plugins accordingly 2018-08-14 11:12:54 +08:00
Cheng Xing 7fa120c18c CSI plugin now calls NodeGetInfo() to get driver's node ID 2018-08-08 13:15:43 -07:00
Kubernetes Submit Queue b95ae9312c
Merge pull request #61389 from linyouchong/linyouchong-20180320
Automatic merge from submit-queue. 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>.

csiAttacher: check deviceMountPath before hasStageUnstageCapability

csiAttacher#MountDevice: it is better to check `deviceMountPath` before `hasStageUnstageCapability`

**Release note**:
```
NONE
```
/release-note-none
/kind cleanup
/sig storage
2018-08-03 07:02:46 -07:00
linyouchong f2e92776bc Use glog instead of fmt 2018-07-24 09:46:56 +08:00
Seungcheol Ko 43f805b7bd Fix a typo in csiPlugin comment 2018-07-19 21:01:09 +09:00
linyouchong 51e81d2585 csiAttacher: check deviceMountPath before hasStageUnstageCapability 2018-07-19 11:26:45 +08:00
Kubernetes Submit Queue 3b269e182d
Merge pull request #65499 from krunaljain/bugfix/csi_default_fs_type
Automatic merge from submit-queue (batch tested with PRs 55023, 65499). 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>.

Bugfix/csi default fs type

This PR address the issue mentioned in the following ticket https://github.com/kubernetes/kubernetes/issues/65122 
The FSType string will now not be defaulted to ext4. Removes defaulting of CSI file system type to ext4. CSI plugins that depended on this default need to be updated as the fsType would remain an empty string if not provided and would not default to ext4. CSI spec allows for an empty fstype string. This is intended for non-block plugins like nfs and gluster where filesystems are not separately created on the volume. But currently the default file system is overridden to ext4  which makes the above case redundant. This commit prevents such an overridding. 


```release-note  
ACTION REQUIRED: Removes defaulting of CSI file system type to ext4. All the production drivers listed under https://kubernetes-csi.github.io/docs/Drivers.html were tested and work as expected after this change. If you are using a driver not in that list, please test the drivers on an updated test cluster first. ```
2018-07-10 10:18:08 -07:00
Kubernetes Submit Queue 9cb2ee0992
Merge pull request #65456 from wenlxie/upstream.master.csivolumemode
Automatic merge from submit-queue (batch tested with PRs 65456, 65549). 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>.

add volume mode field to constructed volume spec for CSI plugin

Add volume mode filed to constructed Volume Spec for CSI plugin

```release-note
Add volume mode filed to constructed volume spec for CSI plugin
```
2018-07-09 06:24:03 -07:00
Kubernetes Submit Queue e35ecf1618
Merge pull request #65573 from CaoShuFeng/csi
Automatic merge from submit-queue (batch tested with PRs 65628, 65573). 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>.

run test TestAttacherMountDevice in temp directory

This change fix two unit test:

1. After run command `make test WHAT=k8s.io/kubernetes/pkg/volume/csi KUBE_TEST_ARGS='-run ^TestAttacherMountDevice$'`
There is a file leaked in work space:
pkg/volume/csi/vol_data.json


2. make test WHAT=k8s.io/kubernetes/pkg/volume/csi KUBE_TEST_ARGS='-run ^TestAttacherUnmountDevice$'
   This  test fails if it does not run along with TestAttacherMountDevice.

This change fix it.


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

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-07-04 03:29:05 -07:00
wenlxie 0df13e7d18 add volume mode field to constructed VolumeSpec 2018-06-29 18:00:47 +08: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
Krunal Jain 5dfe7b5758 Removes defaulting of CSI fsType to ext4 2018-06-28 16:48:25 -07:00
Kubernetes Submit Queue 44073e6f43
Merge pull request #64660 from figo/master
Automatic merge from submit-queue. 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>.

Add support for plugin directory hierarchy

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

Add hierarchy support for plugin directory, it traverses and 
watch plugin directory and its sub directory recursively.

plugin socket file only need be unique within one directory,
``` 
 plugin socket directory  
    |  
    ---->sub directory 1
    |              |  
    |              ----->  socket1,  socket2 ...
    ----->sub directory 2
                  |
                  ------> socket1, socket2 ...  
```
the design itself allow sub directory be anything,
but in practical, each plugin type could just use one sub directory.

**Which issue(s) this PR fixes**:
Fixes #64003

**Special notes for your reviewer**:

twos bonus changes added as below

1) propose to let pluginWatcher bookkeeping registered plugins,
to make sure plugin name is unique within one plugin type.  
arguably, we could let each handler do the same work, but it requires
every handler repeat the same thing.    
 
2) extract example handler out from test, it is easier to read the code with the
seperation.  


**Release note**:

```release-note
N/A
```

/sig node
/cc @vikaschoudhary16  @jiayingz @RenaudWasTaken @vishh @derekwaynecarr  @saad-ali @vladimirvivien @dchen1107 @yujuhong @tallclair @Random-Liu @anfernee @akutz
2018-06-28 14:53:44 -07:00
Cao Shufeng 65ead1950f run test TestAttacherMountDevice in temp directory 2018-06-28 17:18:23 +08:00
Kubernetes Submit Queue e55ea1608a
Merge pull request #65323 from jsafrane/fix-csi-json
Automatic merge from submit-queue (batch tested with PRs 65404, 65323, 65468). 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 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.

Fixes #65322

**Release note**:
```release-note
Fixed cleanup of CSI metadata files.
```

/assign @saad-ali @vladimirvivien
2018-06-26 17:33:05 -07:00
hui luo d04f596829 Add hierarchy support for plugin directory
it traverses and watch plugin directory and its sub directory recursively,
plugin socket file only need be unique within one directory,

- plugin socket directory
-    |
-    ---->sub directory 1
-    |              |
-    |              ----->  socket1,  socket2 ...
-    ----->sub directory 2
-                  |
-                  ------> socket1, socket2 ...

the design itself allow sub directory be anything,
but in practical, each plugin type could just use one sub directory.

four bonus changes added as below

1. extract example handler out from test, it is easier to read the code
with the seperation.

2. there are two variables here: "Watcher" and "watcher".
"Watcher" is the plugin watcher, and "watcher" is the fsnotify watcher.
so rename the "watcher" to "fsWatcher" to make code easier to
understand.

3. change RegisterCallbackFn() return value order, it is
conventional to return error last, after this change,
the pkg/volume/csi is compliance with golint, so remove it
from hack/.golint_failures

4. refactor errors handling at invokeRegistrationCallbackAtHandler()
to make error message more clear.
2018-06-25 17:32:18 -07:00
Jeff Grafton 23ceebac22 Run hack/update-bazel.sh 2018-06-22 16:22:57 -07:00
Kubernetes Submit Queue cbe4f48866
Merge pull request #65064 from davidz627/fix/CSIe2eAttach
Automatic merge from submit-queue (batch tested with PRs 65064, 65218, 65260, 65241, 64372). 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>.

Added attach/mount/check steps to CSI Driver E2E tests

This PR makes the CSI Volume E2E tests actually go through the entire dynamic provisioning pipeline and test attach/mount/check file etc.

Fixes #64927

```release-note
None
```
2018-06-21 21:12:09 -07: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
Kubernetes Submit Queue 92dfcfcb65
Merge pull request #64882 from jsafrane/csi-mount-json
Automatic merge from submit-queue. 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 UnmountDevice with deleted pod.

When a pod is deleted, kubelet can't read VolumeAttachment objects. It should cache all information in a json file.

Fixes #63827

~~Work in progress: missing (unit?) tests~~

**Release note**:

```release-note
NONE
```

@saad-ali @vladimirvivien @sbezverk 
/sig storage
2018-06-20 09:59:57 -07:00
Kubernetes Submit Queue f485cb790f
Merge pull request #64416 from cofyc/remove_unnecessary_getmountrefs
Automatic merge from submit-queue (batch tested with PRs 64416, 63625, 60967, 64767, 64588). 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>.

Remove mount.GetMountRefs in favor of mounter.GetMountRefs

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

Currently, there are two `GetMountRefs` functions:

- `mount.GetMountRefs`: used in various volume plugins
- `<mounter>.GetMountRefs` (previously `mount.GetMountRefsByDev` introduced in [#49988](https://github.com/kubernetes/kubernetes/pull/49988/files#diff-0c0020e71c995790a90ad9c61ede7632R154), moved to `Mounter` interface in #62903)

This is confusing, and it's better to implement `GetMountRefs` on mounter interface, because different mounters can have their own implementation (especially for nsenter).

This pr removes `mount.GetMountRefs` in favor of mounter.GetMountRefs.

More discussions: https://github.com/kubernetes/kubernetes/pull/62102#issuecomment-390081884 and https://github.com/kubernetes/kubernetes/pull/62102#issuecomment-390123022.

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-06-20 07:12:14 -07:00
Yecheng Fu c542b6be5d Remove mount.GetMountRefs in favor of mounter.GetMountRefs 2018-06-20 17:01:27 +08:00
David Zhu 77df3ff525 Added attach/mount/check steps to CSI Driver E2E tests 2018-06-19 13:43:36 -07:00
Vladimir Vivien 6553e2c849 CSI block fix for mapping path 2018-06-18 12:46:07 -04: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 5044a3d12c CSI implementation of raw block volume support 2018-06-05 16:53:56 -04:00
Serguei Bezverkhi ea474cd99c New labelmanager package 2018-06-04 16:54:25 -04:00
Serguei Bezverkhi 1c05ca5575 Adding CSI driver registration 2018-06-04 16:47:24 -04: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
Kubernetes Submit Queue 36b1f67617
Merge pull request #64026 from jsafrane/csi-selinux
Automatic merge from submit-queue (batch tested with PRs 63914, 63887, 64116, 64026, 62933). 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>.

Enable SELinux relabeling in CSI volumes

**What this PR does / why we need it**:
CSI volume plugin should provide correct information in `GetAttributes` call so kubelet can ask container runtime to relabel the volume. Therefore CSI volume plugin needs to check if a random volume mounted by a CSI driver supports SELinux or not by checking for "seclabel" mount or superblock option.


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

**Release note**:
```release-note
NONE
```

@saad-ali @vladimirvivien @davidz627 
@cofyc, FYI, I'm changing `struct mountInfo`.
2018-05-22 17:36:18 -07:00
Jan Safranek 080d2dfe8f Add SELinux support to CSI 2018-05-18 14:27:13 +02: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
Kubernetes Submit Queue 6b6d1ea1ab
Merge pull request #62486 from vladimirvivien/csi-fsGroup-fix
Automatic merge from submit-queue (batch tested with PRs 62486, 62471, 62183). 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>.

CSI - Update to apply fsGroup volume ownership

**What this PR does / why we need it**:
This PR correctly fixes the CSI internal driver to apply fsGroup volume ownership value during mount.

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #62413 

```release-note
NONE
```
2018-04-13 16:01:06 -07:00
Kubernetes Submit Queue 028550f451
Merge pull request #61392 from jianglingxia/csi-mounter20180320
Automatic merge from submit-queue. 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>.

The err has checked in TearDownAt func/kind bug

**What this PR does / why we need it**:
The err has checked in TearDownAt func/kind bug
**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-04-13 06:10:03 -07:00
Vladimir Vivien e207e0b324 CSI - Apply fsGroup volume ownership when pv not readOnly 2018-04-13 08:55:27 -04:00
Kubernetes Submit Queue 89d8884fba
Merge pull request #61147 from mlmhl/csi
Automatic merge from submit-queue (batch tested with PRs 61147, 62236, 62018). 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 NodeStageVolume/NodePublishVolume error if operation failed for CSI

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

Currently in CSI volume plugin, if `NodeStageVolume`/`NodePublishVolume` operation failed, we will try to remove according target dir(global mount path or pod volume path) first. If this clear operation failed, according error will be returned, and finally displayed in `Pod`'s event. However, compared to this clear error, the user is more concerned about `NodeStageVolume`/`NodePublishVolume` error, so I suggest that just log the clear error and still return the `NodeStageVolume`/`NodePublishVolume` error.

**Release note**:

```release-note
NONE
```

/sig storage
2018-04-10 05:31:13 -07:00
Kubernetes Submit Queue f239270ec7
Merge pull request #61447 from jianglingxia/csiattacher-2018032109
Automatic merge from submit-queue (batch tested with PRs 56045, 61447, 62189). 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>.

Add UT Test to TestAttacherUnmountDevice

**What this PR does / why we need it**:
Add UT Test to TestAttacherUnmountDevice if no volumeID scenero
**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-04-06 09:14:04 -07:00
Kubernetes Submit Queue c079d1e6af
Merge pull request #61096 from mlmhl/csi_secret
Automatic merge from submit-queue (batch tested with PRs 61096, 61955, 61542, 60597). 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 error if get NodeStageSecret and NodePublishSecret failed

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

Currently, if got NodeStageSecret  or NodePublishSecret failed, we just log the error and assume that there is no credential. I think we should report the error as if user specified these secret, they expect to apply some credentials.

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #61052

**Release note**:

```release-note
NONE
```

/sig storage
2018-04-02 15:35:02 -07:00
hzxuzhonghu 70e45eccf2 Replace "golang.org/x/net/context" with "context" 2018-03-22 20:57:14 +08:00
jianglingxia 89340a5948 Add UT Test to TestAttacherUnmountDevice 2018-03-21 09:33:31 +08:00
jianglingxia 595e0ff5cb the err has checked in TearDownAt func/kind bug 2018-03-20 17:34:01 +08:00
mlmhl b9606696c9 return error if get NodeStageSecret and NodePublishSecret failed 2018-03-20 12:57:08 +08:00
mlmhl 23dbd69925 return NodeStageVolume/NodePublishVolume error if operation failed 2018-03-15 11:03:30 +08:00
mlmhl 4a3bdbecf9 set readOnly for CSI mounter 2018-03-11 11:16:20 +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
Serguei Bezverkhi c8956fa93c CSI code changes 2018-02-24 16:30:17 -05:00
Serguei Bezverkhi 3aa462eab4 autogenerated api changes 2018-02-23 16:50:44 -05:00
Serguei Bezverkhi a6ca466859 k8s csi code change 2018-02-23 16:50:43 -05:00