-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
nomad job run -json
panics after successful registration of a periodic job when Job.Periodic.SpecType
is not defined
#13844
Labels
Projects
Milestone
Comments
Hi @tristanpemble! Thanks for the PR #13845. I've left some review comments there. |
tgross
pushed a commit
to tristanpemble/nomad
that referenced
this issue
Feb 1, 2023
tgross
pushed a commit
that referenced
this issue
Feb 1, 2023
hc-github-team-nomad-core
added a commit
that referenced
this issue
Feb 1, 2023
…nce into release/1.2.x (#16015) This pull request was automerged via backport-assistant
hc-github-team-nomad-core
added a commit
that referenced
this issue
Feb 1, 2023
…nce into release/1.3.x (#16016) This pull request was automerged via backport-assistant
hc-github-team-nomad-core
added a commit
that referenced
this issue
Feb 1, 2023
…nce into release/1.4.x (#16017) This pull request was automerged via backport-assistant
Fixed in #13845 which will ship in Nomad 1.5.0 (plus backports) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Nomad version
Nomad v1.3.1
Operating system and Environment details
Darwin 21.5.0 Darwin Kernel Version 21.5.0: Tue Apr 26 21:08:37 PDT 2022; root:xnu-8020.121.3~4/RELEASE_ARM64_T6000 arm64 arm unknown Darwin
Issue
When running an API formatted job file (JSON job) via
nomad job run -json
, and the job has a periodic spec, job registration succeeds, and then the command panics with a SIGSEGV.Reproduction steps
Create an API job with a
Periodic.Spec
, but do not definePeriodic.SpecType
. Run it withnomad job run -json
.Expected Result
The command completes successfully.
Actual Result
The command panics with a SIGSEGV
Job file (if appropriate)
Nomad Server logs (if appropriate)
Nomad Client logs (if appropriate)
Additional Information
I traced the issue down to the nil pointer here, which is called from this path.
This code is called after the job registration succeeds on the server. I believe the root of the issue is that when submitting an API job via the CLI, it is canonicalized server-side, but not client-side. Registration succeeds on the server, and then this code path is called. It references paths that have not been canonicalized with their default values, and fails.
I am new to this codebase, so unsure I have the best approach, but I am submitting a PR that resolved the issue for me.
The text was updated successfully, but these errors were encountered: