XrdProofdProtocol is an implementation of the generic XrdProtocol XROOTD protocol class. The class is compiled in a dedicated shared library named libXrdProofd and located under $ROOTSYS/lib.
Starting with ROOT version 5.24/00 an executable named xproofd is also available under $ROOTSYS/bin. The xproofd executable is build out of the same main program used to build the xrootd executable. However, it loads by default the XrdProofdProtocol instead of the data-serving protocol XrdXrootdProtocol. The purpose of this daemon is to simplify the configuration when data-serving is not needed or it is handled differently.
For small standalone tests xproofd can be started from the command line in foreground mode:
$ xproofd -c xpd.cf
or in daemon mode:
$ xproofd -c xpd.cf -b -l /tmp/xpd.log
Here xpd.cf is the containing the configuration directives described below (for a very quick test the file is not even needed).
To have xrootd loading the protocol the standard SCALLA directive xrd.protocol must be used:
### Load the XrdProofdProtocol to serve PROOF sessions
if exec xrootd
xrd.protocol xproofd:1093 libXrdProofd.so
fi
The condition on 'exec' allows to use the same configuration file for both xproofd and xrootd. From now on we will refer interchangeably to xproofd or xrootd, assuming that when xrootd is used the xrd.protocol is present.
The text file xpd,cf mentioned above contains the directives governing the behavior of XrdProofdProtocol; these are described in detail in the reference guide. See the quick-setup page and the more advanced examples (cluster with pool disks, CAF) for samples of configuration files.
Starting xproofd on the command line as shown above may be sufficient from a PROOF system serving a single user. To serve PROOF to multiple users, ensuring the privacy of their sandboxes, the daemon must be started with super-user privileges (needed to be able to log the user into its own sandbox). For this purpose xproofd provides the command line option -R followed by the username of an unprivileged user:
It is also possible to force an unprivileged daemon to serve multiple users using the xpd.multiuser directive:
### Force the daemon to serve multiple user
### no matter the process privileges
xpd.multiuser 1
In such a case the sandboxes and PROOF applications will be owned by the effective user of the daemon; this means, in particular, that the privacy of the sandboxes is not ensured.
In production xrootd should be started with a script. Being a multi-port/protocol handler itself it can not be integrated in the (x)inetd schema. Standard service startup scripts work fine. We describe and dissect here the ones used at the CERN CAF under linux SLC4.
The daemon is started by the script /etc/init.d/xrootd . The xrootd related parts here are:
- Definition of the executable to be run and of the path with the xrootd plug-in libraries
XROOTD=/opt/root/bin/xrootd
XRDLIBS=/opt/root/lib
- The start() function sets the environment and starts the daemon in the background:
start() {
echo -n $"Starting $prog:"
# Options are specified in /etc/sysconfig/xrootd .
# See $ROOTSYS/etc/daemons/xrootd.sysconfig for an example.
# $XRDUSER *must* be the name of an existing non-privileged user.
export LD_LIBRARY_PATH=$XRDLIBS:$LD_LIBRARY_PATH
daemon $XROOTD -b -l $XRDLOG -R $XRDUSER -c $XRDCF $XRDDEBUG
RETVAL=$?
echo
[ $RETVAL -eq 0 ] touch /var/lock/subsys/xrootd
return $RETVAL
}
The variables used by /etc/init.d/xrootd are defined in /etc/sysconfig/xrootd (the following examples are taken from the CAF):
- Location of the xrootd config file
#
# Specify here the full path to the configuration file to be used
XRDCF="/afs/cern.ch/user/a/alicecaf/public/conf/xrd-lxb.cf"
- Location of the log file location
#
# Give here the log file location
# (nb: user XRDUSER must be allowed to write in this directory)
XRDLOG="/var/log/xrootd/xrootd.log"
- Definition of the user name under which the daemon as to run
#
# Specifiy here the normal assumed as effective owner of the daemon.
XRDUSER="alicecaf"
- Switching on debugging
#
# Debug switch: leave empty for no debug
# XRDDEBUG="-d"
XRDDEBUG=""
- Define the path of an additional environment setting configuration file
#
# Additional environment settings; this file is sourced before
# starting the daemon
XRDENVCONFIG="/afs/cern.ch/user/a/alicecaf/public/conf/xrd-userconfig.sh"