Page MenuHomePhabricator

Zuul deployment fails due to unsupported wheel
Closed, ResolvedPublic

Description

I went for a deployment of Zuul with scap deploy --no-log-message --verbose --limit 'contint1001*' and it eventually failed:

/srv/deployment/zuul/venv/bin/pip install --no-deps /srv/deployment/zuul/deploy-cache/revs/a859d0f85d27873e6ab6e9584638403f7aa09a18/artifacts/*.whl
PyYAML-3.11-cp27-cp27mu-linux_x86_64.whl is not a supported wheel on this platform.

/srv/deployment/zuul/venv/bin/pip has a shebang to /srv/deployment/zuul/venv/bin/python2 which is Python 2.7.16

/srv/deployment/zuul/venv/bin/python2
Python 2.7.16 (default, Oct 10 2019, 22:02:15) 
[GCC 8.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pip
>>> from pprint import pprint
>>> pprint(pip.pep425tags.get_supported())
[('cp27', 'none', 'linux_x86_64'),
 ('cp27', 'none', 'any'),
 ('cp2', 'none', 'any'),
 ('cp26', 'none', 'any'),
 ('cp25', 'none', 'any'),
 ('cp24', 'none', 'any'),
 ('cp23', 'none', 'any'),
 ('cp22', 'none', 'any'),
 ('cp21', 'none', 'any'),
 ('cp20', 'none', 'any'),
 ('py27', 'none', 'any'),
 ('py2', 'none', 'any'),
 ('py26', 'none', 'any'),
 ('py25', 'none', 'any'),
 ('py24', 'none', 'any'),
 ('py23', 'none', 'any'),
 ('py22', 'none', 'any'),
 ('py21', 'none', 'any'),
 ('py20', 'none', 'any')]

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMon, Jun 15, 12:03 PM
hashar updated the task description. (Show Details)Mon, Jun 15, 12:10 PM

In the wheel filename cp27-cp27mu stands for CPython 2.7 with wide unicode. Should match a Python compiled with pymalloc (m) and --enable-unicode=ucs4 (u).

In the virtualenv we have:

/srv/deployment/zuul/venv/local/lib/python2.7/site-packages/PyYAML-3.11.dist-info/WHEEL
Wheel-Version: 1.0
Generator: bdist_wheel (0.34.2)
Root-Is-Purelib: false
Tag: cp27-cp27mu-linux_x86_64
$ /srv/deployment/zuul/venv/bin/python2
>>> from pip.wheel import Wheel
>>> Wheel('/srv/deployment/zuul/deploy-cache/revs/a859d0f85d27873e6ab6e9584638403f7aa09a18/artifacts/PyYAML-3.11-cp27-cp27mu-linux_x86_64.whl')
<pip.wheel.Wheel object at 0x7fc87ebfa350>
>>> wheel = Wheel('/srv/deployment/zuul/deploy-cache/revs/a859d0f85d27873e6ab6e9584638403f7aa09a18/artifacts/PyYAML-3.11-cp27-cp27mu-linux_x86_64.whl')
>>> from pprint import pprint
>>> pprint(whee)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'whee' is not defined
>>> pprint(wheel)
<pip.wheel.Wheel object at 0x7fc87da27cd0>
>>> pprint(wheel.__dict__)
{'abis': ['cp27mu'],
 'file_tags': set([('cp27', 'cp27mu', 'linux_x86_64')]),
 'filename': '/srv/deployment/zuul/deploy-cache/revs/a859d0f85d27873e6ab6e9584638403f7aa09a18/artifacts/PyYAML-3.11-cp27-cp27mu-linux_x86_64.whl',
 'name': '/srv/deployment/zuul/deploy-cache/revs/a859d0f85d27873e6ab6e9584638403f7aa09a18/artifacts/PyYAML',
 'plats': ['linux_x86_64'],
 'pyversions': ['cp27'],
 'version': '3.11'}
>>> wheel.supported()
False
>>> 

The wheel file tags set([('cp27', 'cp27mu', 'linux_x86_64')]) are not in pip.pep425tags.supported_tags :(

In the deploy repository we have pip==1.5.6 which is the version from Jessie.

Change 605588 had a related patch set uploaded (by Hashar; owner: Hashar):
[integration/zuul/deploy@master] Drop pip==1.5.6 from requirements

https://gerrit.wikimedia.org/r/605588

Change 605588 merged by Hashar:
[integration/zuul/deploy@master] Drop pip==1.5.6 from requirements

https://gerrit.wikimedia.org/r/605588

Mentioned in SAL (#wikimedia-operations) [2020-06-15T13:20:19Z] <hashar> Stopping zuul-merger on contint1001 to rebuild the virtualenv # T255424

I have dropped pip from the frozen-requirements.txt in order to have virtualenv to install the OS provided pip (which is pip 18.1 on Buster). But that does not get pip upgraded so I had to move /srv/deployment/zuul/venv and for a redeployment:

scap deploy --no-log-message --verbose --limit 'contint1001*' --force

And the wheel has been properly installed: ./lib/python2.7/site-packages/PyYAML-3.11.dist-info/WHEEL

Mentioned in SAL (#wikimedia-operations) [2020-06-15T13:26:22Z] <hashar> Started zuul-merger on contint1001 with newer virtualenv # T255424

I will have to do the same upgrade on contint2001.wikimedia.org. The host also runs the Zuul scheduler and we can't just stop it at anytime.

Mentioned in SAL (#wikimedia-operations) [2020-06-16T06:04:19Z] <hashar> Restarted Zuul scheduler and merger on contint2001 a couple hotfixes # T252310 T255424

hashar closed this task as Resolved.Tue, Jun 16, 6:04 AM