rcbops / openstack-ops

Tasks and Scripts written by the RPC Support team for use in RPC environments
Apache License 2.0
14 stars 24 forks source link

install-dependencies playbook fails when run from python2 environment #159

Closed rax-rstark closed 4 years ago

rax-rstark commented 4 years ago

Since January 2020 and the release of Setuptools 45, Python 2 is no longer supported by the most current release (discussion). Setuptools as a project continues to support Python 2 with bugfixes and important features on Setuptools 44.x.

This playbook tries to install setuptools latest here, but should pin to <45 for python2 environments.

This error was encountered during a maintenance last weekend:

TASK [Create virtualenv and upgrade setuptools] ********************************
fatal: [XXXXXX-compute31]: FAILED! => {"changed": false, "cmd": "/openstack/venvs/rcbops-r14.23.0/bin/pip install -U --isolated  setuptools", "failed": true, "msg": "stdout: Collecting setuptools\n  Using cached https://files.pythonhosted.org/packages/25/bf/a37e89d3148221fedd4def62bb68749041d79f3840d58a7943f81a6f6c6e/setuptools-47.1.1.zip\n    Complete output from command python setup.py egg_info:\n    pkg_resources/py2_warn.py:15: UserWarning: Setuptools no longer works on Python 2\n    ************************************************************\n    Encountered a version of Setuptools that no longer supports\n    this version of Python. Please head to\n    https://bit.ly/setuptools-py2-sunset for support.\n    ************************************************************\n      warnings.warn(pre + \"*\" * 60 + msg + \"*\" * 60)\n    \n    ----------------------------------------\n\n:stderr: Command \"python setup.py egg_info\" failed with error code 32 in /tmp/pip-build-uceSzA/setuptools/\nYou are using pip version 8.1.2, however version 20.1.1 is available.\nYou should consider upgrading via the 'pip install --upgrade pip' command.\n"}
BjoernT commented 4 years ago

This is already fixed for the ansible-eol branch (https://github.com/rcbops/openstack-ops/commit/e071f104800f249cc1ce6619847258041070b6e1) which tag did you use ?

rax-rstark commented 4 years ago
root@698703-infra01:/opt/openstack-ops# git status
HEAD detached at 1.3.3

root@698703-infra01:/opt/openstack-ops# git tag
1.0.0
1.0.1
1.1.0
1.1.1
1.2.0
1.3.0
1.3.1
1.3.2
1.3.3
BjoernT commented 4 years ago

Fixed with version 1.3.4