[GE users] Environment leaking

reuti reuti at staff.uni-marburg.de
Tue Dec 15 11:36:31 GMT 2009


Hi,

Am 15.12.2009 um 12:10 schrieb beatrubi:

> I had a quite strange effect in GE6.2u3 on SLES10. During the  
> weekend I
> restarted all the execution daemons. After this step the PATH was  
> no longer
> set correctly for user jobs.
>
> Doing some debugging I found that the environment of the process  
> starting
> /etc/init.d/sgeexecd is passed to the users jobs. As I used ssh to  
> start the
> execution daemons I found also some SSH related variables :-)
>
>     beat at master:~> cat envtest.sub
>     #!/bin/sh
>
>     #$ -N EnvTest
>     #$ -S /bin/sh
>     #$ -cwd
>     #$ -j y
>
>     set
>
>     beat at master:~> qsub envtest.sub
>     Your job 208 ("EnvTest") has been submitted
>
>     beat at master:~> cat EnvTest.o208
>     ...
>     SSH_CLIENT='10.150.0.1 40038 22'
>     SSH_CONNECTION='10.150.0.1 40038 10.150.0.1 22'
>     SSH_TTY=/dev/pts/9
>     TERM=xterm
>     ...
>     PROFILEREAD=true
>
> The variable $PROFILEREAD is used by SuSE to avoid a second  
> sourcing of
> /etc/profile. It was set by the root shell I used to start the  
> execution
> daemon. Passed through the init script, sge_execd and sge_shepherd  
> to the
> login shell of the job. And there it avoided a clean setup of the
> environment.
>
> In my understanding each program starting user shells should  
> cleanup the
> environment. login and ssh does, even the good old in.telnetd does.  
> Why not
> sge_shepherd?

this can be adjusted in SGE's configuration:

execd_params  INHERIT_ENV=false

(man sge_conf)

-- Reuti


> To workaround my problem I added a line to my init scripts:
>
> --- sgeexecd.cluster.orig    2009-12-12 10:09:46.383474352 +0100
> +++ sgeexecd.cluster    2009-12-15 11:30:44.920153858 +0100
> @@ -36,6 +36,10 @@
>  #___INFO__MARK_END__
>
>  #
> +# Delete environment - sge_execd and sge_shepherd are leaking
> +unset `env | awk -F= '{ print $1 }'`
> +
> +#
>  # This script can be called with the following arguments:
>  #
>  #       start       start execution daemon
>
> Beat
>
> -- 
>      \|/                           Beat Rubischon <beat at 0x1b.ch>
>    ( 0^0 )                             http://www.0x1b.ch/~beat/
> oOO--(_)--OOo---------------------------------------------------
> Meine Erlebnisse, Gedanken und Traeume: http://www.0x1b.ch/blog/
>
> ------------------------------------------------------
> http://gridengine.sunsource.net/ds/viewMessage.do? 
> dsForumId=38&dsMessageId=233475
>
> To unsubscribe from this discussion, e-mail: [users- 
> unsubscribe at gridengine.sunsource.net].

------------------------------------------------------
http://gridengine.sunsource.net/ds/viewMessage.do?dsForumId=38&dsMessageId=233482

To unsubscribe from this discussion, e-mail: [users-unsubscribe at gridengine.sunsource.net].



More information about the gridengine-users mailing list