Commit Graph

27 Commits

Author SHA1 Message Date
houjun
7458399f77 Fix the wrong log 2021-11-17 09:07:07 +08:00
Hemant Kumar
27d1e9a4e2 Remove all references to ConfigurableFSGroupPolicy feature gate 2021-11-10 14:24:08 -05:00
Stephen Augustus
481cf6fbe7
generated: Run hack/update-gofmt.sh
Signed-off-by: Stephen Augustus <foo@auggie.dev>
2021-08-24 15:47:49 -04:00
huchengze
334b31faf6 migrate log in pkg/volume/volume_linux.go 2021-03-11 09:16:03 +08:00
Jiawei Wang
6a7222cf4e Add migrated field to storage_operation_duration_seconds metric 2021-02-12 17:35:01 -08:00
Mauricio Vásquez
7d293e3efa volume: Change owner of symlinks too
This commit uses Lchown instead of Chown to change the owner of symlinks too.
It doesn't change any behaviour. However, it could avoid some confusions as the
symlinks are updated to the correct owner too.
2020-11-11 08:32:46 -05:00
jornshen
4ed7709774 Report a metric for time taken to perform recursive permission change 2020-10-26 21:04:30 +08:00
José Guilherme Vanz
5ebb1c3be2
cleanup: print warning message after timeout
If a pod has a configmap/secret volume an annoying message shows up
in the log approximately every 70 seconds. This happens because the
desiredStateOfWorldPopulator sync loop always call the
MarkRemountRequired. The function finds the volume plugin and check
if the plugin requires mount. Configmap and secret plugins always
returns true for that. Thus, the reconciler code of the volume manager
remounts the volume every time. This commit change the SetVolumeOwnership
to print the warning only if the function does not finish within 30
seconds.

Signed-off-by: José Guilherme Vanz <jguilhermevanz@suse.com>
2020-07-20 22:46:11 -03:00
José Guilherme Vanz
08ccbe6f0e
Revert "cleanup: decrease log level from warn to v3"
This reverts commit ebece49936e635f151fdd8a64fa2b77fd183e817.
2020-07-20 22:46:11 -03:00
José Guilherme Vanz
9b9dcf3d84
cleanup: decrease log level from warn to v3
If a pod has a configmap/secret volume an annoying message shows up
in the log approximately every 70 seconds. This happens because the
desiredStateOfWorldPopulator sync loop always call the
MarkRemountRequired. The function finds the volume plugin and check
if the plugin requires mount. Configmap and secret plugins always
returns true for that. Thus, the reconciler code of the volume manager
remounts the volume every time. This commit decrease the log level of
that message in the mount function from warning to V4.

Signed-off-by: José Guilherme Vanz <jguilhermevanz@suse.com>
2020-07-20 22:46:11 -03: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
Hemant Kumar
b132959687 Start adding tests for verifying correct modes
Add an example for permission bits checking
2020-03-05 08:00:27 -05: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
David Zhu
223ef76db5 Dedupe logging for PD SetUpAt and added a slow SetVolumeOwnership warning 2019-10-03 11:10:20 -07:00
Maximilian Gaß
7a9f21bbb8 Ensure directories are executable for fsGroup 2019-01-30 18:07:38 +01:00
Davanum Srinivas
954996e231
Move from glog to klog
- Move from the old github.com/golang/glog to k8s.io/klog
- klog as explicit InitFlags() so we add them as necessary
- we update the other repositories that we vendor that made a similar
change from glog to klog
  * github.com/kubernetes/repo-infra
  * k8s.io/gengo/
  * k8s.io/kube-openapi/
  * github.com/google/cadvisor
- Entirely remove all references to glog
- Fix some tests by explicit InitFlags in their init() methods

Change-Id: I92db545ff36fcec83afe98f550c9e630098b3135
2018-11-10 07:50:31 -05:00
Yecheng Fu
3748197876 Add more volume types in e2e and fix part of them.
- Add dir-link/dir-bindmounted/dir-link-bindmounted/blockfs volume types for e2e
tests.
- Return error if we cannot resolve volume path.
- Add GetFSGroup/GetMountRefs methods for mount.Interface.
- Fix fsGroup related e2e tests partially.
2018-05-02 10:31:42 +08:00
Serguei Bezverkhi
f2e89886a1 Fixes cross platform build failure
Closes #51358
2017-08-26 09:58:51 -04:00
mbohlool
c91a12d205 Remove all references to types.UnixUserID and types.UnixGroupID 2017-06-21 04:09:07 -07:00
Jamie Hannaford
9440a68744 Use dedicated Unix User and Group ID types 2017-05-05 14:07:38 +02:00
Rodrigo Campos
2eb1583e4b Remove unused chmod/chown abstractions
These abstractions have not been used since I first hacked into
kubernetes, so let's just remove them and add them back if it's needed
later.
2017-04-23 20:25:23 -03:00
Seth Jennings
51ae5a34b9 fix permissions when using fsGroup 2016-12-06 14:04:16 -06:00
Seth Jennings
67f3134232 Avoid setting S_ISGID on files in volumes.
Directories in volumes are set S_ISGID to ensure files created inside
them inherit group ownership.  Currently, files are also set S_ISGID
however this is not relevant to the original intent, and indicates
'mandatory file locking' (stat(2)).

With this commit, only directories are set S_ISGID.
2016-11-07 14:18:32 -06:00
David McMahon
ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
saadali
79012f6d53 Rename volume.Builder to Mounter and volume.Cleaner to Unmounter 2016-03-25 11:29:58 -07:00
Chao Xu
c72d234bbf replacing handwritten client in several controllers 2016-01-31 15:42:02 -08:00
Sami Wagiaalla
e33e4ae055 Move manageVolumeOwnership to pkg/volume/volume.go 2016-01-13 10:36:59 -05:00