Skip to content
This repository has been archived by the owner on Apr 17, 2019. It is now read-only.

[rescheduler] actually wait for pod to be scheduled #1630

Merged
merged 1 commit into from
Aug 26, 2016

Conversation

piosz
Copy link
Contributor

@piosz piosz commented Aug 26, 2016

@piosz
Copy link
Contributor Author

piosz commented Aug 26, 2016

cc @mwielgus

glog.Infof("Waiting for pod %s to be scheduled", podId(pod))
time.Sleep(10 * time.Minute)
func waitForScheduled(client *kube_client.Client, podsBeingProcessed *podSet, pod *kube_api.Pod) {
for start := time.Now(); time.Since(start) < *podScheduledTimeout; time.Sleep(10 * time.Second) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if you already have this dependency in contrib (and if not how easy it is to import it), but it would be great if you could use:
wait.Poll(...)
from: https://github.com/kubernetes/kubernetes/blob/master/pkg/util/wait/wait.go#L158
function instead.

Also, please make the sleep smaller (like 500ms or sth like that).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@wojtek-t wojtek-t added the lgtm Indicates that a PR is ready to be merged. label Aug 26, 2016
@wojtek-t
Copy link
Contributor

LGTM

@k8s-github-robot
Copy link

Automatic merge from submit-queue

@k8s-github-robot k8s-github-robot merged commit 3bdca8e into kubernetes-retired:master Aug 26, 2016
@piosz piosz deleted the events branch August 26, 2016 08:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants