Chris Henzie
2b98f8edc7
Enforce ReadWriteOncePod access mode during mount
2021-06-28 21:25:37 -07:00
Jan Safranek
f4b41c0a17
Fix UnmountDevice error cases
...
When UnmountDevice fails, kubelet treat the volume mount as uncertain,
because it does not know at which stage UnmountDevice failed. It may be
already partially unmonted / destroyed.
As result, MountDevice will be performer when a new Pod is started on the
node after UnmountDevice faiure.
2021-06-16 18:39:04 +02:00
andyzhangx
e10d3948f5
fix: azure file namespace issue in csi translation
...
fix build failure
fix comments
2021-04-20 07:23:09 +00:00
Sung Jun Park
5f69cf74d8
fix: when newly binding pvc to a pv, adjust pvc.status.capacity to pv's annotation that denotes the pre-resize capacity of the original pvc that pv was bound to if it has one
...
test: confirm that pvc's status capacity is adjusted if pv has a pre-resize capacity annotation
2021-03-09 07:55:10 +00:00
Benjamin Elder
56e092e382
hack/update-bazel.sh
2021-02-28 15:17:29 -08:00
Jiawei Wang
6a7222cf4e
Add migrated field to storage_operation_duration_seconds metric
2021-02-12 17:35:01 -08:00
wzshiming
48eb16797c
Speed up pkg/volume/util/operationexecutor unit tests
2021-02-04 22:14:34 +08:00
xiongzhongliang
0d2b542dde
fix typo and format for klog
2020-11-14 23:44:38 +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
6060c57ba3
Call MountDevice only once
...
Cann MountDevice only when the volume was not device-mounted before.
2020-11-09 19:22:29 +01:00
Jan Safranek
b3b53cbf63
Mark MountDevice as uncertain after failed resize
...
When NodeExpand fails between MountDevice and SetUp, make sure the next
NodeExpand attempt is called before SetUp.
2020-11-09 19:22:29 +01:00
Kubernetes Prow Robot
71fea80155
Merge pull request #92692 from Pingan2017/verify-controller-attach
...
fix bug for verify attached volume loop
2020-11-04 05:22:04 -08:00
Jing Xu
e233a7220b
Add jingxu97 to volume/util owners
...
Add myself to volume/util/operationexecutor owner
Change-Id: I85424e7ede4f6c136bed65c619aa48e856e8770f
2020-10-22 20:31:31 -07:00
Pingan2017
a1063c924b
fix loop bug for verify attached volume
2020-10-22 13:58:40 +08:00
lala123912
7594702b22
modify static check
...
fix format
2020-09-23 19:27:24 +08:00
Srini Brahmaroutu
fbe5daed73
Change code to use staging/k8s.io/mount-utils
2020-09-16 21:51:24 -07:00
Jiawei Wang
a6d8e6c5c2
Detect change of volume attachability in the middle of attaching
...
- Add Unit tests for both volumemanager and attach/detach controller
- Add E2E test
2020-08-24 17:15:11 -07: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
Brian Pursley
4cc4e774c6
Make unmount device log warning and continue if mount path is not found
2020-06-24 10:02:50 -04: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
Shihang Zhang
3db7275b54
set proper file permission for projected service account volume
2020-05-04 18:25:23 -07: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
Cheng Xing
ef3d66b98b
Parallelize attach operations across different nodes for volumes that allow multi-attach
2020-03-05 22:22:05 -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
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
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
3e3a3599ca
Merge pull request #87711 from alena1108/jan30volume
...
Ineffassign fixes for pkg/volume
2020-02-14 21:53:28 -08: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
Mike Danese
3aa59f7f30
generated: run refactor
2020-02-07 18:16:47 -08:00
Alena Prokharchyk
331cd94ccc
Ineffassign fixes for pkg/volume
...
Along resolves errors whitelisted in hack/.staticcheck_failures
2020-01-31 10:14:45 -08:00
Jordan Liggitt
cd1059e3c4
Revert "Merge pull request #87258 from verult/slow-rxm-attach"
...
This reverts commit 15c3f1b119
, reversing
changes made to 52d7614a8c
.
2020-01-29 14:58:32 -05:00
Cheng Xing
c6a03fa5be
Parallelize attach operations across different nodes for volumes that allow multi-attach
2020-01-27 15:02:25 -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
309c6f863a
Handle the case of remounts correctly
2019-12-02 12:09:38 -05:00
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
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
Hemant Kumar
a795f3de88
Add code for introducing uncertain state of mounts
...
Add a comment about volumestate
2019-12-02 11:57:40 -05:00
Travis Rhoden
0c5c3d8bb9
Remove pkg/util/mount (moved out of tree)
...
This patch removes pkg/util/mount completely, and replaces it with the
mount package now located at k8s.io/utils/mount. The code found at
k8s.io/utils/mount was moved there from pkg/util/mount, so the code is
identical, just no longer in-tree to k/k.
2019-11-15 08:29:12 -07: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
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
a275026ad4
Split CustomBlockVolumeMapper and CustomBlockVolumeUnmapper
...
- Move SetUpDevice to BlockVolumeStager
- Move MapPodDevice to BlockVolumePublisher
- Move TearDownDevice to BlockVolumeUnstager
- Move UnmapPodDevice to BlockVolumeUnpublisher
- Implement BlockVolumePublisher only in local and csi plugin
- Implement BlockVolumeUnstager only in fc, iscsi, rbd, and csi plugin
- Implement BlockVolumeStager and BlockVolumeUnpublisher only in csi plugin
2019-11-14 22:01:19 +00: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
aee875a855
Fix error messages in operation_generator.go
2019-11-14 15:58:27 +00:00
Masaki Kimura
8a159d7253
Move MapBlockVolume call to operation_generator and add UnmapBlockVolume
2019-11-14 15:58:26 +00:00
Masaki Kimura
68be3947b8
Make descriptor lock per pod and release it per pod
...
This change is needed to avoid unmapVolumeFunc for one pod blocked,
when the lock for the same volume is taken for another pod.
2019-11-14 15:58:26 +00:00
Masaki Kimura
2ecdc5e8d1
Change globalMapPath to bind mount from symlink
...
This change is needed to make descriptor lock per pod, in the next commit.
If losetup is called for symlink, path in the output for losetup is resolved,
as a result, we can't distinguish which path the lock is taken.
2019-11-14 15:58:26 +00:00
Kubernetes Prow Robot
a45917008f
Merge pull request #84301 from yutedz/pvc-expand-fail
...
Add event for pvc in case node expansion fails
2019-10-28 14:09:29 -07:00
Ted Yu
e8bd5c7785
Add event for pvc in case node expansion fails
2019-10-24 09:11:01 -07:00
caiweidong
909be01bd6
Add an event to pvc when node expand successfully
2019-10-21 11:33:46 +08:00
David Zhu
92cb06a2e7
Refactor CSI Translation Library into a struct that is injected into various components to simplify unit testing in future
2019-09-27 12:59:53 -07:00
Kubernetes Prow Robot
3a19f1e80b
Merge pull request #82472 from draveness/feature/remove-feature-gates-in-1-17
...
feat: cleanup several GA feature flags which should be removed in 1.17
2019-09-17 06:58:24 -07:00
Kubernetes Prow Robot
60bc301889
Merge pull request #81613 from tedyu/op-exec-vol-cont
...
Continue with remaining volumeAttached's in VerifyVolumesAreAttached
2019-09-10 14:31:33 -07:00
Ted Yu
8819a4b6b4
Continue with remaining volumeAttached's in VerifyVolumesAreAttached
2019-09-09 15:52:53 -07:00
draveness
2c0d6053fa
feat: remove PersistentLocalVolumes feature gates
2019-09-09 08:10:27 +08:00
Travis Rhoden
935c23f2ad
Move HostUtil to pkg/volume/util/hostutil
...
This patch moves the HostUtil functionality from the util/mount package
to the volume/util/hostutil package.
All `*NewHostUtil*` calls are changed to return concrete types instead
of interfaces.
All callers are changed to use the `*NewHostUtil*` methods instead of
directly instantiating the concrete types.
2019-08-30 10:14:42 -06:00
Han Kang
3a50917795
migrate kubelet's metrics/probes & metrics endpoint to metrics stability framework
2019-08-28 11:16:38 -07:00
Kubernetes Prow Robot
f105fef3d5
Merge pull request #81429 from huffmanca/resize_block_volume
...
Enables resizing of block volumes.
2019-08-23 17:59:05 -07:00
Hemant Kumar
9dbe0b3ad8
Fix devicePath for raw block expansion
...
Fix tests
2019-08-22 22:48:46 -04:00
Christian Huffman
7a4cdf5ab2
Included resizing for CSI-based block volumes.
...
Perform a no-op when volume is of type raw block
Fix bug with checking volume mounts for readonly
2019-08-22 15:45:57 -04:00
Travis Rhoden
a7830a2c6e
mv HasMountRefs from mount pkg to vol/util
...
HasMountRefs is only used internal to K8s and should not be moved out
with the mount package. move it to pkg/volume/util instead.
2019-08-21 14:53:34 -06:00
Masaki Kimura
c130b77a48
Move nil check for mapperPlugin earlier in reconstructVolume
2019-08-01 20:36:21 +00:00
Jan Safranek
bab81b809b
Don't create mounter when reconstructing block volume
...
CSI mounter will create a new directory + json for a filesystem volume,
leading to even more orphaned files/directories.
2019-08-01 20:04:10 +00:00
David Zhu
290a7f12ce
Add migration shim for VerifyVolumesAreAttached and BulkVolumeVerify
2019-07-23 12:57:47 -07:00
Kubernetes Prow Robot
2bf8ab13c4
Merge pull request #80048 from davidz627/fix/tests
...
Fixes mount/unmount paths for migrated inline volumes
2019-07-12 20:19:17 -07:00
David Zhu
2820c1d8c8
Add davidz627 (David Zhu) to Approvers for OperationExecutor and GCE PD
2019-07-11 13:14:31 -07:00
David Zhu
93d6356d2f
Fixes mount/unmount paths for migrated inline volumes. Some minor fixes for GCE specific inline migrated volumes
2019-07-11 11:51:43 -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
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
518f16636f
Merge pull request #78593 from RobertKrawitz/ephemeral-storage-quota-cleanup
...
Ephemeral storage quota cleanup
2019-06-14 05:33:18 -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
Kubernetes Prow Robot
333081e79c
Merge pull request #78595 from gnufied/fix-aws-dangling-volumes
...
Add dangling volume as uncertain
2019-06-06 16:47:59 -07:00
Hemant Kumar
7bcebe98bb
Add dangling volume as uncertain
2019-06-06 15:25:10 -04:00
Hemant Kumar
0f62e3fbe8
Make language of error msgs and func names consistent: ExpandVolumeInUse
...
change feature flag
Fix the e2e test for online and offline expansion
2019-06-03 12:26:56 -04: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
Robert Krawitz
bf1f0fa5d9
Remove pod UID from volumeMount, we can get it elsewhere
2019-05-31 14:25:01 -04:00
Kubernetes Prow Robot
cf76868b34
Merge pull request #66928 from RobertKrawitz/ephemeral-storage-quota-exp
...
Ephemeral storage monitoring via filesystem quotas
2019-05-30 20:44:26 -07:00
Deep Debroy
de7be9d613
Populate InlineVolumeSpec in CSI attacher and translation library
...
Signed-off-by: Deep Debroy <ddebroy@docker.com>
2019-05-30 09:35:22 +00:00
Robert Krawitz
f8661d6240
Use xfs_quota command to apply quotas
2019-05-29 15:12:28 -04:00
Robert Krawitz
448e0c44c6
Apply quotas via syscalls using cgo.
2019-05-29 15:12:28 -04:00
Robert Krawitz
5b97b2860d
Change fsGroup to mounterArgs in volume.SetUp() to allow for future extension.
2019-05-29 15:12:28 -04:00
Hemant Kumar
7563b4d01b
Address comments about retry in online resizing block
2019-05-29 11:01:45 -04:00
Hemant Kumar
d119899e22
handle review comments
2019-05-28 15:22:41 -04:00
Hemant Kumar
33b95ebddb
add some tests for expand controller
...
Update bazel file
2019-05-20 10:55:23 -04:00
Hemant Kumar
673773cbde
check for pvc objects
2019-05-16 12:23:52 -04:00
Matthew Wong
c16a555654
Use workqueue model in expand controller
...
Add a test for patch creation
2019-05-14 16:42:06 -04:00
Kubernetes Prow Robot
9e52832c52
Merge pull request #77317 from gnufied/fix-block-volume-resizing
...
Fix block volume expansion
2019-05-01 20:42:56 -07:00
Kubernetes Prow Robot
b5c34d0c43
Merge pull request #74734 from codenrhoden/move-mountspath
...
Move MountsInGlobalPDPath from mount pkg to volume
2019-05-01 17:28:18 -07:00
Hemant Kumar
0eb68c5a22
Fix blockvolume expansion
2019-05-01 18:25:54 -04:00
David Zhu
1271237d23
Add migration metrics checking to all test suites
2019-05-01 11:24:03 -07:00
Travis Rhoden
78d109e201
Always use filepath.Join instead of path.Join
...
This patch cleans up pkg/util/mount/* and pkg/util/volume/* to always
use filepath.Join instead of path.Join. filepath.Join is preferred
because path.Join can have issues on Windows.
2019-04-29 09:56:05 -06:00
David Zhu
213cc99ead
Operation generator migration metric fixes and test metrics retrieval code
2019-04-25 16:27:45 -07:00