Logo ROOT   6.08/07
Reference Guide
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
XrdProofdProofServMgr Class Reference

Definition at line 130 of file XrdProofdProofServMgr.h.

Public Types

enum  PSMCounters { kCreateCnt = 0, kCleanSessionsCnt = 1, kProcessCnt = 2 }
 
enum  PSMProtocol {
  kSessionRemoval = 0, kClientDisconnect = 1, kCleanSessions = 2, kProcessReq = 3,
  kChgSessionSt = 4
}
 

Public Member Functions

 XrdProofdProofServMgr (XrdProofdManager *mgr, XrdProtocol_Config *pi, XrdSysError *e)
 Constructor. More...
 
virtual ~XrdProofdProofServMgr ()
 
int AcceptPeer (XrdProofdProofServ *xps, int to, XrdOucString &e)
 Accept a callback from a starting-up server and setup the related protocol object. More...
 
std::list< XrdProofdProofServ * > * ActiveSessions ()
 
bool Alive (XrdProofdProtocol *p)
 Check destroyed status. More...
 
int Attach (XrdProofdProtocol *p)
 Handle a request to attach to an existing session. More...
 
void BroadcastClusterInfo ()
 Broadcast cluster info to the active sessions. More...
 
int BroadcastPriorities ()
 Broadcast priorities to the active sessions. More...
 
int CheckActiveSessions (bool verify=1)
 Go through the active sessions admin path and make sure sessions are alive. More...
 
int CheckCounter (int t)
 
int CheckFrequency () const
 
int CheckTerminatedSessions ()
 Go through the terminated sessions admin path and make sure sessions they are gone. More...
 
int CleanClientSessions (const char *usr, int srvtype)
 Go through the sessions admin path and clean all sessions belonging to 'usr'. More...
 
int CleanupLostProofServ ()
 Cleanup (kill) all 'proofserv' processes which lost control from their creator or controller daemon. More...
 
int CleanupProofServ (bool all=0, const char *usr=0)
 Cleanup (kill) all 'proofserv' processes from the process table. More...
 
int Config (bool rcf=0)
 Run configuration and parse the entered config directives. More...
 
int Create (XrdProofdProtocol *p)
 Handle a request to create a new session. More...
 
int CurrentSessions (bool recalculate=0)
 Return the number of current sessions (top masters) More...
 
int DeleteFromSessions (const char *pid)
 Delete from the hash list the session with ID pid. More...
 
int Destroy (XrdProofdProtocol *p)
 Handle a request to shutdown an existing session. More...
 
int Detach (XrdProofdProtocol *p)
 Handle a request to detach from an existing session. More...
 
void DisconnectFromProofServ (int pid)
 Change reconnecting status. More...
 
int DoDirective (XrdProofdDirective *d, char *val, XrdOucStream *cfg, bool rcf)
 Update the priorities of the active sessions. More...
 
void FormFileNameInSessionDir (XrdProofdProtocol *p, XrdProofdProofServ *xps, const char *sessiondir, const char *extension, XrdOucString &outfn)
 
XrdProofdProofServGetActiveSession (int pid)
 Return active session with process ID pid, if any. More...
 
void GetTagDirs (int opt, XrdProofdProtocol *p, XrdProofdProofServ *xps, XrdOucString &sesstag, XrdOucString &topsesstag, XrdOucString &sessiondir, XrdOucString &sesswrkdir)
 Determine the unique tag and relevant dirs for this session. More...
 
int InternalWait () const
 
bool IsClientRecovering (const char *usr, const char *grp, int &deadline)
 Returns true (an the recovering deadline) if the client has sessions in recovering state; returns false otherwise. More...
 
bool IsReconnecting ()
 Return true if in reconnection state, i.e. More...
 
XrdSysRecMutexMutex ()
 
int MvSession (const char *fpid)
 Move session file from the active to the terminated areas. More...
 
int NextSessionsCheck ()
 
XrdProofdPipePipe ()
 
int Process (XrdProofdProtocol *p)
 Process manager request. More...
 
XrdSysSemWaitProcessSem ()
 
int Recover (XpdClientSessions *cl)
 Handle a request to recover a session after stop&restart for a specific client. More...
 
int RecoverActiveSessions ()
 Accept connections from sessions still alive. More...
 
void RegisterDirectives ()
 Register directives for configuration. More...
 
void SetNextSessionsCheck (int t)
 
int SetProofServEnv (XrdProofdProtocol *p, void *in)
 Set environment for proofserv. More...
 
int SetProofServEnvOld (XrdProofdProtocol *p, void *in)
 Set environment for proofserv; old version preparing the environment for proofserv protocol version <= 13. More...
 
void SetReconnectTime (bool on=1)
 Change reconnecting status. More...
 
