Wrong pip package versions after upgrade

Bug #1489251 reported by Jordan Callicoat
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack-Ansible
Fix Released
High
Jesse Pretorius
Juno
Invalid
High
Unassigned
Kilo
Fix Released
High
Jesse Pretorius
Trunk
Fix Released
High
Jesse Pretorius

Bug Description

If an environment is upgraded to a new release, pip packages from the old requirements.txt will remain installed even if the new requirements.txt requires previous or conflicting package versions.

10.1.3 requirements.txt has:

Jinja2==2.7.3
PyYAML==3.11

10.1.11 requirements.txt has:

Jinja2<=2.7.2
PyYAML>=3.1.0,<=3.10

Upgraded 10.1.11 environment has:

root@87b035a9-infra1:/opt/os-ansible-deployment/rpc_deployment# pip freeze | fgrep -e Jinja -e PyYAML
You are using pip version 6.1.1, however version 7.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Jinja2==2.7.3
PyYAML==3.11

Though this bug is reported with the above packages, it applies to *all* pip packages where versions in requirements.txt have changed between tags.

I tried passing -e pip_install_options="--force-reinstall" when running setup-everything, but I still have the newer versions of the packages.

Revision history for this message
Nolan Brubaker (nolan-brubaker) wrote :

Has this demonstrated improper behavior? Does the install fail, or does it break services?

Changed in openstack-ansible:
status: New → Incomplete
Revision history for this message
Jordan Callicoat (jcallicoat) wrote :

"Incomplete (Reporter, Give Us More Information!)

This is the status around which the Bug Janitor’s expiration code works. It is an intermediate stage between New and Confirmed; it means that someone has looked at the bug, attempted to understand or reproduce it, and needs more information to be able to confirm it is in fact a bug."

What further information do you need about this bug? Is there some scenario where you intend the wrong packages to be installed after an upgrade?

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

This is a real issue between many tags due to upstream requirements changes and cap changes all the time.

Changed in openstack-ansible:
status: Incomplete → Confirmed
importance: Undecided → High
assignee: nobody → Jesse Pretorius (jesse-pretorius)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to openstack-ansible (master)

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

Changed in openstack-ansible:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstack-ansible (master)

Reviewed: https://review.openstack.org/229383
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible/commit/?id=2c19010ff9a936c5d0ad3d72e2015308c105ff0f
Submitter: Jenkins
Branch: master

commit 2c19010ff9a936c5d0ad3d72e2015308c105ff0f
Author: Jesse Pretorius <email address hidden>
Date: Wed Sep 30 12:48:13 2015 +0100

    Allow pip extra arguments to be passed to playbooks

    This patch adds the variable 'pip_install_options' which is passed to the pip
    install module as extra arguments in order to allow the use of options like
    '--force-reinstall' when executing playbooks.

    eg: openstack-ansible -e pip_install_options="--force-reinstall" \
            setup-openstack.yml

    This is required due to constant upstream changes in dependencies which
    result in python wheel version upgrades and downgrades between tagged
    versions of openstack-ansible.

    The intention is that this can be used whenever a deployer switches between
    tags for both upgrades and downgrades.

    DocImpact
    Closes-Bug: #1489251
    Closes-Bug: #1499451
    Related-Bug: #1501114
    Change-Id: I996185e009a4c4af4f23798619bdbd0d490360c9

Changed in openstack-ansible:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstack-ansible (kilo)

Reviewed: https://review.openstack.org/229542
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible/commit/?id=f5e3b1171f41ff10b60725c7c30d13a18f3156ca
Submitter: Jenkins
Branch: kilo

commit f5e3b1171f41ff10b60725c7c30d13a18f3156ca
Author: Jesse Pretorius <email address hidden>
Date: Wed Sep 30 12:48:13 2015 +0100

    Allow pip extra arguments to be passed to playbooks

    This patch adds the variable 'pip_install_options' which is passed to the pip
    install module as extra arguments in order to allow the use of options like
    '--force-reinstall' when executing playbooks.

    eg: openstack-ansible -e pip_install_options="--force-reinstall" \
            setup-openstack.yml

    This is required due to constant upstream changes in dependencies which
    result in python wheel version upgrades and downgrades between tagged
    versions of openstack-ansible.

    The intention is that this can be used whenever a deployer switches between
    tags for both upgrades and downgrades.

    DocImpact
    Closes-Bug: #1489251
    Closes-Bug: #1499451
    Related-Bug: #1501114
    Change-Id: I996185e009a4c4af4f23798619bdbd0d490360c9
    (cherry picked from commit 2c19010ff9a936c5d0ad3d72e2015308c105ff0f)

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

For Juno, the pip install options can already be used - so closing this bug for Juno as invalid.

Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote : Fix included in openstack/openstack-ansible 11.2.11

This issue was fixed in the openstack/openstack-ansible 11.2.11 release.

Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/openstack-ansible 11.2.12

This issue was fixed in the openstack/openstack-ansible 11.2.12 release.

Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote : Fix included in openstack/openstack-ansible 11.2.14

This issue was fixed in the openstack/openstack-ansible 11.2.14 release.

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.