Skip to content

Commit

Permalink
Only schedule to pods that are available. kubernetes#5545
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Rati committed Mar 26, 2015
1 parent 35b2c5c commit c2938b2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions plugin/pkg/scheduler/factory/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions plugin/pkg/scheduler/factory/factory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ func TestPollMinions(t *testing.T) {
},
},
},
expectedCount: 6,
expectedCount: 5,
},
{
minions: []api.Node{
Expand Down Expand Up @@ -262,7 +262,7 @@ func TestPollMinions(t *testing.T) {
},
},
},
expectedCount: 1,
expectedCount: 0,
},
{
minions: []api.Node{
Expand Down Expand Up @@ -299,7 +299,7 @@ func TestPollMinions(t *testing.T) {
},
},
},
expectedCount: 1,
expectedCount: 0,
},
}

Expand Down

0 comments on commit c2938b2

Please sign in to comment.