Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
c82d4129
Commit
c82d4129
authored
Nov 29, 2017
by
Hemant Kumar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not resize file system on a read-only mount
parent
c0353ca2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
operation_generator.go
pkg/volume/util/operationexecutor/operation_generator.go
+8
-0
No files found.
pkg/volume/util/operationexecutor/operation_generator.go
View file @
c82d4129
...
...
@@ -544,6 +544,7 @@ func (og *operationGenerator) resizeFileSystem(volumeToMount VolumeToMount, devi
glog
.
V
(
6
)
.
Infof
(
"Resizing is not enabled for this volume %s"
,
volumeToMount
.
VolumeName
)
return
nil
}
mounter
:=
og
.
volumePluginMgr
.
Host
.
GetMounter
(
pluginName
)
// Get expander, if possible
expandableVolumePlugin
,
_
:=
...
...
@@ -565,6 +566,13 @@ func (og *operationGenerator) resizeFileSystem(volumeToMount VolumeToMount, devi
// File system resize was requested, proceed
glog
.
V
(
4
)
.
Infof
(
volumeToMount
.
GenerateMsgDetailed
(
"MountVolume.resizeFileSystem entering"
,
fmt
.
Sprintf
(
"DevicePath %q"
,
volumeToMount
.
DevicePath
)))
if
volumeToMount
.
VolumeSpec
.
ReadOnly
{
simpleMsg
,
detailedMsg
:=
volumeToMount
.
GenerateMsg
(
"MountVolume.resizeFileSystem failed"
,
"requested read-only file system"
)
glog
.
Warningf
(
detailedMsg
)
og
.
recorder
.
Eventf
(
volumeToMount
.
Pod
,
v1
.
EventTypeWarning
,
kevents
.
FileSystemResizeFailed
,
simpleMsg
)
return
nil
}
diskFormatter
:=
&
mount
.
SafeFormatAndMount
{
Interface
:
mounter
,
Exec
:
og
.
volumePluginMgr
.
Host
.
GetExec
(
expandableVolumePlugin
.
GetPluginName
()),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment