Wait for nodes to be ready after cluster resizing

This commit is contained in:
Wojciech Tyczynski 2015-07-06 11:53:34 +02:00
parent bb6f2f7ad9
commit 977a775a6f

View File

@ -124,6 +124,11 @@ func waitForClusterSize(c *client.Client, size int) error {
Logf("Failed to list nodes: %v", err)
continue
}
// Filter out not-ready nodes.
filterNodes(nodes, func(node api.Node) bool {
return isNodeReadySetAsExpected(&node, true)
})
if len(nodes.Items) == size {
Logf("Cluster has reached the desired size %d", size)
return nil