Workaround for new pip 20.3 behavior

This WA set specific pip version to avoid the issue:
"ERROR: Links are not allowed as constraints" [1]
A proper fix would be to adapt to new pip behavior.
Similar issue on Devstack [2][3]

[1] https://github.com/pypa/pip/issues/8210
[2] https://bugs.launchpad.net/devstack/+bug/1906322
[3] https://review.opendev.org/c/openstack/devstack/+/764803

Change-Id: I49d436b0cf1503b148a04f82e1ee41941ebd9d0a
(cherry picked from commit a93e1cc979)
This commit is contained in:
Martin Chacon Piza 2021-03-31 14:35:41 +02:00
parent 67ac39dfb0
commit 0ace669f3a
1 changed files with 6 additions and 1 deletions

View File

@ -1168,8 +1168,13 @@ function install_monasca_agent {
sudo mkdir -p /opt/monasca-agent || true
sudo chown $STACK_USER:monasca /opt/monasca-agent
# TODO: remove the trailing pip version when a proper fix
# arrives for handling this bug https://github.com/pypa/pip/issues/8210
# Similar issue: https://bugs.launchpad.net/devstack/+bug/1906322
if python3_enabled; then
(cd /opt/monasca-agent ; virtualenv -p python3 .)
(cd /opt/monasca-agent ;
virtualenv -p python3 . ;
bin/python3 -m pip install --upgrade pip==20.2.3)
sudo rm -rf /opt/stack/monasca-common/.eggs/
else
(cd /opt/monasca-agent ; virtualenv .)