Commit Graph

3015 Commits

Author SHA1 Message Date
mrobson
03892097fc Set session scanning to manual to avoid discovering all iSCSI devices during login
Move session scanning to before if !b.chapSession
2020-05-12 13:55:33 -04:00
ZeroMagic
01713f2411 chore: set resourceGroup into azure pv annotation
Signed-off-by: ZeroMagic <jiliu8@microsoft.com>
2020-05-12 05:34:27 +00:00
Ted Yu
1b9d6f46bf Append suffix 'i' only if needed
Signed-off-by: Ted Yu <yuzhihong@gmail.com>
2020-05-10 07:36:58 -07:00
ZeroMagic
f3a64e22d9 chore: switch to use AzureFile management SDK
Signed-off-by: ZeroMagic <jiliu8@microsoft.com>
2020-05-09 02:52:51 +00:00
Shihang Zhang
3db7275b54 set proper file permission for projected service account volume 2020-05-04 18:25:23 -07:00
Christian Huffman
a29fcc679f Updates the fstype of Cinder volumes to be ext4 if nil 2020-04-29 15:48:25 -04:00
Kubernetes Prow Robot
3c3497bed9
Merge pull request #89981 from gaurav1086/VolumeMode_nil_ptr_check
[volume] VolumeMode nil pointer check
2020-04-27 22:26:19 -07:00
Kubernetes Prow Robot
64d55ae13b
Merge pull request #90270 from gaurav1086/aws_block_test
[Provider/AWS] fix block test
2020-04-27 05:13:29 -07:00
Kubernetes Prow Robot
36eee3ca8a
Merge pull request #90080 from gaurav1086/gce_nil_ptr_check
[GCE] VolumeNode nil check
2020-04-25 12:17:29 -07:00
Gaurav Singh
3531283b70 Changed error message 2020-04-24 11:15:48 -04:00
Gaurav Singh
749839c050 Change the error message 2020-04-24 10:48:09 -04:00
Di Xu
084fe6de93 fix bug on checking hostpath type file 2020-04-23 10:52:40 +08:00
Gaurav Singh
d7a59d7694 Code review changes 2020-04-20 23:13:19 -04:00
Gaurav Singh
c41932e919 Code review changes 2020-04-20 23:05:05 -04:00
Gaurav Singh
903b98d2bf [AWS] fix block test 2020-04-18 18:56:59 -04:00
Kubernetes Prow Robot
4f2f51602e
Merge pull request #90081 from gaurav1086/linux_nil_ptr_check
[LINUX] call T.Fatalf() for nil ptr
2020-04-16 04:55:01 -07:00
Gaurav Singh
fe8d468633 call T.Fatalf() for nil ptr 2020-04-11 11:15:40 -04:00
Gaurav Singh
e84c415417 Correct error log message 2020-04-11 10:05:29 -04:00
Gaurav Singh
11d54320ac Correct error message 2020-04-11 10:02:56 -04:00
Gaurav Singh
a2e3a9f37a gce_correct_nil_check 2020-04-11 09:59:15 -04:00
Gaurav Singh
05149450d9 s/t.Errorf/t.Fatalf/ 2020-04-10 09:23:35 -04:00
Kubernetes Prow Robot
3d350d86d6
Merge pull request #81892 from praseodym/fix-staticcheck-pkg/volume
Fix staticcheck failures for pkg/volume/...
2020-04-09 20:03:48 -07: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
Gaurav Singh
2061924b0f [volume] VolumeMode nil pointer check 2020-04-08 17:09:13 -04:00
Kubernetes Prow Robot
60df45fa55
Merge pull request #89768 from andyzhangx/update-max-disk-count2
fix: get attach disk error due to missing item in max count table
2020-04-03 08:33:45 -07:00
Michelle Au
63ee9b3f4f Clean up event messages for errors.
Change-Id: Ib70b50e676b917c4d976f32ee7a19f8fc63b6bc6
2020-04-02 15:25:36 -07:00
andyzhangx
9b14d44aa5 fix: update max azure disk max count 2020-04-02 13:44:23 +00:00
Kubernetes Prow Robot
8d773421ee
Merge pull request #80973 from xiaoanyunfei/bugfix/orphan-volume
fix orphaned pod flexvolume  can not be cleaned up
2020-04-01 20:50:23 -07:00
Hemant Kumar
6362a616ec Force sgid bit to be off before checking volume permission 2020-04-01 11:20:38 -04: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
Kubernetes Prow Robot
e178cacb97
Merge pull request #89589 from jsafrane/fix-node-startup
Wait for APIServer 'ok' forever during CSINode initialization during Kubelet init
2020-03-30 07:02:08 -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
Kubernetes Prow Robot
a329e67922
Merge pull request #89511 from andyzhangx/sharedisk
feat: add azure shared disk support
2020-03-29 17:29:53 -07:00
andyzhangx
51e0bd2480 feat: add azure shared disk support
fix comment
2020-03-29 09:35:15 +00:00
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
Kubernetes Prow Robot
99d0559ab4
Merge pull request #89172 from jsafrane/fix-mount-opts
Fix mountOptions in iSCSI and FC volume plugins
2020-03-26 15:58:23 -07:00
Jan Safranek
58129fd12c Fix mount options in FibreChannel volumes
Do not mount volumes in WaitForAttach(), mount them in MountDevice()
instead. They will get proper mount options this way.
2020-03-26 18:01:19 +01:00
Shihang Zhang
b56da85a77 sync api/v1/pod/util with api/pod/util and remove DefaultContainers 2020-03-24 16:42:32 -07:00
andyzhangx
f889213d38 feat: support Azure shared disk 2020-03-21 13:16:22 +00:00
Kubernetes Prow Robot
173b5ee6f7
Merge pull request #89250 from andyzhangx/disk-version
feat: change azure disk api-version
2020-03-21 02:56:57 -07:00
Kubernetes Prow Robot
2c8ef3b19d
Merge pull request #89196 from YuikoTakada/fix_non_aschii_pkg_volume_iscsi
Fix non-ascii characters in pkg/volume/iscsi/iscsi_util_test.go
2020-03-19 10:28:08 -07:00
andyzhangx
12c6c81b1a feat: change azure disk api-version 2020-03-19 10:51:53 +00:00
Yuiko Mori
558e8bb199 Fix non-ascii characters in pkg/volume/iscsi/iscsi_util_test.go 2020-03-18 02:14:07 +00:00
Jan Safranek
f60a0c8660 Fix mount options in iSCSI volumes
Do not mount volumes in WaitForAttach(), mount them in MountDevice()
instead. They will get proper mount options this way.
2020-03-17 11:37:18 +01:00
andyzhangx
da20cc202f chore: upgrade to azure-sdk v40.2.0
chore: use autorest v0.9.6

fix go module issue

fix go module error
2020-03-13 11:51:25 +00:00
Kubernetes Prow Robot
ef672c1c2d
Merge pull request #88678 from verult/slow-rxm-attach
Parallelize attach operations across different nodes for volumes that allow multi-attach
2020-03-06 13:17:21 -08:00
Christian Huffman
d0890533a9 Updated files after rebase 2020-03-06 08:56:59 -05: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
Cheng Xing
ef3d66b98b Parallelize attach operations across different nodes for volumes that allow multi-attach 2020-03-05 22:22:05 -08:00
Mike Danese
c58e69ec79 automated refactor 2020-03-05 14:59:46 -08:00
Hemant Kumar
b132959687 Start adding tests for verifying correct modes
Add an example for permission bits checking
2020-03-05 08:00:27 -05: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
Hemant Kumar
053baaf143 Update generated files
update generated code
2020-03-04 21:23:31 -05:00
Kubernetes Prow Robot
cd23e78c3d
Merge pull request #88684 from saad-ali/updateMountLib
Update AzureFile and CephFS to use MountSensitive
2020-03-03 21:05:48 -08:00
Kubernetes Prow Robot
9d0cbb7503
Merge pull request #88673 from jsafrane/block-feature-ga
Promote block volumes to GA
2020-03-03 12:17:12 -08:00
saad-ali
3784438b56 Prevent CephFS from logging senstive options 2020-03-03 11:20:08 -08:00
saad-ali
548b297a00 Prevent AzureFile from logging senstive options 2020-03-03 11:20:08 -08:00
saad-ali
727582311f Fix MountError Test 2020-03-03 11:20:08 -08:00
Kubernetes Prow Robot
ac55a51034
Merge pull request #85056 from pohsienshih/volume/golint
Fix golint issues for pkg/volume/rbd
2020-03-03 01:37:37 -08:00
Jan Safranek
3af671011a Generated API 2020-03-02 22:21:42 +01: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
8536787133 Add unit tests 2020-03-02 12:54:02 +01:00
Jan Safranek
c11427fef5 Call NodeUnstage after NodeStage timeout
When NodeStage times out and does not prepare destination device and user
deletes corresponding pod, the driver may continue staging the volume in
background. Kubernetes must call NodeUnstage to "cancel" this operation.

Therefore TearDownDevice should be called even when the target directory
does not exist (yet).
2020-03-02 12:54:02 +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
Kubernetes Prow Robot
39ed64ec4c
Merge pull request #88569 from andyzhangx/csi-corrupt-mnt-fix
fix: corrupted mount point in csi driver node stage/publish
2020-03-02 03:30:43 -08:00
pohsienshih
9bfe818229 Fixed golint issues in RBD code 2020-02-29 23:36:58 +08:00
Jan Safranek
2c1b743766 Promote block volume features to GA 2020-02-28 20:48:38 +01:00
Kubernetes Prow Robot
c73532c4f7
Merge pull request #88610 from andyzhangx/azurefile-mount-fix
fix: azure file mount timeout issue
2020-02-27 22:10:50 -08:00
Kubernetes Prow Robot
a555825ab4
Merge pull request #88602 from yuga711/pd-limit
Fix to expose max gce-pd disks per instance
2020-02-27 16:12:53 -08:00
andyzhangx
fb7209486e fix: azure file mount timeout issue 2020-02-27 09:29:27 +00:00
Jayasekhar Konduru
505dff6d20 Fixed in the GCE/PD in-tree volume logic to expose the max number of
persistent-disks for each instance type correctly.

