Bug 1297801

Summary: bash warnings seen when running a shell inside RHGS container
Product: Red Hat Gluster Storage Reporter: Shruti Sampat <ssampat>
Component: rhgs-server-containerAssignee: Mohamed Ashiq <mliyazud>
Status: CLOSED CURRENTRELEASE QA Contact: Anoop <annair>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rhgs-3.1CC: hchiramm, mliyazud, pprakash, rcyriac, sankarshan
Target Milestone: ---Keywords: ZStream
Target Release: RHGS 3.1.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rhgs-server-docker-3.1.2-6 Doc Type: Bug Fix
Doc Text:
Cause: due to locale.conf. Consequence: shows warning on every docker exec. Fix: Edited locale.conf in the RHGS image. Result: Warnings are no longer thrown while doing docker exec.
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-01-03 10:50:41 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:

Description Shruti Sampat 2016-01-12 14:00:49 UTC
Description of problem:
-----------------------

On executing /bin/bash in RHGS container, the following bash warnings are seen -

-bash-4.2# docker exec -ti 7e7ec6f85e09384edf20a9366b03af99e563f1b88ea4dda091e47bbe01938e7a /bin/bash
bash: warning: setlocale: LC_CTYPE: cannot change locale (en_US.UTF-8): No such file or directory
bash: warning: setlocale: LC_COLLATE: cannot change locale (en_US.UTF-8): No such file or directory
bash: warning: setlocale: LC_MESSAGES: cannot change locale (en_US.UTF-8): No such file or directory
bash: warning: setlocale: LC_NUMERIC: cannot change locale (en_US.UTF-8): No such file or directory
bash: warning: setlocale: LC_TIME: cannot change locale (en_US.UTF-8): No such file or directory

Version-Release number of selected component (if applicable):
-------------------------------------------------------------
rhgs-server-rhel7:3.1.2-5

How reproducible:
-----------------
100%

Steps to Reproduce:
-------------------
1. Execute /bin/bash in RHGS container -

docker exec -ti <container-id> /bin/bash

Actual results:
---------------
Even though a shell is obtained, the above described warnings are seen.

Expected results:
-----------------
No warnings.

Comment 2 Humble Chirammal 2016-01-14 12:55:57 UTC
These are just warning about the locale which can be ignored, however below solution may resolve this issue.

Removing the below  from /etc/sysconfig/i18n :

LANG="en_US.UTF-8"

@ashiq, can you please try this in dockerfile in your next build?

Comment 3 Humble Chirammal 2016-01-18 11:30:52 UTC
It should be /etc/locale.conf instead of /etc/sysconfig/i18n

[root@dhcp35-20 hchiramm]# cat /etc/locale.conf 
#LANG="en_US.UTF-8"
[root@dhcp35-20 hchiramm]#

Comment 7 Shruti Sampat 2016-01-27 07:03:16 UTC
Verified as fixed in rhgs-server-rhel7:3.1.2-6. Warnings no longer observed.