From 1bef7fdd04910375ef77334e974cd58aae233766 Mon Sep 17 00:00:00 2001 From: Justin Huff Date: Tue, 17 Jun 2014 15:48:37 -0700 Subject: [PATCH] FirstFitScheduler was triggering a panic by passing nil as the query to EtcdRegistry.ListPods. I think this was just missed during the recent label refactor. --- pkg/registry/scheduler.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/registry/scheduler.go b/pkg/registry/scheduler.go index 7d9a6f9db8a..bbe5c3ba40a 100644 --- a/pkg/registry/scheduler.go +++ b/pkg/registry/scheduler.go @@ -20,6 +20,7 @@ import ( "math/rand" "github.com/GoogleCloudPlatform/kubernetes/pkg/api" + "github.com/GoogleCloudPlatform/kubernetes/pkg/labels" ) // Scheduler is an interface implemented by things that know how to schedule pods onto machines. @@ -90,7 +91,7 @@ func (s *FirstFitScheduler) containsPort(pod api.Pod, port api.Port) bool { func (s *FirstFitScheduler) Schedule(pod api.Pod) (string, error) { machineToPods := map[string][]api.Pod{} - pods, err := s.registry.ListPods(nil) + pods, err := s.registry.ListPods(labels.Everything()) if err != nil { return "", err }