From 882462ad870de1ce5547f75e95f5ac9ca1ab990c Mon Sep 17 00:00:00 2001 From: Jonathan Wills Date: Mon, 1 Jun 2015 08:13:48 -0400 Subject: [PATCH] Change isVolumeConflict so read-only gce persistent disks don't conflict with each other --- plugin/pkg/scheduler/algorithm/predicates/predicates.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugin/pkg/scheduler/algorithm/predicates/predicates.go b/plugin/pkg/scheduler/algorithm/predicates/predicates.go index c1a5d3cf99c..a271aed510f 100644 --- a/plugin/pkg/scheduler/algorithm/predicates/predicates.go +++ b/plugin/pkg/scheduler/algorithm/predicates/predicates.go @@ -52,12 +52,13 @@ func (nodes ClientNodeInfo) GetNodeInfo(nodeID string) (*api.Node, error) { func isVolumeConflict(volume api.Volume, pod *api.Pod) bool { if volume.GCEPersistentDisk != nil { - pdName := volume.GCEPersistentDisk.PDName + disk := volume.GCEPersistentDisk manifest := &(pod.Spec) for ix := range manifest.Volumes { if manifest.Volumes[ix].GCEPersistentDisk != nil && - manifest.Volumes[ix].GCEPersistentDisk.PDName == pdName { + manifest.Volumes[ix].GCEPersistentDisk.PDName == disk.PDName && + !(manifest.Volumes[ix].GCEPersistentDisk.ReadOnly && disk.ReadOnly) { return true } }