int SetUserEnvironment (XrdProofdProtocol *p)
 Set user environment: set effective user and group ID of the process to the ones of the owner of this protocol instnace and change working dir to the sandbox. More...
 
void UpdateCounter (int t, int n)
 
int VerifyTimeOut () const
 
- Public Member Functions inherited from XrdProofdConfig
 XrdProofdConfig (const char *cfg=0, XrdSysError *edest=0)
 Main constructor. More...
 
virtual ~XrdProofdConfig ()
 
const char * CfgFile () const
 
void SetCfgEDest (const char *cfg, XrdSysError *edest)
 Set config file and error handler. More...
 

Static Public Member Functions

static int SetProofServEnv (XrdProofdManager *m, XrdROOT *r)
 Set basic environment accordingly to 'r'. More...
 

Private Member Functions

int AddSession (XrdProofdProtocol *p, XrdProofdProofServ *s)
 Add new active session. More...
 
int CreateAdminPath (XrdProofdProofServ *xps, XrdProofdProtocol *p, int pid, XrdOucString &emsg)
 Create the admin path for the starting session Return 0 on success, -1 on error (error message in 'emsg') More...
 
int CreateProofServEnvFile (XrdProofdProtocol *p, void *input, const char *envfn, const char *rcfn)
 Create in 'rcfn' the rootrc file for the proofserv being created return 0 on success, -1 on error. More...
 
int CreateProofServRootRc (XrdProofdProtocol *p, void *input, const char *rcfn)
 Create in 'rcfn' the rootrc file for the proofserv being created return 0 on success, -1 on error. More...
 
int CreateSockPath (XrdProofdProofServ *xps, XrdProofdProtocol *p, unsigned int seq, XrdOucString &emsg)
 Create the socket path for the starting session Return 0 on success, -1 on error (error message in 'emsg') More...
 
int DoDirectiveProofServMgr (char *, XrdOucStream *, bool)
 Process 'proofswrvmgr' directive eg: xpd.proofswrvmgr checkfq:120 termto:100 verifyto:5 recoverto:20. More...
 
int DoDirectivePutEnv (char *, XrdOucStream *, bool)
 Process 'putenv' directives. More...
 
int DoDirectivePutRc (char *, XrdOucStream *, bool)
 Process 'putrc' directives. More...
 
int DoDirectiveShutdown (char *, XrdOucStream *, bool)
 Process 'shutdown' directive. More...
 
void ExtractEnv (char *, XrdOucStream *, XrdOucString &users, XrdOucString &groups, XrdOucString &rcval, XrdOucString &rcnam, int &smi, int &smx, int &vmi, int &vmx, bool &hex)
 Extract env information from the stream 'cfg'. More...
 
void FillEnvList (std::list< XpdEnv > *el, const char *nam, const char *val, const char *usrs=0, const char *grps=0, int smi=-1, int smx=-1, int vmi=-1, int vmx=-1, bool hex=0)
 Fill env entry(ies) in the relevant list. More...
 
unsigned int GetSeqSessionN ()
 
bool IsSessionSocket (const char *fpid)
 Checks is fpid is the path of a session UNIX socket Returns TRUE is yes; cleans the socket if the session is gone. More...
 
void ParseCreateBuffer (XrdProofdProtocol *p, XrdProofdProofServ *xps, XrdOucString &tag, XrdOucString &ord, XrdOucString &cffile, XrdOucString &uenvs, int &intwait)
 Extract relevant quantities from the buffer received during a create request. More...
 
XrdProofdProofServPrepareProofServ (XrdProofdProtocol *p, XrdProofdResponse *r, unsigned short &sid)
 Allocate and prepare the XrdProofdProofServ object describing this session. More...
 
int PrepareSessionRecovering ()
 Go through the active sessions admin path and prepare reconnection of those still alive. More...
 
void ResolveKeywords (XrdOucString &s, ProofServEnv_t *in)
 Resolve some keywords in 's' <logfileroot>, <user>, <rootsys> More...
 
int ResolveSession (const char *fpid)
 Handle a request to recover a session after stop&restart. More...
 
int RmSession (const char *fpid)
 Remove session file from the terminated sessions area. More...
 
void SendErrLog (const char *errlog, XrdProofdResponse *r)
 Send content of errlog upstream asynchronously. More...
 
int SetupProtocol (XrdNetPeer &peerpsrv, XrdProofdProofServ *xps, XrdOucString &e)
 Setup the protocol object serving the peer described by 'peerpsrv'. More...
 
int SetUserOwnerships (XrdProofdProtocol *p, const char *ord, const char *stag)
 Set user ownerships on some critical files or directories. More...
 
int TouchSession (const char *fpid, const char *path=0)
 Update the access time for the session pid file to the current time. More...
 
int VerifySession (const char *fpid, int to=-1, const char *path=0)
 Check if the session is alive, i.e. More...
 

Private Attributes

