Jan Safranek
167d27a790
Save SELinux context both in MountDevice and SetUp
...
And make it feature gated in both places.
2022-11-08 18:10:51 +01:00
Kubernetes Prow Robot
d9db8db68f
Merge pull request #111707 from leiyiz/migration
...
remove const that's not used
2022-11-04 13:48:15 -07:00
Fabio Bertinatto
b19172c58f
Promote DelegateFSGroupToCSIDriver feature to GA
2022-11-04 07:26:17 -03:00
Jan Safranek
8dd3510032
Fix SELinux context mount with unknown context
...
Don't mount with SELinux mount option if kubelet does not know the SELinux
context, i.e. MounterArgs.SELinuxLabel is ""
2022-10-31 19:11:48 +01:00
Léiyì Zhang
ea0fe5a33e
remove const that's not used
2022-08-04 15:55:17 -07:00
Jan Safranek
5c90474f38
Add SELinux mount support to CSI driver
...
With some minor refactoring to use common getCSIDriver function.
2022-08-04 10:51:45 +02:00
Roman Bednar
f17f00363b
csi_attacher: improve attach/detach timeout message
...
If we time out waiting for volume to be attached the message given
to user is not informative enough:
"Attach timeout for volume vol-123"
It would be better if we provide more information on what's going on
and even include name of the driver that's causing the problem, e.g.:
"timed out waiting for external-attacher of ebs.csi.aws.com CSI driver to attach volume vol-123"
2022-03-14 11:00:22 +01:00
Fabio Bertinatto
eb2adaa32f
Fix panic in Kubelet
...
Currently, the Kubelet panics when it's started with the
`enable-controller-attach-detach=false` option set and a
volume is attached to a node.
This patch adds a check that prevents the Kubelet from trying to attach
or detach CSI volumes and report a proper error warning the user that this
use case is not supported.
2022-01-31 17:29:25 -03:00
Kubernetes Prow Robot
c175418281
Merge pull request #107065 from saikat-royc/fix-node-stage-path
...
change node staging path for csi driver to PV agnostic
2022-01-21 01:31:58 -08:00
Saikat Roychowdhury
80e0501e89
change staging path for csi driver to pv agnostic
2022-01-20 22:59:29 +00:00
Kubernetes Prow Robot
31898fc504
Merge pull request #101856 from prateekpandey14/fix-staticcheck
...
fix static check of importing the same package multiple times
2022-01-05 14:55:47 -08:00
Jan Safranek
516633d67f
Remove AttachID matching from Detach
...
Detach() always gets CSI volume unique ID and never attachment ID. Related
code has been removed from Kubernetes in
129f15328b
.
2021-12-14 15:37:17 +01:00
prateekpandey14
f9cf14f3f6
fix static check of importing the same package multiple times
...
Signed-off-by: prateekpandey14 <prateekpandey14@gmail.com>
2021-12-14 11:06:44 +05:30
wojtekt
d9b08c611d
Migrate to k8s.io/utils/clock
2021-09-17 15:19:08 +02:00
Kubernetes Prow Robot
a7af9f6e0e
Merge pull request #101475 from ash2k/ash2k/stop-timer
...
Stop timer and correctly drain it
2021-08-09 09:35:31 -07:00
Cheng Xing
c50b3074fe
Moved VOLUME_MOUNT_GROUP capability check from NodeStageVolume to MountDevice; added log message in SetupAt to indicate FSGroup is delegated to driver
2021-07-03 16:29:42 -07:00
Cheng Xing
794a925a85
Pass FsGroup to NodeStageVolume
2021-07-03 16:29:42 -07:00
Cheng Xing
0e315355df
Pass FsGroup to MountDevice
2021-07-03 16:29:42 -07:00
刁浩 10284789
5908cd0d90
simplify returning boolean expression in /pkg/volume
...
Signed-off-by: 刁浩 10284789 <diao.hao@zte.com.cn>
2021-05-25 02:39:55 +00:00
Mikhail Mazurskiy
5b42681840
Correctly drain timer
2021-04-26 15:13:09 +10:00
Chris Henzie
f36fec997a
Poll for VolumeAttachments in CSI attacher
...
The CSI attacher that runs inside of the AttachDetachController has
access to a VolumeAttachment lister. By polling this lister for the
status of VolumeAttachments, we can save threads on the API server by
not using watches.
2021-02-23 16:54:18 -08:00
Jiawei Wang
43bc6fa806
Add csi_operations_seconds metrics on kubelet
2021-02-17 13:38:27 -08:00
Christian Huffman
df3119e815
Adjust defer to correctly call
2021-01-19 16:08:25 -05:00
fankangbest
b9afd2d34a
do not remove volume dir when saveVolumeData fails
2021-01-19 15:53:10 -05:00
Chris Henzie
195a5af23b
Make volume attachment watch timeout configurable for csiAttacher
2021-01-06 16:11:39 -08:00
Chris Henzie
b4e3f272b9
Remove unused waitSleepTime field in csiAttacher
2021-01-06 15:45:56 -08:00
Kubernetes Prow Robot
2b4be7bb5f
Merge pull request #88759 from andyzhangx/csi-dir-fix
...
feat: ignore mount dir check in csi node stage/publish
2020-11-09 16:08:40 -08:00
Jan Safranek
9a765f8c2d
Restore staging path creation
...
CSI says about NodeStage (=MountDevice):
// The CO SHALL ensure [...]
// that the path is directory and that the process serving the
// request has `read` and `write` permission to that directory. The
// CO SHALL be responsible for creating the directory if it does not
// exist.
2020-11-09 19:22:29 +01:00
Jayasekhar Konduru
2a89577659
CSI: Modify VolumeAttachment check to use Informer/Cache
...
Change-Id: Ie70c8b6657c67eefbf13042f36d56ca84a2e42bb
2020-06-11 10:34:09 -07: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
andyzhangx
8d5c65b8cd
fix: comments(only create parent dir)
2020-04-21 07:15:02 +00:00
Mike Danese
c58e69ec79
automated refactor
2020-03-05 14:59:46 -08:00
andyzhangx
b3a27c44bf
fix comments
2020-03-04 11:33:06 +00:00
andyzhangx
0c81a2f6b0
fix: ignore dir check in csi node stage/publish
2020-03-03 11:55:48 +00: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
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
danielqsj
5bc0e26c19
unify alias of api errors under pkg and staging
2019-12-26 16:42:28 +08: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
db9ac38592
Change signature of MountDevice function and remove MountDeviceWithStatusTracking
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
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
Chris Duchesne
b4e0f1b8f8
modify detach timeout to be csiTimeout
2019-10-24 07:53:16 -07:00
caiweidong
a890bf1175
Merge attach and detach common func
2019-09-30 17:36:14 +08: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
caiweidong
28dc53f727
Remove recursion in waitForVolumeDetachmentInternal
2019-08-28 11:18:23 +08: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