apt cache is updated before repos are configured

Bug #1446339 reported by Jimmy McCrory
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack-Ansible
Invalid
Medium
Unassigned
Juno
Fix Released
Medium
Jimmy McCrory
Trunk
Invalid
Medium
Unassigned

Bug Description

Related: https://bugs.launchpad.net/openstack-ansible/+bug/1421679

An apt cache update is occurring after packages are pinned, but before the apt repos are configured.

From behind a firewall where the default repos are unreachable, this leads to an error since an update is attempted before the repos can be replaced.

The tasks should be reordered to Add Common repos > Add apt pin preferences > Update apt cache

Replacing repos by overriding apt_common_repos:
apt_common_repos:
- { repo: "deb http://archive.ubuntu.com/ubuntu trusty main restricted universe multiverse", state: "absent" }
- { repo: "deb http://archive.ubuntu.com/ubuntu trusty-updates main restricted universe multiverse", state: "absent" }
- { repo: "deb http://security.ubuntu.com/ubuntu trusty-security main restricted universe multiverse", state: "absent" }
- { repo: "deb http://internal-repo/mirrored-assets/ftp.osuosl.org/pub/mariadb/repo/5.5/ubuntu trusty main", state: "present" }
- { repo: "deb http://internal-repo/ubuntu/ trusty main restricted universe multiverse", state: "present" }
- { repo: "deb http:///internal-repo/ubuntu/ trusty-updates main restricted universe multiverse", state: "present" }
- { repo: "deb http:///internal-repo/ubuntu/ trusty-security main restricted universe multiverse", state: "present" }

Error when attempting to connect to default external repos:
failed: [dal-appblx061-01_rabbit_mq_container-7f7c10a9] => {"failed": true, "parsed": false}
invalid output was: Traceback (most recent call last):
  File "<stdin>", line 1763, in <module>
  File "<stdin>", line 492, in main
  File "/usr/lib/python2.7/dist-packages/apt/cache.py", line 440, in update
    raise FetchFailedException(e)
apt.cache.FetchFailedException: W:Failed to fetch http://security.ubuntu.com/ubuntu/dists/trusty-security/Release.gpg Connection failed [IP: 91.189.92.200 80]
, W:Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty/Release.gpg Connection failed [IP: 91.189.91.23 80]
, W:Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-updates/Release.gpg Connection failed [IP: 91.189.92.200 80]
, W:Failed to fetch http://security.ubuntu.com/ubuntu/dists/trusty-security/main/i18n/Translation-en_US Connection failed [IP: 91.189.91.14 80]...

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to os-ansible-deployment (juno)

Fix proposed to branch: juno
Review: https://review.openstack.org/175554

Changed in openstack-ansible:
status: New → Triaged
importance: Undecided → Medium
assignee: nobody → Jimmy McCrory (jimmy-mccrory)
no longer affects: openstack-ansible/icehouse
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to os-ansible-deployment (juno)

Reviewed: https://review.openstack.org/175554
Committed: https://git.openstack.org/cgit/stackforge/os-ansible-deployment/commit/?id=af5c841c710c9c796aa5fb332835ada0cca26479
Submitter: Jenkins
Branch: juno

commit af5c841c710c9c796aa5fb332835ada0cca26479
Author: Jimmy McCrory <email address hidden>
Date: Fri Apr 3 18:19:48 2015 -0700

    Reorder common apt repo tasks

    An apt cache update was being initiated after the apt package pinning
    occured, but before apt repos were put in place. The order has changed
    so that both apt package pinning and an apt cache update occur after
    repos have been configured.

    Change-Id: I96bacfbf565903ffce49486fff1d14409e9135dc
    Closes-Bug: 1446339
    Related-Bug: 1421679

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.