[2.4-beta3] no-proxy model-config is possible to set alongside juju-no-proxy

Bug #1773447 reported by Dmitrii Shcherbakov
10
This bug affects 2 people
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-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

description: updated
Revision history for this message
Tim Penhey (thumper) wrote : Re: [Bug 1773447] [NEW] [2.4-beta3] no-proxy model-config is possible to set alongside juju-no-proxy

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.

Changed in juju:
status: New → Triaged
importance: Undecided → Low
tags: added: proxy
Revision history for this message
Canonical Juju QA Bot (juju-qa-bot) wrote :

This bug has not been updated in 2 years, so we're marking it Low importance. If you believe this is incorrect, please update the importance.

tags: added: expirebugs-bot
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.