Skip to content
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

JSON Plugin config in 0.9-rc1 non functional #5484

Closed
benagricola opened this issue Mar 28, 2019 · 2 comments · Fixed by #5489
Closed

JSON Plugin config in 0.9-rc1 non functional #5484

benagricola opened this issue Mar 28, 2019 · 2 comments · Fixed by #5489

Comments

@benagricola
Copy link

Not sure if this is a question or a bug 🙂

Nomad version

Nomad v0.9.0-rc1 (7c00ab4f3f37cfd1e258b38fd2ad99e7bc23e4c3)

Issue

Cannot enable docker privileged containers, or raw_exec using JSON configuration. Based on the example HCL configs, AIUI I should be able to do the following:

/etc/nomad.d/plugins.json:

{
    "plugin": {
        "docker": {
            "config": {
                "allow_privileged": true
            }
        },
        "raw_exec": {
            "config": {
                "enabled": true
            }
        }
    }
}

Based on the configSpec defined in both plugins this looks correct, but errors on start:

 error parsing 'config': plugin-> invalid keys in plugin config 1: 1 error(s) occurred
  * invalid key: allow_privileged 

Removing the contents of the config block (leaving it an empty object) and I get error parsing 'config': plugin-> plugin config 1 doesn't incude a name key instead.

I've also tried making plugin a list of objects, and various other formats, and none of them work - I'm lost.

Is this supposed to work? If so, what is the correct JSON format? I can't find any tests which use a JSON config to set those settings so there's nothing to go off here except trying to read the code.

We currently use JSON configs with a 0.8.7 cluster and I'm trying to get ahead of the curve prepping our deployment setup to handle 0.9 properly.

@preetapan
Copy link
Contributor

@benagricola Thanks for the report, this turned out to be an edge case in json parsing that only affects the plugin configuration. We will fix this for the final release.

@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants