Skip to content
This repository has been archived by the owner on Oct 11, 2023. It is now read-only.

ros config usage comma-separated list in variable #802

Closed
tallandtree opened this issue Mar 9, 2016 · 2 comments
Closed

ros config usage comma-separated list in variable #802

tallandtree opened this issue Mar 9, 2016 · 2 comments
Assignees
Milestone

Comments

@tallandtree
Copy link

I can't figure out how to add a no_proxy with multiple (comma-separated) hostnames via ros config set:

I've tried variants of:
ros config set rancher.docker.environment [HTTP_PROXY=http://proxy:8080,HTTPS_PROXY=http://proxy:8080,NO_PROXY=localhost,127.0.0.1]

which yields to (cloud-config.yml):
rancher:
docker:
environment:
- HTTP_PROXY=http://proxy:8080
- HTTPS_PROXY=http://proxy:8080
- NO_PROXY=localhost
- 127.0.0.1

I've tried with single/double quotes, escaping the comma, etc, but nothing seems to work. So, edited the cloud-config.yml directly.

@deniseschannon
Copy link

Used the same command as the example

sudo ros config set rancher.docker.environment [HTTP_PROXY=http://proxy:8080,HTTPS_PROXY=http://proxy:8080,NO_PROXY=localhost,127.0.0.1]

It seems to get set incorrectly in the cloud-config.yml

[rancher@rancher ~]$ sudo cat /var/lib/rancher/conf/cloud-config.yml 
rancher:
  docker:
    environment: '[HTTP_PROXY=http://proxy:8080,HTTPS_PROXY=http://proxy:8080,NO_PROXY=localhost,127.0.0.1]'

And based on how it gets set, I can't export the config

[rancher@rancher ~]$ sudo ros config export
ERRO[0000] Failed [1/2] 50%                             
FATA[0000] Cannot resolve [HTTP_PROXY=http://proxy:8080,HTTPS_PROXY=http://proxy:8080,NO_PROXY=localhost,127.0.0.1] into <[]string Value> at line 2, column 17

@deniseschannon
Copy link

Spoke with @joshwget. There needs to be double quotes around the array and single quotes around each item for it get set correctly.

sudo ros config set rancher.docker.environment "['HTTP_PROXY=http://proxy:8080', 'HTTP_PROXY=http://proxy:8080', 'NO_PROXY=localhost,127.0.0.1']"

Verified working with the above syntax using v0.4.5-rc2.

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