-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Periodic dispatcher #540
Periodic dispatcher #540
Conversation
Awesome work @dadgar, I'm going to test this PR as soon as possible. |
8eff2c4
to
c01b8e7
Compare
When periodic jobs are created (i.e. nomad run periodic.hcl), the CLI does not show evaluation details similar to batch or service jobs. Is it expected? Similarly status for jobs also show , i was expecting that to show either next trigger time or something else, and probably previous allocations etc. |
@ranjib: It is expected that the CLI doesn't show eval details on periodic jobs. This is because periodic jobs never have an evaluation associated with them. They will spawn child jobs that will have evals but they themselves never do. As for |
@dadgar 🎉 One more thing, system jobs cant be periodic? like we cant use nomad to run chef periodically on all hosts? |
@ranjib: Currently (and for the foreseeable future) there will not be periodic system jobs. You could probably create the behavior by registering a system job and on the interval you need to run chef, do an update to the job that would force Nomad to rerun the job (changing args would do it). |
I started testing this branch using the |
@c4milo: Yeah that isn't actually a problem with this PR. It is a bigger problem in general. We aren't freeing up the resources consumed by an alloc even when it is terminal in certain cases. This will be fixed by a PR I am working on now. Should be done soon. |
|
||
// PeriodicSpecTest is only used by unit tests. It is a sorted, comma | ||
// seperated list of unix timestamps at which to launch. | ||
PeriodicSpecTest = "test" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given this behavior, maybe it should just be called "fixed" since it runs at fixed times. Otherwise, maybe pick something less likely to be accidentally used, e.g. "_internal_test"
…ce to the periodicDispatcher
👯 |
This is a beautiful christmas gift 🎄 |
I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions. |
This PR adds support for running periodic jobs. It provides an at-most once run guarantee even across leadership transitions.
A follow up PR is needed to force run a periodic job.