Commit c2938b29 authored by Robert Rati's avatar Robert Rati

Only schedule to pods that are available. #5545

parent 35b2c5ce
......@@ -230,8 +230,8 @@ func (factory *ConfigFactory) pollMinions() (cache.Enumerator, error) {
}
} else {
// If no condition is set, we get unknown node condition. In such cases,
// we add nodes unconditionally.
nodes.Items = append(nodes.Items, node)
// do not add the node
glog.V(2).Infof("Minion %s is not available. Skipping", node.Name)
}
}
return &nodeEnumerator{nodes}, nil
......
......@@ -220,7 +220,7 @@ func TestPollMinions(t *testing.T) {
},
},
},
expectedCount: 6,
expectedCount: 5,
},
{
minions: []api.Node{
......@@ -262,7 +262,7 @@ func TestPollMinions(t *testing.T) {
},
},
},
expectedCount: 1,
expectedCount: 0,
},
{
minions: []api.Node{
......@@ -299,7 +299,7 @@ func TestPollMinions(t *testing.T) {
},
},
},
expectedCount: 1,
expectedCount: 0,
},
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment