[SRU] cc_apt_configure does not understand regions

Bug #1470890 reported by Dan Watkins on 2015-07-02
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
cloud-init
High
Dan Watkins
cloud-init (Ubuntu)
Undecided
Unassigned
Precise
Undecided
Unassigned
Trusty
Undecided
Unassigned
Vivid
Undecided
Unassigned

Bug Description

[Impact]
In GCE, we want to deploy Ubuntu mirrors per-region. At the moment, it is impossible to configure cloud-init to look for mirrors with the instance's region substituted in to the mirror DNS name. This will allow us to do so, which will allow us to improve the experience for Ubuntu users on GCE, both in terms of mirror responsiveness and bandwidth costs.

[Test Case]
On GCE, specify a primary mirror search URL of "http://%(region)s.gce.clouds.archive.ubuntu.com/ubuntu/" and run cloud-init. When running 'apt-get update', you should see a mirror URL which matches the above with the instance's region substituted in.

[Regression Potential]
There are two existing substitutions for mirror strings: availability_zone and ec2_region. We will need to ensure that each of these can still be used (testing specifically on EC2 for the latter).

[Original Report]
In _get_package_mirror_info (in cloudinit/distros/__init__.py), there is code that specifically handles converting EC2 availability zones to their corresponding regions. This won't work for other clouds that don't have the same form for availability zones (and even if they _do_, they'll have to be configured using strings containing 'ec2'; weird), which is problematic.

This is particularly a problem for GCE.

Related branches

Changed in cloud-init:
importance: Undecided → High
Dan Watkins (oddbloke) on 2015-07-22
Changed in cloud-init:
assignee: nobody → Dan Watkins (daniel-thewatkins)
status: New → Confirmed
Dan Watkins (oddbloke) on 2015-07-22
Changed in cloud-init:
status: Confirmed → In Progress
Dan Watkins (oddbloke) on 2015-08-14
summary: - cc_apt_configure only understands EC2 availability zones
+ [SRU] cc_apt_configure only understands EC2 availability zones
summary: - [SRU] cc_apt_configure only understands EC2 availability zones
+ [SRU] cc_apt_configure does not understand regions
Dan Watkins (oddbloke) on 2015-08-14
description: updated
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in cloud-init (Ubuntu):
status: New → Confirmed
Chris J Arges (arges) on 2015-08-20
affects: ubuntu → cloud-init (Ubuntu)

Hello Dan, or anyone else affected,

Accepted cloud-init into vivid-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/cloud-init/0.7.7~bzr1091-0ubuntu5 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in cloud-init (Ubuntu):
status: New → Fix Released
Changed in cloud-init (Ubuntu Vivid):
status: New → Fix Committed
tags: added: verification-needed
Chris J Arges (arges) wrote :

Hello Dan, or anyone else affected,

Accepted cloud-init into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/cloud-init/0.7.5-0ubuntu1.8 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in cloud-init (Ubuntu Trusty):
status: New → Fix Committed
Changed in cloud-init (Ubuntu Precise):
status: New → Fix Committed
Chris J Arges (arges) wrote :

Hello Dan, or anyone else affected,

Accepted cloud-init into precise-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/cloud-init/0.6.3-0ubuntu1.19 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Dan Watkins (oddbloke) wrote :

Confirmed fixed in precise; trusty and vivid images building for validation.

Dan Watkins (oddbloke) wrote :

Confirmed fixed in vivid; trusty image still building for validation.

Dan Watkins (oddbloke) wrote :

Verified on trusty; marked as verification-done.

tags: added: verification-done
removed: verification-needed

The verification of the Stable Release Update for cloud-init has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cloud-init - 0.7.5-0ubuntu1.8

---------------
cloud-init (0.7.5-0ubuntu1.8) trusty; urgency=medium

  * debian/patches/lp-1411582-azure-udev-ephemeral-disks.patch:
      - Use udev rules to discover ephemeral disk locations rather than
        hard-coded device names (LP: #1411582).
  * debian/patches/lp-1470880-fix-gce-az-determination.patch:
      - Correctly parse GCE's availability zones (LP: #1470880).
  * d/patches/lp-1470890-include-regions-in-dynamic-mirror-discovery.patch:
      - Make %(region)s a valid substitution in mirror discovery
        (LP: #1470890).
  * Remove python-serial from Build-Depends; it was mistakenly added last
    upload.

 -- Daniel Watkins <email address hidden> Fri, 14 Aug 2015 13:54:02 +0100

Changed in cloud-init (Ubuntu Trusty):
status: Fix Committed → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cloud-init - 0.7.7~bzr1091-0ubuntu5

---------------
cloud-init (0.7.7~bzr1091-0ubuntu5) vivid; urgency=medium

  * d/patches/lp-1411582-azure-udev-ephemeral-disks.patch:
      - Use udev rules to discover ephemeral disk locations rather than
        hard-coded device names (LP: #1411582).
  * d/patches/lp-1470880-fix-gce-az-determination.patch:
      - Correctly parse GCE's availability zones (LP: #1470880).
  * d/patches/lp-1470890-include-regions-in-dynamic-mirror-discovery.patch:
      - Make %(region)s a valid substitution in mirror discovery
        (LP: #1470890).

 -- Daniel Watkins <email address hidden> Fri, 14 Aug 2015 13:50:32 +0100

Changed in cloud-init (Ubuntu Vivid):
status: Fix Committed → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cloud-init - 0.6.3-0ubuntu1.19

---------------
cloud-init (0.6.3-0ubuntu1.19) precise; urgency=medium

  * debian/patches/lp-1411582-azure-udev-ephemeral-disks.patch:
      - Use udev rules to discover ephemeral disk locations rather than
        hard-coded device names (LP: #1411582).
  * debian/patches/lp-1470880-fix-gce-az-determination.patch:
      - Correctly parse GCE's availability zones (LP: #1470880).
  * d/patches/lp-1470890-include-regions-in-dynamic-mirror-discovery.patch:
      - Make %(region)s a valid substitution in mirror discovery
        (LP: #1470890).

 -- Daniel Watkins <email address hidden> Fri, 14 Aug 2015 14:38:48 +0100

Changed in cloud-init (Ubuntu Precise):
status: Fix Committed → Fix Released
Dan Watkins (oddbloke) on 2015-09-10
Changed in cloud-init:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers