deploying from charmstore fails on lxd provider in a restricted network
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
juju-core |
New
|
Undecided
|
Unassigned |
Bug Description
I am unable to deploy charms in a network restricted environment, even though I have http[s]_proxy and no_proxy set:
cat /etc/issue
Ubuntu Xenial Xerus (development branch) \n \l
juju version
2.0-beta3-
export http_proxy=http://
export https_proxy=http://
export no_proxy=`echo localhost 10.245.67.130 10.0.3.{1..255} | sed 's/ /,/g'`
juju bootstrap admin-lxd lxd --upload-tools
...
2016-03-28 20:13:24 INFO cmd cmd.go:129 Bootstrap complete, local.admin-lxd now available.
2016-03-28 20:13:24 INFO cmd supercommand.go:454 command finished
juju deploy ubuntu
ERROR storing charm for URL "cs:trusty/
I could wget the above 'archive' file from my host machine, but could not from the admin controller unit. I thought this would help:
juju set-model-config http-proxy=
After this, I verified the proxy settings were correct on unit 0, and I was able to "juju ssh 0" and wget the above 'archive' file successfully. Still, 'juju deploy ubuntu' failed in the same way. This time with debug:
juju deploy ubuntu --debug
2016-03-28 21:28:29 INFO juju.cmd supercommand.go:60 running juju [2.0-beta3 gc go1.6]
2016-03-28 21:28:29 INFO juju.api api.go:213 connecting to API addresses: [10.0.3.62:17070]
2016-03-28 21:28:29 INFO juju.api apiclient.go:492 dialing "wss://
2016-03-28 21:28:29 INFO juju.api apiclient.go:269 connection established to "wss://
2016-03-28 21:28:29 DEBUG juju.api api.go:361 API hostnames unchanged - not resolving
2016-03-28 21:28:29 DEBUG juju.api api.go:147 failed to connect via bootstrap config: aborted
2016-03-28 21:28:29 DEBUG httpbakery client.go:244 client do GET https:/
2016-03-28 21:28:30 DEBUG httpbakery client.go:246 } -> error <nil>
2016-03-28 21:32:45 DEBUG juju.api apiclient.go:518 health ping failed: connection is shut down
2016-03-28 21:32:45 ERROR cmd supercommand.go:448 storing charm for URL "cs:trusty/
This is probably a duplicate of #1556207 and I have a fix landing for that at the moment in the 1.25 branch. It will then be forward ported to 2.0.
The specific problem of not being able to download a charm is because the juju clients try to download it via the API server, but the API server isn't on the no_proxy list, so it goes to the proxy, which can't see the API server...
You can find what Juju has set its proxy settings are by looking on any Juju deployed machine at ~/.juju-proxy. If you source that file (as generated by the current Juju binary) and wget works on a Juju machine that isn't machine 0 before I land my fix then this is a different problem.