Hemant Kumar
5feea93163
Rename MarkVolumeMountedOpts to MarkVolumeOpts
...
Also remove VolumeNotMounted state
2019-12-02 12:09:38 -05:00
Hemant Kumar
cdbd3ba5c2
Change interface of SetUp function
2019-12-02 12:09:38 -05:00
Hemant Kumar
db9ac38592
Change signature of MountDevice function and remove MountDeviceWithStatusTracking
2019-12-02 12:09:38 -05:00
Hemant Kumar
0c52b6606e
Refactor NodeStage function
...
Timeout operations should result in
Fix unit tests for uncertainDeviceGlobalMounts
2019-12-02 12:09:38 -05:00
Hemant Kumar
57019e0628
Add tests for verifying in-progress state
2019-12-02 12:09:38 -05:00
Hemant Kumar
321e99367a
Add code to handle Setup With Status tracking
2019-12-02 12:09:38 -05:00
Hemant Kumar
dc9e64c31e
Implement return status codes
2019-12-02 12:02:27 -05:00
Hemant Kumar
50dbcb3e00
Make sure PodExistsInVolume does not uses uncertain volumes
2019-12-02 12:01:40 -05:00
Hemant Kumar
34a6007dfe
Add code to mark volume as uncertain
...
Update bazel files
Add tests for volume mounts in uncertain state
2019-12-02 12:01:40 -05:00
David Zhu
21f7060c8f
Plumb test state through to fake volume host creation for error handling
2019-11-18 14:45:01 -08:00
David Zhu
1a47bf54e2
De-race some CSI unit tests that were initializing the plugin manager…ger (and plugins) twice. Set some const variables earlier to support node info manager initialization and wait for initialization to complete before finishing plugin setup.
2019-11-15 11:23:32 -08:00
Kubernetes Prow Robot
372ebd24f5
Merge pull request #83098 from ddebroy/disable-intree
...
CSI Migration phase 2: disable probing of in-tree plugins
2019-11-14 20:51:42 -08:00
Masaki Kimura
4578c6c8ce
Separate staging/publish and unstaging/unpublish logics for block
2019-11-15 01:55:20 +00:00
Masaki Kimura
7caf731773
Change publish path for CSI block volume per pod
...
This change is to allow CSI driver to publish the same volume for multipe pods on the same node.
2019-11-15 01:55:15 +00:00
Deep Debroy
129f15328b
Disable in-tree plugins migrated to CSI
...
Signed-off-by: Deep Debroy <ddebroy@docker.com>
2019-11-14 17:28:21 -08:00
Masaki Kimura
f363a03f0b
Refactor BlockVolumeMapper and BlockVolumeUnmapper interface
...
- Rename MapDevice to MapPodDevice in BlockVolumeMapper
- Add UnmapPodDevice in BlockVolumeUnmapper (This will be used by csi driver later)
- Add CustomBlockVolumeMapper and CustomBlockVolumeUnmapper interface
- Move SetUpDevice and MapPodDevice to CustomBlockVolumeMapper
- Move TearDownDevice and UnmapPodDevice to CustomBlockVolumeUnmapper
- Implement CustomBlockVolumeMapper only in local and csi plugin
- Implement CustomBlockVolumeUnmapper only in fc, iscsi, rbd, and csi plugin
- Change MapPodDevice to return path and SetUpDevice not to return path
2019-11-14 22:01:11 +00:00
Masaki Kimura
8a159d7253
Move MapBlockVolume call to operation_generator and add UnmapBlockVolume
2019-11-14 15:58:26 +00:00
Kubernetes Prow Robot
c580a12c8e
Merge pull request #83568 from bertinatto/volume_limits_ga
...
Promote volume limits to GA
2019-11-12 11:50:22 -08:00
Kubernetes Prow Robot
897ce3073c
Merge pull request #84533 from davidz627/fix/deprecatedPath
...
Remove plugin watching of deprecated directory and CSI v0 support in accordance with deprecation policy
2019-11-12 04:48:20 -08:00
Fabio Bertinatto
affcd0128b
Promote volume limits to GA
2019-11-12 09:43:53 +01:00
David Zhu
802fe12803
Remove plugin watching of deprecated directory {kubelet_root_dir}/plugins and support for CSI V0 in accordance with deprecation announcement in https://v1-13.docs.kubernetes.io/docs/setup/release/notes/
2019-11-11 11:42:58 -08:00
Kubernetes Prow Robot
1d1385af91
Merge pull request #83474 from msau42/topology-ga
...
CSI Topology ga
2019-11-04 15:28:27 -08:00
David Zhu
3575720154
Add davidz627 as owner of pkg/volume/csi
2019-10-30 13:35:44 -07:00
Michelle Au
d27fa9d890
Kubelet creates v1.CSINode
2019-10-28 13:41:13 -07:00
Michelle Au
8f6ab81cd4
Move feature gate to GA
2019-10-28 13:41:13 -07:00
Chris Duchesne
b4e0f1b8f8
modify detach timeout to be csiTimeout
2019-10-24 07:53:16 -07:00
John Strunk
55881f2fc4
Improve efficiency of csiMountMgr.GetAttributes
...
GetAttributes is called repeatedly while setting the fsGroup of a
volume. Previously, it recalculated whether SELinux was supported during
each call. This resulted in volume.SetVolumeOwnership taking a long
time, delaying pod startup for high file count volumes.
This change checks the SELinux status once, right after node publish,
allowing GetAttributes to simply build and return a struct.
Signed-off-by: John Strunk <jstrunk@redhat.com>
2019-10-10 13:51:50 -04:00
David Zhu
8970ec8fa7
Revert "Bugfix: remove PV dir when umount raw block device"
2019-10-01 15:14:35 -07:00
Kubernetes Prow Robot
b89220f9ca
Merge pull request #80420 from cwdsuzhou/July/mergeAttachDetachCommonFunc
...
Merge attach and detach common func
2019-09-30 13:08:46 -07:00
caiweidong
a890bf1175
Merge attach and detach common func
2019-09-30 17:36:14 +08:00
Kubernetes Prow Robot
a392897dec
Merge pull request #79784 from cwdsuzhou/July/RemoveDeviceVolumeDir
...
Bugfix: remove PV dir when umount raw block device
2019-09-27 02:03:36 -07:00
Kubernetes Prow Robot
67d750bb28
Merge pull request #81916 from hwdef/fix-typo-pkg
...
fix typo in pkg
2019-09-26 08:35:24 -07:00
caiweidong
f30a549eb8
Bugfix: remove PV dir when umount raw block device
2019-09-26 19:46:42 +08:00
Kubernetes Prow Robot
71c28e9b87
Merge pull request #82972 from yutedz/high-supported-ver
...
Remove unnecessary sorting for highestSupportedVersion
2019-09-25 13:50:44 -07:00
Kubernetes Prow Robot
6e960ef466
Merge pull request #82964 from yutedz/csi-drv-sync-err
...
Check error return from WaitForCacheSync
2019-09-25 13:50:34 -07:00
Ted Yu
23c7405fe0
Remove unnecessary sorting for highestSupportedVersion
2019-09-24 13:59:25 -07:00
Kubernetes Prow Robot
2e4d02e9ab
Merge pull request #82909 from hwdef/del-unused-var1
...
fix(pkg): delete unused var or const
2019-09-24 13:37:26 -07:00
Ted Yu
44787fe14e
Come out of loop when RPC_STAGE_UNSTAGE_VOLUME is found
2019-09-21 14:23:06 -07:00
Ted Yu
384aaad468
Check error return from WaitForCacheSync
2019-09-21 07:02:51 -07:00
hwdef
386f981116
fix(pkg): delete unused var or const
2019-09-21 17:13:13 +08:00
Kubernetes Prow Robot
8126201b73
Merge pull request #82697 from sttts/sttts-TestBlockMapperMapDeviceNotSupportAttach-race
...
Fix TestBlockMapperMapDeviceNotSupportAttach informer sync race
2019-09-13 03:32:29 -07:00
Dr. Stefan Schimanski
79b9cff948
Fix TestBlockMapperMapDeviceNotSupportAttach informer sync race
2019-09-13 10:02:19 +02:00
Kubernetes Prow Robot
9586c602f2
Merge pull request #82486 from haoshuwei/fix-ineffassign
...
Fix ineffassign
2019-09-11 21:23:19 -07:00
Kubernetes Prow Robot
494d4cb841
Merge pull request #79005 from cwdsuzhou/June/remove_recursion_detach
...
Remove recursion in waitForVolumeDetachmentInternal
2019-09-10 14:29:01 -07:00
haoshuwei
89a6533ef6
fix ineffassign
2019-09-09 11:34:21 +08:00
Patrick Ohly
599a9faf8d
storage: make tests independent of CSIInlineVolume default
...
Some tests assumed instead of ensuring that the CSIInlineVolume
feature is disabled.
2019-08-28 05:32:44 +02:00
caiweidong
28dc53f727
Remove recursion in waitForVolumeDetachmentInternal
2019-08-28 11:18:23 +08:00
Kubernetes Prow Robot
087aafc18d
Merge pull request #80568 from pohly/ephemeral-mode-check
...
ephemeral mode check
2019-08-26 11:53:40 -07:00
hwdef
9b3f577b1d
fix typo in pkg
2019-08-26 09:25:39 +08:00
Hemant Kumar
9dbe0b3ad8
Fix devicePath for raw block expansion
...
Fix tests
2019-08-22 22:48:46 -04:00
Patrick Ohly
8270fe81e4
bazel update
2019-08-22 08:57:53 +02:00
Patrick Ohly
7bbc06fcd4
storage: check CSIDriver.Spec.VolumeLifecycleModes
...
Using a "normal" CSI driver for an inline ephemeral volume may have
unexpected and potentially harmful effects when the driver gets a
NodePublishVolume call that it isn't expecting. To prevent that mistake,
driver deployments for a driver that supports such volumes must:
- deploy a CSIDriver object for the driver
- set CSIDriver.Spec.VolumeLifecycleModes such that it contains "ephemeral"
The default for that field is "persistent", so existing deployments
continue to work and are automatically protected against incorrect
usage.
For the E2E tests we need a way to specify the driver mode. The
existing cluster-driver-registrar doesn't support that and also was
deprecated, so we stop using it altogether and instead deploy and
patch a CSIDriver object.
2019-08-13 23:12:52 +02:00
Madhu Rajanna
ec5ff52b88
Fix logging message during unmounting
...
use errors.New() if formatting is not required
Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2019-08-12 09:18:35 +05:30
Kubernetes Prow Robot
07afde1559
Merge pull request #80935 from wongma7/initcsinode-error
...
Return error returned by CSINode Get if initialization failed
2019-08-06 23:57:29 -07:00
Kubernetes Prow Robot
521b5c3fed
Merge pull request #80994 from verult/csi-deregistration-loglevel
...
Bump log level of CSI driver de-registration to match registration handler
2019-08-06 06:06:09 -07:00
Kubernetes Prow Robot
1bc3d1abde
Merge pull request #80866 from ethan-daocloud/dev-ethan-csi-log
...
cleanup: remove package csi duplicated error log
2019-08-05 18:18:19 -07:00
Matthew Wong
bd42e728a8
Return error returned by CSINode Get if initialization failed
2019-08-05 23:01:50 +00:00
Cheng Xing
da64ca0c54
Bumped log level of CSI driver de-registration to match registration handler
2019-08-05 15:55:28 -07:00
ethan
d26e352fe7
cleanup: remove package csi duplicated error log
...
return err directly in func; delete new line in error message
cleanup: use errors.New(log()) to uniform error message
2019-08-05 20:35:28 +08:00
Kubernetes Prow Robot
9f6ebf0feb
Merge pull request #79144 from tedyu/csi-x-recur
...
Remove recursion in csiAttacher#waitForVolumeAttachmentInternal
2019-08-03 00:05:51 -07:00
Kubernetes Prow Robot
36391966f2
Merge pull request #78736 from endocrimes/dani/comment-fix
...
csi: Fix socket extension comment
2019-08-02 20:27:53 -07:00
Danielle Lancashire
d4c189d52b
csi: Fix socket extension comment
...
The CSI socket has used a sock extension since 179d8e108e
. This removes
the stale TODO for updating it.
2019-08-01 14:52:46 +02:00
Kubernetes Prow Robot
4ce69dd32e
Merge pull request #80848 from cwdsuzhou/Aug/fix_ut
...
Fix some unreasonable places int csi ut
2019-08-01 03:30:14 -07:00
caiweidong
7b5dac03ce
Fix some unreasonable places int csi ut
2019-08-01 14:19:11 +08:00
Kubernetes Prow Robot
3a4cda9def
Merge pull request #80522 from ethan-daocloud/patch-3
...
cleanup: remove duplicated logging error message in csi_mounter.go, also some typos.
2019-07-31 22:36:39 -07:00
ethan
ec2c5dff43
fix some log typos in csi_mounter.go
...
cleanup: remove logging duplicated error message
fix error msg, include err in new returned errors.
Signed-off-by: ethan <guangming.wang@daocloud.io>
2019-08-01 02:39:32 +00:00
AllenZMC
8833e4072c
fix typos in csi_attacher.go
2019-07-26 09:48:51 +08:00
Kubernetes Prow Robot
a3750501b0
Merge pull request #79983 from pohly/persistent-and-ephemeral-csi-volumes
...
persistent and ephemeral csi volumes
2019-07-25 16:01:54 -07:00
Kubernetes Prow Robot
0e3b593ded
Merge pull request #79851 from jparklab/master
...
Fix nil pointer dereference error in volume_stat_calculator
2019-07-25 14:33:58 -07:00
Patrick Ohly
555ff7ef10
CSI: allow drivers that can handle persistent and ephemeral volumes
...
The conceptual change is that the mode in which a volume gets handled
is derived from it's spec, not from the ability of the driver. In
practice, that is already how the code worked because it didn't
actually look at CSIDriver.Spec.Mode at all.
Therefore the code change itself is mostly just renaming "driver mode"
to "volume mode". In some places (CanDeviceMount, CanAttach) the
feature check that was used elsewhere seemed to be missing. Now their
code path for ephemeral volumes are also only entered if that feature
is enabled.
The sanity check whether a CSI driver is being used correctly still
needs to be implemented.
Related-to: https://github.com/kubernetes/kubernetes/issues/79624
2019-07-25 16:45:46 +02:00
Kubernetes Prow Robot
da3daf2e8a
Merge pull request #80451 from cwdsuzhou/July/fix_error_override
...
Fix error override when saveVolumeData occurs error
2019-07-24 02:02:15 -07:00
caiweidong
a5bf98a43e
Fix error overrided when saveVolumeData occurs error
2019-07-24 10:19:22 +08:00
Ted Yu
f4fbfcb46a
Remove recursion in csiAttacher#waitForVolumeAttachmentInternal
2019-07-23 14:29:24 -07:00
caiweidong
45c52d1314
Fix potential panic in nodeGetVolumeStatsV1
2019-07-23 13:47:35 +08:00
caiweidong
8789143062
Fix csi attacher unit tests using t.Run()
2019-07-22 15:42:31 +08:00
David Zhu
831cd29f4e
Add passthrough for MountOptions for NodeStageVolume for CSI
2019-07-16 16:17:47 -07:00
Kubernetes Prow Robot
10a1d1f5bd
Merge pull request #79920 from cwdsuzhou/July/block_not_support_attach
...
Bugfix: csi plugin supporting raw block that does not need attach mounted failed
2019-07-15 08:39:21 -07:00
caiweidong
0c628e101a
Bugfix: csi raw block that does not need attach mounted failed
...
Add unit test
fix verify-test-featurefates failed
2019-07-15 10:34:12 +08:00
Kubernetes Prow Robot
9915047d3d
Merge pull request #79113 from tedyu/stop-w-detach
...
Close watcher early for volume detachment
2019-07-12 06:31:18 -07:00
Kubernetes Prow Robot
021ad88ac4
Merge pull request #79894 from odinuge/csi-client-dead-code
...
Remove dead code from csi_client
2019-07-10 06:20:25 -07:00
Kubernetes Prow Robot
d59a603f1b
Merge pull request #78267 from mucahitkurt/cleanup/operation-generator-migration-scenarios-unit-tests
...
unit tests for operationGenerator.GenerateUnmapVolumeFunc
2019-07-09 18:20:25 -07:00
Odin Ugedal
542c335fca
Remove dead code from csi_client
...
When removing a feature flag in
35bc5dc6b6
, a few of the lines were
removed, resulting in some dead code.
2019-07-08 17:53:52 +02:00
Ji-Young Park
528521cfae
Return MetricsError with ErrCodeNotSupported code
...
GetMetrics function expects MetricsError error
with ErrCodeNotSupported code when driver for the volume
does not support metrics
Updated csi_metrics to return error when underlying csi
driver does not have GET_VOLUME_STATS capability
2019-07-06 10:49:06 -04:00
Kubernetes Prow Robot
a3be4b6817
Merge pull request #79529 from andyzhangx/change-csi-timeout
...
fix: change default timeout value in csi plugin
2019-07-03 09:12:58 -07:00
Kubernetes Prow Robot
2501a9083d
Merge pull request #68513 from codenrhoden/mount-refactor
...
Refactor util/mount interface in prep for moving out of k/k
2019-06-28 13:57:28 -07:00
andyzhangx
d8c92f5c09
fix: change timeout value in csi plugin
2019-06-28 14:27:22 +00:00
Fabio Bertinatto
33c8bacd41
Update nodeinfomanager to store volume limits in CSINode
2019-06-25 16:30:54 +02:00
draveness
35bc5dc6b6
feat: cleanup feature gates for KubeletPluginsWatcher
2019-06-23 16:59:36 +08:00
Ted Yu
005065f8fc
Close watcher early for volume detachment
2019-06-17 15:09:43 -07:00
Kubernetes Prow Robot
365283e202
Merge pull request #78532 from cwdsuzhou/simplify_construct_volume_spec
...
Simplify func ConstructVolumeSpec
2019-06-17 11:05:49 -07:00
Kubernetes Prow Robot
e46b9ca656
Merge pull request #78754 from cwdsuzhou/June/csi_attach_close_chan
...
Avoid to keep the watcher open for too long
2019-06-17 04:36:37 -07:00
Kubernetes Prow Robot
bde744eb97
Merge pull request #78839 from tedyu/cleaner-err
...
Check correct error for cleanup in csiAttacher#MountDevice
2019-06-14 20:47:01 -07:00
Travis Rhoden
be7da5052f
Refactor pkg/util/mount to be more reusable
...
This patch refactors pkg/util/mount to be more usable outside of
Kubernetes. This is done by refactoring mount.Interface to only contain
methods that are not K8s specific. Methods that are not relevant to
basic mount activities but still have OS-specific implementations are
now found in a mount.HostUtils interface.
2019-06-14 09:35:18 -06:00
Kubernetes Prow Robot
70b46ca5fb
Merge pull request #78529 from cwdsuzhou/remove_verbose_err
...
Remove dead codes
2019-06-14 04:09:13 -07:00
Mucahit Kurt
db1c07750a
unit tests for the volume plugin name that's used inside GeneratedUnmapVolumeFunc for csi migration on/off scenarios
...
Signed-off-by: Mucahit Kurt <mucahitkurt@gmail.com>
2019-06-11 08:32:25 +03:00
Ted Yu
de92897e26
Check correct error for cleanup
2019-06-09 21:29:28 -07:00
caiweidong
0508bea9b6
Fix keep the watcher open for too long
2019-06-07 21:40:50 +08:00
caiweidong
4ce2f296f5
Simplify func ConstructVolumeSpec
2019-06-05 10:22:13 +08:00
caiweidong
b726db66d2
Remove dead codes
2019-06-03 22:15:53 +08:00
Kubernetes Prow Robot
b7fa33ec15
Merge pull request #77703 from ddebroy/inline-mig-1
...
API changes to support migration of inline in-tree volumes to CSI
2019-05-31 12:23:19 -07:00