[Bug 1028501] Re: cloud-init selects wrong mirrors for arm
Scott Moser
smoser at ubuntu.com
Thu Nov 8 21:33:02 UTC 2012
** Description changed:
+ [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
+ * bug 1028501 sources.list configuration does not cover security
--
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to cloud-init in Ubuntu.
https://bugs.launchpad.net/bugs/1028501
Title:
cloud-init selects wrong mirrors for arm
To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1028501/+subscriptions
More information about the Ubuntu-server-bugs
mailing list