Skip to content

Commit

Permalink
Using jobSpec for queue e2e.
Browse files Browse the repository at this point in the history
Signed-off-by: Da K. Ma <klaus1982.cn@gmail.com>
  • Loading branch information
k82cn committed Oct 16, 2018
1 parent fb1c506 commit b51fb3d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/scheduler/cache/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,8 @@ func (sc *SchedulerCache) Snapshot() *arbapi.ClusterInfo {
}

if _, found := queues[value.Queue]; !found {
glog.V(3).Infof("The Queue of Job <%v> does not exist, ignore it.", value.UID)
glog.V(3).Infof("The Queue <%v> of Job <%v> does not exist, ignore it.",
value.Queue, value.UID)
continue
}

Expand Down
5 changes: 5 additions & 0 deletions pkg/scheduler/cache/event_handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,11 @@ func (sc *SchedulerCache) AddPodGroup(obj interface{}) {
sc.Mutex.Lock()
defer sc.Mutex.Unlock()

// If namespace as queue, the `.spec.Queue` of PodGroup is ignored.
if sc.namespaceAsQueue {
ss.Spec.Queue = ""
}

glog.V(4).Infof("Add PodGroup(%s) into cache, spec(%#v)", ss.Name, ss.Spec)
err := sc.setPodGroup(ss)
if err != nil {
Expand Down

0 comments on commit b51fb3d

Please sign in to comment.