Skip to content

Commit

Permalink
eliminate wait with no nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
deads2k committed Mar 10, 2015
1 parent 56cbe6c commit 91b92eb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/cloudprovider/controller/nodecontroller.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,10 @@ func (s *NodeController) Run(period time.Duration, syncNodeList, syncNodeStatus

// RegisterNodes registers the given list of nodes, it keeps retrying for `retryCount` times.
func (s *NodeController) RegisterNodes(nodes *api.NodeList, retryCount int, retryInterval time.Duration) error {
if len(nodes.Items) == 0 {
return nil
}

registered := util.NewStringSet()
nodes = s.canonicalizeName(nodes)
for i := 0; i < retryCount; i++ {
Expand Down

0 comments on commit 91b92eb

Please sign in to comment.