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
Jiawei Wang
6a7222cf4e
Add migrated field to storage_operation_duration_seconds metric
2021-02-12 17:35:01 -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
lala123912
7594702b22
modify static check
...
fix format
2020-09-23 19:27:24 +08: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
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
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
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
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
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
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
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
David Zhu
290a7f12ce
Add migration shim for VerifyVolumesAreAttached and BulkVolumeVerify
2019-07-23 12:57:47 -07:00