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
Error getting job struct: Error parsing job file from /tmp/new1:
new1:2,5-10: Extraneous JSON object property; No argument or block type is named "Job". Did you mean "job"?
I took a look at how the UI is doing this, and it seems to submit the job as inspect retrieves it, so I suspect this is the CLI being overly picky about case.
The text was updated successfully, but these errors were encountered:
HCL is currently parsed entirely in the CLI. This is required for HCL2's ability to get environment variables and local files from the CLI's environment.
The nomad job run command currently accepts only HCL. There's no particular documentation that says otherwise, but I've opened docs: clarify HCL is parsed in CLI #10141 to make it explicit.
The output of nomad job inspect :jobid is the JSON jobs output. This is round-trippable to the Create Job HTTP API. (There's an integration test demonstrating this behavior as far back as e13f868 in 2017).
The only difference between the two is the Job wrapper in the JSON. See the examples below for a very simple workaround which should be feasible for any context in which you're manipulating JSON anyways.
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
v1.1.0
also tried v1.0.3
Operating system and Environment details
Debian 10
Issue
I expect that the job definitions retrieved through
nomad job inspect
are valid for re-submissionIn my use case, I want to stop/start jobs through the CLI
Reproduction steps
Expected Result
Nomad successfully reschedules the job
Actual Result
I took a look at how the UI is doing this, and it seems to submit the job as inspect retrieves it, so I suspect this is the CLI being overly picky about case.
The text was updated successfully, but these errors were encountered: