Skip to content
This repository has been archived by the owner on May 25, 2023. It is now read-only.

master and worker start in order in a job #872

Closed
zlcnju opened this issue Jul 5, 2019 · 4 comments
Closed

master and worker start in order in a job #872

zlcnju opened this issue Jul 5, 2019 · 4 comments
Labels
area/question sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling.

Comments

@zlcnju
Copy link

zlcnju commented Jul 5, 2019

Is this a BUG REPORT or FEATURE REQUEST?:

/kind feature

Description:

I have a batch job that the worker pods shouldn't be schedulered until the master pod is in the running state. Is there any solution in kube-batch?

@zlcnju
Copy link
Author

zlcnju commented Jul 5, 2019

/help-wanted

@k82cn
Copy link
Contributor

k82cn commented Jul 5, 2019

For now, kube-batch support scheduling master pod firstly before worker pods, refer to https://github.com/volcano-sh/volcano/tree/master/docs/samples/kubecon-2019-china/task-priority . After scheduling, it dependent on kubelet to start them; it's better to have a retry in worker pod to wait master pod ready.

BTW, running does not mean master pod is ready to provide service to worker pod, as it dependent on logic in the process/container :)

@k82cn k82cn added area/question sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. labels Jul 5, 2019
@zlcnju
Copy link
Author

zlcnju commented Jul 5, 2019

For now, kube-batch support scheduling master pod firstly before worker pods, refer to https://github.com/volcano-sh/volcano/tree/master/docs/samples/kubecon-2019-china/task-priority . After scheduling, it dependent on kubelet to start them; it's better to have a retry in worker pod to wait master pod ready.

BTW, running does not mean master pod is ready to provide service to worker pod, as it dependent on logic in the process/container :)

If the priority is the schedule order, it doesn't solve the problem. Is it a good idea if i add an init container in the worker to check the master is ready to provide service?

@k82cn
Copy link
Contributor

k82cn commented Jul 5, 2019

If the priority is the schedule order, it doesn't solve the problem.

It's still necessary to make sure master pod get resources firstly :)

Is it a good idea if i add an init container in the worker to check the master is ready to provide service?

That should be ok.

@zlcnju zlcnju closed this as completed Jul 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/question sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling.
Projects
None yet
Development

No branches or pull requests

2 participants