[2.4.x][2.5.x] bootstrap logic doesn't handle model-config proxy settings properly
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Fix Released
|
High
|
Eric Claude Jones |
Bug Description
Although juju-http-proxy and juju-https-proxy are passed to the bootstrap command as model-configs (via --config), Juju does not pass them down to the curl command used in cloud-init userdata used before agents are created. This results in the following output on provisioned controller machines in /var/log/
Fetching Juju agent version 2.4.7 for amd64
Attempt 1 to download agent binaries from https:/
curl: (7) Failed to connect to streams.
agent binaries from https:/
d 0.000 bytes/s Download failed, retrying in 15s
Attempt 2 to download agent binaries from https:/
curl: (7) Failed to connect to streams.
agent binaries from https:/
0.000 bytes/s Download failed, retrying in 15s
Attempt 3 to download agent binaries from https:/
curl: (7) Failed to connect to streams.
Relevant code:
https:/
https:/
https:/
https:/
printf "Attempt $n to download agent binaries from %s...\n" {{shquote .}}
Reproducer for localhost provider (considering there is a proxy on a directly connected subnet):
cat modelconfig-
cloudinit-userdata: |
preruncmd:
- ip route del default
postruncmd:
- ip route del default
juju-http-proxy: http://
juju-https-proxy: http://
apt-http-proxy: http://
apt-https-proxy: http://
juju bootstrap localhost --config=
14:19:32 INFO juju.cmd supercommand.go:56 running juju [2.4.7 gc go1.10.4]
# ...
Attempting to connect to 192.0.2.196:22
14:20:39 DEBUG juju.provider.
14:20:44 INFO cmd bootstrap.go:344 Connected to 192.0.2.196
14:20:44 INFO juju.cloudconfig userdatacfg_
14:20:44 INFO cmd bootstrap.go:414 Running machine configuration script...
summary: |
- [2.4.x][2.5.x] bootstrap logic doesn't handle model-config settings - properly + [2.4.x][2.5.x] bootstrap logic doesn't handle model-config proxy + settings properly |
description: | updated |
Changed in juju: | |
milestone: | none → 2.5-rc1 |
importance: | Undecided → High |
status: | New → Triaged |
Changed in juju: | |
assignee: | nobody → Eric Claude Jones (ecjones) |
Changed in juju: | |
status: | Triaged → Fix Committed |
Changed in juju: | |
status: | Fix Committed → Fix Released |
Suggested fix (first pass):
https:/ /github. com/juju/ juju/pull/ 9550
15:47:39 INFO cmd bootstrap.go:344 Connected to 192.0.2.231 unix.go: 484 Fetching agent: curl -sSfw 'agent binaries from %{url_effective} downloaded: HTTP %{http_code}; time %{time_total}s; size %{size_download} bytes; speed %{speed_download} bytes/s ' --retry 10 --proxy http:// 192.0.2. 30:3128 --noproxy 127.0.0. 1,localhost, ::1 -o $bin/tools.tar.gz <[https:/ /streams. canonical. com/juju/ tools/agent/ 2.4.7/juju- 2.4.7-ubuntu- amd64.tgz]>
15:47:39 INFO juju.cloudconfig userdatacfg_
15:47:39 INFO cmd bootstrap.go:414 Running machine configuration script...
Although it gets me forward, even though --no-gui was used Juju fails at a different step.
2018-12-07 12:50:51 DEBUG juju.storage managedstorage. go:294 managed resource entry created with path "buckets/ 63fffe4d- 9b22-4181- 86c7-e5fceeccf5 0e/tools/ 2.4.7-bionic- amd64-1812f4977 66d67c64a93dfa7 f4dab7e16701cde a4b83f583fbc88b a2ea5493f5" -> "c6411aa8ac4f65 1a01cf46608b1d3 a77f312ff7b5b17 80b39c63c6b1c82 ebdbdcd2e5fa2b4 0dcf4e4ebdcaf69 5ba6bf8" system/ jujud-machine- 0.service → /lib/systemd/ system/ jujud-machine- 0/jujud- machine- 0.service. system/ multi-user. target. wants/jujud- machine- 0.service → /lib/systemd/ system/ jujud-machine- 0/jujud- machine- 0.service. juju.commands bootstrap.go:540 failed to bootstrap model: subprocess encountered error code 2 juju.commands bootstrap.go:541 (error details: [{github. com/juju/ juju/cmd/ juju/commands/ bootstrap. go:638: failed to bootstrap model} {subprocess encountered error code 2}]) juju.commands bootstrap.go:1144 cleaning up after failed bootstrap common destroy.go:21 destroying model "controller" common destroy.go:32 destroying instances common destroy.go:56 destroying storage
2018-12-07 12:50:51 WARNING juju.cmd.jujud bootstrap.go:321 cannot set up Juju GUI: cannot fetch GUI info: GUI metadata not found
2018-12-07 12:50:51 DEBUG juju.state open.go:215 closed state without error
2018-12-07 12:50:51 INFO cmd supercommand.go:465 command finished
2018-12-07 12:50:51 DEBUG juju.cmd.jujud main.go:201 jujud complete, code 0, err <nil>
Starting Juju machine agent (service jujud-machine-0)
Created symlink /etc/systemd/
Created symlink /etc/systemd/
RTNETLINK answers: No such process
15:50:52 ERROR juju.cmd.
15:50:52 DEBUG juju.cmd.
15:50:52 DEBUG juju.cmd.
15:50:52 INFO juju.provider.
15:50:52 INFO juju.provider.
15:50:54 INFO juju.provider.
15:50:54 DEBUG juju.provider.lxd environ.go:193 instances: []
15:50:54 INFO cmd supercommand.go:465 command finished