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
faffbe4e
Commit
faffbe4e
authored
Aug 07, 2016
by
Kubernetes Submit Queue
Committed by
GitHub
Aug 07, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #29622 from rootfs/rbd-ro
Automatic merge from submit-queue allow a read-only rbd image mounted by multiple pods allow pod to run read-only rbd volume fix #27725
parents
e19ea41a
730db45e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
predicates.go
plugin/pkg/scheduler/algorithm/predicates/predicates.go
+4
-1
No files found.
plugin/pkg/scheduler/algorithm/predicates/predicates.go
View file @
faffbe4e
...
@@ -121,7 +121,10 @@ func isVolumeConflict(volume api.Volume, pod *api.Pod) bool {
...
@@ -121,7 +121,10 @@ func isVolumeConflict(volume api.Volume, pod *api.Pod) bool {
if
volume
.
RBD
!=
nil
&&
existingVolume
.
RBD
!=
nil
{
if
volume
.
RBD
!=
nil
&&
existingVolume
.
RBD
!=
nil
{
mon
,
pool
,
image
:=
volume
.
RBD
.
CephMonitors
,
volume
.
RBD
.
RBDPool
,
volume
.
RBD
.
RBDImage
mon
,
pool
,
image
:=
volume
.
RBD
.
CephMonitors
,
volume
.
RBD
.
RBDPool
,
volume
.
RBD
.
RBDImage
emon
,
epool
,
eimage
:=
existingVolume
.
RBD
.
CephMonitors
,
existingVolume
.
RBD
.
RBDPool
,
existingVolume
.
RBD
.
RBDImage
emon
,
epool
,
eimage
:=
existingVolume
.
RBD
.
CephMonitors
,
existingVolume
.
RBD
.
RBDPool
,
existingVolume
.
RBD
.
RBDImage
if
haveSame
(
mon
,
emon
)
&&
pool
==
epool
&&
image
==
eimage
{
// two RBDs images are the same if they share the same Ceph monitor, are in the same RADOS Pool, and have the same image name
// only one read-write mount is permitted for the same RBD image.
// same RBD image mounted by multiple Pods conflicts unless all Pods mount the image read-only
if
haveSame
(
mon
,
emon
)
&&
pool
==
epool
&&
image
==
eimage
&&
!
(
volume
.
RBD
.
ReadOnly
&&
existingVolume
.
RBD
.
ReadOnly
)
{
return
true
return
true
}
}
}
}
...
...
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