kolla vmtp image does not build on ubuntu bionic (and other Unicode issues)

Bug #1845306 reported by Radosław Piliszek
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kolla
Fix Released
Critical
Radosław Piliszek

Bug Description

tabulate has been updated in PyPI to 0.8.4 today and breaks builds:

INFO:kolla.common.utils.vmtp:Collecting tabulate>=0.7.3 (from vmtp==2.5.1.dev17)
INFO:kolla.common.utils.vmtp: Downloading http://mirror.ord.rax.opendev.org:8080/pypifiles/packages/76/35/ae65ed1268d6e2a1be141723e5fffdf4a28e4f4e7c1e083709b308998f90/tabulate-0.8.4.tar.gz (45kB)
INFO:kolla.common.utils.vmtp: ERROR: Command errored out with exit status 1:
INFO:kolla.common.utils.vmtp: command: /var/lib/kolla/venv/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-a0204_59/tabulate/setup.py'"'"'; __file__='"'"'/tmp/pip-install-a0204_59/tabulate/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info
INFO:kolla.common.utils.vmtp: cwd: /tmp/pip-install-a0204_59/tabulate/
INFO:kolla.common.utils.vmtp: Complete output (5 lines):
INFO:kolla.common.utils.vmtp: Traceback (most recent call last):
INFO:kolla.common.utils.vmtp: File "<string>", line 1, in <module>
INFO:kolla.common.utils.vmtp: File "/tmp/pip-install-a0204_59/tabulate/setup.py", line 25, in <module>
INFO:kolla.common.utils.vmtp: f.write(LONG_DESCRIPTION)
INFO:kolla.common.utils.vmtp: UnicodeEncodeError: 'ascii' codec can't encode characters in position 5711-5728: ordinal not in range(128)
INFO:kolla.common.utils.vmtp: ----------------------------------------
INFO:kolla.common.utils.vmtp:
INFO:kolla.common.utils.vmtp:ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
INFO:kolla.common.utils.vmtp:

Revision history for this message
Radosław Piliszek (yoctozepto) wrote :

CentOS 7 not affected (python 2.7)

Ubuntu Bionic (18.04) has Python 3.6

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to kolla (master)

Related fix proposed to branch: master
Review: https://review.opendev.org/684687

Revision history for this message
Radosław Piliszek (yoctozepto) wrote : Re: kolla vmtp image does not build on ubuntu bionic

Debian Buster (10) not affected either (python 3.7) - weird

Revision history for this message
Radosław Piliszek (yoctozepto) wrote :

Seems to be something internal to kolla as tabulate installs fine on my Ubuntu workstation (wanted to debug but "it works for me" (TM) happened).

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to kolla (master)

Fix proposed to branch: master
Review: https://review.opendev.org/684808

Changed in kolla:
assignee: nobody → Radosław Piliszek (yoctozepto)
status: Triaged → In Progress
Revision history for this message
Radosław Piliszek (yoctozepto) wrote : Re: kolla vmtp image does not build on ubuntu bionic

0.8.4 fixed by using Unicode locale in Ubuntu (somehow CentOS and Debian did not care)

Revision history for this message
Radosław Piliszek (yoctozepto) wrote :

0.8.5 released not so long ago seems to have fixed the issue for non-unicode too

no longer affects: vmtp
Changed in kolla:
status: In Progress → Fix Released
Revision history for this message
Will Szumski (willjs) wrote :

Somewhat bizarrely the troublesome:

        with open("LONG_DESCRIPTION.md", "w") as f:
            f.write(LONG_DESCRIPTION)

only appears in the 0.8.4 python package from pypi. It is absent from the source in github and has since been removed in 0.8.5. I can only think it was added for debugging purposes and accidentally made it into the release.

Revision history for this message
Radosław Piliszek (yoctozepto) wrote :

Indeed, Will, I shared the same thought on IRC. More bizarrely it was never in the git repo of tabulate. Looks like local development dump made it into PyPI. Things happen. ;-)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on kolla (master)

Change abandoned by Radosław Piliszek (<email address hidden>) on branch: master
Review: https://review.opendev.org/684687
Reason: no longer an issue

Revision history for this message
Radosław Piliszek (yoctozepto) wrote :

Indeed looks like we need to modernize:
2019-10-02 07:21:00.045 17 ERROR glance.db.sqlalchemy.metadata [-] Failed to parse json file /etc/glance/metadefs/compute-hypervisor.json while populating metadata due to: 'ascii' codec can't decode byte 0xc2 in position 898: ordinal not in range(128): UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 898: ordinal not in range(128) 2019-10-02 07:21:00.656 17 ERROR glance.db.sqlalchemy.metadata [-] Failed to parse json file /etc/glance/metadefs/software-runtimes.json while populating metadata due to: 'ascii' codec can't decode byte 0xe2 in position 1367: ordinal not in range(128): UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 1367: ordinal not in range(128) 2019-10-02 07:21:00.707 17 ERROR glance.db.sqlalchemy.metadata [-] Failed to parse json file /etc/glance/metadefs/compute-trust.json while populating metadata due to: 'ascii' codec can't decode byte 0xc2 in position 90: ordinal not in range(128): UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 90: ordinal not in range(128) 2019-10-02 07:39:48.431 16 ERROR glance.db.sqlalchemy.metadata [-] Failed to parse json file /etc/glance/metadefs/compute-hypervisor.json while populating metadata due to: 'ascii' codec can't decode byte 0xc2 in position 898: ordinal not in range(128): UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 898: ordinal not in range(128) 2019-10-02 07:39:48.472 16 ERROR glance.db.sqlalchemy.metadata [-] Failed to parse json file /etc/glance/metadefs/software-runtimes.json while populating metadata due to: 'ascii' codec can't decode byte 0xe2 in position 1367: ordinal not in range(128): UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 1367: ordinal not in range(128) 2019-10-02 07:39:48.477 16 ERROR glance.db.sqlalchemy.metadata [-] Failed to parse json file /etc/glance/metadefs/compute-trust.json while populating metadata due to: 'ascii' codec can't decode byte 0xc2 in position 90: ordinal not in range(128): UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 90: ordinal not in range(128)

summary: - kolla vmtp image does not build on ubuntu bionic
+ kolla vmtp image does not build on ubuntu bionic (and other Unicode
+ issues)
Revision history for this message
Radosław Piliszek (yoctozepto) wrote :

reason debian not affected: https://www.python.org/dev/peps/pep-0538/

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to kolla (master)

Reviewed: https://review.opendev.org/684808
Committed: https://git.openstack.org/cgit/openstack/kolla/commit/?id=a266023ab572f6dc728271a2f3936c385674c08a
Submitter: Zuul
Branch: master

commit a266023ab572f6dc728271a2f3936c385674c08a
Author: Radosław Piliszek <email address hidden>
Date: Wed Sep 25 18:28:38 2019 +0200

    Use C.UTF-8 locale

    This ought to fix problems with Unicode,
    including the recent vmtp issue with tabulate 0.8.4 failing
    due to non-Unicode locale (Ubuntu Bionic 18.04 Python 3.6).

    Change-Id: I8b55a6a260cab14c2292cac02a1a07729223c281
    Related-bug: #1845306
    Signed-off-by: Radosław Piliszek <email address hidden>

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.