openstack-ansible/scripts
Chris Smart 92ad6107e1 Tell existing shell about upgraded pip
When using pip to upgrade itself on a system which already has it
installed, the existing shell does not quite know about the new version.
Even though the 'which' command knows about the new package, running
'pip' will actually execute the previous version.

This means any scripts which require a new version of pip will not work
as expected. This is related to 07123ebeaa "Fix wrong version of pip
used in bootstrap" where the wrong version of pip was being used
(although it was fixed in a different manner there due to the use of
virtualenv).

Note that this does not affect systems which do not already have pip
installed, nor instances which run a new shell after upgrading pip.

This can be seen if one uses apt-get to install pip on Ubuntu 14.04 and
then uses pip to upgrade itself. For example:

root@ubuntu:~# apt-get install python-pip

root@ubuntu:~# which pip
/usr/bin/pip

root@ubuntu:~# pip --version
pip 1.5.4 from /usr/lib/python2.7/dist-packages (python 2.7)

root@ubuntu:~# pip install --upgrade pip

root@ubuntu:~# which pip
/usr/local/bin/pip

root@ubuntu:~# pip --version
pip 1.5.4 from /usr/lib/python2.7/dist-packages (python 2.7)

root@ubuntu:~# hash -r pip

root@ubuntu:~# pip --version
pip 8.1.2 from /usr/local/lib/python2.7/dist-packages (python 2.7)

This patch forces the shell to re-hash the location of pip after an
upgrade.

Change-Id: Ifd9182ec862d6f8e9de2f0e4dc7778fbd46bb594
2016-08-24 21:22:09 +10:00
..
upgrade-utilities Add aodh-api init removal upgrade docs and script 2016-08-20 21:02:08 +00:00
ansible-role-requirements-editor.py Adjust ansible-role-requirements-editor file open options 2016-04-15 13:44:59 +01:00
bootstrap-aio.sh Update ansible to version 2.1 2016-06-02 08:54:41 -05:00
bootstrap-ansible.sh Merge "Fix wrong version of pip used in bootstrap" 2016-08-23 13:54:44 +00:00
fastest-infra-wheel-mirror.py Set AIO to use an OpenStack-Infra wheel mirror 2016-05-26 08:00:40 +01:00
federated-login.sh Add project scoped token when obtaning token 2016-04-08 16:20:09 +00:00
gate-check-commit.sh Robust base dir support for bootstrapping 2016-08-20 13:11:15 +00:00
get-pypi-pkg-version.py Update all SHAs for Newton 2016-07-20 2016-07-21 14:12:54 +01:00
inventory-manage.py Resolve pep8 violations caught by pep8 v1.7.0 2016-01-14 00:45:41 +00:00
os-cmd Add an easy way to run cmds in utility container 2016-06-18 09:05:08 +00:00
osa-aio-heat-template.yml Rename everything for the osad to osa name change 2015-09-12 02:31:21 +01:00
pw-token-gen.py Add Ceph/RBD support to playbooks 2015-08-01 19:49:00 +01:00
release-yaml-file-prep.py Add release file prep script 2016-06-15 14:10:18 +00:00
run-playbooks.sh Merge "Robust base dir support for bootstrapping" 2016-08-22 17:56:51 +00:00
run-tempest.sh Robust base dir support for bootstrapping 2016-08-20 13:11:15 +00:00
run-upgrade.sh Set default/fix version numbers in upgrade script 2016-08-23 10:32:04 +00:00
scripts-library.sh Tell existing shell about upgraded pip 2016-08-24 21:22:09 +10:00
sources-branch-updater.sh Robust base dir support for bootstrapping 2016-08-20 13:11:15 +00:00
update-revision.sh Fixes loops for bashate 2015-08-21 15:44:05 +00:00