XrdOucString fActiAdminPath
 
std::list< XrdProofdProofServ * > fActiveSessions
 
int fCheckFrequency
 
bool fCheckLost
 
int fCounters [PSMMAXCNTS]
 
XrdSecCredsSaver_t fCredsSaver
 
int fCurrentSessions
 
std::map< XrdProofdProtocol *, int > fDestroyTimes
 
XrdSysRecMutex fEnvsMutex
 
XrdSysSemWait fForkSem
 
int fInternalWait
 
XrdSysLoggerfLogger
 
XrdProofdManagerfMgr
 
XrdSysRecMutex fMutex
 
int fNextSessionsCheck
 
XrdOucString fParentExecs
 
XrdProofdPipe fPipe
 
XrdSysSemWait fProcessSem
 
XrdOucString fProofPlugin
 
std::list< XpdEnvfProofServEnvs
 
std::list< XpdEnvfProofServRCs
 
int fReconnectTime
 
int fReconnectTimeOut
 
std::list< XpdClientSessions * > * fRecoverClients
 
int fRecoverDeadline
 
XrdSysRecMutex fRecoverMutex
 
int fRecoverTimeOut
 
unsigned int fSeqSessionN
 
XrdOucHash< XrdProofdProofServfSessions
 
int fShutdownDelay
 
int fShutdownOpt
 
XrdOucString fTermAdminPath
 
int fTerminationTimeOut
 
bool fUseFork
 
int fVerifyTimeOut
 

Additional Inherited Members

- Protected Member Functions inherited from XrdProofdConfig
int ParseFile (bool rcf=false)
 Parse config file for the registered directives. More...
 
bool ReadFile (bool update=true)
 Return true if the file has never been read or did change since last reading, false otherwise. More...
 
void Register (const char *dname, XrdProofdDirective *d)
 
- Protected Attributes inherited from XrdProofdConfig
XrdSysErrorfEDest
 

#include <XrdProofdProofServMgr.h>

Inheritance diagram for XrdProofdProofServMgr:
[legend]

Member Enumeration Documentation

◆ PSMCounters

Enumerator
kCreateCnt 
kCleanSessionsCnt 
kProcessCnt 

Definition at line 232 of file XrdProofdProofServMgr.h.

◆ PSMProtocol

Enumerator
kSessionRemoval 
kClientDisconnect 
kCleanSessions 
kProcessReq 
kChgSessionSt 

Definition at line 231 of file XrdProofdProofServMgr.h.

Constructor & Destructor Documentation

◆ XrdProofdProofServMgr()

XrdProofdProofServMgr::XrdProofdProofServMgr ( XrdProofdManager mgr,
XrdProtocol_Config *  pi,
XrdSysError e 
)

Constructor.

Definition at line 270 of file XrdProofdProofServMgr.cxx.

◆ ~XrdProofdProofServMgr()

virtual XrdProofdProofServMgr::~XrdProofdProofServMgr ( )
inlinevirtual

Definition at line 229 of file XrdProofdProofServMgr.h.

Member Function Documentation

◆ AcceptPeer()

int XrdProofdProofServMgr::AcceptPeer ( XrdProofdProofServ xps,
int  to,
XrdOucString &  msg 
)

Accept a callback from a starting-up server and setup the related protocol object.

Used for old servers. Return 0 if successful or -1 in case of failure.

Definition at line 2547 of file XrdProofdProofServMgr.cxx.

◆ ActiveSessions()

std::list<XrdProofdProofServ *>* XrdProofdProofServMgr::ActiveSessions ( )
inline

Definition at line 278 of file XrdProofdProofServMgr.h.

◆ AddSession()

int XrdProofdProofServMgr::AddSession ( XrdProofdProtocol p,
XrdProofdProofServ s 
)
private

Add new active session.

Definition at line 431 of file XrdProofdProofServMgr.cxx.

◆ Alive()

bool XrdProofdProofServMgr::Alive ( XrdProofdProtocol p)

Check destroyed status.

Definition at line 4634 of file XrdProofdProofServMgr.cxx.

◆ Attach()

int XrdProofdProofServMgr::Attach ( XrdProofdProtocol p)

Handle a request to attach to an existing session.

Definition at line 1557 of file XrdProofdProofServMgr.cxx.

◆ BroadcastClusterInfo()

void XrdProofdProofServMgr::BroadcastClusterInfo ( )

Broadcast cluster info to the active sessions.

Definition at line 4552 of file XrdProofdProofServMgr.cxx.

◆ BroadcastPriorities()

int XrdProofdProofServMgr::BroadcastPriorities ( )

Broadcast priorities to the active sessions.

Returns the number of sessions contacted.

Definition at line 4585 of file XrdProofdProofServMgr.cxx.

◆ CheckActiveSessions()

