Skip to content

Commit

Permalink
Merge pull request #43837 from mikedanese/automated-cherry-pick-of-#4…
Browse files Browse the repository at this point in the history
…3835-release-1.6

Automatic merge from submit-queue

Automated cherry pick of #43835 release 1.6

Automated cherry pick of #43835 release 1.6

fixes: #43815
  • Loading branch information
Kubernetes Submit Queue committed Mar 31, 2017
2 parents 3ce5a2b + f6cf925 commit 90f0bbf
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions cmd/kubeadm/app/master/apiclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func CreateClientAndWaitForAPI(file string) (*clientset.Clientset, error) {
fmt.Println("[apiclient] Created API client, waiting for the control plane to become ready")
WaitForAPI(client)

fmt.Println("[apiclient] Waiting for at least one node to register and become ready")
fmt.Println("[apiclient] Waiting for at least one node to register")
start := time.Now()
wait.PollInfinite(kubeadmconstants.APICallRetryInterval, func() (bool, error) {
nodeList, err := client.Nodes().List(metav1.ListOptions{})
Expand All @@ -55,20 +55,11 @@ func CreateClientAndWaitForAPI(file string) (*clientset.Clientset, error) {
if len(nodeList.Items) < 1 {
return false, nil
}
n := &nodeList.Items[0]
if !v1.IsNodeReady(n) {
fmt.Println("[apiclient] First node has registered, but is not ready yet")
return false, nil
}

fmt.Printf("[apiclient] First node is ready after %f seconds\n", time.Since(start).Seconds())
fmt.Printf("[apiclient] First node has registered after %f seconds\n", time.Since(start).Seconds())
return true, nil
})

if err := createAndWaitForADummyDeployment(client); err != nil {
return nil, err
}

return client, nil
}

Expand Down

0 comments on commit 90f0bbf

Please sign in to comment.