From: Kefu Chai Date: Tue, 17 Aug 2021 07:53:51 +0000 (+0800) Subject: mgr/dashboard/api: set a UTF-8 locale when running pip X-Git-Tag: v16.2.6~56^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F42829%2Fhead;p=ceph.git mgr/dashboard/api: set a UTF-8 locale when running pip ansible-core started to include files whose filenames are encoded in non-ascii characters, so we have to use a more capable encoding for the locale in order to install this package. otherwise we'd have following error: Collecting ansible-core<2.12,>=2.11.3 Using cached ansible-core-2.11.4.tar.gz (6.8 MB) ERROR: Exception: Traceback (most recent call last): File "/tmp/tmp.fX76ASIrch/venv/lib/python3.8/site-packages/pip/_internal/cli/base_command.py", line 173, in _main status = self.run(options, args) ... File "/tmp/tmp.fX76ASIrch/venv/lib/python3.8/site-packages/pip/_internal/utils/unpacking.py", line 226, in untar_file with open(path, "wb") as destfp: UnicodeEncodeError: 'latin-1' codec can't encode characters in position 137-140: ordinal not in range(256) Signed-off-by: Kefu Chai (cherry picked from commit 05e4145856bb5ed19ecc879f2e50b5a88cb2045e) --- diff --git a/src/pybind/mgr/dashboard/run-backend-api-tests.sh b/src/pybind/mgr/dashboard/run-backend-api-tests.sh index 3c1d2e8b8b40..7ce0aa6d95f3 100755 --- a/src/pybind/mgr/dashboard/run-backend-api-tests.sh +++ b/src/pybind/mgr/dashboard/run-backend-api-tests.sh @@ -163,6 +163,8 @@ cleanup_teuthology() { unset cleanup_teuthology } +export LC_ALL=en_US.UTF-8 + setup_teuthology setup_coverage run_teuthology_tests --create-cluster-only