int XrdProofdProofServMgr::CheckActiveSessions ( bool  verify = 1)

Go through the active sessions admin path and make sure sessions are alive.

If 'verify' is true also ask the session to proof that they are alive via asynchronous ping (the result will be done at next check). Move those not responding in the terminated sessions admin path.

Definition at line 897 of file XrdProofdProofServMgr.cxx.

◆ CheckCounter()

int XrdProofdProofServMgr::CheckCounter ( int  t)
inline

Definition at line 269 of file XrdProofdProofServMgr.h.

◆ CheckFrequency()

int XrdProofdProofServMgr::CheckFrequency ( ) const
inline

Definition at line 241 of file XrdProofdProofServMgr.h.

◆ CheckTerminatedSessions()

int XrdProofdProofServMgr::CheckTerminatedSessions ( )

Go through the terminated sessions admin path and make sure sessions they are gone.

Hard-kill those still alive.

Definition at line 979 of file XrdProofdProofServMgr.cxx.

◆ CleanClientSessions()

int XrdProofdProofServMgr::CleanClientSessions ( const char *  usr,
int  srvtype 
)

Go through the sessions admin path and clean all sessions belonging to 'usr'.

Move those not responding in the terminated sessions admin path.

Definition at line 1038 of file XrdProofdProofServMgr.cxx.

◆ CleanupLostProofServ()

int XrdProofdProofServMgr::CleanupLostProofServ ( )

Cleanup (kill) all 'proofserv' processes which lost control from their creator or controller daemon.

We rely here on the information in the admin path(s) (<xrd_admin>/.xproof.<port>). This is called regurarly by the cron job to avoid having proofservs around. Return number of process killed or -1 in case of any error.

Definition at line 3918 of file XrdProofdProofServMgr.cxx.

◆ CleanupProofServ()

int XrdProofdProofServMgr::CleanupProofServ ( bool  all = 0,
const char *  usr = 0 
)

Cleanup (kill) all 'proofserv' processes from the process table.

Only the processes associated with 'usr' are killed, unless 'all' is TRUE, in which case all 'proofserv' instances are terminated (this requires superuser privileges). Super users can also terminated all processes fo another user (specified via usr). Return number of process notified for termination on success, -1 otherwise

Definition at line 4028 of file XrdProofdProofServMgr.cxx.

◆ Config()

int XrdProofdProofServMgr::Config ( bool  rcf = 0)
virtual

Run configuration and parse the entered config directives.

Return 0 on success, -1 on error

Reimplemented from XrdProofdConfig.

Definition at line 322 of file XrdProofdProofServMgr.cxx.

◆ Create()

int XrdProofdProofServMgr::Create ( XrdProofdProtocol p)

Handle a request to create a new session.

Definition at line 1777 of file XrdProofdProofServMgr.cxx.

◆ CreateAdminPath()

int XrdProofdProofServMgr::CreateAdminPath ( XrdProofdProofServ xps,
XrdProofdProtocol p,
int  pid,
XrdOucString &  emsg 
)
private

Create the admin path for the starting session Return 0 on success, -1 on error (error message in 'emsg')

Definition at line 2304 of file XrdProofdProofServMgr.cxx.

◆ CreateProofServEnvFile()

int XrdProofdProofServMgr::CreateProofServEnvFile ( XrdProofdProtocol p,
void input,
const char *  envfn,
const char *  rcfn 
)
private

Create in 'rcfn' the rootrc file for the proofserv being created return 0 on success, -1 on error.

Definition at line 3417 of file XrdProofdProofServMgr.cxx.

◆ CreateProofServRootRc()

int XrdProofdProofServMgr::CreateProofServRootRc ( XrdProofdProtocol p,
void input,
const char *  rcfn 
)
private

Create in 'rcfn' the rootrc file for the proofserv being created return 0 on success, -1 on error.

Definition at line 3648 of file XrdProofdProofServMgr.cxx.

◆ CreateSockPath()

int XrdProofdProofServMgr::CreateSockPath ( XrdProofdProofServ xps,
XrdProofdProtocol p,
unsigned int  seq,
XrdOucString &  emsg 
)
private

Create the socket path for the starting session Return 0 on success, -1 on error (error message in 'emsg')

Definition at line 2325 of file XrdProofdProofServMgr.cxx.

◆ CurrentSessions()

int XrdProofdProofServMgr::CurrentSessions ( bool  recalculate = 0)

Return the number of current sessions (top masters)

Definition at line 4711 of file XrdProofdProofServMgr.cxx.

◆ DeleteFromSessions()

int XrdProofdProofServMgr::DeleteFromSessions ( const char *  fpid)

Delete from the hash list the session with ID pid.

Return -ENOENT if not found, or 0.

Definition at line 669 of file XrdProofdProofServMgr.cxx.

◆ Destroy()

int XrdProofdProofServMgr::Destroy ( XrdProofdProtocol p)

