apt cache not updated after pin or repo additions

Bug #1421679 reported by Jesse Pretorius
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack-Ansible
Fix Released
Critical
Jesse Pretorius
Icehouse
Fix Released
Critical
Jesse Pretorius
Juno
Fix Released
Critical
Kevin Carter
Trunk
Fix Released
Critical
Jesse Pretorius

Bug Description

Whenever we add a repository or pinning preferences we should ensure that the apt cache is updated.

Currently we get failures when the mariadb packages try to install. This happens because the pinning has not yet taken affect and because apt doesn't think that it has packages available for the installation to complete properly.

Example errors:

No package matching 'mariadb-galera-server-5.5' is available

The following packages have unmet dependencies:
 mariadb-client : Depends: mariadb-client-5.5 (= 5.5.41+maria-1~trusty) but 5.5.41-1ubuntu0.14.04.1 is to be installed
 mariadb-galera-server-5.5 : Depends: mariadb-client-5.5 (>= 5.5.41+maria-1~trusty) but 5.5.41-1ubuntu0.14.04.1 is to be installed

description: updated
Changed in openstack-ansible:
milestone: none → next
Changed in openstack-ansible:
assignee: nobody → Jesse Pretorius (jesse-pretorius)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to os-ansible-deployment (master)

Fix proposed to branch: master
Review: https://review.openstack.org/155802

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

Reviewed: https://review.openstack.org/155802
Committed: https://git.openstack.org/cgit/stackforge/os-ansible-deployment/commit/?id=b707e133339983d838eb59dbc624e18a22976ad7
Submitter: Jenkins
Branch: master

commit b707e133339983d838eb59dbc624e18a22976ad7
Author: Jesse Pretorius <email address hidden>
Date: Fri Feb 13 16:13:57 2015 +0000

    Update apt cache after adding repos or pinning

    This patch implements a forced apt cache update after a new apt
    repository is added, or any apt pinning is implemented.

    This ensures that apt is sure about what packages are available to it,
    and which packages/repositories should be preferred above others.

    Change-Id: I2f6e9fa33c7765e8ed8aeaf4ea60be696125c186
    Closes-Bug: #1421679

Changed in openstack-ansible:
status: In Progress → Fix Committed
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/155872

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

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

commit 78524c0b8f31e29efa7d4b5df18aceac437396b1
Author: Jesse Pretorius <email address hidden>
Date: Fri Feb 13 16:13:57 2015 +0000

    Update apt cache after adding repos or pinning

    This patch implements a forced apt cache update after a new apt
    repository is added, or any apt pinning is implemented.

    This ensures that apt is sure about what packages are available to it,
    and which packages/repositories should be preferred above others.

    Change-Id: I2f6e9fa33c7765e8ed8aeaf4ea60be696125c186
    Closes-Bug: #1421679
    (cherry picked from commit b707e133339983d838eb59dbc624e18a22976ad7)

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

Fix proposed to branch: icehouse
Review: https://review.openstack.org/158325

Revision history for this message
Jesse Pretorius (jesse-pretorius) wrote :

Patch https://review.openstack.org/152753 has removed this capability in master, we it needs to be developed for master again.

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

Reviewed: https://review.openstack.org/158325
Committed: https://git.openstack.org/cgit/stackforge/os-ansible-deployment/commit/?id=ee14428d963451daaa0bdaff66c2a536f8add58d
Submitter: Jenkins
Branch: icehouse

commit ee14428d963451daaa0bdaff66c2a536f8add58d
Author: Jesse Pretorius <email address hidden>
Date: Fri Feb 13 16:13:57 2015 +0000

    Update apt cache after adding repos or pinning

    This patch implements a forced apt cache update after a new apt
    repository is added, or any apt pinning is implemented.

    This ensures that apt is sure about what packages are available to it,
    and which packages/repositories should be preferred above others.

    Change-Id: I2f6e9fa33c7765e8ed8aeaf4ea60be696125c186
    Closes-Bug: #1421679
    (cherry picked from commit b707e133339983d838eb59dbc624e18a22976ad7)

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

Fix proposed to branch: master
Review: https://review.openstack.org/158681

Changed in openstack-ansible:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on os-ansible-deployment (master)

Change abandoned by Jesse Pretorius (<email address hidden>) on branch: master
Review: https://review.openstack.org/158681
Reason: The ansible module apt_repository has the default setting of 'update_cache: yes' which handles the equivalent of 'apt-get update' after the repository is added, so this is not required.

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

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related 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.