Bug #3075

glideins not propery configuring the shell

Added by Igor Sfiligoi over 8 years ago. Updated about 7 years ago.

Target version:
Start date:
Due date:
% Done:


Estimated time:
First Occurred:
Occurs In:


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 over 8 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

       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.

#2 Updated by Igor Sfiligoi over 8 years ago

This has been bitting UNL recently.

Since they share home dirs between grid and interactive use (for local users),
weird things in ~/.bashrc have been preventing Condor/glexec to work as it should.

#3 Updated by Igor Sfiligoi over 8 years ago

I reverted the
logic to copy the /bin/sh into a local directory, instead of dereferencing it.

Committed in

#4 Updated by Parag Mhashilkar over 8 years ago

  • Target version set to v2_6_2

#5 Updated by Igor Sfiligoi over 8 years ago

  • Priority changed from High to Normal
  • Target version deleted (v2_6_2)

Looks like we actually cannot influence which shell Condor executes!

So this patch is effectively a no-op.

#6 Updated by Burt Holzman over 8 years ago

  • Target version set to v3_1

#7 Updated by Burt Holzman almost 8 years ago

  • Target version changed from v3_1 to v3_x

Igor: should we close this since it's in Condor's hands, or do you have hope that we'll get a knob to do this?

#8 Updated by Igor Sfiligoi almost 8 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 almost 8 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.

#10 Updated by Igor Sfiligoi about 7 years ago

Should we do something about this, or just close it?

Also available in: Atom PDF