Handle a request to shutdown an existing session.

Definition at line 2798 of file XrdProofdProofServMgr.cxx.

◆ Detach()

int XrdProofdProofServMgr::Detach ( XrdProofdProtocol p)

Handle a request to detach from an existing session.

Definition at line 2769 of file XrdProofdProofServMgr.cxx.

◆ DisconnectFromProofServ()

void XrdProofdProofServMgr::DisconnectFromProofServ ( int  pid)

Change reconnecting status.

Definition at line 4678 of file XrdProofdProofServMgr.cxx.

◆ DoDirective()

int XrdProofdProofServMgr::DoDirective ( XrdProofdDirective d,
char *  val,
XrdOucStream *  cfg,
bool  rcf 
)
virtual

Update the priorities of the active sessions.

Reimplemented from XrdProofdConfig.

Definition at line 1190 of file XrdProofdProofServMgr.cxx.

◆ DoDirectiveProofServMgr()

int XrdProofdProofServMgr::DoDirectiveProofServMgr ( char *  val,
XrdOucStream *  cfg,
bool  rcf 
)
private

Process 'proofswrvmgr' directive eg: xpd.proofswrvmgr checkfq:120 termto:100 verifyto:5 recoverto:20.

Definition at line 1216 of file XrdProofdProofServMgr.cxx.

◆ DoDirectivePutEnv()

int XrdProofdProofServMgr::DoDirectivePutEnv ( char *  val,
XrdOucStream *  cfg,
bool   
)
private

Process 'putenv' directives.

Definition at line 1285 of file XrdProofdProofServMgr.cxx.

◆ DoDirectivePutRc()

int XrdProofdProofServMgr::DoDirectivePutRc ( char *  val,
XrdOucStream *  cfg,
bool   
)
private

Process 'putrc' directives.

Syntax: xpd.putrc [u:<usr1>,<usr2>,...] [g:<grp1>,<grp2>,...] [s:[svnmin][-][svnmax]] [v:[vermin][-][vermax]] RcVarName RcVarValue NB: <usr1>,... and <grp1>,... may contain the wild card '*'

Definition at line 1316 of file XrdProofdProofServMgr.cxx.

◆ DoDirectiveShutdown()

int XrdProofdProofServMgr::DoDirectiveShutdown ( char *  val,
XrdOucStream *  cfg,
bool   
)
private

Process 'shutdown' directive.

Definition at line 1452 of file XrdProofdProofServMgr.cxx.

◆ ExtractEnv()

void XrdProofdProofServMgr::ExtractEnv ( char *  val,
XrdOucStream *  cfg,
XrdOucString &  users,
XrdOucString &  groups,
XrdOucString &  rcval,
XrdOucString &  rcnam,
int &  smi,
int &  smx,
int &  vmi,
int &  vmx,
bool &  hex 
)
private

Extract env information from the stream 'cfg'.

Definition at line 1338 of file XrdProofdProofServMgr.cxx.

◆ FillEnvList()

void XrdProofdProofServMgr::FillEnvList ( std::list< XpdEnv > *  el,
const char *  nam,
const char *  val,
const char *  usrs = 0,
const char *  grps = 0,
int  smi = -1,
int  smx = -1,
int  vmi = -1,
int  vmx = -1,
bool  hex = 0 
)
private

Fill env entry(ies) in the relevant list.

Definition at line 1394 of file XrdProofdProofServMgr.cxx.

◆ FormFileNameInSessionDir()

void XrdProofdProofServMgr::FormFileNameInSessionDir ( XrdProofdProtocol p,
XrdProofdProofServ xps,
const char *  sessiondir,
const char *  extension,
XrdOucString &  outfn 
)

Definition at line 3196 of file XrdProofdProofServMgr.cxx.

◆ GetActiveSession()

XrdProofdProofServ * XrdProofdProofServMgr::GetActiveSession ( int  pid)

Return active session with process ID pid, if any.

Definition at line 4507 of file XrdProofdProofServMgr.cxx.

◆ GetSeqSessionN()

unsigned int XrdProofdProofServMgr::GetSeqSessionN ( )
inlineprivate

Definition at line 189 of file XrdProofdProofServMgr.h.

◆ GetTagDirs()

void XrdProofdProofServMgr::GetTagDirs ( int  opt,
XrdProofdProtocol p,
XrdProofdProofServ xps,
XrdOucString &  sesstag,
XrdOucString &  topsesstag,
XrdOucString &  sessiondir,
XrdOucString &  sesswrkdir 
)

Determine the unique tag and relevant dirs for this session.

Definition at line 3228 of file XrdProofdProofServMgr.cxx.

◆ InternalWait()

int XrdProofdProofServMgr::InternalWait ( ) const
inline

Definition at line 242 of file XrdProofdProofServMgr.h.

