Commit Graph

2300 Commits (bad9f6341a093c371f71e26aa27c0f695be1ba86)

Author SHA1 Message Date
jianglingxia 0c79df1bcb delete some para no need used in local volume 2018-11-03 14:03:47 +08:00
jianglingxia 4ead52e0f5 fix local volume getVolumeSourceFSType func by golint 2018-11-03 12:56:10 +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
k8s-ci-robot 69f5f5eff2
Merge pull request #67978 from WanLinghao/token_controller_improve
remove idle tokens in kubelet token manager
2018-11-02 12:28:47 -07:00
Hemant Kumar 889468b1ab Fix csi volume attach limit 2018-11-02 15:10:31 -04:00
k8s-ci-robot 6813ebb568
Merge pull request #67851 from aniket-s-kulkarni/flexvolume-resize-implementation
Flexvolume resize implementation
2018-11-02 10:47:01 -07:00
k8s-ci-robot 6c0684f010
Merge pull request #70548 from vladimirvivien/csi-plugin-deregister
CSI Kubelet Plugin Watcher DeRegistration
2018-11-02 08:39:06 -07:00
k8s-ci-robot 45550cadbe
Merge pull request #70477 from andyzhangx/azure-ultrassd-sdk
add azure UltraSSD disk support
2018-11-01 22:16:55 -07:00
k8s-ci-robot 4351cea80c
Merge pull request #70046 from cheftako/lintCleanGce
Fixed lint errors for pkg/cloudprovider/providers/gce.
2018-11-01 13:44:06 -07:00
k8s-ci-robot 133f662610
Merge pull request #70408 from idealhack/fix-golint-pkg-volume-util
Fix golint error for `pkg/volume/util/resize_util.go`
2018-11-01 11:11:22 -07:00
Vladimir Vivien df280251e7 CSI Kubelet Plugin Watcher unregistration 2018-11-01 13:53:55 -04:00
qingsenLi 3ac9b27b2a remove repetitive word in annotation 2018-11-02 00:54:41 +08:00
yameiwang 18a904d187 fix golint errors in pkg/volume/* 2018-11-01 16:52:56 +08:00
andyzhangx f1bd292c76 add ultrassd support
update stagin Godeps.json

update godeps license

fix test failure

fix comments
2018-11-01 06:30:15 +00:00
Humble Chirammal 734da0edb1 glusterfs: Allow admin to provide custom endpoint/service name prefix
This patch introduces a new SC parameter called `customepnameprefix`
in glusterfs plugin. This new storageclass parameter allow admins
to create endpoints and services with mentioned prefix.
If this parameter has not been set or if its empty,
default prefix string ie "glusterfs-dynamic-" will be used for ep/svc
name.

This patch address below issues#

https://github.com/kubernetes/kubernetes/issues/53939
https://github.com/kubernetes/kubernetes/issues/56379

Additional Ref# #
https://github.com/kubernetes/kubernetes/issues/56380

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2018-10-31 18:06:40 +05:30
andyzhangx d210b4bcf3 upgrade azure sdk to support ultra ssd
update Godeps.json

update azure sdk for ultrassd support

update bazel

fix build failure
2018-10-31 10:08:52 +00:00
xichengliudui 8477389e7c Fix some types
Fix some typos
2018-10-31 04:05:25 -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 63a7e06eb5
Merge pull request #69484 from ddebroy/ddebroy-winpipe1
Correctly handle named pipe host mounts for Windows
2018-10-30 16:15:57 -07:00
k8s-ci-robot a49e4e128e
Merge pull request #69708 from mcrute/fix-aws-imports
Fix AWS volume and cloud provider import order
2018-10-30 13:44:50 -07:00
Mike Crute 49df100af9 fix AWS volume and cloud provider import order 2018-10-30 08:18:45 -07:00
k8s-ci-robot 650357ae53
Merge pull request #70306 from obnoxxx/glusterfs-improve-comments
Glusterfs: improve some comments
2018-10-30 06:25:20 -07:00
k8s-ci-robot c7f0616482
Merge pull request #70236 from mlmhl/cephfs
Improve cephfs fuse error log level
2018-10-30 06:25:10 -07:00
Yang Li a4fff0d32c Fix golint error for `pkg/volume/util/resize_util.go` 2018-10-30 13:01:54 +08:00
k8s-ci-robot 070a35f9c3
Merge pull request #69544 from justinsb/tempdir_cleanup
Introduce test harness into unit tests
2018-10-29 20:07:27 -07:00
mlmhl 12e007d33c improve cephfs fuse error log level 2018-10-30 09:56:47 +08:00
walter 735ad9ed63 Fixed lint errors for pkg/cloudprovider/providers/gce.
Fixed minor issues.
Cleaned up from merge errors.
2018-10-29 11:52:24 -07:00
Michael Adam 870bf314fe glusterfs: remove a redundant comment
This comment exactly states what the line below it does.
There's no point in keeping it.

Signed-off-by: Michael Adam <obnox@redhat.com>
2018-10-29 17:07:08 +01:00
Michael Adam 465bb06533 glusterfs: improve a comment block
moving it to the function it explains and
rewording slightly.

Signed-off-by: Michael Adam <obnox@redhat.com>
2018-10-29 17:07:08 +01:00
Humble Chirammal a6759a7b22 Fix a typo in source code comment
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2018-10-26 20:01:19 +05:30
Humble Chirammal 5bd0b5d841 GlusterFS: Use pvc uid instead of pvc name in glusterfs endpoint name.
At present, endpoints and services are created
for glusterfs pvcs are in form of glusterfs-dynamic-<PVC name>
however this could cause issue if user deletes a PVC and immediately
creates a new one with the same name, PV controller will try to delete
the old PV and its endpoint and at the same the controller will try to create new PV
and the same endpoint. Depending on which event reaches the
controller first, it may create new PV, check that endpoints exists,
then delete the old PVC and delete endpoints already used by the new PV.

This patch changes the endpoint/service name to below format:

`glusterfs-dynamic-<PVC UUID>`.

By the uniqueness of UUID, above mentioned issue will no longer be present.

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2018-10-26 20:00:02 +05:30
Deep Debroy 119e2a1d43 Address CR comments and add more tests
Signed-off-by: Deep Debroy <ddebroy@docker.com>
2018-10-26 00:29:27 -07:00
Aniket Kulkarni 75350d11e9 adding support for expanding in use persistent volumes for Flex 2018-10-24 15:31:16 -04:00
k8s-ci-robot 3abb9f0ad7
Merge pull request #70002 from andyzhangx/getdisklun
fix azure disk attachment error on Linux
2018-10-24 10:53:51 -07:00
WanLinghao 83a9db5148 Support more volume types in stats/summary endpoint including configmap, secret, projected 2018-10-24 14:19:12 +08: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
andyzhangx f69068753a improve azure disk attachment perf on Linux
use new getDiskLUN func in linux
2018-10-22 02:24:15 +00:00
WanLinghao 7df1078d6f Currently, kubelet token mamanger only clean tokens who are expired. For tokens with long expiration, if the pod who creates them got killed or evicted, those tokens may stay in kubelet's memory until they are expired. It's bad for kubelet and node itself. After this patch, each time a pod was deleted, token manager would clean related tokens. 2018-10-22 09:32:59 +08:00
gman 571ad40fa1 CSI client: added missing lock when reading from csiDrivers 2018-10-20 22:43:17 +02:00
andyzhangx 79a5bb6216 add more logging for azure disk diagnostics 2018-10-19 08:11:49 +00:00
k8s-ci-robot b5c25728ec
Merge pull request #69718 from andyzhangx/azurefile-premium
support Azure premium file for azure file plugin
2018-10-18 05:18:50 -07:00
andyzhangx bc2c79a43a add azure premium file support
update bazel and fix goftm

use defaultStorageAccountKind

fix test failure

update godep license file

fix staging godeps issue

update staging godeps

fix comments, use one API call for file creation
2018-10-17 03:27:29 +00:00
k8s-ci-robot c585d13e36
Merge pull request #69854 from andyzhangx/azurefile-permission
change default azure file mount permission to 0777
2018-10-16 19:26:25 -07:00
k8s-ci-robot 5a0220a6d8
Merge pull request #69387 from mcrute/master
fix golint for pkg/cloudprovider/providers/aws
2018-10-16 17:53:02 -07:00
k8s-ci-robot 1d3d1e8968
Merge pull request #68518 from leakingtapan/golint-fix-volume-empty-dir
fix golint issues for pkg/volume/empty_dir
2018-10-16 17:52:44 -07:00
andyzhangx ccac3a51f3 change azure file mount permission to 0777 2018-10-16 07:51:05 +00:00
k8s-ci-robot d54e0fc0bc
Merge pull request #69670 from atlassian/simplify-rand-seed
Simplify rand seeding
2018-10-15 13:53:01 -07:00
Cheng Pan 42ef7ae8d5 fix golint issues for pkg/volume/empty_dir 2018-10-15 20:00:36 +00: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
k8s-ci-robot 2119512b9e
Merge pull request #68491 from leakingtapan/golint-fix-volume-util
fix golint issue for pkg/volume/util
2018-10-15 11:40:32 -07:00
k8s-ci-robot 296ea67c84
Merge pull request #69556 from leakingtapan/golint-fix-volume-fc-flock
Fix golint issues for pkg/volume/{fc,flocker} packages
2018-10-14 10:43:59 -07:00
Deep Debroy f8a69f1086 Broaden scope of host path types to skip processing in Windows
Signed-off-by: Deep Debroy <ddebroy@docker.com>
2018-10-12 19:57:08 -07: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
Mikhail Mazurskiy f5e9c0473c
Remove unnecessary random re-seeding
Package k8s.io/apimachinery/pkg/util/rand seeds the random based on time
during the package initialization, so no need to re-seed it.
2018-10-11 22:02:01 +11:00
Mikhail Mazurskiy 3a243090a5
Simplify random seed initialization
There is no need to set the time zone as the result does not
depend on it
2018-10-11 21:01:15 +11:00
k8s-ci-robot 43d61f42f1
Merge pull request #69187 from SandeepPissay/addOwner
Adding myself as OWNER for vSphere Cloud Provider.
2018-10-10 20:24:37 -07:00
k8s-ci-robot 3ac3889838
Merge pull request #69558 from andyzhangx/GetVolumeLimits-warning
fix GetVolumeLimits log flushing issue
2018-10-10 16:46:54 -07:00
andyzhangx 12284c9817 upgrade azure go sdk for azure file premium support
update azure sdk for azure file premium support

update azure sdk to support azure file premium

update bazel
2018-10-09 13:28:51 +00:00
lichuqiang 814dbac3df add provision failure hook in fake volume plugin 2018-10-09 19:16:27 +08:00
andyzhangx e67b369dfa fix GetVolumeLimits log flushing issue
fix logging flushing issue in GetVolumeLimits
2018-10-09 07:12:33 +00:00
Cheng Pan 065e4543b7 Fix golint issues for pkg/volume/{fc,flocker} packages 2018-10-09 06:04:00 +00:00
Justin Santa Barbara 58fc3c8c23 Introduce test harness into unit tests
The harness lets us execute code after the test has completed.

Use it to clean-up temp dirs in the flexvolume tests (initially).
2018-10-08 18:44:05 -04:00
Mike Crute 4d65f20ff6 fix golint for pkg/cloudprovider/providers/aws 2018-10-08 12:08:56 -07:00
Jan Safranek 362be3a58b Retry attaching multipath iSCSI volumes
Don't mount single path instead of multipath volumes and always wait until
at least 2 paths are available. Try up to 3 times to get all paths. Try 5
times to get at last 2 paths.
2018-10-08 13:00:24 +02:00
k8s-ci-robot a29b093a56
Merge pull request #69451 from justinsb/sort_bind_options
Sort bind options in JoinMountOptions
2018-10-06 21:29:51 -07:00
k8s-ci-robot 0f17e9ade6
Merge pull request #69386 from cblecker/go-1.11
Update to go1.11.1
2018-10-05 17:35:51 -07:00
Deep Debroy b4bb5dd430 Correctly handle named pipe host mounts for Windows
Signed-off-by: Deep Debroy <ddebroy@docker.com>
2018-10-05 16:46:04 -07:00
k8s-ci-robot 13705ac81e
Merge pull request #68310 from cheftako/cpiMove
Moving the cloudprovider interface to staging.
2018-10-05 13:29:01 -07:00
Christoph Blecker 97b2992dc1
Update gofmt for go1.11 2018-10-05 12:59:38 -07:00
Justin Santa Barbara 3c4789b464 Sort bind options in JoinMountOptions
We were not sorting them previously, which made the order
non-deterministic.  If we believe the order doesn't matter, let's pick
a consistent order to minimize the chances of a rare flake.

This also simplifies the unit tests, which were flaking
not-very-rarely, e.g. with

`bazel test //pkg/volume/awsebs/... --runs_per_test=8`
2018-10-04 21:39:13 -04:00
k8s-ci-robot 6e850768a6
Merge pull request #69115 from mkimuram/issue/69114
Fix descriptor lock release logic for block volume unmapDevice
2018-10-04 18:19:36 -07:00
Walter Fender f3f46d5f5a Moving the cloudprovider interface to staging.
Individual implementations are not yet being moved.
Fixed all dependencies which call the interface.
Fixed golint exceptions to reflect the move.
Added project info as per @dims and
https://github.com/kubernetes/kubernetes-template-project.
Added dims to the security contacts.
Fixed minor issues.
Added missing template files.
Copied ControllerClientBuilder interface to cp.
This allows us to break the only dependency on K8s/K8s.
Added TODO to ControllerClientBuilder.
Fixed GoDeps.
Factored in feedback from JustinSB.
2018-10-04 14:41:20 -07:00
k8s-ci-robot ae2efc752a
Merge pull request #69391 from justinsb/fix_go111_printf
Storage: printf cleanups
2018-10-04 07:51:48 -07:00
k8s-ci-robot a25bc8df42
Merge pull request #68440 from humblec/log-level
Add `log-level` mount option support for glusterfs plugin
2018-10-04 06:21:49 -07:00
Masaki Kimura 4226ae7a61 Fix to reflect commnet
- Change not to skip error from GetLoopDevice other than DeviceNotFound
- Add comment for the reason for order of descriptor lock release and TearDownDevice
2018-10-03 22:31:51 +00:00
k8s-ci-robot 02df80d82b
Merge pull request #69211 from lichuqiang/mount_options
mountoptions support for local storage
2018-10-03 13:02:13 -07:00
k8s-ci-robot e03886c34a
Merge pull request #68297 from leakingtapan/golint-fix-gce-pd
fix golint for pkg/volume/gce_pd
2018-10-03 13:01:34 -07:00
Justin Santa Barbara 1a082a48e8 storage: printf cleanups
go test in 1.11 now performs some validation of format strings, so
this address the issues highlighted by go test, allowing go test to
pass with 1.11.

Fixes pertaining to storage.
2018-10-03 15:26:55 -04:00
Masaki Kimura 3d808540df Fix descriptor lock release logic for block volume unmapDevice
Fixes: #69114
2018-10-03 14:40:54 +00:00
k8s-ci-robot 984b7c89e8
Merge pull request #69140 from jsafrane/iscsi-panic
Fix iSCSI panic in DetachDisk
2018-10-03 01:16:30 -07:00
lichuqiang f733837392 support mount options in setup 2018-10-03 14:06:14 +08:00
lichuqiang 2f4be20f5d mountoptions support for local storage 2018-10-03 13:13:52 +08:00
Humble Chirammal fdcd58a794 Add `log-level` mount option support for glusterfs plugin
The glusterfs plugin/driver set log-level to ERROR by default while
mounting glusterfs shares. However at times, its required to supply other
log-level options like INFO, TRACE..etc. This patch enables the support
to provide other log-level values from storageclass.

Additional Ref#
    https://docs.gluster.org/en/v3/Administrator%20Guide/Setting%20Up%20Clients/

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2018-10-03 10:16:41 +05:30
k8s-ci-robot a4589f1cbe
Merge pull request #68813 from leakingtapan/golint-fix-volume-flex
fix golint issue for pkg/volume/flexvolume package
2018-10-02 18:15:31 -07: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
Cheng Pan 7d68fd00e6 fix golint for pkg/volume/gce_pd 2018-10-01 18:58:30 +00: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 ecfd1a3e56
Merge pull request #68945 from gnufied/fix-mount-options
Make sure we pass mount options while creating bind mounts
2018-10-01 09:27:54 -07:00
k8s-ci-robot 0815609e4a
Merge pull request #69116 from JHilker/patch-1
Random typo fix
2018-10-01 02:45:45 -07:00
k8s-ci-robot 9895e4e844
Merge pull request #69032 from mlmhl/azure_file_setup
return error if make dir failed when setting up azure file volume
2018-09-29 22:21:58 -07: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
SandeepPissay 800ba767f8 Adding few VMware contributors as approvers for vsphere volume plugin 2018-09-28 15:29:25 -07:00
k8s-ci-robot 2e73529c9e
Merge pull request #58646 from adityadani/disable_selinux_for_portworx_volumes
Change the portworx volume attribute SupportsSELinux to false
2018-09-28 03:06:16 -07:00
k8s-ci-robot 52b7f6f0c3
Merge pull request #68979 from xing-yang/nodeinfo
Return error from NodeGetInfo
2018-09-27 04:48:29 -07:00
Jan Safranek e5fbb3538f Unmount iSCSI device only if it's mounted. 2018-09-27 10:24:59 +02:00
Jan Safranek ffaff4e976 Fixed panic in iSCSI.UnmountDevice
Fill iscsiDetacher.plugin so iscsiDetacher.plugin.targetLocks.LockKey(iqn) does not
panic.
2018-09-27 10:23:54 +02:00
Jacob Hilker 4eb6f16b54
Random typo fix 2018-09-26 16:18:04 -04:00
Hemant Kumar 6eda6d1a06 Make sure we pass mount options while creating bind mounts
This fixes an inconsitency that exists in mounter
2018-09-26 15:12:05 -04:00
k8s-ci-robot c8f0af2afc
Merge pull request #68680 from benoitf/fix-chown
Fix chown on distributed flex volumes (like gluster)
2018-09-25 19:23:58 -07:00
k8s-ci-robot 7db813178d
Merge pull request #68536 from sngchlko/affinity-for-cinder
Add VolumeScheduling support for Cinder
2018-09-25 12:16:02 -07:00
k8s-ci-robot 433d72da06
Merge pull request #68435 from humblec/log-file-nil
Glusterfs: Remove unwanted `log-file` mount argument.
2018-09-25 12:15:42 -07:00
Florent BENOIT 6584df5914 if driver disable support of FSGroup, mounter will not process the volume ownership 2018-09-25 16:12:11 +02:00
k8s-ci-robot c16691037d
Merge pull request #68255 from leakingtapan/golint-fix-ebs
Fix golint for pkg/volume/aws_ebs
2018-09-25 06:13:33 -07:00
mlmhl 867a717fb1 return error if make dir failed when setting up azure file volume 2018-09-25 20:16:08 +08:00
k8s-ci-robot b875ad8c08
Merge pull request #67508 from brahmaroutu/flex_metrics
Provide Flex volume metrics if the plugin supports.
2018-09-25 00:18:10 -07:00
k8s-ci-robot 9120dc01e1
Merge pull request #67939 from NickrenREN/rbd-ams
RBD AccessModes checking when attaching
2018-09-24 17:17:00 -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
Cheng Pan 000e30086b fix golint for pkg/volume/aws_ebs 2018-09-22 05:56:05 +00: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
Cheng Pan aa297d1adf fix golint issue for pkg/volume/flexvolume package 2018-09-20 17:33:45 +00:00
houjun 76c0dd588c Remove unused function in downwardapi.go 2018-09-20 16:17:40 +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
David Zhu 9d207b3e3c GetMountRefs should not fail if the path supplied does not exist anymore. It has no mount references 2018-09-17 17:35:12 -07:00
k8s-ci-robot f193e4b107
Merge pull request #68691 from gnufied/fix-configmap-bug
verify invalid secret/configmap/projected volumes
2018-09-14 17:02:02 -07:00
Hemant Kumar 85e337153a verify invalid secret/configmap/projected volumes
And avoid calling Setup if they don't exist
2018-09-14 17:38:52 -04: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
Humble Chirammal 38e8c00119 Glusterfs: Remove unwanted `log-file` mount argument.
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2018-09-12 22:41:25 +05:30
Seungcheol Ko 4b3e50b61c fix verify-bazel error 2018-09-12 07:27:33 +00:00
Seungcheol Ko 8f7fcd5adc Add VolumeScheduling support for Cinder 2018-09-12 05:11:54 +00:00
Cheng Pan a5c4f341d7 fix golint issue for pkg/volume/util 2018-09-10 21:24:35 +00:00
Cheng Xing 4ca39ef0ed Consolidated CSIDriver logic under CSIDriverRegistry flag 2018-09-10 13:34:40 -07:00
Kubernetes Submit Queue f26556cc14
Merge pull request #67684 from verult/top-csi-driver-registration
Automatic merge from submit-queue. 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.

CSI Node info registration in kubelet

**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 #67683

**Special notes for your reviewer**:
Feature issue: https://github.com/kubernetes/features/issues/557
Design doc: https://github.com/kubernetes/community/pull/2034

Missing pieces:
* CSI client retry and exponential backoff logic.
* CSINodeInfo object validation
* e2e test with all the CSI machinery.

An RBAC rule is also added to support external-provisioner topology updates.

**Release note**:

```release-note
Registers volume topology information reported by a node-level Container Storage Interface (CSI) driver. This enables Kubernetes support of CSI topology mechanisms.
```
2018-09-08 00:16:52 -07:00
Cheng Xing 94d649b590 Rearranged feature flags 2018-09-07 17:45:27 -07:00
Kubernetes Submit Queue 5c8ef7eb3b
Merge pull request #68320 from NickrenREN/localvolume-metricspath
Automatic merge from submit-queue. 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 metricsStatFS volume path for local volume

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

Fix metricsStatFS volume path for local volume

**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
```

/kind bug
/sig storage
/assign @msau42
2018-09-06 21:41:17 -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
Kubernetes Submit Queue e5f55dd9d0
Merge pull request #68239 from cuppett/issue-59015
Automatic merge from submit-queue. 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.

Resolves #59015, Scheduler: Add support for EBS types t3, r5, & z1d

Fixes #59015

The new t3, r5, r5d and z1 need matched as well according to this:

From current AWS documentation:

https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/volume_limits.html

T3, C5, C5d, M5, M5d, R5, R5d, and z1d instances support a maximum of
28 attachments, and every instance has at least one network interface
attachment. If you have no additional network interface attachments on
these instances, you could attach 27 EBS volumes.

**Release note**:

```NONE

```
2018-09-06 04:23:56 -07:00
NickrenREN e03635e02c fix metricsStatFS volume path for local volume 2018-09-06 11:38:06 +08:00
Stephen Cuppett d85daf0f4c Resolves #59015, extends existing regex to cover t3, r5(d) & z1d instance types
From current AWS documentation:

https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/volume_limits.html

T3, C5, C5d, M5, M5d, R5, R5d, and z1d instances support a maximum of
28 attachments, and every instance has at least one network interface
attachment. If you have no additional network interface attachments on
these instances, you could attach 27 EBS volumes.
2018-09-05 21:24:09 -04: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
Hemant Kumar fc61620db5 Fix compatibility tests for scheduler 2018-09-05 12:29:00 -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
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
Michelle Au 8091c7975b Integration and e2e tests 2018-09-04 16:30:14 -07:00
NickrenREN 8d3fdc5a32 fix UT errors and add new UTs 2018-09-03 13:35:17 +08:00
NickrenREN 8173ef1e8d local volume plugin changes 2018-09-03 13:35:04 +08:00
Kubernetes Submit Queue f1ac8956fe
Merge pull request #68129 from dixudx/hostpath_owner
Automatic merge from submit-queue. 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.

as hostpathtype owner, adds myself to OWNERS file

**What this PR does / why we need it**:
As the owner of HostPathType, I would like to add myself to OWNERS file.

**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**:
/cc thockin saad-ali 
**Release note**:

```release-note
None
```
2018-09-02 10:28:19 -07:00
Kubernetes Submit Queue 85300f4f5d
Merge pull request #67803 from saad-ali/csiClusterReg3
Automatic merge from submit-queue (batch tested with PRs 64283, 67910, 67803, 68100). 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.

CSI Cluster Registry and Node Info CRDs

**What this PR does / why we need it**:
Introduces the new `CSIDriver` and `CSINodeInfo` API Object as proposed in https://github.com/kubernetes/community/pull/2514 and https://github.com/kubernetes/community/pull/2034

**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 https://github.com/kubernetes/features/issues/594

**Special notes for your reviewer**:
Per the discussion in https://groups.google.com/d/msg/kubernetes-sig-storage-wg-csi/x5CchIP9qiI/D_TyOrn2CwAJ the API is being added to the staging directory of the `kubernetes/kubernetes` repo because the consumers will be attach/detach controller and possibly kubelet, but it will be installed as a CRD (because we want to move in the direction where the API server is Kubernetes agnostic, and all Kubernetes specific types are installed).

**Release note**:

```release-note
Introduce CSI Cluster Registration mechanism to ease CSI plugin discovery and allow CSI drivers to customize Kubernetes' interaction with them.
```

CC @jsafrane
2018-08-31 16:46:41 -07:00
Kubernetes Submit Queue e1a270d6dc
Merge pull request #68117 from andyzhangx/azurefile-crsss-rg
Automatic merge from submit-queue (batch tested with PRs 68051, 68130, 67211, 68065, 68117). 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.

support cross resource group for azure file

**What this PR does / why we need it**:
support cross resource group for azure file: by `resourceGroup` field, azure cloud provider will create azure file on user specified resource group

```
---
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
  name: azurefile-rg
provisioner: kubernetes.io/azure-file
parameters:
  resourceGroup: RESOURCE_GROUP_NAME
  storageAccount: EXISTING_STORAGE_ACCOUNT
```
**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 #64428

**Special notes for your reviewer**:

**Release note**:

```
resourcegroup parameter is added to AzureFile storage class to support azure file dyanmic provision in cross resource group.
```

/kind bug
/sig azure
/assign @feiskyer 
cd @khenidak
2018-08-31 15:32:49 -07:00
Jan Safranek 7d673cb8f0 Pass new CSI API Client and informer to Volume Plugins 2018-08-31 12:25:59 -07:00
Di Xu 1c637ffc71 as hostpathtype owner, adds myself to OWNERS file 2018-08-31 19:25:32 +08:00
andyzhangx 4e3b4a7f6a support cross resource group for azure file
fix test failure
2018-08-31 08:11:07 +00:00
andyzhangx 630c841075 fix select zone error in azure disk creation
fix comments
2018-08-30 07:33:43 +00:00
Kubernetes Submit Queue 37b29297aa
Merge pull request #67432 from lichuqiang/topo_provision_beta
Automatic merge from submit-queue (batch tested with PRs 67745, 67432, 67569, 67825, 67943). 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.

Move volume dynamic provisioning scheduling to beta

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

*  Combine feature gate VolumeScheduling and DynamicProvisioningScheduling into one
* Add allowedTopologies description in kubectl

**Special notes for your reviewer**:
Wait until related e2e and downside plugins are ready.

/hold

**Release note**:

```release-note
Move volume dynamic provisioning scheduling to beta (ACTION REQUIRED: The DynamicProvisioningScheduling alpha feature gate has been removed. The VolumeScheduling beta feature gate is still required for this feature)
```
2018-08-29 15:19:34 -07:00
Kubernetes Submit Queue 720781e6af
Merge pull request #67745 from feiskyer/choose-zones
Automatic merge from submit-queue (batch tested with PRs 67745, 67432, 67569, 67825, 67943). 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 panic when choosing zone or zones for volume

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

Fix panic when choosing zone or zones for volume, so that zoneSlice won't divide by zero now.

**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
```

cc @ddebroy @andyzhangx
2018-08-29 15:19:30 -07:00
lichuqiang 4c43d626f2 related test update 2018-08-29 10:30:16 +08:00
lichuqiang b4a57f6855 combine feature gate VolumeScheduling and DynamicProvisioningScheduling into one 2018-08-29 10:30:08 +08:00
NickrenREN 0df3e167ac only when accessmodes equals to ROX, we don't need check rbd status of being used 2018-08-28 18:43:38 +08:00
Kubernetes Submit Queue 91e37eeb92
Merge pull request #67772 from andyzhangx/azuredisk-volumelimits2
Automatic merge from submit-queue (batch tested with PRs 67766, 67642, 67772). 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 dynamic azure disk volume limits

**What this PR does / why we need it**:
Enable dynamic azure disk volume limits,
This is an azure cloud provider implementation related to feature: [Dynamic Maximum volume count](https://github.com/kubernetes/features/issues/554)

**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 #66269

**Special notes for your reviewer**:
This PR use `az.VirtualMachineSizesClient.List` to list all vm sizes under region, match vm size with current node size, and then got `MaxDataDiskCount`, the `GetVolumeLimits` happens in kubelet and will return `attachable-volumes-azure-disk` in node status as following example:
```
agentpool-22082114-0
    ...
    allocatable:
      attachable-volumes-azure-disk: "8"
      cpu: "2"
      ephemeral-storage: "28043041951"
      hugepages-1Gi: "0"
      hugepages-2Mi: "0"
      memory: 7034772Ki
      pods: "30"
```

**Release note**:

```
Enable dynamic azure disk volume limits
```

/sig azure
/kind feature
2018-08-27 06:14:17 -07:00
andyzhangx dd63d407a4 Enable dynamic azure disk volume limits
use API to get max disk num

use continue when got exception

add logging

add cache and unit test

fix comments
2018-08-27 02:41:45 +00:00
Kubernetes Submit Queue 6a81baf133
Merge pull request #67822 from humblec/remove-config
Automatic merge from submit-queue (batch tested with PRs 67822, 67835). 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 provisioner config from log message.

Signed-off-by: hchiramm <hchiramm@redhat.com>
```
release-note-none

```
2018-08-26 10:38:58 -07:00
Kubernetes Submit Queue b2b3c36ecb
Merge pull request #67530 from ddebroy/ddebroy-gcepd1
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 DynamicProvisioningScheduling support for GCE PD and RePD

**What this PR does / why we need it**:
This PR adds support for the DynamicProvisioningScheduling feature for GCE PD and RePD. With this in place, if VolumeBindingMode: WaitForFirstConsumer is specified in a GCE storageclass and DynamicProvisioningScheduling is enabled, GCE PD provisioner will use the selected node's LabelZoneFailureDomain as (1) the zone to provision a GCE PD volume in (2) one of the zones to provision GCE RePD volume in.

**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**:
E2E tests for DynamicProvisioningScheduling scenarios for GCE PD to follow 

**Release note**:
```release-note
none
```
/sig storage
/assign @msau42
2018-08-24 18:23:19 -07:00
Kubernetes Submit Queue b883c5905a
Merge pull request #67328 from cofyc/fix65113-2
Automatic merge from submit-queue (batch tested with PRs 66916, 67252, 67794, 67619, 67328). 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>.

Using a fixed set of locks, then we don't need to free unused locks anymore.

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

Using a fixed set of locks, then we don't need to free unused locks anymore.
See kubernetes/kubernetes/pull/66442 for discussions.

**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 #65113

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```

/assign @msau42 
/assign @thockin
2018-08-24 15:25:17 -07:00
Deep Debroy a2de7d2d8d Add DynamicProvisioningScheduling support for GCE PD and RePD
Signed-off-by: Deep Debroy <ddebroy@docker.com>
2018-08-24 14:38:25 -07:00
hchiramm 5fff5226cd Remove provisioner config from log message.
Signed-off-by: hchiramm <hchiramm@redhat.com>
2018-08-24 19:40:37 +05:30
Yecheng Fu 798838a6a0 Using a fixed set of locks, then we don't need to free unused locks
anymore.
See kubernetes/kubernetes/pull/66442 for discussions.
2018-08-24 12:24:09 +08:00
Kubernetes Submit Queue 82924e71cd
Merge pull request #67604 from feiskyer/cross-rg-nodes
Automatic merge from submit-queue (batch tested with PRs 66980, 67604, 67741, 67715). 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 of Azure cross resource group nodes

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

Part of feature [Cross resource group nodes](https://github.com/kubernetes/features/issues/604).

This PR adds support of Azure cross resource group nodes that are labeled with `kubernetes.azure.com/resource-group=<rg-name>` and `alpha.service-controller.kubernetes.io/exclude-balancer=true`

**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**:

See designs [here](https://github.com/kubernetes/community/pull/2479).

**Release note**:

```release-note
Azure cloud provider now supports cross resource group nodes that are labeled with `kubernetes.azure.com/resource-group=<rg-name>` and `alpha.service-controller.kubernetes.io/exclude-balancer=true`
```

/sig azure
/kind feature
2018-08-23 03:14:07 -07:00
Kubernetes Submit Queue 36cb72cfa9
Merge pull request #67483 from andyzhangx/azuredisk-kind
Automatic merge from submit-queue (batch tested with PRs 59230, 66233, 67483, 67713). 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>.

change default value of kind for azure disk

**What this PR does / why we need it**:
change default value of kind for azure disk, as we are suggesting users to use managed disk, default value should be managed disk.

**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 #67480

**Special notes for your reviewer**:
assign @feiskyer 
FYI @khenidak @brendandburns 

**Release note**:

```
change default value of kind for azure disk
```

/kind feature
/sig azure
2018-08-22 23:04:22 -07:00
Pengfei Ni 8e4ab129e9 Fix panic when choosing zone or zones for volume 2018-08-23 10:46:41 +08:00
Pengfei Ni 5fdc7154f2 Only set nodeSelectorTerms when there are zoned nodes 2018-08-23 10:37:57 +08: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
Davanum Srinivas 9b43d97cd4
Add Labels to various OWNERS files
Will reduce the burden of manually adding labels. Information pulled
from:
https://github.com/kubernetes/community/blob/master/sigs.yaml

Change-Id: I17e661e37719f0bccf63e41347b628269cef7c8b
2018-08-21 13:59:08 -04:00
Kubernetes Submit Queue da2169f899
Merge pull request #67332 from nak3/ceph-fuse-opt
Automatic merge from submit-queue (batch tested with PRs 67332, 66737, 67281, 67173). 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>.

Support mount options for cephfs with ceph-fuse mount

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

When cephfs uses ceph-fuse for the mount command, mount option and
readOnly options are disregarded. This patch adds to ceph-fuse as
well.


**Special notes for your reviewer**:

N/A

**Release note**:

```release-note
NONE
```
2018-08-21 05:25:03 -07:00
Srini Brahmaroutu 6777dc7404 Provide Flex volume metrics if the plugin supports. 2018-08-17 11:54:29 -07:00
andyzhangx aa4594ffae add more sku support for azure disk
add error msg

update bazel
2018-08-17 06:52:46 +00:00
andyzhangx 3013df9e9e change default value of kind for azure disk 2018-08-16 07:13:01 +00:00
Kubernetes Submit Queue 2a81c37d4c
Merge pull request #67229 from feiskyer/unzoned-disks
Automatic merge from submit-queue (batch tested with PRs 66884, 67410, 67229, 67409). 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 node affinity for Azure unzoned managed disks

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

Continue of [Azure Availability Zone feature](https://github.com/kubernetes/features/issues/586).

Add node affinity for Azure unzoned managed disks, so that unzoned disks only scheduled to unzoned nodes.

This is required because Azure doesn't allow attaching unzoned disks to zoned VMs.

**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**:

Unzoned nodes would label `failure-domain.beta.kubernetes.io/zone=0` and the value is fault domain ( while availability zone is used for zoned nodes). So fault domain is used to populate unzoned disks.

Since there are at most 3 fault domains in each region, the PR adds 3 terms for them:

```yaml
kubectl describe pv pvc-bdf93a67-9c45-11e8-ba6f-000d3a07de8c
Name:              pvc-bdf93a67-9c45-11e8-ba6f-000d3a07de8c
Labels:            <none>
Annotations:       pv.kubernetes.io/bound-by-controller=yes
                   pv.kubernetes.io/provisioned-by=kubernetes.io/azure-disk
                   volumehelper.VolumeDynamicallyCreatedByKey=azure-disk-dynamic-provisioner
Finalizers:        [kubernetes.io/pv-protection]
StorageClass:      azuredisk-unzoned
Status:            Bound
Claim:             default/unzoned-pvc
Reclaim Policy:    Delete
Access Modes:      RWO
Capacity:          5Gi
Node Affinity:     
  Required Terms:  
    Term 0:        failure-domain.beta.kubernetes.io/region in [southeastasia]
                   failure-domain.beta.kubernetes.io/zone in [0]
    Term 1:        failure-domain.beta.kubernetes.io/region in [southeastasia]
                   failure-domain.beta.kubernetes.io/zone in [1]
    Term 2:        failure-domain.beta.kubernetes.io/region in [southeastasia]
                   failure-domain.beta.kubernetes.io/zone in [2]
Message:           
Source:
    Type:         AzureDisk (an Azure Data Disk mount on the host and bind mount to the pod)
    DiskName:     k8s-5b3d7b8f-dynamic-pvc-bdf93a67-9c45-11e8-ba6f-000d3a07de8c
    DiskURI:      /subscriptions/<subscription>/resourceGroups/<rg-name>/providers/Microsoft.Compute/disks/k8s-5b3d7b8f-dynamic-pvc-bdf93a67-9c45-11e8-ba6f-000d3a07de8c
    Kind:         Managed
    FSType:       
    CachingMode:  None
    ReadOnly:     false
Events:           <none>
```

**Release note**:

```release-note
Add node affinity for Azure unzoned managed disks
```

/sig azure
/kind feature

/cc @brendandburns @khenidak @andyzhangx @msau42
2018-08-15 07:10:15 -07: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
Kubernetes Submit Queue 5aea00d885
Merge pull request #67097 from chakri-nelluri/EIO-Unmountfix
Automatic merge from submit-queue (batch tested with PRs 67396, 67097, 67395, 67365, 67099). 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>.

Ignore EIO error in unmount path

**What this PR does / why we need it**:
This PR ignores EIO in unmount path. XFS shuts down filesystem when the target is down and it returns EIO for the stat calls used in unmount path.

**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 #66868

**Special notes for your reviewer**:
We already handle ESTALE & ENOTCONN errors in isCorruptedMnt Call. Adding EIO to that list covers the XFS shutdown case.

Also Flexvolume doesn't check for these errors in its current form. Updated Flexvolume code to handle it.

```release-note
NONE
```
2018-08-15 05:45:17 -07:00
Kubernetes Submit Queue bc60801d18
Merge pull request #66895 from ctriple/master
Automatic merge from submit-queue (batch tested with PRs 61212, 66369, 66446, 66895, 66969). 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>.

pkg/volume/cephfs: fix doc typo, nfs -> cephfs
2018-08-14 21:18:15 -07:00
Kubernetes Submit Queue 76434bd62a
Merge pull request #66780 from NetApp/volumeresize
Automatic merge from submit-queue (batch tested with PRs 66780, 67330). 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>.

Changed admission controller to allow volume expansion for all volume plugins

**What this PR does / why we need it**:
There are two motivations for this change:

1. CSI plugins are soon going to support volume expansion. For such plugins, admission controller doesn't know whether the plugins are capabale of supporting volume expansion or not.
2. Currently, admission controller rejects PVC updates for in-tree plugins that don't support volume expansion (e.g., NFS, iSCSI). This change allows external controllers to expand volumes similar to how external provisioners are accommodated.

**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**:
This PR mimics the behavior of the PV controller when PVs are provisioned externally by logging and setting a new event for PVs that are being expanded externally. As SIG Storage is planning new types of operations on PVs, it may make more sense to a have a single event for all actions taken by external controllers.

**Release note**:

```release-note
The check for unsupported plugins during volume resize has been moved from the admission controller to the two controllers that handle volume resize.
```
/sig storage
/assign @gnufied @jsafrane @wongma7
2018-08-14 12:22:00 -07:00
Pengfei Ni dbdfd0fab2 Set nodeAffinity for unmanaged disks 2018-08-14 14:25:15 +08:00
Pengfei Ni cf4981fc80 Update bazel 2018-08-14 14:14:01 +08:00
Pengfei Ni 028f155b9e Add node affinity for unzoned managed disks 2018-08-14 14:14:01 +08:00
NickrenREN 55784f88d4 add UTs for devicemountable conditions 2018-08-14 11:13:02 +08:00
NickrenREN 81e360d20f update volume plugins accordingly 2018-08-14 11:12:54 +08:00
NickrenREN c7e4466873 attacher/detacher refactor 2018-08-14 11:12:41 +08:00
Kenjiro Nakayama 32117163e4 Support mount options for cephfs with ceph-fuse mount
When cephfs uses ceph-fuse for the mount command, mount option and
readOnly options are disregarded. This patch adds to ceph-fuse as
well.
2018-08-13 18:09:28 +09:00
Kubernetes Submit Queue 1dfe2e8bff
Merge pull request #67140 from NetApp/multipath-race-fix
Automatic merge from submit-queue (batch tested with PRs 67017, 67190, 67110, 67140, 66873). 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 wait loop for multipath devices to appear

It takes a variable amount of time for the multipath daemon
to create /dev/dm-XX in response to new LUNs being discovered.
The old iscsi_util code only discovered the multipath device
if it was created quickly enough, but in a significant number
of cases, kubelet would grab one of the individual paths and
put a filesystem it on before multipathd could construct a
multipath device.

This change waits for the multipath device to get created for
up to 10 seconds, but only if the PV actually had more than
one portal.

fixes #60894

```release-note
Dynamic provisions that create iSCSI PVs can ensure that multipath is used by specifying 2 or more target portals in the PV, which will cause kubelet to wait up to 10 seconds for the multipath device. PVs with just one portal continue to work as before, with kubelet not waiting for the multipath device and just using the first disk it finds.
```
2018-08-10 17:01:16 -07:00
Kubernetes Submit Queue 032a096d86
Merge pull request #67110 from verult/kubelet-nodeid
Automatic merge from submit-queue (batch tested with PRs 67017, 67190, 67110, 67140, 66873). 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 plugin now calls NodeGetInfo() to get driver's node ID

**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 #67040

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
/sig storage
@sbezverk @vladimirvivien @saad-ali
2018-08-10 17:01:13 -07:00
Kubernetes Submit Queue 6696ae39ee
Merge pull request #66332 from jianglingxia/jlx-k8s-201807181704
Automatic merge from submit-queue (batch tested with PRs 66602, 67178, 67207, 67125, 66332). 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 to RBD volume test of TestGetAccessModes and TestRequiresRemount

**What this PR does / why we need it**:
Add UT to RBD volume test of TestGetAccessModes and TestRequiresRemount
**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-08-10 14:13:19 -07:00
Kubernetes Submit Queue 6c77dce9be
Merge pull request #67220 from verult/vsphere-panic
Automatic merge from submit-queue (batch tested with PRs 67058, 67083, 67220, 67222, 67209). 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>.

Fixed unsafe type cast in vSphere volume plugin

**What this PR does / why we need it**: Fixes the controller manager panic caused by vSphere volumes being used on the wrong cloud provider.

**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 #67218

**Release note**:

```release-note
NONE
```

/assign @saad-ali
2018-08-09 20:58:10 -07:00
Cheng Xing 85c3de40e5 Fixed vsphere volume plugin unsafe type cast; added unit tests 2018-08-09 16:15:59 -07:00
Kubernetes Submit Queue facc84752b
Merge pull request #67184 from linyouchong/pr-0809
Automatic merge from submit-queue (batch tested with PRs 67195, 67184). 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 redundant code in aws_ebs_block.go

**What this PR does / why we need it**:
Remove redundant code in aws_ebs_block.go
There is the same code in aws_ebs.go

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

**Special notes for your reviewer**:
NONE

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

/sig storage
2018-08-09 12:18:21 -07:00
Masaki Kimura d03434e370 Fix provision fail issue for aws provisioner if fsType specified
fixes: #67146
2018-08-09 13:32:34 +00:00
linyouchong 5472f445dc Remove redundant code in aws_ebs_block.go 2018-08-09 15:57:05 +08:00
Pengfei Ni 7962954053 Parse zoned first before using it 2018-08-09 10:23:53 +08:00
Cheng Xing 7fa120c18c CSI plugin now calls NodeGetInfo() to get driver's node ID 2018-08-08 13:15:43 -07:00
Pengfei Ni 30fe79d63f Add DynamicProvisioningScheduling and VolumeScheduling support for AzureDisk 2018-08-08 17:05:46 +08:00
Ben Swartzlander 39e52ddae5 Add wait loop for multipath devices to appear
It takes a variable amount of time for the multipath daemon
to create /dev/dm-XX in response to new LUNs being discovered.
The old iscsi_util code only discovered the multipath device
if it was created quickly enough, but in a significant number
of cases, kubelet would grab one of the individual paths and
put a filesystem it on before multipathd could construct a
multipath device.

This change waits for the multipath device to get created for
up to 10 seconds, but only if the PV actually had more than
one portal.
2018-08-08 00:44:45 -04:00
Chakri Nelluri 93a19fce28 Ignore EIO error in unmount path 2018-08-07 21:04:39 -04:00
Kubernetes Submit Queue 14bcbb9450
Merge pull request #66553 from feiskyer/azure-disk-availablity-zone
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 availability zones support to Azure managed disks

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

Continue of [Azure Availability Zone feature](https://github.com/kubernetes/features/issues/586).

This PR adds availability zone support for Azure managed disks and its storage class. Zoned managed disks is enabled by default if there are zoned nodes in the cluster.

The zone could also be customized by `zone` or `zones` parameter, e.g.

```yaml
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  annotations:
  name: managed-disk-zone-1
parameters:
  zone: "southeastasia-1"
  # zones: "southeastasia-1,"southeastasia-2"
  cachingmode: None
  kind: Managed
  storageaccounttype: Standard_LRS
provisioner: kubernetes.io/azure-disk
reclaimPolicy: Delete
volumeBindingMode: Immediate
```

All zoned AzureDisk PV will also be labeled with its availability zone, e.g.

```sh
$ kubectl get pvc pvc-azuredisk-az-1
NAME                 STATUS    VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS          AGE
pvc-azuredisk-az-1   Bound     pvc-5ad0c7b8-8f0b-11e8-94f2-000d3a07de8c   5Gi        RWO            managed-disk-zone-1   2h

$ kubectl get pv pvc-5ad0c7b8-8f0b-11e8-94f2-000d3a07de8c --show-labels
NAME                                       CAPACITY   ACCESS MODES   RECLAIM POLICY   STATUS    CLAIM                        STORAGECLASS          REASON    AGE       LABELS
pvc-5ad0c7b8-8f0b-11e8-94f2-000d3a07de8c   5Gi        RWO            Delete           Bound     default/pvc-azuredisk-az-1   managed-disk-zone-1             2h        failure-domain.beta.kubernetes.io/region=southeastasia,failure-domain.beta.kubernetes.io/zone=southeastasia-1
```

**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**:

See also the [KEP](https://github.com/kubernetes/community/pull/2364).

DynamicProvisioningScheduling feature would be added in a following PR.

**Release note**:

```release-note
Azure managed disks now support availability zones and new parameters `zoned`, `zone` and `zones` are added for AzureDisk storage class.
```

/kind feature
/sig azure
/assign @brendandburns @khenidak @andyzhangx
2018-08-06 02:02:54 -07:00