Commit 91b92eba authored by deads2k's avatar deads2k

eliminate wait with no nodes

parent 56cbe6c5
......@@ -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++ {
......
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