Merge pull request #5725 from rrati/schedule-to-available-nodes-5545

Only schedule to pods that are available.  This turns on the node
This commit is contained in:
Piotr Szczesniak 2015-03-27 10:20:35 +01:00
commit 8d94c43e70
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,
}, },
} }