https://bugzilla.wikimedia.org/show_bug.cgi?id=58784

--- Comment #7 from Tim Landscheidt <t...@tim-landscheidt.de> ---
(In reply to comment #5)
> [...]
> My assumption (and fear :-)) is that SGE sources ~/.profile before job
> execution, which means that there will be a *lot* of confusion on where to
> configure locales and how they are evaluated.

> I don't want to go down that road if it can be avoided.  Is it possible to
> explicitely set the locale in Python?  Otherwise we could change jsub so that
> users can use qsub's "-v" option to set the locale in the environment:
> [...]

No, we can't as a test on my account with setting LANG to de_DE.UTF-8 in
~/.profile shows:

| scfc@tools-login:~$ qsub -b y -v LANG=it_IT.UTF-8 env
| Your job 1935416 ("env") has been submitted
| scfc@tools-login:~$ fgrep LANG env.o1935416 
| LANG=de_DE.UTF-8
| scfc@tools-login:~$

In bug #48811 we encountered a similar problem: We need "-b y" for binary
programs, but "-b y" adds a (login) shell to the call stack:

| scfc@tools-login:~$ { echo '#!/usr/bin/python'; echo 'import os'; echo 'print
os.environ["LANG"]'; } > env-test.py && chmod +x env-test.py
| scfc@tools-login:~$ qsub -N test-without-b-y -v LANG=it_IT.UTF-8
./env-test.py 
| Your job 1935503 ("test-without-b-y") has been submitted
| scfc@tools-login:~$ qsub -N test-with-b-y -b y -v LANG=it_IT.UTF-8
./env-test.py 
| Your job 1935504 ("test-with-b-y") has been submitted
| scfc@tools-login:~$ grep . test-with*-b-y.*
| test-with-b-y.o1935504:de_DE.UTF-8
| test-without-b-y.o1935503:it_IT.UTF-8

There is a configuration variable login_shells in sge_conf(5), but I'll need to
whip up Toolsbeta in shape to evaluate options.

For the time being I suggest wrapper scripts.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to