yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #68841
[Bug 1727527] Re: cloud-init 0.7.5 doesn't honor the apt: proxy: setting, needs apt_proxy instead
Older versions of cloud init only supported the apt_proxy setting. Newer
versions support the newer 'apt' top level key. They also convert
support the old format.
Documentation that comes in the package installed will mention the older
in example. We just did not use rtd in 0.7.5 so you won't find doc on
that there.
Sorry, but this is just kind of the way it is.
Not all function has always been supported.
You're welcome to use the old format with 16.04.
** Changed in: cloud-init
Status: New => Invalid
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to cloud-init.
https://bugs.launchpad.net/bugs/1727527
Title:
cloud-init 0.7.5 doesn't honor the apt: proxy: setting, needs
apt_proxy instead
Status in cloud-init:
Invalid
Bug description:
When passing a profile with an apt proxy defined in cloud-config data,
it isn't honored for Ubuntu 14.04, but it is for 16.04 and 17.10 (I've
only tried those).
Steps to reproduce:
This uses lxd as I initially ran into this while trying to have a
profile that would automatically set up the proxy for my containers.
Assuming you have an apt-cacher-ng or similar at 1.2.3.4:
lxc profile create aptcache2
cat << EOF | lxc profile edit aptcache2
name: aptcache
description: set up apt caching via 1.2.3.4
config:
user.vendor-data: |
#cloud-config
apt:
proxy: "http://1.2.3.4:3142"
EOF
lxc launch -p default -p aptcache2 ubuntu:14.04 y-u-no-cache
lxc launch -p default -p aptcache2 ubuntu:16.04 i-do-cache
lxc exec y-u-no-cache -- grep -r 3142 /etc/apt/apt.conf.d
lxc exec i-do-cache -- grep -r 3142 /etc/apt/apt.conf.d
Expected result:
Both lxc exec commands should show something like:
/etc/apt/apt.conf.d/90cloud-init-aptproxy:Acquire::http::Proxy
"http://1.2.3.4:3142";
Actual result:
Only the command on the 16.04 container shows this, the other container has no proxy settings.
The 14.04 image has cloud-init Installed: 0.7.5-0ubuntu1.22
The 16.04 image has Installed: 0.7.9-233-ge586fe35-0ubuntu1~16.04.2
Stéphane Graber pointed out that 0.7.5 supports this syntax:
user.vendor-data: |
#cloud-config
apt_proxy: "http://1.2.3.4:3142"
I didn't find any documentation on that when I went looking, current
cloud-init documentation only mentions the apt: proxy: thing:
http://cloudinit.readthedocs.io/en/latest/topics/examples.html
#additional-apt-configuration
To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1727527/+subscriptions
References