Cannot change locale (eo) message printed during successful unit test runs

Bug #1226626 reported by Peter Portante
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Object Storage (swift)
Invalid
Undecided
Unassigned

Bug Description

Swift unit tests run fine on F18, but this error message is printed out during the run, which makes we wonder if this is really working:

sh: warning: setlocale: LC_ALL: cannot change locale (eo): No such file or directory

Revision history for this message
Peter Portante (peter-a-portante) wrote :

This message is also present in the Jenkins python26 jobs that are successful.

Revision history for this message
clayg (clay-gerrard) wrote :

Seems like this error can pop up if your LC_ALL is set to something that's not installed on the system (which is likely for an esoteric locale like Esperanto) - although I'm not exactly sure who's printing the warning? python? sh? who invoked sh?

Might be something to do with the os.environ being set in the parent process before the fork (subprocess.check_output).

If you have an environment that can duplicate the warning try moving the os.environ['LC_ALL'] = 'eo' => from swift import gettext_ lines inside the __main__ check and see if the warning goes away?

Revision history for this message
Li Ma (nick-ma-z) wrote :

I run unit test in a fresh centos 6.4 environment. It reports the same error.

Revision history for this message
Samuel Merritt (torgomatic) wrote :

The warning is emitted by the shell, not by anything in Swift. You can see this with strace.

The remedy is to stop setting the locale to something not installed on the system; this appears to have been done in the Jenkins jobs at some point.

Changed in swift:
status: New → Invalid
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.