◆ IsClientRecovering()

bool XrdProofdProofServMgr::IsClientRecovering ( const char *  usr,
const char *  grp,
int &  deadline 
)

Returns true (an the recovering deadline) if the client has sessions in recovering state; returns false otherwise.

Called during for attach requests.

Definition at line 860 of file XrdProofdProofServMgr.cxx.

◆ IsReconnecting()

bool XrdProofdProofServMgr::IsReconnecting ( )

Return true if in reconnection state, i.e.

during that period during which clients are expected to reconnect. Return false if the session is fully effective

Definition at line 4603 of file XrdProofdProofServMgr.cxx.

◆ IsSessionSocket()

bool XrdProofdProofServMgr::IsSessionSocket ( const char *  fpid)
private

Checks is fpid is the path of a session UNIX socket Returns TRUE is yes; cleans the socket if the session is gone.

Definition at line 459 of file XrdProofdProofServMgr.cxx.

◆ Mutex()

XrdSysRecMutex* XrdProofdProofServMgr::Mutex ( )
inline

Definition at line 234 of file XrdProofdProofServMgr.h.

◆ MvSession()

int XrdProofdProofServMgr::MvSession ( const char *  fpid)

Move session file from the active to the terminated areas.

Definition at line 498 of file XrdProofdProofServMgr.cxx.

◆ NextSessionsCheck()

int XrdProofdProofServMgr::NextSessionsCheck ( )
inline

Definition at line 245 of file XrdProofdProofServMgr.h.

◆ ParseCreateBuffer()

void XrdProofdProofServMgr::ParseCreateBuffer ( XrdProofdProtocol p,
XrdProofdProofServ xps,
XrdOucString &  tag,
XrdOucString &  ord,
XrdOucString &  cffile,
XrdOucString &  uenvs,
int &  intwait 
)
private

Extract relevant quantities from the buffer received during a create request.

Definition at line 1691 of file XrdProofdProofServMgr.cxx.

◆ Pipe()

XrdProofdPipe* XrdProofdProofServMgr::Pipe ( )
inline

Definition at line 299 of file XrdProofdProofServMgr.h.

◆ PrepareProofServ()

XrdProofdProofServ * XrdProofdProofServMgr::PrepareProofServ ( XrdProofdProtocol p,
XrdProofdResponse r,
unsigned short &  sid 
)
private

Allocate and prepare the XrdProofdProofServ object describing this session.

Definition at line 1650 of file XrdProofdProofServMgr.cxx.

◆ PrepareSessionRecovering()

int XrdProofdProofServMgr::PrepareSessionRecovering ( )
private

Go through the active sessions admin path and prepare reconnection of those still alive.

Called at start-up.

Definition at line 709 of file XrdProofdProofServMgr.cxx.

◆ Process()

int XrdProofdProofServMgr::Process ( XrdProofdProtocol p)

Process manager request.

Definition at line 1504 of file XrdProofdProofServMgr.cxx.

◆ ProcessSem()

XrdSysSemWait* XrdProofdProofServMgr::ProcessSem ( )
inline

Definition at line 257 of file XrdProofdProofServMgr.h.

◆ Recover()

int XrdProofdProofServMgr::Recover ( XpdClientSessions cl)

Handle a request to recover a session after stop&restart for a specific client.

Definition at line 2488 of file XrdProofdProofServMgr.cxx.

◆ RecoverActiveSessions()

int XrdProofdProofServMgr::RecoverActiveSessions ( )

Accept connections from sessions still alive.

This is run in a dedicated thread. Returns -1 in case of failure, 0 if all alive sessions reconnected or the numer of sessions not reconnected if the timeout (fRecoverTimeOut per client) expired.

Definition at line 780 of file XrdProofdProofServMgr.cxx.

◆ RegisterDirectives()

void XrdProofdProofServMgr::RegisterDirectives ( )
virtual

Register directives for configuration.

Reimplemented from XrdProofdConfig.

Definition at line 1168 of file XrdProofdProofServMgr.cxx.

◆ ResolveKeywords()

void XrdProofdProofServMgr::ResolveKeywords ( XrdOucString &  s,
ProofServEnv_t in 
)
private

Resolve some keywords in 's' <logfileroot>, <user>, <rootsys>

Definition at line 4731 of file XrdProofdProofServMgr.cxx.

◆ ResolveSession()

int XrdProofdProofServMgr::ResolveSession ( const char *  fpid)
private

Handle a request to recover a session after stop&restart.

Definition at line 2410 of file XrdProofdProofServMgr.cxx.

◆ RmSession()

int XrdProofdProofServMgr::RmSession ( const char *  fpid)
private

Remove session file from the terminated sessions area.

Definition at line 551 of file XrdProofdProofServMgr.cxx.

◆ SendErrLog()

