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

Test and document behavior of merging agent plugin.config stanzas #9382

Closed
schmichael opened this issue Nov 17, 2020 · 2 comments · Fixed by #9680
Closed

Test and document behavior of merging agent plugin.config stanzas #9382

schmichael opened this issue Nov 17, 2020 · 2 comments · Fixed by #9680
Assignees

Comments

@schmichael
Copy link
Member

Nomad version

v0.12.8

Issue

Given 2 agent config files:

00-docker.hcl

plugin "docker" {
  config {
    volumes {
      enabled = true
    }
  }
}

01-docker.hcl

plugin "docker" {
  config {
    endpoint = "unix:///var/run/docker.sock"
   }
}

Is the merged config additive:

plugin["docker"].config.volumes.enabled = true
plugin["docker"].config.endpoint = "..."

Or Last Write Wins:

plugin["docker"].config.endpoint = "..."

The former (merged) is expected, but we may be better off updating documentation than breaking backward compatibility.

@tgross tgross added the theme/docs Documentation issues and enhancements label Nov 19, 2020
@tgross tgross self-assigned this Dec 18, 2020
@tgross
Copy link
Member

tgross commented Dec 18, 2020

Configuration file file1.hcl:

plugin "docker" {
  config {
    allow_privileged = true
  }
}

Configuration file file2.hcl:

plugin "docker" {
  config {
    volumes {
      enabled = true
    }
  }
}

Results, which demonstrate that we don't merge:

$ nomad node status -self -verbose | grep docker
docker       true      true     Healthy  2020-12-18T16:19:48Z
driver.docker                 = 1
driver.docker.bridge_ip       = 172.17.0.1
driver.docker.os_type         = linux
driver.docker.runtimes        = runc
driver.docker.version         = 19.03.8
driver.docker.volumes.enabled = true

Working up docs for this now. It looks like this behavior is inconsistent... it applies to plugins but not, for example advertise.

@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 Oct 26, 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