missing locale within mysql-shell snap
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Community Project |
New
|
Undecided
|
Unassigned | ||
OpenStack Snap |
New
|
Undecided
|
Unassigned | ||
snap-mysql-shell |
New
|
Undecided
|
Unassigned | ||
openstack (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
There is small issue currently with mysql-shell as it is right now.
It is reproducible on any Ubuntu deployment using this snap since its related to the snap environment itself.
(Tested in my case on Focal and Impish even with the locale en_US.UTF-8 generated on the system)
Whenever running mysql-shell command, it will complain right at the beginning about missing a locale
```
$ mysql-shell.mysqlsh
Cannot set LC_ALL to locale en_US.UTF-8: No such file or directory
MySQL Shell 8.0.23
```
While this is not blocking any command. It also pollutes messages and logs on mysql-innodb-
It happens on mysql-shell based on version 8.0.23 and also 8.0.27 when I tried to rebuilt the snap from upstream version with the latest matching tag set on snapcraft.yaml file.
When looking at the source code of mysql-shell, this error is triggered from main.cc in the source code, where apparently the locale to use, en_US.UTF-8, is simply hardcoded : [1]
However from the snap environment of mysql-shell, only the locales C, C.UTF-8 are available.
I'm missing some informations about the way MySQL handles really the locale, but to fix this issue it will probably requires either to :
* install the locale en_US in the core18 environement
* make mysql-shell to use the only available locale in Ubuntu Core
For the first option, it doesn't seem simple since I couldn't find a way to add a locale and specify it on Ubuntu Core 18 image.
And just as a test for the second point, I made a quick and somewhat crude patch replacing all the en_US.UTF-8 entries to C.UTF-8 with the help of sed. It makes at least the initial error disappear when using mysql-shell but I haven't tested more since I don't know what is the right approach to fix this.
On minor issues regarding the snap package building itself :
a) There is an issue regarding the repository used for library boost where I get a 403 error from the server whenever I try to pull the archive.
I was able to circumvent this by obtening the archive here : [2]
b) to build the package, I also needed to add gcc-8 and g++-8 as requirements for the build-packages section in the snapcraft.yaml .
[1] : https:/
[2] : https:/
description: | updated |
description: | updated |
I don't know how to link it properly to this ticket but I've made a fork of the repository with my patch implemented here and the snapcraft.yaml updated accordingly for testing (although it is probably not implemented the best way) : /code.launchpad .net/~odufourc/ snap-mysql- shell/+ git/snap- mysql-shell
https:/