Hi Fabrizio and Roeberto,
we are using prepare, so I can give you some hints. There is NO bug
inside that class. Buff should be passed in, because, the buff was
generated from ldir to take into account instance names. Instance names
are used when you are running multiple xrootd servers per a node. This
is just that if your logdir /tmp and your instance name is padova then
buff will be /tmp/padova.
I am not sure what you are trying to do with prepare, but we are using
it to stage files from HPSS (MSS at BNL).
I have noticed several miss-configuration in your configuration file.
Again, don't know what you are trying to achieve with it.
First of all, there must be olb.prep command defined somewhere in the
configuration (You can use mps.prep which is shipped with xroot
tarball). This mps_prep command writes files to be prepared to defined
path. (For example mps.pstg.prtyfn /tmp/XROOTD_PROD/pre_stage.queue).
Then there must be a procedure which will prepare those files on server
side. We are using mps_PreStage command. That scripts uses queue file
(mps.pstg.prtyfn) and preparing files from this queue. Note that
mps_PreStage command needs to be started by external process (none of
the xrootd, olbd starts this executable).Also if you are using prepare
in client, you need to specify flag kXr_Stage, so that missing files can
be staged.
If you are just trying to prepare files on redirector node to get rid of
the lookup delay then please forget the entire story about mps_PreStage
and mps_prep in olb.
If you want look, I have put our configuration files here:
http://www.star.bnl.gov/~pjakl/documents/configuration.cfg
Let me know, if I can assist you more.
Pavel
Fabrizio Furano wrote:
> Hi Andy,
>
> in trying to set up a prepare-enabled staging system in Padova we
> found problems in using the xrootd.prep directive. Here, the server
> refuses to accept any value for it saying that the directory does not
> exist (even things like /tmp).
> Roberto spotted this small bug in XrdXrootdConfig.cc, after the
> correction the server now starts but the prepare request still does
> nothing. I put here the small fix and our test xrootd.cf file, please
> could you have a look at it to see if we forgot to set something to
> put the prepare at work?
> BTW the normal staging works fine!
>
> Thank you
> Fabrizio
>
> Index: XrdXrootdConfig.cc
> ===================================================================
> RCS file:
> /afs/slac.stanford.edu/g/babar/repo/xrootd/src/XrdXrootd/XrdXrootdConfig.cc,v
>
> retrieving revision 1.37
> diff -r1.37 XrdXrootdConfig.cc
> 776c776
> < || (rc = XrdXrootdPrepare::setParms(buff)) < 0)
> ---
> > || (rc = XrdXrootdPrepare::setParms(ldir)) < 0)
>
>
>
>
> config file:
> ---------------------------------------------------------------
>
>
> odc.manager bbr-xrootd.pd.babar 3121
> xrootd.trace all
> xrd.trace all
>
> all.adminpath /opt/xrootd/admin
> olb.adminpath /opt/xrootd/admin
>
> # The Open Distributed Cache Section
> #
>
> # The Open Load Balancer Section
> #
> olb.trace all
> olb.allow host bbr-xrootd.pd.babar
> olb.allow host bbr-user02priv.pd.babar
> olb.allow host bbr-cndserv03.pd.babar
> olb.allow host bbr-datamove*.pd.babar
> olb.port 3121
> #olb.path w /store
> olb.path w /prod
> olb.path ws /xtc
> # olb.path w /xtc
> # olb.path w /ERToMerge
> # olb.path w /ERToExport
> olb.sched cpu 10 io 90
> olb.perf int 3m pgm /opt/xrootd/etc/XrdOlbMonPerf 180
> olb.subscribe bbr-xrootd.pd.babar 3121
> olb.wait
> olb.role server
> olb.prep echo scrub 30s keep 12h ifpgm /opt/xrootd/utils/mps_prep -c
> /opt/xrootd/etc/xrootd.cf
>
> # The Open File System Section
> #
> ofs.redirect target
>
>
> # The Open Storage System Section (cache & localroot are used by olb)
> #
> # oss.stage
> oss.trace all
> #oss.mssgwcmd /tmp/stage.pl
> #oss.stagecmd | /tmp/stage.pl
> oss.nocheck
> oss.nomig
> oss.alloc * * 80
> oss.cache public /kanga/d1/xrootd/prod
> oss.cache public /kanga/d2/xrootd/prod
> &oss.cgroup xtcgrp
> &oss.sprty 3
> #oss.cache xtcgrp /kanga/d1/xrootd/xtc
> #oss.cache xtcgrp /kanga/d2/xrootd/xtc
> #oss.cache prod /kanga/d1/xrootd/prod
> #oss.cache prod /kanga/d2/xrootd/prod
> # oss.cache public /kanga/d1/xrootd/ERToMerge
> # oss.cache public /kanga/d2/xrootd/ERToMerge
> # oss.cache public /kanga/d1/xrootd/ERToExport
> # oss.cache public /kanga/d2/xrootd/ERToExport
> oss.fdlimit * max
> oss.localroot /data/xrootd
> #oss.remoteroot /babar
> #oss.path /store
> oss.path /xtc stage mig
> oss.path /prod nostage nomig
> # oss.path /xtc
> # oss.path /ERToMerge
> # oss.path /ERToExport
>
> oss.mssgwcmd /opt/xrootd/utils/tinacmd.pl
> oss.stagecmd /opt/xrootd/utils/mps_Stage -dv -F -k -c
> /opt/xrootd/etc/xrootd.cf
> oss.xfr 8 30M 5m 0
>
>
>
>
> # The XRD Section
> #
> xrd.protocol xrootd *
> xrd.timeout idle 999h
>
>
> # The XROOTD Section
> #
> xrootd.fslib /opt/xrootd/lib/libXrdOfs.so
> #xrootd.export /store
> xrootd.export /prod
> xrootd.export /xtc
> # xrootd.export /ERToMerge
> # xrootd.export /ERToExport
> xrootd.async off
> xrootd.chksum crc32 /opt/xrootd/etc/getCRC32.sh
> xrootd.prep logdir /tmp/preplog
>
> mps.adminuser bbrprmgr
> #mps.basedir /store
> mps.debug 4
> #mps.errlogfn /data/xrootd/logs/mpslog
> #mps.errlogintvl 60
> #mps.ftpcmd /opt/xrootd/utils/xfrcmd mps.keyfn
> /var/adm/mps/xfrcmd/keyfile
> #mps.lockfn DIR_LOCK
> #mps.migr.logfn /var/log/mps/mlog
> #mps.pstg.logfn /var/log/mps/slog
> #mps.purg.logfn /var/log/mps/plog
> #mps.stage.logfn /var/log/mps/Slog
> mps.mailcmd /bin/mail
> #mps.prtyfn /var/mps/migrpurg
> mps.max_retry 2
> #mps.migr.max_retry 2
> #mps.mssdir /store
> mps.migr.waittime 2419200
> mps.pstg.waittime 1
> mps.purg.waittime 2419200
> mps.xfrblksz 1024
> mps.xfrhost bbr-tape
> mps.xfrport 21
> mps.xfruser bbrprmgr
> mps.stage.cpgroup xtcgrp
> mps.scan /data/xrootd
> mps.cache xtcgrp /kanga/d1/xrootd/xtc
> mps.cache xtcgrp /kanga/d2/xrootd/xtc
>
> mps.mssstat = stat
> mps.xfrcmd = /opt/xrootd/utils/tinaxfr.pl %sfn %tfn
> # For pre-stage, we generally want to indicate the maximum number allowed
> # at one time and the command to use to transfer data from the mss
> #
> mps.pstg.max_pstg_proc = 3
> #mps.pstg.pstgcmd = /opt/xrootd/utils/mps_PreStage -i -x 3 -c
> /opt/xrootd/etc/xrootd.cf
> mps.pstg.pstgcmd = /opt/xrootd/utils/mps_prep -x 3 -c
> /opt/xrootd/etc/xrootd.cf
> mps.pstg.stopstg /tmp/STOPPSTG
>
|