yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #00279
[Bug 1028501] Re: cloud-init selects wrong mirrors for arm
This bug was fixed in the package cloud-init - 0.6.3-0ubuntu1.3
---------------
cloud-init (0.6.3-0ubuntu1.3) precise-proposed; urgency=low
* debian/patches/lp-1070345-landscape-restart-after-change.patch,
debian/patches/lp-1066115-landscape-install-fix-perms.patch:
fix missing or incorrect imports (LP: #1070345, LP: #1066115).
cloud-init (0.6.3-0ubuntu1.2) precise-proposed; urgency=low
* debian/patches/lp-978127-maas-oauth-fix-bad-clock.patch: fix usage of
oauth in maas data source if local system has a bad clock (LP: #978127)
* debian/cloud-init.preinst: fix bug where user data scripts re-ran on
upgrade from 10.04 versions (LP: #1049146)
* debian/patches/lp-974509-detect-dns-server-redirection.patch: detect dns
server redirection and disable searching dns for a mirror named
'ubuntu-mirror' (LP: #974509)
* debian/patches/lp-1018554-shutdown-message-to-console.patch: write a
message to the console on system shutdown. (LP: #1018554)
* debian/patches/lp-1066115-landscape-install-fix-perms.patch: install
landscape package if needed which will ensure proper permissions on config
file (LP: #1066115).
* debian/patches/lp-1070345-landscape-restart-after-change.patch: restart
landscape after modifying config (LP: #1070345)
* debian/patches/lp-1073077-zsh-workaround-for-locale_warn.patch: avoid
warning when user's shell is zsh (LP: #1073077)
* debian/patches/rework-mirror-selection.patch: improve mirror selection by:
* allowing region/availability-zone to be part of mirror (LP: #1037727)
* making mirror selection arch aware (LP: #1028501)
* allow specification of a security mirror (LP: #1006963)
-- Scott Moser <smoser@xxxxxxxxxx> Thu, 13 Dec 2012 12:16:56 -0500
** Changed in: cloud-init (Ubuntu Precise)
Status: Fix Committed => Fix Released
--
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/1028501
Title:
cloud-init selects wrong mirrors for arm
Status in Init scripts for use on cloud images:
Fix Released
Status in MAAS:
Fix Released
Status in “cloud-init” package in Ubuntu:
Fix Released
Status in “cloud-init” source package in Precise:
Fix Released
Bug description:
[Impact]
* The official Ubuntu mirrors for armhf and armel arch are on
ports.ubuntu.com where as i386 and amd64 are on archive.ubuntu.com.
Cloud-init has code that selects a local mirror, but that code in 12.04
did not take arch into into consideration at all.
As a result, if you're using cloud-init on arm with 12.04, you need to
either
a.) tell cloud-init to "preserve_sources_list"
b.) provide the correct 'mirror' in cloud-config syntax always when you
launch the instance, and this isn't really even sufficient as
cloud-init's template for sources.list references security.ubuntu.com
which is also not valid for arm.
The fix here is to make the mirror selection code architecture specific
and to also make it handle security.ubuntu.com separately. Looking at
the default configuration probably makes it obvious how it works:
| package_mirrors:
| - arches: [i386, amd64]
| failsafe:
| primary: http://archive.ubuntu.com/ubuntu
| security: http://security.ubuntu.com/ubuntu
| search:
| primary:
| - http://%(ec2_region)s.ec2.archive.ubuntu.com/ubuntu/
| - http://%(availability_zone)s.clouds.archive.ubuntu.com/ubuntu/
| security: []
| - arches: [armhf, armel, default]
| failsafe:
| primary: http://ports.ubuntu.com/ubuntu
| security: http://ports.ubuntu.com/ubuntu
[Test Case]
Simply letting cloud-init take its default behavior will show the
brokenness on arm. The code is not arch specific at all so launching
an EC2 instance (of i386 or amd64) will select the primary mirror
of http://us-east-1.ec2.archive.ubuntu.com and security.ubuntu.com for
security. This is clearly broken.
Showing the correct working path requires actually running cloud-init
within arm. This can be done using an arm image from
cloud-images.ubuntu.com.
[Regression Potential]
* Selection of the wrong mirror is really the potential failure path
here, and on arm in 12.04, cloud-init already selects the wrong mirror
so it is assured to not make the situation worse.
=== End SRU Information ===
cloud-inits' mirror selection does not include any logic to account for arch.
the arm arch are not available on ec2 mirrors nor on *.archive.ubuntu.com .
The best work around at the moment is to disable mirror selection via:
apt_preserve_sources_list: True
For juju, that can be done by modifying juju/providers/common/utils.py to contain:
cloud_config = {
"apt-update": True,
"apt-upgrade": True,
"apt_preserve_sources_list": True,
"ssh_authorized_keys": authorized_keys,
"packages": [],
"output": {"all": "| tee -a /var/log/cloud-init-output.log"}}
Related bugs:
* bug 1028501 sources.list configuration does not cover security
To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1028501/+subscriptions