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
Jan Safranek
2c1b743766
Promote block volume features to GA
2020-02-28 20:48:38 +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
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
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
Cheng Xing
37957e2a0d
Refactor operation keys for NestedPendingOperations
2020-01-27 10:42:16 -08:00
Kubernetes Prow Robot
40df9f82d0
Merge pull request #82492 from gnufied/fix-uncertain-mounts
...
Fix uncertain mounts
2019-12-17 14:49:57 -08:00
Ted Yu
62d7772882
Check FileInfo against nil during walk of container dir path
2019-12-16 17:59:17 -08:00
Hemant Kumar
ca532c6fb2
Ensure that error is returned on NodePublish
2019-12-11 22:10:09 -05: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
0c52b6606e
Refactor NodeStage function
...
Timeout operations should result in
Fix unit tests for uncertainDeviceGlobalMounts
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
560d9c56eb
Change mount.NewOSExec to utilexec.New
2019-11-14 15:58:27 +00:00
Masaki Kimura
8a09460c2f
Change getDeviceMajorMinor to use unix.Stat
2019-11-14 15:58:27 +00:00
Masaki Kimura
aee875a855
Fix error messages in operation_generator.go
2019-11-14 15:58:27 +00:00
Masaki Kimura
a2cbc028f4
Remove remaining empty file in unmapBindMountDevice
2019-11-14 15:58:27 +00:00
Masaki Kimura
dd945424e1
Rename IsBindMountExist to IsDeviceBindMountExist
2019-11-14 15:58:26 +00:00
Masaki Kimura
bee6514d79
Remove klog for output error instead return err with context
2019-11-14 15:58:26 +00:00
Masaki Kimura
7abb704e7b
Improve comments for volume path hanlder and volume.go
2019-11-14 15:58:26 +00:00
Masaki Kimura
5a351e3014
Check and return error first in IsSymlinkExist and IsBindMountExist
2019-11-14 15:58:26 +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
Travis Rhoden
367f879131
Retire mount.Exec for k8s.io/utils/exec
...
This patch removes mount.Exec entirely and instead uses the common
utility from k8s.io/utils/exec.
The fake exec implementation found in k8s.io/utils/exec differs a bit
than mount.Exec, with the ability to pre-script expected calls to
Command.CombinedOutput(), so tests that previously relied on a callback
mechanism to produce specific output have been updated to use that
mechanism.
2019-11-13 14:09:57 -07:00
Travis Rhoden
1fd8921546
Move mount/fake.go to mount/fake_mount.go
...
This patch moves fake.go to mount_fake.go, and follows to principle of
always returning a discrete type rather than an Interface. All callers
of "FakeMounter" are changed to instead use "NewFakeMounter()". The
FakeMounter "Log" struct member is changed to not be exported, and
instead only access through a new "GetLog()" method.
2019-11-08 08:07:41 -07:00
Janario Oliveira
c9e97151b3
Changed unmount function for subpath with dirs
2019-11-07 10:05:26 +01:00
Janario Oliveira
cb0ab22b2e
Added test case for subpath mount with file
2019-11-07 10:05:26 +01:00
Janario Oliveira
2ca213579d
Renamed function
2019-11-07 10:05:26 +01:00
Janario Oliveira
439ce51441
Changed test case to use filepath.Walk
2019-11-07 10:05:26 +01:00
Janario Oliveira
67ec00d6b8
Unmount subpath should only scan the first level dir
2019-11-07 10:05:26 +01:00
Jordan Liggitt
297570e06a
hack/update-vendor.sh
2019-11-06 17:42:34 -05:00
Kubernetes Prow Robot
08410cbf06
Merge pull request #84365 from codenrhoden/rm-mount-container
...
Remove Alpha feature MountContainers
2019-11-03 21:29:41 -08: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
Travis Rhoden
2e054a4f4c
Remove Alpha feature Mount Containers
...
The alpha feature for mount containers is unused, and is
superseded by CSI. By removing it, we can remove a lot of unnecessary
code, and also clean up the mount library even more before moving it out
of tree.
2019-10-25 09:25:13 -06:00
Ted Yu
e8bd5c7785
Add event for pvc in case node expansion fails
2019-10-24 09:11:01 -07:00
Kubernetes Prow Robot
900c0cf0b6
Merge pull request #84137 from cwdsuzhou/Octo/add_success_events
...
Add an event to pvc when node expand successfully
2019-10-24 07:33:15 -07:00
Kubernetes Prow Robot
18cef954a1
Merge pull request #83591 from jingxu97/Oct/cache
...
Flush data cache during unmount device for GCE-PD in Windows
2019-10-21 21:11:36 -07:00
caiweidong
909be01bd6
Add an event to pvc when node expand successfully
2019-10-21 11:33:46 +08:00
Jing Xu
1636b2b452
Flush data cache during unmount device for GCE-PD in Windows
...
This PR fixes the issue mentioned in #83590 for GCE-PD. It uses
WriteVolumeCache API to writes the file system cache to disk during
UnmountDevice in Windows. Linux does not need to explicitly flush cache
because unmount will automatically sync the disk which also flush the
cache.
Change-Id: Ife2745c92b8c0446e79a52e9f9ec7851d2f6b90d
2019-10-16 10:12:35 -07:00
Bob Killen
6e68d80013
Prune inactive owners from pkg/volume/* OWNERS files.
2019-10-13 08:44:11 -04:00
Kubernetes Prow Robot
14e5adfc85
Merge pull request #82683 from davidz627/fix/translationStruct
...
Refactor CSI Translation Library into a struct that is injected into various components to simplify unit testing
2019-09-29 10:11:37 -07: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
chenyaqi01
66be69bb0e
replace bytes.Compare() with bytes.Equal()
2019-09-27 10:08:49 +08:00
Kubernetes Prow Robot
8a106a5714
Merge pull request #82994 from yutedz/rm-persist-vol-mode
...
Remove unused func GetPersistentVolumeClaimVolumeMode
2019-09-25 13:51:04 -07:00
Ted Yu
ba45f73c1f
Remove unused func GetPersistentVolumeClaimVolumeMode
2019-09-22 08:54:01 -07:00
hwdef
386f981116
fix(pkg): delete unused var or const
2019-09-21 17:13:13 +08: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
d1c6898ab5
Merge pull request #82474 from cwdsuzhou/du_one_file_system
...
Add -x to du commands to not traverse other file systems
2019-09-11 18:29:45 -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
Kubernetes Prow Robot
96439cc97f
Merge pull request #82028 from codenrhoden/rename-isbind
...
Rename mount.IsBind to mount.MakeBindOpts
2019-08-30 00:43:32 -07:00
Kubernetes Prow Robot
4170a19749
Merge pull request #81437 from jingxu97/Aug/metricfs
...
Fix Windows disk usage metric measurement
2019-08-29 21:21:59 -07:00
Jing Xu
3b7e696c2f
Fix Windows disk usage metric measurement
...
This PR will fix issue #81088 . The current fs_windows utility reports
the whole file system usage instead of specific file path. This PR fix
this and walk the dir tree under the file path and collect the disk
usage.
Change-Id: I502ccf0af4bd07be69b61be043be616660499e4d
2019-08-29 15:37:25 -07:00
Han Kang
6f70f781df
add some documentation around the metrics stability migration changes for clarity
2019-08-28 11:17:33 -07:00
Han Kang
3a50917795
migrate kubelet's metrics/probes & metrics endpoint to metrics stability framework
2019-08-28 11:16:38 -07:00
Travis Rhoden
ef855c7c08
Rename mount.IsBind to mount.MakeBindOpts
2019-08-27 11:34:42 -06:00
Travis Rhoden
a30ba6197d
Internalize mount.Interface.IsMountPointMatch
...
IsMountPointMatch() had no callers outside of the mount package, and has
internal implementation details. This patch makes it no longer be
public.
2019-08-26 09:47:07 -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
Kubernetes Prow Robot
b55f3252e1
Merge pull request #81843 from codenrhoden/remove-nsenter
...
Remove nsenter impl from pkg/vol/util
2019-08-23 15:49:06 -07:00
Travis Rhoden
dde8a6f7f6
Remove nsenter impl from pkg/vol/util
...
With the removal of the `--containerized` flag from kubelet, nothing
uses this code anymore.
2019-08-23 10:09:49 -06:00
Lee Verberne
b465d579de
Add ephemeral container to GetPodVolumeNames test
2019-08-23 13:36:22 +00:00
Kubernetes Prow Robot
f1453953b7
Merge pull request #81745 from codenrhoden/mv-hasmountrefs
...
mv HasMountRefs from mount pkg to vol/util
2019-08-23 00:52:13 -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
Michelle Au
fa822f3c51
Use VisitContainers instead of directly accessing pod container fields
...
Change-Id: I354513683e7b5bf4d1837f567ef0e84b17f6e174
2019-08-20 11:16:35 -07:00
Jan Safranek
8d580262f9
Refactor makeMountsMap into GetPodVolumeNames
...
The function will be handy in subsequent patches. Also change custom maps
into sets.String.
2019-08-15 10:48:38 +02:00
Kubernetes Prow Robot
76e19a1619
Merge pull request #81204 from codenrhoden/rename-hu-pathexists
...
Rename HostUtils.ExistsPath to PathExists
2019-08-12 20:12:12 -07:00
Travis Rhoden
0e73131ca6
Rename HostUtils.GetFSGroup to HostUtils.GetOwner
...
This patch renames GetFSGroup (a process property) to GetOwner (a file
property), returning both the uid and gid of the given pathname. This
method is only used in one place in the k/k codebase, but having
"GetOwner" instead of "GetGroup" seems to have more utility.
2019-08-09 13:20:35 -06:00
Travis Rhoden
14e25b7c04
Rename HostUtils.ExistsPath to PathExists
2019-08-09 12:40:19 -06:00
Eytan Heidingsfeld
6a94d50fb3
Add -s to du commands to not traverse other file systems
2019-08-06 14:59:19 +08: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
514a157adf
Merge pull request #74691 from cpuguy83/epoll_use_cloexec
...
Use EPOLL_CLOEXEC to prevent fd leaks.
2019-07-10 21:38:55 -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
Brian Goff
0051db89a7
Use O_CLOEXEC for volume subpath util
...
This prevents fd's from leaking to subprocesses.
2019-07-09 10:03:59 -07:00
Kubernetes Prow Robot
a5e3d74691
Merge pull request #79534 from odinuge/volume-util-fd
...
Fix possible fd leak and closing of dirs in doSafeMakeDir
2019-07-01 15:09: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