void XrdProofdProofServMgr::SendErrLog ( const char *  errlog,
XrdProofdResponse r 
)
private

Send content of errlog upstream asynchronously.

Definition at line 2360 of file XrdProofdProofServMgr.cxx.

◆ SetNextSessionsCheck()

void XrdProofdProofServMgr::SetNextSessionsCheck ( int  t)
inline

Definition at line 247 of file XrdProofdProofServMgr.h.

◆ SetProofServEnv() [1/2]

int XrdProofdProofServMgr::SetProofServEnv ( XrdProofdProtocol p,
void in 
)

Set environment for proofserv.

Definition at line 3332 of file XrdProofdProofServMgr.cxx.

◆ SetProofServEnv() [2/2]

int XrdProofdProofServMgr::SetProofServEnv ( XrdProofdManager m,
XrdROOT r 
)
static

Set basic environment accordingly to 'r'.

Definition at line 3136 of file XrdProofdProofServMgr.cxx.

◆ SetProofServEnvOld()

int XrdProofdProofServMgr::SetProofServEnvOld ( XrdProofdProtocol p,
void input 
)

Set environment for proofserv; old version preparing the environment for proofserv protocol version <= 13.

Needed for backward compatibility.

Definition at line 2877 of file XrdProofdProofServMgr.cxx.

◆ SetReconnectTime()

void XrdProofdProofServMgr::SetReconnectTime ( bool  on = 1)

Change reconnecting status.

Definition at line 4619 of file XrdProofdProofServMgr.cxx.

◆ SetupProtocol()

int XrdProofdProofServMgr::SetupProtocol ( XrdNetPeer &  peerpsrv,
XrdProofdProofServ xps,
XrdOucString &  e 
)
private

Setup the protocol object serving the peer described by 'peerpsrv'.

Definition at line 2581 of file XrdProofdProofServMgr.cxx.

◆ SetUserEnvironment()

int XrdProofdProofServMgr::SetUserEnvironment ( XrdProofdProtocol p)

Set user environment: set effective user and group ID of the process to the ones of the owner of this protocol instnace and change working dir to the sandbox.

Return 0 on success, -1 if enything goes wrong.

Definition at line 4447 of file XrdProofdProofServMgr.cxx.

◆ SetUserOwnerships()

int XrdProofdProofServMgr::SetUserOwnerships ( XrdProofdProtocol p,
const char *  ord,
const char *  stag 
)
private

Set user ownerships on some critical files or directories.

Return 0 on success, -1 if enything goes wrong.

Definition at line 4350 of file XrdProofdProofServMgr.cxx.

◆ TouchSession()

int XrdProofdProofServMgr::TouchSession ( const char *  fpid,
const char *  path = 0 
)
private

Update the access time for the session pid file to the current time.

Definition at line 579 of file XrdProofdProofServMgr.cxx.

◆ UpdateCounter()

void XrdProofdProofServMgr::UpdateCounter ( int  t,
int  n 
)
inline

Definition at line 266 of file XrdProofdProofServMgr.h.

◆ VerifySession()

int XrdProofdProofServMgr::VerifySession ( const char *  fpid,
int  to = -1,
const char *  fpath = 0 
)
private

Check if the session is alive, i.e.

if it has recently touched its admin file. Return 0 if alive, 1 if not-responding, -1 in case of error. The timeout for verification is 'to' if positive, else fVerifyTimeOut; the admin file is looked under 'fpath' if defined, else fActiAdminPath.

Definition at line 611 of file XrdProofdProofServMgr.cxx.

◆ VerifyTimeOut()

int XrdProofdProofServMgr::VerifyTimeOut ( ) const
inline

Definition at line 243 of file XrdProofdProofServMgr.h.

Member Data Documentation

◆ fActiAdminPath

XrdOucString XrdProofdProofServMgr::fActiAdminPath
private

Definition at line 167 of file XrdProofdProofServMgr.h.

◆ fActiveSessions

std::list<XrdProofdProofServ *> XrdProofdProofServMgr::fActiveSessions
private

Definition at line 171 of file XrdProofdProofServMgr.h.

◆ fCheckFrequency

int XrdProofdProofServMgr::fCheckFrequency
private

Definition at line 149 of file XrdProofdProofServMgr.h.

◆ fCheckLost

bool XrdProofdProofServMgr::fCheckLost
private

Definition at line 156 of file XrdProofdProofServMgr.h.

◆ fCounters

int XrdProofdProofServMgr::fCounters[PSMMAXCNTS]
private

Definition at line 160 of file XrdProofdProofServMgr.h.

◆ fCredsSaver

XrdSecCredsSaver_t XrdProofdProofServMgr::fCredsSaver
private

Definition at line 174 of file XrdProofdProofServMgr.h.

◆ fCurrentSessions

int XrdProofdProofServMgr::fCurrentSessions
private

