LHCb Environment setup

As of September 2015, the CMake configuration and associated scripts to run the projects built thus (lb-run/lb-dev) are available for nearly all LHCb projects. While we can run the projects without cmt, this tool is still used to setup the environment in LbLogin. In order to refactor LbLogin it is necessary to identify its essential features. This is what this document intends to do.

Group environment

The LHCb scripts are not only intended to be run in isolation, from a clean environment, but also have to be installed on machines with HEPIX configurations, and should also support CernVM hosts. Both sh and csh have to be supported and we investigated below the order in which the files are invoked. The HEPIX debugging was turned on by doing:

 echo 100 > ~/.hepix/verbose-level 

And the various configuration files have been modified to add printouts (prefixed with ###)

Bourne shell scripts in a Hepix environment

Here are the files involked when opening a login shell:

[lben@lxplus0032 ~]$ ssh lxplus
Last login: Mon Sep  7 15:46:13 2015 from lxplus0032.cern.ch
* ********************************************************************
* Welcome to lxplus0032.cern.ch, SLC, 6.7
* Archive of news is available in /etc/motd-archive
* Reminder: You have agreed to comply with the CERN computing rules
* http://cern.ch/ComputingRules
* Puppet environment: production
* Puppet hostgroup: bi/inter/plus/live/login
* LXPLUS Public Login Service
* * WARNING, lxplus0032.cern.ch has lemon exceptions:
*  exception.tmp_full

* 2015-08-11 - Updated OpenStack clients to Juno release
* 2015-09-01 - nano the editor(?) installed
* ********************************************************************
hepix: N: CHECK /etc/hepix/sh/HEP/profile
hepix: N: -> SOURCE /etc/hepix/sh/HEP/profile
hepix: N: CHECK /etc/hepix/sh/HEP/env
hepix: N: -> SOURCE /etc/hepix/sh/HEP/env
hepix: N: CHECK /etc/hepix/sh/CORE/pathtools
hepix: N: -> SOURCE /etc/hepix/sh/CORE/pathtools
hepix: N: CHECK /etc/hepix/sh/CORE/pathtools.sh
hepix: N: -> SOURCE /etc/hepix/sh/CORE/pathtools.sh
hepix: N: PROCESSED /etc/hepix/sh/CORE/pathtools.sh
hepix: N: PROCESSED /etc/hepix/sh/CORE/pathtools
hepix: N: CHECK /afs/cern.ch/group/z5/group_sys.conf.sh
hepix: N: CHECK /afs/cern.ch/group/z5/group_env.sh
hepix: N: CHECK /etc/hepix/sh/HEP/rc
hepix: N: -> SOURCE /etc/hepix/sh/HEP/rc
hepix: N: CHECK /afs/cern.ch/group/z5/group_aliases.sh
hepix: N: PROCESSED /etc/hepix/sh/HEP/rc
hepix: N: CHECK /etc/hepix/sh/HEP/bashrc
hepix: N: -> SOURCE /etc/hepix/sh/HEP/bashrc
hepix: N: CHECK /afs/cern.ch/group/z5/group_bashrc
hepix: N: -> SOURCE /afs/cern.ch/group/z5/group_bashrc
hepix: N: PROCESSED /afs/cern.ch/group/z5/group_bashrc
hepix: N: PROCESSED /etc/hepix/sh/HEP/bashrc
hepix: N: PROCESSED /etc/hepix/sh/HEP/env
hepix: W: Your home directory is 95% full.  This may
hepix: W: cause problems, especially when logging in.
hepix: W: Please remove unwanted files, or go to
hepix: W: http://cern.ch/account to increase your quota.
hepix: N: CHECK /afs/cern.ch/group/z5/group_profile
hepix: N: CHECK /afs/cern.ch/group/z5/group_login.sh
hepix: N: -> SOURCE /afs/cern.ch/group/z5/group_login.sh
hepix: N: PROCESSED /afs/cern.ch/group/z5/group_login.sh
hepix: N: CHECK /afs/cern.ch/group/z5/group_termset.sh
hepix: N: PROCESSED /etc/hepix/sh/HEP/profile
### .bash_profile

Now when creating a new shell nothing should be printed out:

-bash-4.1$ bash
### .bashrc
[lben@lxplus0032 ~]$ 

On interesting point is that bash does not read the .bashrc file for non interactive shells:

[lben@lxplus0032 ~]$ bash -c "echo TOTO"
TOTO

bash being the implemnetation we have to deal with in practice, here is its associated documentation: http://www.gnu.org/software/bash/manual/html_node/Bash-Startup-Files.html

C shell scripts in a Hepix environment

Here are the files invoked when opening a login shell:

[benlhcb@lxplus0105 ~]$ ssh lxplus
Last login: Mon Sep  7 16:45:51 2015 from lxplus0105.cern.ch
* ********************************************************************
* Welcome to lxplus0105.cern.ch, SLC, 6.7
* Archive of news is available in /etc/motd-archive
* Reminder: You have agreed to comply with the CERN computing rules
* http://cern.ch/ComputingRules
* Puppet environment: production
* Puppet hostgroup: bi/inter/plus/live/login
* LXPLUS Public Login Service
* 2015-08-11 - Updated OpenStack clients to Juno release
* 2015-09-01 - nano the editor(?) installed
* ********************************************************************
hepix: N: CHECK /etc/hepix/csh/HEP/csh.login
hepix: N: -> SOURCE /etc/hepix/csh/HEP/csh.login
hepix: N: CHECK /etc/hepix/csh/HEP/csh.cshrc
hepix: N: -> SOURCE /etc/hepix/csh/HEP/csh.cshrc
hepix: N: CHECK /afs/cern.ch/group/z5/group_sys.conf.csh
hepix: N: CHECK /afs/cern.ch/group/z5/group_env.csh
hepix: N: CHECK /afs/cern.ch/group/z5/group_aliases.csh
hepix: N: CHECK /afs/cern.ch/group/z5/group_csh.cshrc
hepix: N: CHECK /etc/hepix/csh/HEP/tcshrc
hepix: N: -> SOURCE /etc/hepix/csh/HEP/tcshrc
hepix: N: CHECK /afs/cern.ch/group/z5/group_tcshrc
hepix: N: -> SOURCE /afs/cern.ch/group/z5/group_tcshrc
hepix: N: PROCESSED /afs/cern.ch/group/z5/group_tcshrc
hepix: N: PROCESSED /etc/hepix/csh/HEP/tcshrc
hepix: N: PROCESSED /etc/hepix/csh/HEP/csh.cshrc
hepix: N: CHECK /afs/cern.ch/group/z5/group_csh.login
hepix: N: CHECK /afs/cern.ch/group/z5/group_login.csh
hepix: N: -> SOURCE /afs/cern.ch/group/z5/group_login.csh
********************************************************************************
*                         ---- LHCb Login v8r4p2 ----                          *
*      Building with gcc48 on slc6 x86_64 system (x86_64-slc6-gcc48-opt)       *
********************************************************************************
 --- User_release_area is set to /afs/cern.ch/user/b/benlhcb/cmtuser
 --- LHCBPROJECTPATH is set to:
    /afs/cern.ch/lhcb/software/releases
    /afs/cern.ch/sw/Gaudi/releases
    /afs/cern.ch/sw/lcg/releases
    /afs/cern.ch/sw/lcg/app/releases
--------------------------------------------------------------------------------
hepix: N: PROCESSED /afs/cern.ch/group/z5/group_login.csh
hepix: N: CHECK /afs/cern.ch/group/z5/group_termset.csh
hepix: N: PROCESSED /etc/hepix/csh/HEP/csh.login
### .tcshrc
### .login
[benlhcb@lxplus0105 ~]$ 

Now when creating a new shell nothing should be printed out:

[benlhcb@lxplus0105 ~]$ tcsh 
hepix: N: CHECK /etc/hepix/csh/HEP/csh.cshrc
hepix: N: -> SOURCE /etc/hepix/csh/HEP/csh.cshrc
hepix: N: CHECK /afs/cern.ch/group/z5/group_sys.conf.csh
hepix: N: CHECK /afs/cern.ch/group/z5/group_env.csh
hepix: N: CHECK /afs/cern.ch/group/z5/group_aliases.csh
hepix: N: CHECK /afs/cern.ch/group/z5/group_csh.cshrc
hepix: N: CHECK /etc/hepix/csh/HEP/tcshrc
hepix: N: -> SOURCE /etc/hepix/csh/HEP/tcshrc
hepix: N: CHECK /afs/cern.ch/group/z5/group_tcshrc
hepix: N: -> SOURCE /afs/cern.ch/group/z5/group_tcshrc
hepix: N: PROCESSED /afs/cern.ch/group/z5/group_tcshrc
hepix: N: PROCESSED /etc/hepix/csh/HEP/tcshrc
hepix: N: PROCESSED /etc/hepix/csh/HEP/csh.cshrc
### .tcshrc
[benlhcb@lxplus0105 ~]$ 

On interesting point is that tcsh does read the .tcshc file for non interactive shells:

[benlhcb@lxplus0105 ~]$ tcsh -c "echo TOTO"
### .tcshrc
TOTO

Z shell

[zben@lxplus0002]~% ssh lxplus
Last login: Tue Sep  8 13:33:18 2015 from lxplus0007.cern.ch
* ********************************************************************
* Welcome to lxplus0002.cern.ch, SLC, 6.7
* Archive of news is available in /etc/motd-archive
* Reminder: You have agreed to comply with the CERN computing rules
* http://cern.ch/ComputingRules
* Puppet environment: qa
* Puppet hostgroup: bi/inter/plus/live/login
* LXPLUS Public Login Service
* 2015-08-11 - Updated OpenStack clients to Juno release
* 2015-09-01 - nano the editor(?) installed
* ********************************************************************
hepix: N: CHECK /etc/hepix/sh/HEP/profile
hepix: N: -> SOURCE /etc/hepix/sh/HEP/profile
hepix: N: CHECK /etc/hepix/sh/HEP/env
hepix: N: -> SOURCE /etc/hepix/sh/HEP/env
hepix: N: CHECK /etc/hepix/sh/CORE/pathtools
hepix: N: -> SOURCE /etc/hepix/sh/CORE/pathtools
hepix: N: CHECK /etc/hepix/sh/CORE/pathtools.zsh
hepix: N: -> SOURCE /etc/hepix/sh/CORE/pathtools.zsh
hepix: N: PROCESSED /etc/hepix/sh/CORE/pathtools.zsh
hepix: N: PROCESSED /etc/hepix/sh/CORE/pathtools
hepix: N: CHECK /afs/cern.ch/group/z5/group_sys.conf.sh
hepix: N: CHECK /afs/cern.ch/group/z5/group_env.sh
hepix: N: CHECK /etc/hepix/sh/HEP/rc
hepix: N: -> SOURCE /etc/hepix/sh/HEP/rc
hepix: N: CHECK /afs/cern.ch/group/z5/group_aliases.sh
hepix: N: PROCESSED /etc/hepix/sh/HEP/rc
hepix: N: CHECK /etc/hepix/sh/HEP/zshrc
hepix: N: -> SOURCE /etc/hepix/sh/HEP/zshrc
hepix: N: CHECK /afs/cern.ch/group/z5/group_zshrc
hepix: N: -> SOURCE /afs/cern.ch/group/z5/group_zshrc
hepix: N: PROCESSED /afs/cern.ch/group/z5/group_zshrc
hepix: N: PROCESSED /etc/hepix/sh/HEP/zshrc
hepix: N: PROCESSED /etc/hepix/sh/HEP/env
hepix: N: CHECK /afs/cern.ch/group/z5/group_profile
hepix: N: CHECK /afs/cern.ch/group/z5/group_login.sh
hepix: N: -> SOURCE /afs/cern.ch/group/z5/group_login.sh
hepix: N: PROCESSED /afs/cern.ch/group/z5/group_login.sh
hepix: N: CHECK /afs/cern.ch/group/z5/group_termset.sh
hepix: N: PROCESSED /etc/hepix/sh/HEP/profile
### .zprofile
### .zshrc
### .zlogin

[zben@lxplus0002]~% zsh
hepix: N: CHECK /etc/hepix/sh/HEP/env
hepix: N: -> SOURCE /etc/hepix/sh/HEP/env
hepix: N: CHECK /etc/hepix/sh/CORE/pathtools
hepix: N: -> SOURCE /etc/hepix/sh/CORE/pathtools
hepix: N: CHECK /etc/hepix/sh/CORE/pathtools.zsh
hepix: N: -> SOURCE /etc/hepix/sh/CORE/pathtools.zsh
hepix: N: PROCESSED /etc/hepix/sh/CORE/pathtools.zsh
hepix: N: PROCESSED /etc/hepix/sh/CORE/pathtools
hepix: N: CHECK /afs/cern.ch/group/z5/group_sys.conf.sh
hepix: N: CHECK /afs/cern.ch/group/z5/group_env.sh
hepix: N: CHECK /etc/hepix/sh/HEP/rc
hepix: N: -> SOURCE /etc/hepix/sh/HEP/rc
hepix: N: CHECK /afs/cern.ch/group/z5/group_aliases.sh
hepix: N: PROCESSED /etc/hepix/sh/HEP/rc
hepix: N: CHECK /etc/hepix/sh/HEP/zshrc
hepix: N: -> SOURCE /etc/hepix/sh/HEP/zshrc
hepix: N: CHECK /afs/cern.ch/group/z5/group_zshrc
hepix: N: -> SOURCE /afs/cern.ch/group/z5/group_zshrc
hepix: N: PROCESSED /afs/cern.ch/group/z5/group_zshrc
hepix: N: PROCESSED /etc/hepix/sh/HEP/zshrc
hepix: N: PROCESSED /etc/hepix/sh/HEP/env
### .zshrc
[zben@lxplus0002]~%

[zben@lxplus0002]~% zsh -c "echo TOTO"
TOTO
[zben@lxplus0002]~% 

-- BenjaminCouturier - 2015-09-07

Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r3 - 2015-10-20 - MarcoCattaneo
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    LHCb All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback