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
0b1d61db
Commit
0b1d61db
authored
Jul 21, 2017
by
Hemant Kumar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix controller crash because of nil volume spec
For volumes that don't support bulk volume verifiction, a nil volume spec can cause crash of controller.
parent
3bae345a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
operation_generator.go
pkg/volume/util/operationexecutor/operation_generator.go
+4
-0
No files found.
pkg/volume/util/operationexecutor/operation_generator.go
View file @
0b1d61db
...
...
@@ -115,6 +115,10 @@ func (og *operationGenerator) GenerateVolumesAreAttachedFunc(
volumeSpecMap
:=
make
(
map
[
*
volume
.
Spec
]
v1
.
UniqueVolumeName
)
// Iterate each volume spec and put them into a map index by the pluginName
for
_
,
volumeAttached
:=
range
attachedVolumes
{
if
volumeAttached
.
VolumeSpec
==
nil
{
glog
.
Errorf
(
"VerifyVolumesAreAttached.GenerateVolumesAreAttachedFunc: nil spec for volume %s"
,
volumeAttached
.
VolumeName
)
continue
}
volumePlugin
,
err
:=
og
.
volumePluginMgr
.
FindPluginBySpec
(
volumeAttached
.
VolumeSpec
)
if
err
!=
nil
||
volumePlugin
==
nil
{
...
...
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