Bug 1757168
Summary: | /bin/sh: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8) when running fedora container | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Jun Aruga <jaruga> |
Component: | singularity | Assignee: | Dave Dykstra <dwd> |
Status: | CLOSED NOTABUG | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 30 | CC: | bbockelm, dave.love, dwd |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2019-10-01 11:49:33 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Jun Aruga
2019-09-30 18:01:33 UTC
I can reproduce the issue on el7 with the latest singularity in epel-testing and the following command $ rpm -q singularity singularity-3.4.1-1.1.el7.x86_64 $ LC_ALL=en_US.UTF-8 singularity run docker://fedora echo "fedora" /bin/sh: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8) /bin/sh: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8) fedora The reason is that unlike docker and presumably podman, by default singularity imports all environment variables. You can work around it by using the run --cleanenv or -e option. In addition apparently the fedora container does not by default support the en_US.UTF-8 locale. I can also reproduce by explicitly setting LC_ALL in docker: $ docker run fedora bash -c 'LC_ALL=en_US.UTF-8 echo fedora' bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8): No such file or directory fedora Is that a sufficient answer for you? Hi Dave. Yes, it's a sufficient answer! Thank you for checking it! I was able to suppress the warning with "--cleanenv" option. ``` $ singularity run --cleanenv docker://fedora echo "fedora" fedora ``` I was able to reproduce below warning too. ``` $ docker run fedora bash -c 'LC_ALL=en_US.UTF-8 echo fedora' fedora bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8): No such file or directory ``` I would close this ticket. Thanks, again. |