[feature-request] Add non-x86 Ubuntu EC2 mirrors in to default cloud-init configuration

Bug #1805854 reported by Philip Roche on 2018-11-29
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

With the announcement of EC2s A1 instances we'd (CPC) like to be able to rely on cloud-init to configure archive mirrors for non-x86 architectures.

Currently the AMIs have the mirrors configured using /etc/cloud/cloud.cfg.d/95_mirrors.cfg which points to the in region archive mirrors for non-x86 architectures.

# Add archive mirrors for non-x86 architectures
     - arches: [i386, amd64]
         primary: http://archive.ubuntu.com/ubuntu
         security: http://security.ubuntu.com/ubuntu
           - http://%(ec2_region)s.ec2.archive.ubuntu.com/ubuntu/
           - http://%(availability_zone)s.clouds.archive.ubuntu.com/ubuntu/
           - http://%(region)s.clouds.archive.ubuntu.com/ubuntu/
         security: []
     - arches: [armhf, armel, default]
         primary: http://ports.ubuntu.com/ubuntu-ports
         security: http://ports.ubuntu.com/ubuntu-ports
           - http://%(ec2_region)s.ec2.ports.ubuntu.com/ubuntu-ports/
           - http://%(availability_zone)s.clouds.ports.ubuntu.com/ubuntu-ports/
           - http://%(region)s.clouds.ports.ubuntu.com/ubuntu-ports/
         security: []

See http://paste.ubuntu.com/p/QGvGKpKYKb/ for current AMIs that can be used for testing.

So the feature request is that coud-init configure the above mirrors automatically without us having to write /etc/cloud/cloud.cfg.d/95_mirrors.cfg on the image.

Please let me know if you would like me to spin up instances for testing instead or if you need any further info.

Related branches

Philip Roche (philroche) on 2018-11-29
description: updated
Dan Watkins (oddbloke) on 2018-11-29
summary: - [feature-request] Add support for adding adding archive mirrors for
- non-x86 architectures on ec2
+ [feature-request] Add non-x86 Ubuntu EC2 mirrors in to default cloud-
+ init configuration
Scott Moser (smoser) wrote :


We have two possible paths here:
a.) make 'default' use the 'search/primary' list:
 - http://%(ec2_region)s.ec2.ports.ubuntu.com/ubuntu-ports/
 - http://%(availability_zone)s.clouds.ports.ubuntu.com/ubuntu-ports/
 - http://%(region)s.clouds.ports.ubuntu.com/ubuntu-ports/

b.) add a 'arches: [armhf, armel]' that uses the above search list
and leave the 'default' to fall back to ports.ubuntu.com

The choice is based on whether or not the infrastructure at
 *.ec2.archive.ubuntu.com and *.clouds.archive.ubuntu.com
support arches other than armhf and armel..

I suspect that they do support arm64, but do they support others?
 * yes: http://paste.ubuntu.com/p/D6wW4JqJrW/
 * no: http://paste.ubuntu.com/p/hwnmFxJsMv/

Also relevant is the question of whether or not we want to have
user's mirror selection change through an SRU. Even though the
official mirrors may support it, the customer may have put up
a 'ports.ubuntu.com' mirror and even dns-hijacked that, but
their infrastrucutre likely would not support requests to
us-east-1.ec2.ports.ubuntu.com or us-east-1a.clouds.ports.ubuntu.com .

Changed in cloud-init:
status: New → Confirmed
Scott Moser (smoser) wrote :

I got some feedback from Phillip.

As of today, the commit message in the MP is correct.

We've decided to limit the auto-selection of those
mirrors to arm, where we know a use case. That way new instances
of ppc64el or other arches will not select them. Such a behavior change
could be problematic for a user in a firewalled environment.

The 'default' path will still end up hitting ports.archive.ubuntu.com.

Scott Moser (smoser) on 2018-12-03
Changed in cloud-init:
importance: Undecided → Medium

This bug is fixed with commit a582a2d2 to cloud-init on branch master.
To view that commit see the following URL:

Changed in cloud-init:
status: Confirmed → Fix Committed

This bug is believed to be fixed in cloud-init in version 18.5. If this is still a problem for you, please make a comment and set the state back to New

Thank you.

Changed in cloud-init:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers