You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Nomad cluster running across a handful of Linux hosts (kernel 3.6, Debian 8).
Issue
When a periodic job with invalid syntax is submitted, e.g.:
"Spec": "1 15-0 * * 1-5",
"SpecType": "cron"
The underlying cron library (gorhill/cronexpr#35) throws an Index out of range panic. It's the expected behavior by the library (and confirmed by the maintainer), 15-0 is incorrect cron syntax and the library doesn't guarantee behavior for invalid syntax.
However, this makes Nomad get the panic when trying to schedule the job, and they all went into a crash loop:
Not sure what the steps are going forward - if there's Nomad-side validation of cron syntax, then why rely on a third-party cron library? Is panic-catching considered idiomatic Go?
I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Nomad version
Nomad v0.7.1 (0b295d399d00199cfab4621566babd25987ba06e)
Operating system and Environment details
Nomad cluster running across a handful of Linux hosts (kernel 3.6, Debian 8).
Issue
When a periodic job with invalid syntax is submitted, e.g.:
The underlying cron library (gorhill/cronexpr#35) throws an Index out of range panic. It's the expected behavior by the library (and confirmed by the maintainer),
15-0
is incorrect cron syntax and the library doesn't guarantee behavior for invalid syntax.However, this makes Nomad get the panic when trying to schedule the job, and they all went into a crash loop:
Not sure what the steps are going forward - if there's Nomad-side validation of cron syntax, then why rely on a third-party cron library? Is panic-catching considered idiomatic Go?
Reproduction steps
Pass a periodic job with invalid cron syntax.
Nomad Server logs (if appropriate)
The text was updated successfully, but these errors were encountered: