I removed this cloudinit-userdata model-config and retried without it (what's below is not present in archives uploaded above) - doesn't look like this model-config affects anything, however, I can see by crtime of 95-juju-proxy-settings in the container that apt proxy settings land in a container after apt update is done (22:11:48 for update vs 22:11:53 for crtime of the proxy settings file:
Cloud-init v. 18.4-0ubuntu1~18.04.1 running 'modules:config' at Wed, 13 Feb 2019 22:11:45 +0000. Up 27.00 seconds.
Ign:1 http://security.ubuntu.com/ubuntu bionic-security InRelease
Err:2 http://security.ubuntu.com/ubuntu bionic-security Release
Cannot initiate the connection to security.ubuntu.com:80 (2001:67c:1360:8c01::19). - connect (101: Network is unreachable) Cannot initiate the connection to security
.ubuntu.com:80 (91.189.92.201). - connect (101: Network is unreachable)
# ...
2019-02-13 22:11:48,632 - util.py[WARNING]: Failed to install packages: ['curl', 'cpu-checker', 'bridge-utils', 'cloud-utils', 'tmux', 'ubuntu-fan']
2019-02-13 22:11:48,633 - cc_package_update_upgrade_install.py[WARNING]: 2 failed with exceptions, re-raising the last one
2019-02-13 22:11:48,634 - util.py[WARNING]: Running module package-update-upgrade-install (<module 'cloudinit.config.cc_package_update_upgrade_install' from '/usr/lib/python3/dist-packages/cloudinit/config/cc_package_update_upgrade_install.py'>) failed
Although I can't see why that happens because bootcmd commands (including the one to write proxy apt settings) run before cc_package_update_upgrade_install
2019-02-13 22:11:21,350 - stages.py[DEBUG]: Running module bootcmd (<module 'cloudinit.config.cc_bootcmd' from '/usr/lib/python3/dist-packages/cloudinit/config/cc_bootcmd.py'>) with frequency always
# ...
2019-02-13 22:11:21,679 - handlers.py[DEBUG]: finish: init-network/config-bootcmd: SUCCESS: config-bootcmd ran successfully
2019-02-13 22:11:46,314 - stages.py[DEBUG]: Running module runcmd (<module 'cloudinit.config.cc_runcmd' from '/usr/lib/python3/dist-packages/cloudinit/config/cc_runcmd.py'>) with frequency once-per-instance
2019-02-13 22:11:46,314 - handlers.py[DEBUG]: start: modules-config/config-runcmd: running config-runcmd with frequency once-per-instance
# ...
2019-02-13 22:11:47,029 - stages.py[DEBUG]: Running module package-update-upgrade-install (<module 'cloudinit.config.cc_package_update_upgrade_install' from '/usr/lib/python3/dist-packages/cloudinit/config/cc_package_update_upgrade_install.py'>) with frequency once-per-instance
Besides "no default gateway" I had this in cloudinit-userdata:
juju model-config cloudinit-userdata =SNAPPY_ STORE_NO_ CDN=1 system/ snapd.service. d/proxy- nocdn.conf
write_files:
- content: |
[Service]
Environment
owner: "root:root"
path: /etc/systemd/
permissions: '0644'
packages:
- squashfuse
snap:
commands:
"00": systemctl restart snapd
https:/ /paste. ubuntu. com/p/sV9gqCYhV C/ ======= ======= ======= ======= ======= ======= ======= ======= =
=======
I removed this cloudinit-userdata model-config and retried without it (what's below is not present in archives uploaded above) - doesn't look like this model-config affects anything, however, I can see by crtime of 95-juju- proxy-settings in the container that apt proxy settings land in a container after apt update is done (22:11:48 for update vs 22:11:53 for crtime of the proxy settings file:
https:/ /paste. ubuntu. com/p/w4qFpR6KJ 6/
Cloud-init v. 18.4-0ubuntu1~ 18.04.1 running 'modules:config' at Wed, 13 Feb 2019 22:11:45 +0000. Up 27.00 seconds. security. ubuntu. com/ubuntu bionic-security InRelease security. ubuntu. com/ubuntu bionic-security Release ubuntu. com:80 (2001:67c: 1360:8c01: :19). - connect (101: Network is unreachable) Cannot initiate the connection to security
Ign:1 http://
Err:2 http://
Cannot initiate the connection to security.
.ubuntu.com:80 (91.189.92.201). - connect (101: Network is unreachable)
# ...
2019-02-13 22:11:48,632 - util.py[WARNING]: Failed to install packages: ['curl', 'cpu-checker', 'bridge-utils', 'cloud-utils', 'tmux', 'ubuntu-fan'] update_ upgrade_ install. py[WARNING] : 2 failed with exceptions, re-raising the last one update- upgrade- install (<module 'cloudinit. config. cc_package_ update_ upgrade_ install' from '/usr/lib/ python3/ dist-packages/ cloudinit/ config/ cc_package_ update_ upgrade_ install. py'>) failed
2019-02-13 22:11:48,633 - cc_package_
2019-02-13 22:11:48,634 - util.py[WARNING]: Running module package-
debugfs -R 'stat /var/lib/ lxd/storage- pools/default/ containers/ juju-6d9aac- 3-lxd-2/ rootfs/ etc/apt/ apt.conf. d/95-juju- proxy-settings' /dev/sda1 2>/dev/null | grep -P 'crtime|mtime'
mtime: 0x5c64b32f:04de7d60 -- Thu Feb 14 00:15:43 2019
crtime: 0x5c649629:813b3c54 -- Wed Feb 13 22:11:53 2019
======= ======= ======= ======= ======= ======= ==
Although I can't see why that happens because bootcmd commands (including the one to write proxy apt settings) run before cc_package_ update_ upgrade_ install
2019-02-13 22:11:21,350 - stages.py[DEBUG]: Running module bootcmd (<module 'cloudinit. config. cc_bootcmd' from '/usr/lib/ python3/ dist-packages/ cloudinit/ config/ cc_bootcmd. py'>) with frequency always config- bootcmd: SUCCESS: config-bootcmd ran successfully
# ...
2019-02-13 22:11:21,679 - handlers.py[DEBUG]: finish: init-network/
2019-02-13 22:11:46,314 - stages.py[DEBUG]: Running module runcmd (<module 'cloudinit. config. cc_runcmd' from '/usr/lib/ python3/ dist-packages/ cloudinit/ config/ cc_runcmd. py'>) with frequency once-per-instance config/ config- runcmd: running config-runcmd with frequency once-per-instance
2019-02-13 22:11:46,314 - handlers.py[DEBUG]: start: modules-
# ... update- upgrade- install (<module 'cloudinit. config. cc_package_ update_ upgrade_ install' from '/usr/lib/ python3/ dist-packages/ cloudinit/ config/ cc_package_ update_ upgrade_ install. py'>) with frequency once-per-instance
2019-02-13 22:11:47,029 - stages.py[DEBUG]: Running module package-
/var/lib/ cloud/instance/ user-data. txt
#cloud-config :http:: Proxy "http:// 10.232. 0.1:3128"; :https: :Proxy "http:// 10.232. 0.1:3128"; :http:: Proxy:: "127.0. 0.1" "DIRECT"; :https: :Proxy: :"127.0. 0.1" "DIRECT"; :ftp::Proxy: :"127.0. 0.1" "DIRECT"; :http:: Proxy:: "localhost" "DIRECT"; :https: :Proxy: :"localhost" "DIRECT"; :ftp::Proxy: :"localhost" "DIRECT"; :http:: Proxy:: "::1" "DIRECT"; :https: :Proxy: :"::1" "DIRECT"; :ftp::Proxy: :"::1" "DIRECT";' > /etc/apt/ apt.conf. d/95-juju- proxy-settings
apt_mirror: ""
bootcmd:
# ...
- |-
printf '%s\n' 'Acquire:
Acquire:
Acquire:
Acquire:
Acquire:
Acquire:
Acquire:
Acquire:
Acquire:
Acquire:
Acquire: