Only schedule to pods that are available. #5545

This commit is contained in:
Robert Rati 2015-03-20 16:04:37 -04:00
parent 35b2c5ce9d
commit c2938b299d
2 changed files with 5 additions and 5 deletions

View File

@ -230,8 +230,8 @@ func (factory *ConfigFactory) pollMinions() (cache.Enumerator, error) {
} }
} else { } else {
// If no condition is set, we get unknown node condition. In such cases, // If no condition is set, we get unknown node condition. In such cases,
// we add nodes unconditionally. // do not add the node
nodes.Items = append(nodes.Items, node) glog.V(2).Infof("Minion %s is not available. Skipping", node.Name)
} }
} }
return &nodeEnumerator{nodes}, nil return &nodeEnumerator{nodes}, nil

View File

@ -220,7 +220,7 @@ func TestPollMinions(t *testing.T) {
}, },
}, },
}, },
expectedCount: 6, expectedCount: 5,
}, },
{ {
minions: []api.Node{ minions: []api.Node{
@ -262,7 +262,7 @@ func TestPollMinions(t *testing.T) {
}, },
}, },
}, },
expectedCount: 1, expectedCount: 0,
}, },
{ {
minions: []api.Node{ minions: []api.Node{
@ -299,7 +299,7 @@ func TestPollMinions(t *testing.T) {
}, },
}, },
}, },
expectedCount: 1, expectedCount: 0,
}, },
} }