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

rkt env vars are quoted #2686

Closed
schmichael opened this issue Jun 3, 2017 · 4 comments
Closed

rkt env vars are quoted #2686

schmichael opened this issue Jun 3, 2017 · 4 comments

Comments

@schmichael
Copy link
Member

Because of the %q here rkt env vars values are still quoted: https://github.com/hashicorp/nomad/blob/master/client/driver/rkt.go#L314

@legeyda reported in gitter that env { CONSUL_HTTP_ADDR = "${NOMAD_IP_app}:8500" } sets the environment variables to "10.0.2.15:8500" (note the literal quotes) when it should be 10.0.2.15:8500.

This may be as simple as switching %q to %s but requires some testing first.

@blalor
Copy link
Contributor

blalor commented Jun 29, 2017

I've been meaning to report this for some time. For some reason it hasn't impacted my applications, but it is a problem when I rkt enter a Nomad-invoked container. Thanks!

@schmichael
Copy link
Member Author

Looks like it was as easy as changing %q to %s! Sorry for the delay. A test binary if you want it:

linux_amd64.zip

@kmalec
Copy link
Contributor

kmalec commented Jul 5, 2017

When I tested that, with %s it only could support single-line vars without any escape chars; having \n there broke rkt enter for example (since their env parser reads line by line, looking for ENV=VALUE strings strictly). I was testing with yours crazy multiline env we discussed some time ago on gitter.

@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 Dec 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants