Print

Print


  Hi Greg,

On Fri, Nov 12, 2004 at 09:21:48AM -0500, Gregory J. Sharp wrote:
> On Nov 12, 2004, at 8:17 AM, Peter Elmer wrote:
> >
> >  Did fixing this have any effect on the problem you reported earlier
> >with the cache file system? (i.e. that the staged file winds up in the
> >index area instead of the cache filesystems themselves).
> 
> Not by itself. It was the first piece of the puzzle. I did it to work 
                                                            ^
                                                           get(?)
> late last night.

  Ah, good.

> The problem is that SLAC uses ooss_Stage, not the thing it distributes 
> to everyone else. (The file is the same, but the behavior is changed by 
> changing the name to mps_Stage.)

  Hmm, ok, at one point I tried to get this consolidated at SLAC such that
xrootd uses the version distributed with the xrootd distribution, but there
were some backwards compatibility complications (namely the fact that the 
ooss_Stage and olbd were originally used with the AMS and Objy and we had
both systems at SLAC) why we got to this mixed system.

  Andy, BaBar now has a concrete plan to phase out Objy event data access
at SLAC (or bring it close to zero, say). Do you object if we move to
using mps_Stage with xrootd instead of ooss_Stage? (And maintain the original 
ooss_Stage only for the special case of the residual objy access.) Other
than sorting out the taylor configurations at SLAC, is there anything else
outstanding to make such a change?

  If you want to look at the SLAC ooss_Stage script currently in use, I've 
put it here:

  http://www.slac.stanford.edu/~elmer/ooss_Stage

In practice the only differences are probably those you suggested to Andy:

kan003> diff /usr/etc/ooss/ooss_Stage ~/xrootd/utils/mps_Stage
3c3
< # $Id: mps_Stage,v 1.5 2004/09/20 12:29:28 abh Exp $
---
> # $Id: mps_Stage,v 1.6 2004/11/04 06:57:05 abh Exp $
681,686c681,682
<    if (/=/) {             # var = val
<       ($var,$val) = /(\S*?)\s*=\s*(.*)/;
<       }
<    else {                 # var val (no equal sign)
<       ($var,$val) = /(\S*)\s*(.*)/;
<       }
---
>    ($var, $val) = split("\s",$_,2);
>    ($x, $val) = split("\s", $val,2) if $val =~ /^= /; # remove =


> To make it work I had to do the following:
> 
> 1. Modify mps_Stage so that it never calls the subroutine Xfr_File. The 
> manual promises that xfrcmd is always called as xfrcmd -f scriptfn 
> xfrhost xfrport. The subroutine Xfr_File calls it with no arguments.  
> By commenting out the setting of XfrCmd from the config file, I 
> prevented Xfr_File from being called.
> 
> 2. I had to put in an mps.scan directive (Dan Riley was right). That 
> was the only way to get $Dolink set to 1 in mps_Stage. That's the only 
> way to get $DoLink set to 1. (It happens in sub InPlace().)

  I'm not sure I understand this. SLAC definitely does not have this in
its config file on the dataservers.
 
                                   Pete

> I also noticed that the fix I made to the config parsing is still not 
> quite good enough. Stripping the white space off $val has to happen 
> before the splits, since we are splitting on white space. So it 
> probably should be:
> 
> while( <CONFIG> ) {
>    chomp;
>    s/#.*$//;       #remove comments
>    s/^\s*//;       #remove leading whitespaces
>    ($var, $val) = split(/\s/,$_,2);
>    $val = (split(/\s/,$val,2))[1] if $val =~ /^=/; # remove =
>    $var =~ tr/ \t\n//d;   #remove whitespaces
>    $val =~ s/\s*$//;      #remove trailing whitespaces
> 
> Somebody should think that through a little more, since it may have 
> other implications.
> 



-------------------------------------------------------------------------
Peter Elmer     E-mail: [log in to unmask]      Phone: +41 (22) 767-4644
Address: CERN Division PPE, Bat. 32 2C-14, CH-1211 Geneva 23, Switzerland
-------------------------------------------------------------------------