boot failure when model-config sets snap-proxy
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Fix Released
|
High
|
Ian Booth |
Bug Description
When I set a snap proxy and then add a machine, i.e.
juju model-config snap-http-proxy="http://
juju add-machine
The juju created user-data will configure snap in the bootcmd section. This fails since at the time bootcmd is run the snapd service is not running.
$ juju ssh 0 -- sudo head -n30 /var/lib/
Content-Type: multipart/mixed; boundary=
MIME-Version: 1.0
Number-Attachments: 1
--=====
MIME-Version: 1.0
Content-Type: text/cloud-config
Content-
#cloud-config
apt_mirror: ""
bootcmd:
- |-
printf '%s
' 'Acquire:
Acquire:
Acquire:
Acquire:
Acquire:
Acquire:
Acquire:
Acquire:
Acquire:
Acquire:
- snap set system proxy.http="http://
- snap set system proxy.https="https:/
output:
all: '| tee -a /var/log/
package_update: true
package_upgrade: true
packages:
$ juju ssh 0 -- sudo grep snapd /var/log/
error: cannot communicate with server: Put http://
error: cannot communicate with server: Put http://
Changed in juju: | |
status: | In Progress → Fix Committed |
Changed in juju: | |
status: | Fix Committed → Fix Released |
I was unable to reproduce this at all, but have done a small patch to defer the snap set commands to cloud init runcmds rather than bootcmds.
https:/ /github. com/juju/ juju/pull/ 13261