Definition at line 161 of file XrdProofdProofServMgr.h.

◆ fDestroyTimes

std::map<XrdProofdProtocol*,int> XrdProofdProofServMgr::fDestroyTimes
private

Definition at line 176 of file XrdProofdProofServMgr.h.

◆ fEnvsMutex

XrdSysRecMutex XrdProofdProofServMgr::fEnvsMutex
private

Definition at line 135 of file XrdProofdProofServMgr.h.

◆ fForkSem

XrdSysSemWait XrdProofdProofServMgr::fForkSem
private

Definition at line 136 of file XrdProofdProofServMgr.h.

◆ fInternalWait

int XrdProofdProofServMgr::fInternalWait
private

Definition at line 139 of file XrdProofdProofServMgr.h.

◆ fLogger

XrdSysLogger* XrdProofdProofServMgr::fLogger
private

Definition at line 138 of file XrdProofdProofServMgr.h.

◆ fMgr

XrdProofdManager* XrdProofdProofServMgr::fMgr
private

Definition at line 132 of file XrdProofdProofServMgr.h.

◆ fMutex

XrdSysRecMutex XrdProofdProofServMgr::fMutex
private

Definition at line 133 of file XrdProofdProofServMgr.h.

◆ fNextSessionsCheck

int XrdProofdProofServMgr::fNextSessionsCheck
private

Definition at line 165 of file XrdProofdProofServMgr.h.

◆ fParentExecs

XrdOucString XrdProofdProofServMgr::fParentExecs
private

Definition at line 158 of file XrdProofdProofServMgr.h.

◆ fPipe

XrdProofdPipe XrdProofdProofServMgr::fPipe
private

Definition at line 147 of file XrdProofdProofServMgr.h.

◆ fProcessSem

XrdSysSemWait XrdProofdProofServMgr::fProcessSem
private

Definition at line 137 of file XrdProofdProofServMgr.h.

◆ fProofPlugin

XrdOucString XrdProofdProofServMgr::fProofPlugin
private

Definition at line 140 of file XrdProofdProofServMgr.h.

◆ fProofServEnvs

std::list<XpdEnv> XrdProofdProofServMgr::fProofServEnvs
private

Definition at line 141 of file XrdProofdProofServMgr.h.

◆ fProofServRCs

std::list<XpdEnv> XrdProofdProofServMgr::fProofServRCs
private

Definition at line 142 of file XrdProofdProofServMgr.h.

◆ fReconnectTime

int XrdProofdProofServMgr::fReconnectTime
private

Definition at line 152 of file XrdProofdProofServMgr.h.

◆ fReconnectTimeOut

int XrdProofdProofServMgr::fReconnectTimeOut
private

Definition at line 153 of file XrdProofdProofServMgr.h.

◆ fRecoverClients

std::list<XpdClientSessions *>* XrdProofdProofServMgr::fRecoverClients
private

Definition at line 172 of file XrdProofdProofServMgr.h.

◆ fRecoverDeadline

int XrdProofdProofServMgr::fRecoverDeadline
private

Definition at line 155 of file XrdProofdProofServMgr.h.

◆ fRecoverMutex

XrdSysRecMutex XrdProofdProofServMgr::fRecoverMutex
private

Definition at line 134 of file XrdProofdProofServMgr.h.

◆ fRecoverTimeOut

int XrdProofdProofServMgr::fRecoverTimeOut
private

Definition at line 154 of file XrdProofdProofServMgr.h.

◆ fSeqSessionN

unsigned int XrdProofdProofServMgr::fSeqSessionN
private

Definition at line 163 of file XrdProofdProofServMgr.h.

◆ fSessions

XrdOucHash<XrdProofdProofServ> XrdProofdProofServMgr::fSessions
private

Definition at line 170 of file XrdProofdProofServMgr.h.

◆ fShutdownDelay

int XrdProofdProofServMgr::fShutdownDelay
private

Definition at line 145 of file XrdProofdProofServMgr.h.

◆ fShutdownOpt

int XrdProofdProofServMgr::fShutdownOpt
private

Definition at line 144 of file XrdProofdProofServMgr.h.

◆ fTermAdminPath

XrdOucString XrdProofdProofServMgr::fTermAdminPath
private

Definition at line 168 of file XrdProofdProofServMgr.h.

◆ fTerminationTimeOut

int XrdProofdProofServMgr::fTerminationTimeOut
private

Definition at line 150 of file XrdProofdProofServMgr.h.

◆ fUseFork

bool XrdProofdProofServMgr::fUseFork
private

Definition at line 157 of file XrdProofdProofServMgr.h.

◆ fVerifyTimeOut

int XrdProofdProofServMgr::fVerifyTimeOut
private

Definition at line 151 of file XrdProofdProofServMgr.h.


The documentation for this class was generated from the following files: