Commit Graph

355 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
96c057ab48
Merge pull request #92001 from huffmanca/include-csidriver-fsgroup
Include CSIDriver capability to indicate fsGroup support
2020-07-16 09:11:42 -07:00
Hemant Kumar
ade2f83685 Simplify the code 2020-07-11 23:29:24 -04:00
Christian Huffman
58bd3e5230 Include CSIDriver SupportsFsGroup 2020-07-11 23:29:24 -04:00
Hemant Kumar
b8c0435bc2 Handle volume-in-use error 2020-07-11 09:02:58 -04:00
Hemant Kumar
6342dad709 Ensure that StagingPath is supplied to blockVolume expansion 2020-07-01 12:21:17 -04:00
Hemant Kumar
69613da0ae rename volumeid to volumeID 2020-07-01 11:34:31 -04:00
Hemant Kumar
75e13e370e Supply staging path for block expansion 2020-07-01 11:34:31 -04:00
Hemant Kumar
7d6959ce2c Add extra fields in node expansion CSI call 2020-07-01 11:34:31 -04:00
Kubernetes Prow Robot
14c69640d0
Merge pull request #87166 from jingxu97/Jan/mountcheckfix
Fix issue in kubelet getMountedVolumePathListFromDisk
2020-06-25 09:45:39 -07:00
Jing Xu
7012994a61 Fix issue in kubelet getMountedVolumePathListFromDisk
This PR fixes issue #74650. It adds the extra check for /mount dir under
pod volume dir. It also adds the unit test for this function
2020-06-22 10:00:43 -07:00
Kubernetes Prow Robot
98f250f883
Merge pull request #91307 from yuga711/attach
CSI: Modify VolumeAttachment check to use Informer/Cache
2020-06-15 08:10:10 -07:00
Jayasekhar Konduru
2a89577659 CSI: Modify VolumeAttachment check to use Informer/Cache
Change-Id: Ie70c8b6657c67eefbf13042f36d56ca84a2e42bb
2020-06-11 10:34:09 -07:00
Divyen Patel
148ef06a3d vSphere in-tree volumes migration to vSphere CSI driver 2020-06-08 16:17:02 -07:00
Davanum Srinivas
07d88617e5
Run hack/update-vendor.sh
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-05-16 07:54:33 -04:00
Davanum Srinivas
442a69c3bd
switch over k/k to use klog v2
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-05-16 07:54:27 -04:00
Mark Janssen
2c61627f8c Fix staticcheck failures for pkg/volume/...
Errors from staticcheck:
pkg/volume/azure_dd/azure_common.go:68:2: var winDiskNumFormat is unused (U1000)
pkg/volume/csi/csi_block.go:97:2: field volumeInfo is unused (U1000)
pkg/volume/csi/csi_block_test.go:56:6: func prepareBlockUnmapperTest is unused (U1000)
pkg/volume/csi/csi_client.go:108:2: const initialDuration is unused (U1000)
pkg/volume/csi/csi_client.go:109:2: const factor is unused (U1000)
pkg/volume/csi/csi_client.go:110:2: const steps is unused (U1000)
pkg/volume/csi/csi_client_test.go:83:8: this value of err is never used (SA4006)
pkg/volume/csi/csi_mounter.go:76:2: field options is unused (U1000)
pkg/volume/csi/csi_mounter_test.go:454:13: this value of err is never used (SA4006)
pkg/volume/csi/csi_plugin_test.go:766:16: this value of err is never used (SA4006)
pkg/volume/csi/csi_plugin_test.go:861:13: this value of err is never used (SA4006)
pkg/volume/csi/csi_plugin_test.go:1186:13: this value of err is never used (SA4006)
pkg/volume/csi/csi_plugin_test.go:1249:13: this value of err is never used (SA4006)
pkg/volume/csi/csi_test.go:305:5: the goroutine calls T.Fatalf, which must be called in the same goroutine as the test (SA2002)
pkg/volume/flexvolume/probe_test.go:67:10: this value of err is never used (SA4006)
pkg/volume/iscsi/iscsi_test.go:95:2: field attachCalled is unused (U1000)
pkg/volume/iscsi/iscsi_test.go:96:2: field detachCalled is unused (U1000)
pkg/volume/iscsi/iscsi_test.go:501:24: this value of err is never used (SA4006)
pkg/volume/iscsi/iscsi_util_test.go:159:2: this value of exist is never used (SA4006)
pkg/volume/local/local.go:351:57: argument devicePath is overwritten before first use (SA4009)
pkg/volume/plugins_test.go:119:2: this value of plug is never used (SA4006)
pkg/volume/plugins_test.go:125:2: this value of plug is never used (SA4006)
pkg/volume/quobyte/quobyte.go:474:23: this result of append is never used, except maybe in other appends (SA4010)
pkg/volume/quobyte/quobyte.go:477:23: this result of append is never used, except maybe in other appends (SA4010)
pkg/volume/quobyte/quobyte.go:480:23: this result of append is never used, except maybe in other appends (SA4010)
pkg/volume/rbd/rbd.go:886:2: field adminSecret is unused (U1000)
pkg/volume/rbd/rbd.go:887:2: field adminID is unused (U1000)
pkg/volume/rbd/rbd.go:888:2: field imageFormat is unused (U1000)
pkg/volume/rbd/rbd.go:889:2: field imageFeatures is unused (U1000)
pkg/volume/storageos/storageos.go:302:2: field secretName is unused (U1000)
pkg/volume/storageos/storageos_util_test.go:43:2: field apiAddr is unused (U1000)
pkg/volume/storageos/storageos_util_test.go:44:2: field apiUser is unused (U1000)
pkg/volume/storageos/storageos_util_test.go:45:2: field apiPass is unused (U1000)
pkg/volume/storageos/storageos_util_test.go:46:2: field apiVersion is unused (U1000)
pkg/volume/util/atomic_writer_test.go:756:49: argument err is overwritten before first use (SA4009)
pkg/volume/util/fsquota/common/quota_linux_common.go:37:2: const acct is unused (U1000)
pkg/volume/util/fsquota/common/quota_linux_common.go:38:2: const enforcing is unused (U1000)
pkg/volume/util/fsquota/project.go:168:31: identical expressions on the left and right side of the '==' operator (SA4000)
pkg/volume/util/fsquota/quota_linux.go:306:50: argument poduid is overwritten before first use (SA4009)
pkg/volume/util/fsquota/quota_linux_test.go:558:16: this value of err is never used (SA4006)
pkg/volume/util/subpath/subpath_linux.go:232:81: argument err is overwritten before first use (SA4009)
pkg/volume/util/subpath/subpath_linux_test.go:579:73: argument err is overwritten before first use (SA4009)
2020-04-09 22:08:07 +02:00
Kubernetes Prow Robot
2590f6cc77
Merge pull request #89435 from humblec/correct
Clean some code paths and correct static errors
2020-03-31 05:14:40 -07:00
Humble Chirammal
31b837b420 Clean some code paths and correct static errors
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2020-03-30 17:34:06 +05:30
Jan Safranek
8bdbd4d683 Fix CSINodeInfo startup
To speed up unit tests and add more observability when things go wrong.
2020-03-27 18:29:34 +01:00
David Zhu
8205f815fb Wait for APIServer 'ok' forever during CSINode initialization during Kubelet init 2020-03-27 18:27:57 +01:00
Christian Huffman
c6fd25d100 Updated CSIDriver references 2020-03-06 08:21:26 -05:00
Kubernetes Prow Robot
5708511499
Merge pull request #88708 from mikedanese/deleteopts
Migrate clientset metav1.DeleteOpts to pass-by-value
2020-03-05 23:09:23 -08:00
Mike Danese
c58e69ec79 automated refactor 2020-03-05 14:59:46 -08:00
Hemant Kumar
c52d4bf32f Implement changes into volume plugins for skipping chown
Add a separate function for walking directories
2020-03-04 21:23:31 -05:00
Jan Safranek
afcbb68386 Fix unit test to fail with proper final gRPC code
Plain "errors.New" is interpreted as transient error.
2020-03-02 12:54:03 +01:00
Jan Safranek
f6fc73573c Call NodeUnpublish after NodePublish timeout
When NodePublish times out and user deletes corresponding pod, the driver
may continue publishing the volume. In order to "cancel" this operation,
Kubernetes must issue NodeUnpublish and wait until it finishes.

Therefore, NodeUnpublish should be called even if the target directory
(created by the driver) does not exist yet.
2020-03-02 12:54:02 +01:00
Jan Safranek
86a5bd98b6 Add uncertain map state to block volumes
Volume mount should be marked as uncertain after NodeStage / NodePublish
timeout or similar error, when the driver can continue with the operation in
background.
2020-03-02 12:54:02 +01:00
andyzhangx
5a6435ad76 fix: corrupted mount point in csi driver
add test

fix build failure and bazel

fix golint
2020-02-26 09:43:51 +00:00
Jan Safranek
073d0b2340 Add getPublishDir and getVolumePluginDir
So we don't need to compute these backwards from getPublishPath and
getVolumeDevicePluginDir.
2020-02-17 10:51:39 +01:00
Jan Safranek
0bd2e629c7 Fix unit tests 2020-02-13 12:20:03 +01:00
Jan Safranek
e2d8e575f0 Add CSI block volume directory cleanup
CSI volume plugin creates number of files/directories when processing block
volumes. These files must be cleaned when the plugin is done with the
volume, i.e. at the end on TearDownDevice().
2020-02-13 12:19:31 +01:00
Kubernetes Prow Robot
92be16ce82
Merge pull request #88014 from andyzhangx/azure-csi-migration
fix: add azure disk migration support on CSINode
2020-02-11 23:16:09 -08:00
Kubernetes Prow Robot
fd0b34d69d
Merge pull request #87911 from tedyu/rm-exp-backoff
Remove the exponential backoff in NodeGetInfo
2020-02-11 23:15:10 -08:00
andyzhangx
9cb7f54c0b fix: add azure disk migration support for CSINode 2020-02-11 11:39:55 +00:00
Mike Danese
25651408ae generated: run refactor 2020-02-08 12:30:21 -05:00
Mike Danese
3aa59f7f30 generated: run refactor 2020-02-07 18:16:47 -08:00
Ted Yu
f48e5de963 Remove the exponential backoff in NodeGetInfo 2020-02-07 06:39:12 -08:00
Kubernetes Prow Robot
69e01784c1
Merge pull request #87838 from Ikuyadeu/path2filepath
Move 'path' package usage to 'path/filepath' (repeat the #87713)
2020-02-06 17:48:11 -08:00
Ted Yu
871739e4df Check getNodeInfoError against nil 2020-02-06 10:57:43 -08:00
Yuki Ueda
d1bc1875aa Move 'path' package usage to 'path/filepath' 2020-02-05 14:29:27 +09:00
Kubernetes Prow Robot
76c89645c5
Merge pull request #87713 from kkmsft/filepath-fixes-windows
Move 'path' package usage to 'path/filepath'.
2020-02-03 17:07:25 -08:00
Krishnakumar R(KK)
72fe307b35 Move 'path' package usage to 'path/filepath'.
In case of windows, the path package functions such as 'Dir' returns faulty directory path.
For eg: 'path.Dir' on 'c:\var\lib\kubelet\pods' returns '.', where as the result should
have been 'c:\var\lib\kubelet'. The filepath package returns the right values.
2020-01-30 15:53:18 -08:00
yuxiaobo
221396ac35 cleanup: delete unused func
Signed-off-by: yuxiaobo <yuxiaobogo@163.com>
2020-01-20 18:20:57 +08:00
Kubernetes Prow Robot
d6412b856f
Merge pull request #84345 from danielqsj/withdialer
replace grpc.WithDialer which is deprecated
2020-01-06 15:56:17 -08:00
danielqsj
19fe9f8d94 replace grpc.WithDialer which is deprecated 2019-12-26 17:46:59 +08:00
danielqsj
5bc0e26c19 unify alias of api errors under pkg and staging 2019-12-26 16:42:28 +08:00
Hemant Kumar
ca532c6fb2 Ensure that error is returned on NodePublish 2019-12-11 22:10:09 -05: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
0741f6fa29 Ensure that metadata directory is not created if secret is not found
To ensure that metadata directory is not created if secret is not
found, we will move fetching secrets bit more earlier in the code.
2019-12-02 12:09:38 -05:00
Hemant Kumar
309c6f863a Handle the case of remounts correctly 2019-12-02 12:09:38 -05:00