[2.4-beta3] no-proxy model-config is possible to set alongside juju-no-proxy
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Triaged
|
Low
|
Unassigned |
Bug 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-
ubuntu@proxytest:~$ juju model-config -m controller | grep proxy
apt-ftp-proxy default ""
apt-http-proxy model http://
apt-https-proxy model http://
apt-no-proxy default ""
ftp-proxy default ""
http-proxy model http://
https-proxy model http://
juju-ftp-proxy default ""
juju-http-proxy default ""
juju-https-proxy default ""
juju-no-proxy default 127.0.0.
no-proxy model localhost,
proxy-ssh default false
ubuntu@proxytest:~$ juju model-config | grep proxy
apt-ftp-proxy default ""
apt-http-proxy model http://
apt-https-proxy model http://
apt-no-proxy default ""
ftp-proxy default ""
http-proxy model http://
https-proxy model http://
juju-ftp-proxy default ""
juju-http-proxy default ""
juju-https-proxy default ""
juju-no-proxy default 127.0.0.
no-proxy model localhost,
proxy-ssh default false
ubuntu@proxytest:~$ cat model-config-
no-proxy: 'localhost,
http-proxy: ''
https-proxy: ''
juju-no-proxy: 'localhost,
juju-http-proxy: 'http://
juju-https-proxy: 'http://
apt-http-proxy: 'http://
apt-https-proxy: 'http://
ubuntu@proxytest:~$ juju model-config model-config-
ubuntu@proxytest:~$ juju model-config | grep proxy
apt-ftp-proxy default ""
apt-http-proxy model http://
apt-https-proxy model http://
apt-no-proxy default ""
ftp-proxy default ""
http-proxy default ""
https-proxy default ""
juju-ftp-proxy default ""
juju-http-proxy model http://
juju-https-proxy model http://
juju-no-proxy model localhost,
no-proxy model localhost,
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_
JUJU_CHARM_
JUJU_CHARM_
JUJU_CHARM_
description: | updated |
Part of this was due to the no-proxy values having defaults if they are
not set.
You cannot set the actual proxy values for old and new, but the no-proxy
was not checked against because if there is no actual proxy set,
whatever you may have in no-proxy doesn't matter are they are never
exposed any more on the machines.