diff --git a/pkg/scheduler/cache/cache.go b/pkg/scheduler/cache/cache.go index c004ca1dd..b47aa026a 100644 --- a/pkg/scheduler/cache/cache.go +++ b/pkg/scheduler/cache/cache.go @@ -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 } diff --git a/pkg/scheduler/cache/event_handlers.go b/pkg/scheduler/cache/event_handlers.go index 943d22bcc..5d54736c7 100644 --- a/pkg/scheduler/cache/event_handlers.go +++ b/pkg/scheduler/cache/event_handlers.go @@ -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 {