yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #68840
[Bug 1727527] [NEW] cloud-init 0.7.5 doesn't honor the apt: proxy: setting, needs apt_proxy instead
Public bug reported:
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
** Affects: cloud-init
Importance: Undecided
Status: New
--
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:
New
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
Follow ups