2018-05-25 20:29:04 |
Dmitrii Shcherbakov |
description |
It is possible to have both no-proxy and juju-no-proxy configured while it isn't for juju-http(s)-proxy and http(s)-proxy (ERROR cannot specify both legacy proxy values and juju proxy values).
The expected behavior is that all settings are mutually exclusive.
# bionic client, xenial hosts
ubuntu@proxytest:~$ juju --version
2.4-beta3-bionic-amd64
ubuntu@proxytest:~$ juju model-config -m controller | grep proxy
apt-ftp-proxy default ""
apt-http-proxy model http://10.10.10.88:3128
apt-https-proxy model http://10.10.10.88:3128
apt-no-proxy default ""
ftp-proxy default ""
http-proxy model http://10.10.10.88:3128
https-proxy model http://10.10.10.88:3128
juju-ftp-proxy default ""
juju-http-proxy default ""
juju-https-proxy default ""
juju-no-proxy default 127.0.0.1,localhost,::1
no-proxy model localhost,127.0.0.1,10.10.101.0/24,10.10.10.0/24
proxy-ssh default false
ubuntu@proxytest:~$ juju model-config | grep proxy
apt-ftp-proxy default ""
apt-http-proxy model http://10.10.10.88:3128
apt-https-proxy model http://10.10.10.88:3128
apt-no-proxy default ""
ftp-proxy default ""
http-proxy model http://10.10.10.88:3128
https-proxy model http://10.10.10.88:3128
juju-ftp-proxy default ""
juju-http-proxy default ""
juju-https-proxy default ""
juju-no-proxy default 127.0.0.1,localhost,::1
no-proxy model localhost,127.0.0.1,10.10.101.0/24,10.10.10.0/24
proxy-ssh default false
ubuntu@proxytest:~$ cat model-config-mixed-noproxy.yaml
no-proxy: 'localhost,127.0.0.1,10.10.101.0/24,10.10.10.0/24'
http-proxy: ''
https-proxy: ''
juju-no-proxy: 'localhost,127.0.0.1,10.10.101.0/24,10.10.10.0/24'
juju-http-proxy: 'http://10.10.10.88:3128'
juju-https-proxy: 'http://10.10.10.88:3128'
apt-http-proxy: 'http://10.10.10.88:3128'
apt-https-proxy: 'http://10.10.10.88:3128'
ubuntu@proxytest:~$ juju model-config model-config-mixed-noproxy.yaml
ubuntu@proxytest:~$ juju model-config | grep proxy
apt-ftp-proxy default ""
apt-http-proxy model http://10.10.10.88:3128
apt-https-proxy model http://10.10.10.88:3128
apt-no-proxy default ""
ftp-proxy default ""
http-proxy default ""
https-proxy default ""
juju-ftp-proxy default ""
juju-http-proxy model http://10.10.10.88:3128
juju-https-proxy model http://10.10.10.88:3128
juju-no-proxy model localhost,127.0.0.1,10.10.101.0/24,10.10.10.0/24
no-proxy model localhost,127.0.0.1,10.10.101.0/24,10.10.10.0/24
proxy-ssh default false
ubuntu@proxytest:~$ juju run --unit ubuntu/0 'env | grep PROXY'
JUJU_CHARM_FTP_PROXY=
JUJU_CHARM_HTTP_PROXY=http://10.10.10.88:3128
JUJU_CHARM_HTTPS_PROXY=http://10.10.10.88:3128
JUJU_CHARM_NO_PROXY=localhost,127.0.0.1,10.10.101.0/24,10.10.10.0/24 |
It is possible to have both no-proxy and juju-no-proxy configured while it isn't for juju-http(s)-proxy and http(s)-proxy (ERROR cannot specify both legacy proxy values and juju proxy values).
The expected behavior is that all settings are mutually exclusive.
# bionic client, xenial hosts
ubuntu@proxytest:~$ juju --version
2.4-beta3-bionic-amd64
ubuntu@proxytest:~$ juju model-config -m controller | grep proxy
apt-ftp-proxy default ""
apt-http-proxy model http://10.10.10.88:3128
apt-https-proxy model http://10.10.10.88:3128
apt-no-proxy default ""
ftp-proxy default ""
http-proxy model http://10.10.10.88:3128
https-proxy model http://10.10.10.88:3128
juju-ftp-proxy default ""
juju-http-proxy default ""
juju-https-proxy default ""
juju-no-proxy default 127.0.0.1,localhost,::1
no-proxy model localhost,127.0.0.1,10.10.101.0/24,10.10.10.0/24
proxy-ssh default false
ubuntu@proxytest:~$ juju model-config | grep proxy
apt-ftp-proxy default ""
apt-http-proxy model http://10.10.10.88:3128
apt-https-proxy model http://10.10.10.88:3128
apt-no-proxy default ""
ftp-proxy default ""
http-proxy model http://10.10.10.88:3128
https-proxy model http://10.10.10.88:3128
juju-ftp-proxy default ""
juju-http-proxy default ""
juju-https-proxy default ""
juju-no-proxy default 127.0.0.1,localhost,::1
no-proxy model localhost,127.0.0.1,10.10.101.0/24,10.10.10.0/24
proxy-ssh default false
ubuntu@proxytest:~$ cat model-config-mixed-noproxy.yaml
no-proxy: 'localhost,127.0.0.1,10.10.101.0/24,10.10.10.0/24'
http-proxy: ''
https-proxy: ''
juju-no-proxy: 'localhost,127.0.0.1,10.10.101.0/24,10.10.10.0/24'
juju-http-proxy: 'http://10.10.10.88:3128'
juju-https-proxy: 'http://10.10.10.88:3128'
apt-http-proxy: 'http://10.10.10.88:3128'
apt-https-proxy: 'http://10.10.10.88:3128'
ubuntu@proxytest:~$ juju model-config model-config-mixed-noproxy.yaml
ubuntu@proxytest:~$ juju model-config | grep proxy
apt-ftp-proxy default ""
apt-http-proxy model http://10.10.10.88:3128
apt-https-proxy model http://10.10.10.88:3128
apt-no-proxy default ""
ftp-proxy default ""
http-proxy default ""
https-proxy default ""
juju-ftp-proxy default ""
juju-http-proxy model http://10.10.10.88:3128
juju-https-proxy model http://10.10.10.88:3128
juju-no-proxy model localhost,127.0.0.1,10.10.101.0/24,10.10.10.0/24
no-proxy model localhost,127.0.0.1,10.10.101.0/24,10.10.10.0/24
proxy-ssh default false
The end result looks valid in hook/action/run environment:
ubuntu@proxytest:~$ juju run --unit ubuntu/0 'env | grep PROXY'
JUJU_CHARM_FTP_PROXY=
JUJU_CHARM_HTTP_PROXY=http://10.10.10.88:3128
JUJU_CHARM_HTTPS_PROXY=http://10.10.10.88:3128
JUJU_CHARM_NO_PROXY=localhost,127.0.0.1,10.10.101.0/24,10.10.10.0/24 |
|