-
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
panic parsing JSON config file #1290
Comments
the exact thing happens with the following json after adding the client key - |
same happens for me |
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. |
Nomad version
0.3.2
0.4.0-rc1
Operating system and Environment details
CentOS 7 64-bit
Ubuntu 16.04 64-bit
Issue
When a config file:
Nomad agent panics with an index-out-of-range.
Reproduction steps
Nomad Client logs
RCA
I'm no go expert, but looking at
https://github.com/hashicorp/nomad/blob/v0.4.0-rc1/command/agent/config_parse.go#L144
I'd say the
client
section gets detected & passed on to https://github.com/hashicorp/nomad/blob/v0.4.0-rc1/command/agent/config_parse.go#L298 which is the source of the panic.So, considering
o := list.Filter("any-section"); len(o.Items) > 0
ando.Elem().Items[0]
eventually does not exist, but only for JSON, I'm pretty stumped.The weird thing is, analysing further it only happens if there's a single dict in the section, this will bork:
and this will work (as in config error of course):
The text was updated successfully, but these errors were encountered: