Commit Graph

257 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
087aafc18d Merge pull request #80568 from pohly/ephemeral-mode-check
ephemeral mode check
2019-08-26 11:53:40 -07: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