Tested: Verified the kubernetes node object shows correct limits for
various instance types (n1-, c2-, e2-).
2020-02-26 18:20:37 -08: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
Kubernetes Prow Robot
851efa8a34
Merge pull request #84051 from bart0sh/PR0079-multiple-sizes-hugepages
Implement support for multiple sizes huge pages
2020-02-25 14:40:27 -08:00
Kubernetes Prow Robot
c69c91987b
Merge pull request #87811 from mborsz/pv
Remove unnecessary calls to GCE API after PD is created
2020-02-21 18:31:01 -08:00
Ed Bartosh
03ecc20b19 empty_dir: Check if hugetlbfs volume is mounted with a correct pagesize
Extended GetMountMedium function to check if hugetlbfs volume
is mounted with the page size equal to the medium size.

Page size is obtained from the 'pagesize' mount option of the
mounted hugetlbfs volume.
2020-02-20 13:57:36 +02:00
Ed Bartosh
882d6e93af Implement tests for multiple sizes huge pages
Co-Authored-By: Odin Ugedal <odin@ugedal.com>
2020-02-19 18:15:40 +02:00
Ed Bartosh
0eb65bd7da Implement support for multiple sizes huge pages
This implementation allows Pod to request multiple hugepage resources
of different size and mount hugepage volumes using storage medium
HugePage-<size>, e.g.

spec:
  containers:
    resources:
      requests:
        hugepages-2Mi: 2Mi
        hugepages-1Gi: 2Gi
    volumeMounts:
      - mountPath: /hugepages-2Mi
        name: hugepage-2mi
      - mountPath: /hugepages-1Gi
        name: hugepage-1gi
    ...
  volumes:
    - name: hugepage-2mi
      emptyDir:
        medium: HugePages-2Mi
    - name: hugepage-1gi
      emptyDir:
        medium: HugePages-1Gi

NOTE: This is an alpha feature.
      Feature gate HugePageStorageMediumSize must be enabled for it to work.
2020-02-19 18:15:40 +02:00
Kubernetes Prow Robot
da9db64f9c
Merge pull request #87978 from jsafrane/block-csi-test
Add CSI block volume directory cleanup
2020-02-19 00:34:24 -08: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
Kubernetes Prow Robot
8b2f08f39d
Merge pull request #88201 from andyzhangx/update-max-disk-count
fix: update azure disk max count
2020-02-16 01:47:28 -08:00
andyzhangx
6a773fb9c2 fix: update max azure disk max count 2020-02-16 02:46:27 +00:00
Kubernetes Prow Robot
3e3a3599ca
Merge pull request #87711 from alena1108/jan30volume
Ineffassign fixes for pkg/volume
2020-02-14 21:53:28 -08:00
andyzhangx
6068ce96b1 fix: get azure disk lun timeout issue 2020-02-14 12:51:42 +00:00
Hemant Kumar
c058073046 Add a event to PV when mount fails because of fs mismatch
Filesystem mismatch is a special event. This could indicate
either user has asked for incorrect filesystem or there is a error
from which mount operation can not recover on retry.

Co-Authored-By: Jordan Liggitt <jordan@liggitt.net>
2020-02-13 12:29:42 -05: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
Maciej Borsz
c78c0e949d Remove unnecessary calls to GCE API after PD is created. 2020-02-13 09:57:25 +01:00
Kubernetes Prow Robot
177506d87c
Merge pull request #87945 from andyzhangx/azure-writeaccelerator
add azure disk WriteAccelerator support
2020-02-12 21:37:24 -08: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
Kubernetes Prow Robot
334d788f08 Merge pull request #87299 from mikedanese/ctx
context in client-go
2020-02-08 06:43:52 -08:00
andyzhangx
657dedc3be add azure disk WriteAccelerator support 2020-02-08 07:43:21 +00:00
Kubernetes Prow Robot
6d4e2d722e
Merge pull request #87381 from yuxiaobo96/k8s-staticcheck3
staticcheck: pkg/volume/fc, pkg/volume/portworx and pkg/volume/vspher…
2020-02-07 18:32:58 -08:00
Mike Danese
3aa59f7f30 generated: run refactor 2020-02-07 18:16:47 -08:00
Kubernetes Prow Robot
cbffb19c76
Merge pull request #87609 from mvisonneau/rbd_mount_ro_fix
Fixed a failing test on a RBD mount scenario
2020-02-07 12:32:03 -08:00