glideins not propery configuring the shell
glideins redefine the SH attribute for Condor.
Unfortunately, they do it in the wrong way!
The current method is do use the output of
readlink -f /bin/sh
However, some shells (e.g. bash) behave differently if they are called as
or with their real name.
So by changing the name, we effectively change the semantics.
With possibly many bad side effects.
#1 Updated by Igor Sfiligoi about 7 years ago
Here is the description of this behavior from the bash manual:
When bash is started non-interactively, to run a shell script, for example, it looks for the variable BASH_ENV in the environment, expands its value if it appears there, and uses the expanded value as the name of a file to read and execute. Bash behaves as if the following com‐ mand were executed: if [ -n "$BASH_ENV" ]; then . "$BASH_ENV"; fi but the value of the PATH variable is not used to search for the file name. If bash is invoked with the name sh, it tries to mimic the startup behavior of historical versions of sh as closely as possible, while conforming to the POSIX standard as well. ... A non-interactive shell invoked with the name sh does not attempt to read any other startup files. When invoked as sh, bash enters posix mode after the startup files are read.
#8 Updated by Igor Sfiligoi over 6 years ago
- Status changed from New to Feedback
- Assignee changed from Igor Sfiligoi to Burt Holzman
Sorry... I thought it was already closed.
As said above, it is impossible to influence what condor does!
The only possible action item is to clean out any code from the glideins that actually does something in that context.
#9 Updated by Burt Holzman over 6 years ago
- Status changed from Feedback to Assigned
I don't think there's anything to do on the code/script side for us, then. I think we just should just a warning to the documentation that .bashrc (and other startup scripts) could interfere with normal glideinWMS operation.