Can we get rid of CMS_PATH ?

Stefano Belforte and Stephan Lammel started looking into this.

Rational

  • make it easy to add a new site by removin the need for CVMFS customization.
  • simply add a new directory to SITECONF, a new entry in factory.. and go
  • adapt to CMSSW distribution evolution, as of 2016 it does not start from CMS_PATH anymore

Constraint

  • basically need to change the way CMSSW discovers the location of site-local-config.xml and TFC, w/o modifying CMSSW, to avoid having to wait for CMSSW_8_x to be outdated

Solution

  • problem is how to tell software running at the site to pick the right files in SITECONF
  • proposal is to exploit that current CMSSW uses ${CMS_PATH}/SITECONF/local/JobConfig/site-local-config.xml . Stephan and Chris have cooked up a trick which will work as long as we can restrict CMS_PATH to be used only here. In which case no change to CMSSW will be needed.
  • So we need to remove CMS_PATH usage from all other places

Needed changes

  1. there are only a couple occurrentces of CMS_PATH in CMSSW, where likely CMSSW_BASE would do
  2. there are a couple occurrences in WMCore : https://github.com/dmwm/WMCore/search?utf8=%E2%9C%93&q=CMS_PATH
  3. there's one occurrence in CRAB3 : https://github.com/dmwm/CRABServer/search?utf8=%E2%9C%93&q=CMS_PATH
  4. there's some in CMSSW setup scripts, at least in /cvmfs/cms.cern.ch/cmsset_default.sh (cmsset_default.sh is also in other subdirs in CVMFS)
  5. there's more in CRAB2, but let's ignore it : https://github.com/dmwm/CRAB2/search?utf8=%E2%9C%93&q=CMS_PATH https://github.com/dmwm/ProdCommon/search?utf8=%E2%9C%93&q=CMS_PATH
  6. what else ????

stupid details

mail thread on the topic with discussion details
SITECONF local link on CVMFS.eml
Subject: 
SITECONF local link on CVMFS
From: 
Stephan Lammel <lammel@fnal.gov>
Date: 
04/25/2016 09:43 PM
To: 
<stefano.belforte@cern.ch>
CC: 
<shahzad.malik.muzaffar@cern.ch>

Hallo Stefano,
   i talked with Shahzad: the SITECONF/local link is used in
FWCore/Services/src/SiteLocalConfigService.cc and constructs
getenv("CMS_PATH") + "SITECONF/local/JobConfig/site-local-config.xml"
to read in the <event-data>, <calib-data>, and <source-config>
sections. So TFC, frontier, and ?data-popularity?.
   An environmental variable set by the pilot/job wrapper seems fine
for grid sites but how would user desktops determine the site?

   Other occurances are in test, scripts, plugins of RecoLuminosity.
   Thanks,
             cheers,  Stephan

Re: SITECONF local link on CVMFS.eml
Subject: 
Re: SITECONF local link on CVMFS
From: 
Stefano Belforte <stefano.belforte@cern.ch>
Date: 
04/25/2016 11:16 PM
To: 
Stephan Lammel <lammel@fnal.gov>
CC: 
<shahzad.malik.muzaffar@cern.ch>

I do not now how best to code it, but I would imagine something like this:
if CMS_SITE is defined:
 getenv("CMS_PATH") + "SITECONF/"+getenv(CMS_SITE)"+/JobConfig/site-local-config.xml"
else:
 # the current line, i.e.
 getenv("CMS_PATH") + "SITECONF/local/JobConfig/site-local-config.xml"

in other words, "local" is the default site for local installations
(desktops etc.), while at a real site we can set the site name in
the same place where we define CMS_PATH. Pilots put it in the
classAds[1]

does this make sense ?

of course it requires a small change in CRAB and WMA.

Stefano

[1]
e.g. the CRAB3 wrapper does:
JOB_CMSSite=`grep '^JOB_CMSSite =' $_CONDOR_JOB_AD | tr -d '"' | awk '{print $NF;}'
from
https://github.com/dmwm/CRABServer/blob/master/scripts/gWMS-CMSRunAnalysis.sh#L111



On 04/25/2016 09:43 PM, Stephan Lammel wrote:
> Hallo Stefano,
>     i talked with Shahzad: the SITECONF/local link is used in
> FWCore/Services/src/SiteLocalConfigService.cc and constructs
> getenv("CMS_PATH") + "SITECONF/local/JobConfig/site-local-config.xml"
> to read in the <event-data>, <calib-data>, and <source-config>
> sections. So TFC, frontier, and ?data-popularity?.
>     An environmental variable set by the pilot/job wrapper seems fine
> for grid sites but how would user desktops determine the site?
>
>     Other occurances are in test, scripts, plugins of RecoLuminosity.
>     Thanks,
>               cheers,  Stephan

-- 
Stefano Belforte - I.N.F.N.     tel   : +39 040 375-6261 (fax: 375-6258)
Area di Ricerca - Padriciano 99 tel mobile: +39 328 010 7327
34012 TRIESTE TS  - Italy       AIM: stefanobelforte

Re: SITECONF local link on CVMFS.eml
Subject: 
Re: SITECONF local link on CVMFS
From: 
Stefano Belforte <stefano.belforte@cern.ch>
Date: 
04/25/2016 11:17 PM
To: 
Stephan Lammel <lammel@fnal.gov>
CC: 
<shahzad.malik.muzaffar@cern.ch>

hmm...
thinking more... we can't go for a change in FWCore,
it would only be present in new releases.
We need something that can work on all releases.
No ?


stefano


On 04/25/2016 11:16 PM, Stefano Belforte wrote:
> I do not now how best to code it, but I would imagine something like this:
> if CMS_SITE is defined:
>   getenv("CMS_PATH") + "SITECONF/"+getenv(CMS_SITE)"+/JobConfig/site-local-config.xml"
> else:
>   # the current line, i.e.
>   getenv("CMS_PATH") + "SITECONF/local/JobConfig/site-local-config.xml"
>
> in other words, "local" is the default site for local installations
> (desktops etc.), while at a real site we can set the site name in
> the same place where we define CMS_PATH. Pilots put it in the
> classAds[1]
>
> does this make sense ?
>
> of course it requires a small change in CRAB and WMA.
>
> Stefano
>
> [1]
> e.g. the CRAB3 wrapper does:
> JOB_CMSSite=`grep '^JOB_CMSSite =' $_CONDOR_JOB_AD | tr -d '"' | awk '{print $NF;}'
> from
> https://github.com/dmwm/CRABServer/blob/master/scripts/gWMS-CMSRunAnalysis.sh#L111
>
>
>
> On 04/25/2016 09:43 PM, Stephan Lammel wrote:
>> Hallo Stefano,
>>     i talked with Shahzad: the SITECONF/local link is used in
>> FWCore/Services/src/SiteLocalConfigService.cc and constructs
>> getenv("CMS_PATH") + "SITECONF/local/JobConfig/site-local-config.xml"
>> to read in the <event-data>, <calib-data>, and <source-config>
>> sections. So TFC, frontier, and ?data-popularity?.
>>     An environmental variable set by the pilot/job wrapper seems fine
>> for grid sites but how would user desktops determine the site?
>>
>>     Other occurances are in test, scripts, plugins of RecoLuminosity.
>>     Thanks,
>>               cheers,  Stephan
>

-- 
Stefano Belforte - I.N.F.N.     tel   : +39 040 375-6261 (fax: 375-6258)
Area di Ricerca - Padriciano 99 tel mobile: +39 328 010 7327
34012 TRIESTE TS  - Italy       AIM: stefanobelforte

Re: SITECONF local link on CVMFS.eml
Subject: 
Re: SITECONF local link on CVMFS
From: 
Stephan Lammel <lammel@fnal.gov>
Date: 
04/26/2016 08:56 AM
To: 
Stefano Belforte <stefano.belforte@cern.ch>
CC: 
<shahzad.malik.muzaffar@cern.ch>

Ahh, your idea was to keep the link for the desktops/non-grid
machines. A FWCore change will propagate slowly for analysis
but probably quicker for production. And CRAB knows the CMSSW
the users wants. So, i think this should work but not
instantaneously. I'll discuss it with Chris when back at
Fermilab.
             cheers,  Stephan


On Mon, 25 Apr 2016, Stefano Belforte wrote:

> Date: Mon, 25 Apr 2016 21:17:44 +0000
> From: Stefano Belforte <stefano.belforte@cern.ch>
> To: Stephan Lammel <lammel@fnal.gov>
> Cc: shahzad.malik.muzaffar@cern.ch
> Subject: Re: SITECONF local link on CVMFS
>
> hmm...
> thinking more... we can't go for a change in FWCore,
> it would only be present in new releases.
> We need something that can work on all releases.
> No ?
>
>
> stefano
>
>
> On 04/25/2016 11:16 PM, Stefano Belforte wrote:
>>  I do not now how best to code it, but I would imagine something like this:
>>  if CMS_SITE is defined:
>>    getenv("CMS_PATH") +
>>  "SITECONF/"+getenv(CMS_SITE)"+/JobConfig/site-local-config.xml"
>>  else:
>>    # the current line, i.e.
>>    getenv("CMS_PATH") + "SITECONF/local/JobConfig/site-local-config.xml"
>>
>>  in other words, "local" is the default site for local installations
>>  (desktops etc.), while at a real site we can set the site name in
>>  the same place where we define CMS_PATH. Pilots put it in the
>>  classAds[1]
>>
>>  does this make sense ?
>>
>>  of course it requires a small change in CRAB and WMA.
>>
>>  Stefano
>>
>>  [1]
>>  e.g. the CRAB3 wrapper does:
>>  JOB_CMSSite=`grep '^JOB_CMSSite =' $_CONDOR_JOB_AD | tr -d '"' | awk
>>  '{print $NF;}'
>>  from
>>  https://github.com/dmwm/CRABServer/blob/master/scripts/gWMS-CMSRunAnalysis.sh#L111
>>
>>
>>
>>  On 04/25/2016 09:43 PM, Stephan Lammel wrote:
>> >  Hallo Stefano,
>> >      i talked with Shahzad: the SITECONF/local link is used in
>> >  FWCore/Services/src/SiteLocalConfigService.cc and constructs
>> >  getenv("CMS_PATH") + "SITECONF/local/JobConfig/site-local-config.xml"
>> >  to read in the <event-data>, <calib-data>, and <source-config>
>> >  sections. So TFC, frontier, and ?data-popularity?.
>> >      An environmental variable set by the pilot/job wrapper seems fine
>> >  for grid sites but how would user desktops determine the site?
>> > >      Other occurances are in test, scripts, plugins of RecoLuminosity.
>> >      Thanks,
>> >                cheers,  Stephan
>>
>
> -- 
> Stefano Belforte - I.N.F.N.     tel   : +39 040 375-6261 (fax: 375-6258)
> Area di Ricerca - Padriciano 99 tel mobile: +39 328 010 7327
> 34012 TRIESTE TS  - Italy       AIM: stefanobelforte
>
>

Re: SITECONF local link on CVMFS.eml
Subject: 
Re: SITECONF local link on CVMFS
From: 
Stefano Belforte <stefano.belforte@cern.ch>
Date: 
04/26/2016 09:27 AM
To: 
Stephan Lammel <lammel@fnal.gov>
CC: 
<shahzad.malik.muzaffar@cern.ch>



On 04/26/2016 08:56 AM, Stephan Lammel wrote:
> Ahh, your idea was to keep the link for the desktops/non-grid
> machines.

we can also point elsewhere when JOB_CMSSite is not defined,
but why break existing installations ?
I worry of the "slowly propagate", old released stay in usage
for years. Maybe I forgot the use case we had in mind 
But if it is to change the way we deal with SITECONF for
operations, you do not want to wait until 2020.


Stefano

Re: SITECONF local link on CVMFS.eml
Subject: 
Re: SITECONF local link on CVMFS
From: 
Stephan Lammel <lammel@fnal.gov>
Date: 
05/05/2016 11:30 PM
To: 
Stefano Belforte <stefano.belforte@cern.ch>
CC: 
<shahzad.malik.muzaffar@cern.ch>, <lammel@fnal.gov>

Hallo Stefano,
   i talked with Chris and we can do this without modifying the
FWCore code by setting CMS_PATH to the SITECONF area of the site
and adding a SITECONF directory with a link local --> .. in it.
FWCore appends SITECONF/local/JobConfig/site-local-config.xml to
it. So, with the link, it should work for existing/old CMSSW
releases. It's a little obscure but does the trick.
                                                cheers,  Stephan

Re: SITECONF local link on CVMFS.eml
Subject: 
Re: SITECONF local link on CVMFS
From: 
Stefano Belforte <stefano.belforte@cern.ch>
Date: 
05/06/2016 05:09 PM
To: 
Stephan Lammel <lammel@fnal.gov>

Thnaks Stephan,
though I must confess I lost sight a bit of target here.
IIRC we wanted to be able to "centrally configure a site via
adding it to SITECONF w/o need for the site admin to play
tricks to local CVMFS setup".

Is that so ?
Then, IIUC, you have established that this can be done
for new versions of CMSSW, by accepting an env.var.
that glidein (pilot) or WMA/CRAB job wrapper can define.
We can also make it so that local installation (CVMFS or not)
can keep working w/o need of define such a site name.

What do I get wrong this time ?


On 05/05/2016 11:30 PM, Stephan Lammel wrote:
> Hallo Stefano,
>     i talked with Chris and we can do this without modifying the
> FWCore code by setting CMS_PATH to the SITECONF area of the site
> and adding a SITECONF directory with a link local --> .. in it.
> FWCore appends SITECONF/local/JobConfig/site-local-config.xml to
> it. So, with the link, it should work for existing/old CMSSW
> releases. It's a little obscure but does the trick.
>                                                  cheers,  Stephan

Re: SITECONF local link on CVMFS.eml
Subject: 
Re: SITECONF local link on CVMFS
From: 
Stephan Lammel <lammel@fnal.gov>
Date: 
05/06/2016 06:23 PM
To: 
Stefano Belforte <stefano.belforte@cern.ch>

Hallo Stefano,
   yes, so we don't need any code change. Adding a directory with a
link per site to the SITECONF in CVMFS allows to move site selection
from the CVMFS config at each site to the glidein/pilot/job wrapper.
One less, CMS-specific, custom step for sites (and in the direction
of easy use of opportunistic non-CMS grid sites).
                                                    cheers,  Stephan

On Fri, 6 May 2016, Stefano Belforte wrote:

> Date: Fri, 6 May 2016 15:09:00 +0000
> From: Stefano Belforte <stefano.belforte@cern.ch>
> To: Stephan Lammel <lammel@fnal.gov>
> Subject: Re: SITECONF local link on CVMFS
>
> Thnaks Stephan,
> though I must confess I lost sight a bit of target here.
> IIRC we wanted to be able to "centrally configure a site via
> adding it to SITECONF w/o need for the site admin to play
> tricks to local CVMFS setup".
>
> Is that so ?
> Then, IIUC, you have established that this can be done
> for new versions of CMSSW, by accepting an env.var.
> that glidein (pilot) or WMA/CRAB job wrapper can define.
> We can also make it so that local installation (CVMFS or not)
> can keep working w/o need of define such a site name.
>
> What do I get wrong this time ?
>
>
> On 05/05/2016 11:30 PM, Stephan Lammel wrote:
>>  Hallo Stefano,
>>      i talked with Chris and we can do this without modifying the
>>  FWCore code by setting CMS_PATH to the SITECONF area of the site
>>  and adding a SITECONF directory with a link local --> .. in it.
>>  FWCore appends SITECONF/local/JobConfig/site-local-config.xml to
>>  it. So, with the link, it should work for existing/old CMSSW
>>  releases. It's a little obscure but does the trick.
>>                                                   cheers,  Stephan
>

Re: SITECONF local link on CVMFS.eml
Subject: 
Re: SITECONF local link on CVMFS
From: 
Stefano Belforte <stefano.belforte@cern.ch>
Date: 
05/06/2016 09:41 PM
To: 
Stephan Lammel <lammel@fnal.gov>

but will we be able to use this before CMSSW_8_ is obsoleste ?
Or will have to go back to "not all sites support all versions" ?


On 05/06/2016 06:23 PM, Stephan Lammel wrote:
> Hallo Stefano,
>     yes, so we don't need any code change. Adding a directory with a
> link per site to the SITECONF in CVMFS allows to move site selection
> from the CVMFS config at each site to the glidein/pilot/job wrapper.
> One less, CMS-specific, custom step for sites (and in the direction
> of easy use of opportunistic non-CMS grid sites).
>                                                      cheers,  Stephan
>
> On Fri, 6 May 2016, Stefano Belforte wrote:
>
>> Date: Fri, 6 May 2016 15:09:00 +0000
>> From: Stefano Belforte <stefano.belforte@cern.ch>
>> To: Stephan Lammel <lammel@fnal.gov>
>> Subject: Re: SITECONF local link on CVMFS
>>
>> Thnaks Stephan,
>> though I must confess I lost sight a bit of target here.
>> IIRC we wanted to be able to "centrally configure a site via
>> adding it to SITECONF w/o need for the site admin to play
>> tricks to local CVMFS setup".
>>
>> Is that so ?
>> Then, IIUC, you have established that this can be done
>> for new versions of CMSSW, by accepting an env.var.
>> that glidein (pilot) or WMA/CRAB job wrapper can define.
>> We can also make it so that local installation (CVMFS or not)
>> can keep working w/o need of define such a site name.
>>
>> What do I get wrong this time ?
>>
>>
>> On 05/05/2016 11:30 PM, Stephan Lammel wrote:
>>>  Hallo Stefano,
>>>      i talked with Chris and we can do this without modifying the
>>>  FWCore code by setting CMS_PATH to the SITECONF area of the site
>>>  and adding a SITECONF directory with a link local --> .. in it.
>>>  FWCore appends SITECONF/local/JobConfig/site-local-config.xml to
>>>  it. So, with the link, it should work for existing/old CMSSW
>>>  releases. It's a little obscure but does the trick.
>>>                                                   cheers,  Stephan
>>

-- 
Stefano Belforte - I.N.F.N.     tel   : +39 040 375-6261 (fax: 375-6258)
Area di Ricerca - Padriciano 99 tel mobile: +39 328 010 7327
34012 TRIESTE TS  - Italy       AIM: stefanobelforte

Re: SITECONF local link on CVMFS.eml
Subject: 
Re: SITECONF local link on CVMFS
From: 
Stephan Lammel <lammel@fnal.gov>
Date: 
05/06/2016 09:56 PM
To: 
Stefano Belforte <stefano.belforte@cern.ch>

Hallo Stefano,
   it will work with any old releases as there is no code change,
only the extra directory plus link made on CVMFS (or in SITECONF)
for all sites.
                  cheers,  Stephan


On Fri, 6 May 2016, Stefano Belforte wrote:

> Date: Fri, 6 May 2016 19:41:36 +0000
> From: Stefano Belforte <stefano.belforte@cern.ch>
> To: Stephan Lammel <lammel@fnal.gov>
> Subject: Re: SITECONF local link on CVMFS
>
> but will we be able to use this before CMSSW_8_ is obsoleste ?
> Or will have to go back to "not all sites support all versions" ?
>
>
> On 05/06/2016 06:23 PM, Stephan Lammel wrote:
>>  Hallo Stefano,
>>      yes, so we don't need any code change. Adding a directory with a
>>  link per site to the SITECONF in CVMFS allows to move site selection
>>  from the CVMFS config at each site to the glidein/pilot/job wrapper.
>>  One less, CMS-specific, custom step for sites (and in the direction
>>  of easy use of opportunistic non-CMS grid sites).
>>                                                       cheers,  Stephan
>>
>>  On Fri, 6 May 2016, Stefano Belforte wrote:
>>
>> >  Date: Fri, 6 May 2016 15:09:00 +0000
>> >  From: Stefano Belforte <stefano.belforte@cern.ch>
>> >  To: Stephan Lammel <lammel@fnal.gov>
>> >  Subject: Re: SITECONF local link on CVMFS
>> > >  Thnaks Stephan,
>> >  though I must confess I lost sight a bit of target here.
>> >  IIRC we wanted to be able to "centrally configure a site via
>> >  adding it to SITECONF w/o need for the site admin to play
>> >  tricks to local CVMFS setup".
>> > >  Is that so ?
>> >  Then, IIUC, you have established that this can be done
>> >  for new versions of CMSSW, by accepting an env.var.
>> >  that glidein (pilot) or WMA/CRAB job wrapper can define.
>> >  We can also make it so that local installation (CVMFS or not)
>> >  can keep working w/o need of define such a site name.
>> > >  What do I get wrong this time ?
>> > > >  On 05/05/2016 11:30 PM, Stephan Lammel wrote:
>> > >   Hallo Stefano,
>> > >       i talked with Chris and we can do this without modifying the
>> > >   FWCore code by setting CMS_PATH to the SITECONF area of the site
>> > >   and adding a SITECONF directory with a link local --> .. in it.
>> > >   FWCore appends SITECONF/local/JobConfig/site-local-config.xml to
>> > >   it. So, with the link, it should work for existing/old CMSSW
>> > >   releases. It's a little obscure but does the trick.
>> > >                                                    cheers,  Stephan
>> > 
>
> -- 
> Stefano Belforte - I.N.F.N.     tel   : +39 040 375-6261 (fax: 375-6258)
> Area di Ricerca - Padriciano 99 tel mobile: +39 328 010 7327
> 34012 TRIESTE TS  - Italy       AIM: stefanobelforte
>

Re: SITECONF local link on CVMFS.eml
Subject: 
Re: SITECONF local link on CVMFS
From: 
Stephan Lammel <lammel@fnal.gov>
Date: 
05/06/2016 10:28 PM
To: 
Stefano Belforte <stefano.belforte@cern.ch>

Hallo Stefano,
   so FWCore uses a CMS_PATH environmental variable to locate the
SITECONF information for the site. BUT is appends
"SITECONF/local/JobConfig/site-local-config.xml" to the variable.
It's not used for anything else. By default it's set to the env
variable CMSSW_BASE, and
   ${CMSSW_BASE}/SITECONF/local/JobConfig/site-local-config.xml
is used.
   The site admins configure CMSSW so the "local" link in their
CMSSW setup points to their site, so that
   {CVMFS}/SITECONF/local --> {CVMFS}/SITECONF/<my-site>

   If we add a "SITECONF/local" link to all SITECONF areas that
points to the parent directory, i.e. a little loop, then we can
set CMS_PATH in the glidein/pilot/job wrapper to the SITECONF
are of the site. FWCore will look for
   ${CMS_PATH}/SITECONF/local/JobConfig/site-local-config.xml
i.e.
   {CVMFS}/SITECONF/<my-site>/SITECONF/local/JobConfig/site-local...
which will be
   {CVMFS}/SITECONF/<my-site>/JobConfig/site-local-config.xml
and is what we want (and works for all existing releases, etc.)

   (FWCore always adds "SITECONF/local/", thus we have to make
the link loop if we want to keep old releases functioning.)
   Sorry for being too brief before. Does this now make sense?
                                                 cheers,  Stephan

Re: SITECONF local link on CVMFS.eml
Subject: 
Re: SITECONF local link on CVMFS
From: 
Stefano Belforte <stefano.belforte@cern.ch>
Date: 
05/07/2016 10:49 AM
To: 
Stephan Lammel <lammel@fnal.gov>

Things look always better in the morning !

Do I understand it correctly then that this relies on
$CMS_PATH being used only in the SITECONF lookup ?
Since basically the idea is to tweak it in order to
solve the issue of finding the site-specific SITECONF.

Indeed the cmsset_default.sh which is currently in CVMFS
does not use CMS_PATH any more, while when learnt
all of this it was pointing to the top CMSSW directory.
Clearly my knowledge is outdated 

I am afraid this may be true for CMSSW on CVMFS, but..
1. we rely on $CMS_PATH in the job wrappers e.g. to find cmsset_default.sh
2. what about sites w/o CVMFS ?

I guess we can fix 1. in CRAB and WM, or it may even be
that the code we have which uses it is not used in practice
anymore,  but I am fearful of the
"change this to fix that" and "try to figure out
the logic from reading only one specific piece of the code base"
which lead to cancers growth
in so many places in (at least) CRAB code.

Seems time for a clean, fresh, global look at:
   how do we discover and configure CMS environment
once rules are made clear at the core (things like "hey..
we could deprecate CMS_PATH !") then all implementation
details usually become easy to straighten.


Stefano

On 05/06/2016 10:28 PM, Stephan Lammel wrote:
> Hallo Stefano,
>     so FWCore uses a CMS_PATH environmental variable to locate the
> SITECONF information for the site. BUT is appends
> "SITECONF/local/JobConfig/site-local-config.xml" to the variable.
> It's not used for anything else. By default it's set to the env
> variable CMSSW_BASE, and
>     ${CMSSW_BASE}/SITECONF/local/JobConfig/site-local-config.xml
> is used.
>     The site admins configure CMSSW so the "local" link in their
> CMSSW setup points to their site, so that
>     {CVMFS}/SITECONF/local --> {CVMFS}/SITECONF/<my-site>
>
>     If we add a "SITECONF/local" link to all SITECONF areas that
> points to the parent directory, i.e. a little loop, then we can
> set CMS_PATH in the glidein/pilot/job wrapper to the SITECONF
> are of the site. FWCore will look for
>     ${CMS_PATH}/SITECONF/local/JobConfig/site-local-config.xml
> i.e.
>     {CVMFS}/SITECONF/<my-site>/SITECONF/local/JobConfig/site-local...
> which will be
>     {CVMFS}/SITECONF/<my-site>/JobConfig/site-local-config.xml
> and is what we want (and works for all existing releases, etc.)
>
>     (FWCore always adds "SITECONF/local/", thus we have to make
> the link loop if we want to keep old releases functioning.)
>     Sorry for being too brief before. Does this now make sense?
>                                                   cheers,  Stephan

-- 
Stefano Belforte - I.N.F.N.     tel   : +39 040 375-6261 (fax: 375-6258)
Area di Ricerca - Padriciano 99 tel mobile: +39 328 010 7327
34012 TRIESTE TS  - Italy       AIM: stefanobelforte

Re: SITECONF local link on CVMFS.eml
Subject: 
Re: SITECONF local link on CVMFS
From: 
Stephan Lammel <lammel@fnal.gov>
Date: 
05/08/2016 08:48 PM
To: 
Stefano Belforte <stefano.belforte@cern.ch>

Hallo Stefano,
   so yes, Chris said that CMS_PATH is only used for SITECONF.
(I assumed it was THEE CMS path given the name but aparently
not.) I checked in the code browser and there are two script
which use it to find non-SITECONF files (Alpgen and Ignominy?).
I think they really wanted CMSSW_BASE and thought, like me,
CMS_PATH was the right env. variable.
   Yes, the job wrapper script would no longer find the
cmsset_default.sh at ${CMS_PATH}/cmsset_default.sh.
   Sites without CVMFS should be fine, since they have the
"SITECONF/local" pointing to their site SITECONF area anyhow.

   I agree, straightening out the env. variables, documenting
what should be used for what, would be the right approach. The
name CMS_PATH to find SITECONF information is not a good
choice. And then we are talking years to flush out old releases.
May be something to brainstorm/discuss at an comp/offline week.
                                                cheers,  Stephan


On Sat, 7 May 2016, Stefano Belforte wrote:

> Date: Sat, 7 May 2016 08:49:30 +0000
> From: Stefano Belforte <stefano.belforte@cern.ch>
> To: Stephan Lammel <lammel@fnal.gov>
> Subject: Re: SITECONF local link on CVMFS
>
> Things look always better in the morning !
>
> Do I understand it correctly then that this relies on
> $CMS_PATH being used only in the SITECONF lookup ?
> Since basically the idea is to tweak it in order to
> solve the issue of finding the site-specific SITECONF.
>
> Indeed the cmsset_default.sh which is currently in CVMFS
> does not use CMS_PATH any more, while when learnt
> all of this it was pointing to the top CMSSW directory.
> Clearly my knowledge is outdated 
>
> I am afraid this may be true for CMSSW on CVMFS, but..
> 1. we rely on $CMS_PATH in the job wrappers e.g. to find cmsset_default.sh
> 2. what about sites w/o CVMFS ?
>
> I guess we can fix 1. in CRAB and WM, or it may even be
> that the code we have which uses it is not used in practice
> anymore,  but I am fearful of the
> "change this to fix that" and "try to figure out
> the logic from reading only one specific piece of the code base"
> which lead to cancers growth
> in so many places in (at least) CRAB code.
>
> Seems time for a clean, fresh, global look at:
>   how do we discover and configure CMS environment
> once rules are made clear at the core (things like "hey..
> we could deprecate CMS_PATH !") then all implementation
> details usually become easy to straighten.
>
>
> Stefano
>
> On 05/06/2016 10:28 PM, Stephan Lammel wrote:
>>  Hallo Stefano,
>>      so FWCore uses a CMS_PATH environmental variable to locate the
>>  SITECONF information for the site. BUT is appends
>>  "SITECONF/local/JobConfig/site-local-config.xml" to the variable.
>>  It's not used for anything else. By default it's set to the env
>>  variable CMSSW_BASE, and
>>      ${CMSSW_BASE}/SITECONF/local/JobConfig/site-local-config.xml
>>  is used.
>>      The site admins configure CMSSW so the "local" link in their
>>  CMSSW setup points to their site, so that
>>      {CVMFS}/SITECONF/local --> {CVMFS}/SITECONF/<my-site>
>>
>>      If we add a "SITECONF/local" link to all SITECONF areas that
>>  points to the parent directory, i.e. a little loop, then we can
>>  set CMS_PATH in the glidein/pilot/job wrapper to the SITECONF
>>  are of the site. FWCore will look for
>>      ${CMS_PATH}/SITECONF/local/JobConfig/site-local-config.xml
>>  i.e.
>>      {CVMFS}/SITECONF/<my-site>/SITECONF/local/JobConfig/site-local...
>>  which will be
>>      {CVMFS}/SITECONF/<my-site>/JobConfig/site-local-config.xml
>>  and is what we want (and works for all existing releases, etc.)
>>
>>      (FWCore always adds "SITECONF/local/", thus we have to make
>>  the link loop if we want to keep old releases functioning.)
>>      Sorry for being too brief before. Does this now make sense?
>>                                                    cheers,  Stephan
>
> -- 
> Stefano Belforte - I.N.F.N.     tel   : +39 040 375-6261 (fax: 375-6258)
> Area di Ricerca - Padriciano 99 tel mobile: +39 328 010 7327
> 34012 TRIESTE TS  - Italy       AIM: stefanobelforte
>
>

Re: SITECONF local link on CVMFS.eml
Subject: 
Re: SITECONF local link on CVMFS
From: 
Stefano Belforte <stefano.belforte@cern.ch>
Date: 
05/09/2016 08:47 AM
To: 
Stephan Lammel <lammel@fnal.gov>



On 05/08/2016 08:48 PM, Stephan Lammel wrote:
>   Yes, the job wrapper script would no longer find the
> cmsset_default.sh at ${CMS_PATH}/cmsset_default.sh.

I gave a look around WMCore and CRAB, may be not difficult
all in all. An approach which worked in similar past occasions would be:
1- review current usage
2- spell new rules
3- edit what's needed

Most of the time will go in "communication".

If you are willing to go this way, let's start a short twiki
to collect 1. I see you've got CMSSW pretty much covered
already, I can add CRAB and WMCore and then we can circulate
to others for what we've missed. I will certainly appreciate
no being alone here !

Stefano

Re: SITECONF local link on CVMFS.eml
Subject: 
Re: SITECONF local link on CVMFS
From: 
Stephan Lammel <lammel@fnal.gov>
Date: 
05/06/2016 10:30 PM
To: 
Stefano Belforte <stefano.belforte@cern.ch>

P.S.: We, centrally, would add the loop link once for all sites
      and site admins would no longer need to customize the CVMFS
      setup at their site for CMS.

-- StefanoBelforte - 2016-05-09

Edit | Attach | Watch | Print version | History: r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r1 - 2016-05-09 - StefanoBelforte
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    CMSPublic All webs login

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