- removed comment
SimFactory problems when running from cron
When running from a cron job, the user's profile has not been set up in the usual way. I have to source /etc/profile on Datura to get things like qsub and qstat on the path. Should simfactory do something about this?
Keyword:
Comments (2)
-
-
- edited description
- changed status to wontfix
Running from a cronjob seems unusual enough that doing so (and getting it right) seems like something that only "experts" will want to do. Those are then expected to set up an environment suitable for simfactory. I would rather have simfactory avoid having support for very many exotic uses. If code depend on
$PATH
then a solution is to put the full path toqsub
etc. into the ini file to eliminate any$PATH
dependencies. This also avoids picking up the "wrong" executable if users change their$PATH
from what we expect it to be.A similar issue also exists when using "ssh" to connect to a OSX system since in that case
PATH
differs from what one would normally find.As far as I can tell
sim login
does not executeenvsetup
on the remote side, only on the local side (as part ofExecuteCommand
. To my knowledgeenvsetup
is only executed bysim execute
(and its internal use by simfactory).sim login
tries to mimic what happens by a regularssh
command by executing the shell it starts as a login shell (by passing the-l
option), it relies onbash
to turn a shell whose stdin is network socket into an interactive shell (ie it does not pass the-i
option). - Log in to comment
"sim --remote X ..." usually loads a different than "sim login X; ...". I tend to add code to the "envsetup" MDB entry to correct for this.
One has to be careful to not just source /etc/profile, since this may overwrite people's setting in their /.profile.
In your case, I would decide on a case-by-case basis whether to modify envsetup, or whether to source /etc/profile from the cron job.