XrdProofdProofServMgr Class Reference

#include <XrdProofdProofServMgr.h>

Inheritance diagram for XrdProofdProofServMgr:

XrdProofdConfig List of all members.

Public Types

enum  PSMProtocol
enum  PSMCounters

Public Member Functions

 XrdProofdProofServMgr (XrdProofdManager *mgr, XrdProtocol_Config *pi, XrdSysError *e)
virtual ~XrdProofdProofServMgr ()
XrdSysRecMutexMutex ()
int Config (bool rcf=0)
int DoDirective (XrdProofdDirective *d, char *val, XrdOucStream *cfg, bool rcf)
void RegisterDirectives ()
int CheckFrequency () const
int InternalWait () const
int VerifyTimeOut () const
int NextSessionsCheck ()
void SetNextSessionsCheck (int t)
bool IsReconnecting ()
bool IsClientRecovering (const char *usr, const char *grp, int &deadline)
void SetReconnectTime (bool on=1)
int Process (XrdProofdProtocol *p)
XrdSysSemWaitProcessSem ()
int Accept (XrdProofdProofServ *xps, int to, XrdOucString &e)
int Attach (XrdProofdProtocol *p)
int Create (XrdProofdProtocol *p)
int Destroy (XrdProofdProtocol *p)
int Detach (XrdProofdProtocol *p)
int Recover (XpdClientSessions *cl)
void UpdateCounter (int t, int n)
int CheckCounter (int t)
void BroadcastClusterInfo ()
int BroadcastPriorities ()
int CurrentSessions (bool recalculate=0)
void DisconnectFromProofServ (int pid)
std::list< XrdProofdProofServ * > * ActiveSessions ()
XrdProofdProofServGetActiveSession (int pid)
int CleanupProofServ (bool all=0, const char *usr=0)
void GetTagDirs (XrdProofdProtocol *p, XrdProofdProofServ *xps, XrdOucString &sesstag, XrdOucString &topsesstag, XrdOucString &sessiondir, XrdOucString &sesswrkdir)
int SetProofServEnv (XrdProofdProtocol *p, void *in)
int SetProofServEnvOld (XrdProofdProtocol *p, void *in)
int SaveAFSkey (XrdSecCredentials *c, const char *fn, XrdProofUI ui)
int SetUserEnvironment (XrdProofdProtocol *p)
XrdProofdPipePipe ()
int DeleteFromSessions (const char *pid)
int MvSession (const char *fpid)
int CheckActiveSessions (bool verify=1)
int CheckTerminatedSessions ()
int CleanClientSessions (const char *usr, int srvtype)
int CleanupLostProofServ ()
int RecoverActiveSessions ()

Static Public Member Functions

static int SetProofServEnv (XrdProofdManager *m, XrdROOT *r)

Private Member Functions

int DoDirectiveProofServMgr (char *, XrdOucStream *, bool)
int DoDirectivePutEnv (char *, XrdOucStream *, bool)
int DoDirectivePutRc (char *, XrdOucStream *, bool)
int DoDirectiveShutdown (char *, XrdOucStream *, bool)
void ExtractEnv (char *, XrdOucStream *, XrdOucString &users, XrdOucString &groups, XrdOucString &rcval, XrdOucString &rcnam, int &smi, int &smx, int &vmi, int &vmx, bool &hex)
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)
int PrepareSessionRecovering ()
int ResolveSession (const char *fpid)
int AddSession (XrdProofdProtocol *p, XrdProofdProofServ *s)
bool IsSessionSocket (const char *fpid)
int RmSession (const char *fpid)
int TouchSession (const char *fpid, const char *path=0)
int VerifySession (const char *fpid, int to=-1, const char *path=0)
void ResolveKeywords (XrdOucString &s, ProofServEnv_t *in)
int SetUserOwnerships (XrdProofdProtocol *p, const char *ord, const char *stag)

Private Attributes

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

Detailed Description

Definition at line 121 of file XrdProofdProofServMgr.h.


Member Enumeration Documentation

enum XrdProofdProofServMgr::PSMProtocol

Definition at line 191 of file XrdProofdProofServMgr.h.

enum XrdProofdProofServMgr::PSMCounters

Definition at line 192 of file XrdProofdProofServMgr.h.


Constructor & Destructor Documentation

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

Definition at line 279 of file XrdProofdProofServMgr.cxx.

References fActiveSessions, fCheckFrequency, fCheckLost, fCounters, fCurrentSessions, fInternalWait, fLogger, fMgr, fNextSessionsCheck, fParentExecs, fPipe, fReconnectTime, fReconnectTimeOut, fRecoverClients, fRecoverDeadline, fRecoverTimeOut, fShutdownDelay, fShutdownOpt, fTerminationTimeOut, fVerifyTimeOut, i, XrdProofdPipe::IsValid(), pi, PSMMAXCNTS, RegisterDirectives(), TRACE, and XPDLOC.

virtual XrdProofdProofServMgr::~XrdProofdProofServMgr (  )  [inline, virtual]

Definition at line 189 of file XrdProofdProofServMgr.h.


Member Function Documentation

int XrdProofdProofServMgr::DoDirectiveProofServMgr ( char *  ,
XrdOucStream ,
bool   
) [private]

Definition at line 1189 of file XrdProofdProofServMgr.cxx.

References XrdOucString::beginswith(), XrdOucString::c_str(), XrdProofdAux::CheckIf(), fCheckFrequency, fCheckLost, fMgr, fRecoverTimeOut, fTerminationTimeOut, fVerifyTimeOut, XrdOucStream::GetWord(), XrdProofdManager::Host(), XrdOucString::replace(), strtol(), TRACE, XPD_LONGOK, XPDFORM, and XPDLOC.

Referenced by DoDirective().

int XrdProofdProofServMgr::DoDirectivePutEnv ( char *  ,
XrdOucStream ,
bool   
) [private]

Definition at line 1253 of file XrdProofdProofServMgr.cxx.

References XrdOucString::c_str(), XrdOucString::erase(), ExtractEnv(), FillEnvList(), XrdOucString::find(), fProofServEnvs, and STR_NPOS.

Referenced by DoDirective().

int XrdProofdProofServMgr::DoDirectivePutRc ( char *  ,
XrdOucStream ,
bool   
) [private]

Definition at line 1280 of file XrdProofdProofServMgr.cxx.

References XrdOucString::c_str(), ExtractEnv(), FillEnvList(), and fProofServRCs.

Referenced by DoDirective().

int XrdProofdProofServMgr::DoDirectiveShutdown ( char *  ,
XrdOucStream ,
bool   
) [private]

Definition at line 1419 of file XrdProofdProofServMgr.cxx.

References XrdProofdAux::CheckIf(), fMgr, fShutdownDelay, fShutdownOpt, XrdOucStream::GetWord(), XrdProofdManager::Host(), l, strtol(), and tval.

Referenced by DoDirective().

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

Definition at line 1306 of file XrdProofdProofServMgr.cxx.

References XrdOucString::atoi(), XrdOucString::beginswith(), XrdOucString::erase(), XrdOucString::find(), XrdOucStream::GetWord(), XrdOucString::isdigit(), XrdOucString::length(), and STR_NPOS.

Referenced by DoDirectivePutEnv(), and DoDirectivePutRc().

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]

Definition at line 1362 of file XrdProofdProofServMgr.cxx.

References XrdOucString::c_str(), XrdOucString::length(), XrdOucString::tokenize(), XpdEnv::ToVersCode(), TRACE, and XPDLOC.

Referenced by DoDirectivePutEnv(), and DoDirectivePutRc().

int XrdProofdProofServMgr::PrepareSessionRecovering (  )  [private]

Definition at line 698 of file XrdProofdProofServMgr.cxx.

References a, XrdOucString::c_str(), XrdProofdManager::ClientMgr(), closedir, dir(), fActiAdminPath, XpdManagerCron_t::fClientMgr, fManagerCron, fMgr, XpdManagerCron_t::fProofSched, fRecoverClients, fRecoverMutex, XpdManagerCron_t::fSessionMgr, XrdProofdClientMgr::GetNClients(), MvSession(), opendir, XrdProofdAux::ParsePidPath(), XrdProofdManager::ProofSched(), readdir, ResolveSession(), XrdSysThread::Run(), SetReconnectTime(), TRACE, XrdProofdAux::VerifyProcessByID(), XPD_LONGOK, XPDLOC, XPDPRT, and XrdProofdProofServRecover().

Referenced by Config().

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

Definition at line 2145 of file XrdProofdProofServMgr.cxx.

References c, XrdOucString::c_str(), XrdProofdManager::ClientMgr(), XrdProofdProofServ::CreateUNIXSock(), fActiAdminPath, XrdProofdConfig::fEDest, fMgr, XpdClientSessions::fProofServs, fRecoverClients, fRecoverMutex, XrdProofdClientMgr::GetClient(), XrdProofdProofServ::Reset(), XrdProofdManager::ROOTMgr(), XrdProofdProofServ::SetValid(), TRACE, XrdProofdProofServ::UNIXSockPath(), XPDFORM, and XPDLOC.

Referenced by PrepareSessionRecovering().

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

Definition at line 429 of file XrdProofdProofServMgr.cxx.

References c, XrdOucString::c_str(), fActiAdminPath, info, p, s, TRACE, XPDFORM, and XPDLOC.

Referenced by Create().

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

Definition at line 455 of file XrdProofdProofServMgr.cxx.

References XrdOucString::beginswith(), XrdOucString::c_str(), CheckCounter(), XrdOucString::endswith(), fActiAdminPath, kCreateCnt, XrdOucString::replace(), stat, TRACE, unlink, XPDFORM, and XPDLOC.

Referenced by CheckActiveSessions().

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

Definition at line 546 of file XrdProofdProofServMgr.cxx.

References XrdOucString::c_str(), fTermAdminPath, TRACE, unlink, XPDFORM, and XPDLOC.

Referenced by CheckTerminatedSessions(), and CleanClientSessions().

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

Definition at line 573 of file XrdProofdProofServMgr.cxx.

References XrdOucString::c_str(), fActiAdminPath, TRACE, XPDFORM, and XPDLOC.

Referenced by MvSession().

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

Definition at line 601 of file XrdProofdProofServMgr.cxx.

References XrdOucString::c_str(), XrdOucString::endswith(), XrdOucString::erase(), fActiAdminPath, fVerifyTimeOut, XrdOucString::rfind(), stat, TRACE, XPDFORM, and XPDLOC.

Referenced by CheckActiveSessions().

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

Definition at line 4177 of file XrdProofdProofServMgr.cxx.

References getenv(), kXPD_Worker, s, and STR_NPOS.

Referenced by SetProofServEnv(), and SetProofServEnvOld().

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

Definition at line 3760 of file XrdProofdProofServMgr.cxx.

References XrdProofdAux::AssertDir(), XrdOucString::c_str(), XrdProofdAux::ChangeMod(), XrdProofdAux::ChangeOwn(), XrdProofdManager::ChangeOwn(), d, XrdProofdManager::DataDir(), XrdProofdManager::DataDirOpts(), XrdProofdManager::DataSetSrcs(), XrdProofdProtocol::EUidAtStartup(), fMgr, XrdProofdAux::GetUserInfo(), i, p, TRACE, XPDFORM, and XPDLOC.

Referenced by Create().

XrdSysRecMutex* XrdProofdProofServMgr::Mutex (  )  [inline]

Definition at line 194 of file XrdProofdProofServMgr.h.

References fMutex.

Referenced by XrdProofdProofServCron().

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

Reimplemented from XrdProofdConfig.

Definition at line 324 of file XrdProofdProofServMgr.cxx.

References XrdProofdManager::AdminPath(), XrdProofdAux::AssertDir(), XrdOucString::c_str(), XrdProofdManager::ClientMgr(), XrdProofdConfig::Config(), XrdProofdManager::EffectiveUser(), fActiAdminPath, XpdManagerCron_t::fClientMgr, fEnvsMutex, fInternalWait, fManagerCron, fMgr, fProofServEnvs, fProofServRCs, XpdManagerCron_t::fSessionMgr, fShutdownDelay, fShutdownOpt, fTermAdminPath, XrdProofdAux::GetUserInfo(), PrepareSessionRecovering(), XrdProofdConfig::ReadFile(), XrdSysThread::Run(), TRACE, XPDFORM, XPDLOC, XPDPRT, and XrdProofdProofServCron().

Referenced by XrdProofdManager::Config(), and XrdProofdManagerCron().

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

Reimplemented from XrdProofdConfig.

Definition at line 1165 of file XrdProofdProofServMgr.cxx.

References d, DoDirectiveProofServMgr(), DoDirectivePutEnv(), DoDirectivePutRc(), DoDirectiveShutdown(), TRACE, and XPDLOC.

void XrdProofdProofServMgr::RegisterDirectives (  )  [virtual]

Reimplemented from XrdProofdConfig.

Definition at line 1143 of file XrdProofdProofServMgr.cxx.

References DoDirectiveClass(), DoDirectiveInt(), DoDirectiveString(), fInternalWait, fParentExecs, fProofPlugin, fReconnectTimeOut, and XrdProofdConfig::Register().

Referenced by XrdProofdProofServMgr().

int XrdProofdProofServMgr::CheckFrequency (  )  const [inline]

Definition at line 201 of file XrdProofdProofServMgr.h.

References fCheckFrequency.

Referenced by XrdProofdProtocol::Ping(), and XrdProofdProofServCron().

int XrdProofdProofServMgr::InternalWait (  )  const [inline]

Definition at line 202 of file XrdProofdProofServMgr.h.

References fInternalWait.

int XrdProofdProofServMgr::VerifyTimeOut (  )  const [inline]

Definition at line 203 of file XrdProofdProofServMgr.h.

References fVerifyTimeOut.

int XrdProofdProofServMgr::NextSessionsCheck (  )  [inline]

Definition at line 205 of file XrdProofdProofServMgr.h.

References fMutex, and fNextSessionsCheck.

Referenced by XrdProofdProofServCron().

void XrdProofdProofServMgr::SetNextSessionsCheck ( int  t  )  [inline]

Definition at line 207 of file XrdProofdProofServMgr.h.

References fMutex, and fNextSessionsCheck.

Referenced by XrdProofdProofServCron().

bool XrdProofdProofServMgr::IsReconnecting (  ) 

Definition at line 4074 of file XrdProofdProofServMgr.cxx.

References fReconnectTime, and fReconnectTimeOut.

Referenced by CheckActiveSessions().

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

Definition at line 847 of file XrdProofdProofServMgr.cxx.

References fRecoverClients, fRecoverDeadline, fRecoverMutex, TRACE, and XPDLOC.

Referenced by Attach().

void XrdProofdProofServMgr::SetReconnectTime ( bool  on = 1  ) 

Definition at line 4091 of file XrdProofdProofServMgr.cxx.

References fMutex, and fReconnectTime.

Referenced by PrepareSessionRecovering(), and RecoverActiveSessions().

int XrdProofdProofServMgr::Process ( XrdProofdProtocol p  ) 

Definition at line 1471 of file XrdProofdProofServMgr.cxx.

References Attach(), xmlio::cnt, Create(), Destroy(), Detach(), emsg(), fProcessSem, kProcessCnt, kProcessReq, kXP_attach, kXP_create, kXP_destroy, kXP_detach, kXR_InvalidRequest, kXR_ServerError, p, Pipe(), XrdProofdAux::ProofRequestTypes(), TRACEP, XrdSysSemWait::Wait(), XPD_SETRESP, and XPDLOC.

Referenced by XrdProofdManager::Process().

XrdSysSemWait* XrdProofdProofServMgr::ProcessSem (  )  [inline]

Definition at line 215 of file XrdProofdProofServMgr.h.

References fProcessSem.

Referenced by XrdProofdProofServCron().

int XrdProofdProofServMgr::Accept ( XrdProofdProofServ xps,
int  to,
XrdOucString e 
)

Definition at line 2277 of file XrdProofdProofServMgr.cxx.

References XrdNet::Accept(), XrdProofdProofServ::AdminPath(), XrdLink::Alloc(), XrdPoll::Attach(), fMgr, free(), XrdNetDNS::getHostName(), XrdNetPeer::InetName, p, XrdProtocol::Process(), XrdProofdManager::Sched(), XrdScheduler::Schedule(), XrdProofdProofServ::SetProtocol(), TRACE, XrdProofdProofServ::UNIXSock(), XrdProofdProofServ::UNIXSockPath(), XPDLOC, and XRDNET_NODNTRIM.

Referenced by Create(), and Recover().

int XrdProofdProofServMgr::Attach ( XrdProofdProtocol p  ) 

Definition at line 1523 of file XrdProofdProofServMgr.cxx.

References c, XrdSrvBuffer::fBuff, fMgr, fRecoverTimeOut, XrdSrvBuffer::fSize, XrdProofdProofServ::GetClientID(), IsClientRecovering(), XrdProofdProofServ::IsValid(), kXPD_ClientMaster, kXPD_msg, kXPD_running, kXR_attn, kXR_InvalidRequest, kXR_ServerError, XrdProofdManager::NameSpace(), p, XrdProofdProofServ::Parent(), XrdProofdManager::PoolURL(), XrdProofdProofServ::ROOT(), XrdClientID::SetP(), XrdProofdProofServ::SetParent(), XrdClientID::SetSid(), sleep, XrdROOT::SrvProtVers(), XrdProofdProofServ::StartMsg(), XrdProofdProofServ::Status(), TRACEP, XPD_SETRESP, XPDLOC, and XPROOFD_VERSBIN.

Referenced by Process().

int XrdProofdProofServMgr::Create ( XrdProofdProtocol p  ) 

Definition at line 1615 of file XrdProofdProofServMgr.cxx.

References Accept(), XrdOucHash< T >::Add(), AddSession(), XrdProofdManager::AdminPath(), XrdOucString::assign(), XrdSysLogger::Bind(), buf, XpdMsg::Buf(), XrdOucString::c_str(), XrdProofdManager::ChangeOwn(), CheckCounter(), XrdProofdPipe::Close(), xmlio::cnt, XrdProofdProofServ::CreateUNIXSock(), CurrentSessions(), XrdProofdManager::DataDirOpts(), XrdROOTMgr::DefaultVersion(), XrdProofdProofServ::DeleteUNIXSock(), emsg(), XrdOucString::erase(), XrdROOT::Export(), fActiAdminPath, fActiveSessions, fCurrentSessions, XrdProofdConfig::fEDest, fForkSem, XrdProofdProofServ::Fileout(), XrdOucString::find(), fInternalWait, fLogger, fMgr, fMutex, XrdScheduler::Fork(), fSessions, XrdProofdProofServ::GetClientID(), XrdProofdProofServ::GetNClients(), GetTagDirs(), Hash_keepdata, XrdProofdProofServ::ID(), int, XrdProofdProofServ::IsValid(), XrdProofdPipe::IsValid(), kCreateCnt, XrdProofdAux::KillProcess(), kXP_ServerError, kXP_TooManySess, kXPD_ClientMaster, kXPD_errmsg, kXPD_MasterMaster, kXPD_MasterWorker, kXPD_srvmsg, kXPD_Worker, kXR_attn, len, XrdOucString::length(), XrdProofSched::MaxSessions(), XrdProofdManager::NameSpace(), nc, ord, p, XrdProofdProofServ::Parent(), XrdProofdPipe::Poll(), XrdProofdManager::PoolURL(), XrdProofdManager::Port(), XrdProofdPipe::Post(), XrdSysSemWait::Post(), XrdROOT::PrgmSrv(), XrdProofdManager::PriorityMgr(), XrdProofdManager::ProofSched(), XrdProofdPipe::Recv(), XrdProofdProofServ::Reset(), XpdMsg::Reset(), XrdOucString::rfind(), XrdProofdProofServ::ROOT(), XrdProofdManager::ROOTMgr(), s, XrdProofdManager::Sched(), XpdSrvMgrCreateGuard::Set(), XrdProofdProofServ::SetAdminPath(), XrdProofdProofServ::SetClient(), XrdProofdProofServ::SetFileout(), XrdProofdProofServ::SetGroup(), XrdProofdProofServ::SetOrdinal(), XrdClientID::SetP(), XrdProofdProofServ::SetParent(), XrdProofdPriorityMgr::SetProcessPriority(), SetProofServEnv(), XrdProofdProofServ::SetROOT(), XrdClientID::SetSid(), XrdProofdProofServ::SetSrvPID(), XrdProofdProofServ::SetSrvType(), XrdProofdProofServ::SetTag(), XrdProofdProofServ::SetUNIXSockPath(), SetUserEnvironment(), XrdProofdProofServ::SetUserEnvs(), SetUserOwnerships(), SIG_UNBLOCK, XrdProofdManager::SockPathDir(), sprintf(), XrdProofdProofServ::SrvPID(), XrdROOT::SrvProtVers(), XrdProofdProofServ::SrvType(), STR_NPOS, XrdProofdProofServ::Tag(), TRACE, TRACEP, TRACING, XpdMsg::Type(), XrdProofdProofServ::UNIXSock(), XrdProofdProofServ::UNIXSockPath(), XrdSysSemWait::Wait(), XPD_SETRESP, XPDFORM, XPDLOC, and XPROOFD_VERSBIN.

Referenced by Process().

int XrdProofdProofServMgr::Destroy ( XrdProofdProtocol p  ) 

Definition at line 2400 of file XrdProofdProofServMgr.cxx.

References XrdOucString::c_str(), XrdProofdManager::ChangeOwn(), fMgr, kXPD_AnyServer, kXR_InvalidRequest, p, Pipe(), XrdProofdProofServ::SrvPID(), TRACEP, XPD_SETRESP, XPDFORM, and XPDLOC.

Referenced by Process().

int XrdProofdProofServMgr::Detach ( XrdProofdProtocol p  ) 

Definition at line 2372 of file XrdProofdProofServMgr.cxx.

References XrdProofdProofServ::FreeClientID(), kXR_InvalidRequest, p, TRACEP, XPD_SETRESP, and XPDLOC.

Referenced by Process().

int XrdProofdProofServMgr::Recover ( XpdClientSessions cl  ) 

Definition at line 2222 of file XrdProofdProofServMgr.cxx.

References Accept(), XrdOucHash< T >::Add(), XrdProofdProofServ::AdminPath(), XrdOucString::c_str(), emsg(), fActiveSessions, XpdClientSessions::fClient, XpdClientSessions::fMutex, XpdClientSessions::fProofServs, fSessions, XrdProofdClient::Group(), Hash_keepdata, XrdProofdProofServ::Protocol(), XrdProofdProtocol::SetAdminPath(), XrdProofdProofServ::SrvPID(), TRACE, TRACING, XrdProofdClient::User(), XPDLOC, and XPDPRT.

Referenced by RecoverActiveSessions().

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

Definition at line 224 of file XrdProofdProofServMgr.h.

References fCounters, fMutex, and PSMCNTOK.

Referenced by XrdProofdProofServCron(), and XpdSrvMgrCreateCnt::~XpdSrvMgrCreateCnt().

int XrdProofdProofServMgr::CheckCounter ( int  t  )  [inline]

Definition at line 227 of file XrdProofdProofServMgr.h.

References xmlio::cnt, fCounters, fMutex, and PSMCNTOK.

Referenced by XrdProofdAdmin::CleanupSessions(), Create(), IsSessionSocket(), and XrdProofdProofServCron().

void XrdProofdProofServMgr::BroadcastClusterInfo (  ) 

Definition at line 4032 of file XrdProofdProofServMgr.cxx.

References fActiveSessions, kXPD_running, kXPD_Worker, TRACE, XPDLOC, and XPDPRT.

Referenced by XrdProofdProofServCron().

int XrdProofdProofServMgr::BroadcastPriorities (  ) 

Definition at line 4058 of file XrdProofdProofServMgr.cxx.

References XrdOucHash< T >::Apply(), BroadcastPriority(), fMgr, fSessions, XrdProofdManager::GroupsMgr(), TRACE, and XPDLOC.

int XrdProofdProofServMgr::CurrentSessions ( bool  recalculate = 0  ) 

Definition at line 4158 of file XrdProofdProofServMgr.cxx.

References XrdOucHash< T >::Apply(), CountTopMasters(), fCurrentSessions, fMutex, fSessions, TRACE, and XPDLOC.

Referenced by Create(), and XrdProofdProofServCron().

void XrdProofdProofServMgr::DisconnectFromProofServ ( int  pid  ) 

Definition at line 4125 of file XrdProofdProofServMgr.cxx.

References XrdOucHash< T >::Apply(), fMutex, FreeClientID(), and fSessions.

Referenced by XrdProofdProofServCron().

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

Definition at line 236 of file XrdProofdProofServMgr.h.

References fActiveSessions.

Referenced by XrdProofSched::GetNumWorkers().

XrdProofdProofServ * XrdProofdProofServMgr::GetActiveSession ( int  pid  ) 

Definition at line 3988 of file XrdProofdProofServMgr.cxx.

References XrdOucString::c_str(), XrdOucHash< T >::Find(), and fSessions.

Referenced by CleanupProofServ().

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

Definition at line 3441 of file XrdProofdProofServMgr.cxx.

References XrdOucString::c_str(), XrdProofdManager::ChangeOwn(), XrdProofdProofServ::Client(), close, closedir, DIGIT, dir(), emsg(), fclose(), fMgr, fopen, fp, fParentExecs, free(), XrdProofUI::fUid, GetActiveSession(), XrdProofdAux::GetLong(), XrdProofdAux::GetUserInfo(), int, XrdProofdAux::KillProcess(), line, XrdProofdManager::MultiUser(), open, opendir, pi, read, readdir, sprintf(), TRACE, XrdProofdAux::VerifyProcessByID(), and XPDLOC.

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

Definition at line 2789 of file XrdProofdProofServMgr.cxx.

References XrdProofdAux::AssertDir(), XrdOucString::c_str(), XrdProofdManager::ChangeOwn(), XrdOucString::erase(), XrdOucString::find(), fMgr, XrdProofdManager::Host(), int, kXPD_ClientMaster, kXPD_MasterWorker, XrdProofdProofServ::Ordinal(), p, XrdProofdProofServ::SetTag(), STR_NPOS, XrdProofdProofServ::Tag(), and XPDFORM.

Referenced by Create().

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

Definition at line 2865 of file XrdProofdProofServMgr.cxx.

References XrdOucHash< T >::Add(), XrdProofdProofServ::AdminPath(), XrdOucHash< T >::Apply(), XrdProofdAux::AssertDir(), XrdSecBuffer::buffer, XrdOucString::c_str(), XrdProofdConfig::CfgFile(), XrdProofdManager::ChangeOwn(), XrdProofdAux::ChangeToDir(), XrdProofdManager::DataDir(), XrdProofdManager::DataSetSrcs(), XrdROOT::Dir(), env, fclose(), fEnvsMutex, XrdOucHash< T >::Find(), fMgr, XpdEnv::fName, fopen, fprintf(), fProofPlugin, fProofServEnvs, fProofServRCs, XrdProofGroupMgr::GetCfgFile(), getenv(), XrdROOT::GetVersionCode(), XrdProofdManager::GroupsMgr(), Hash_keepdata, XrdProofdManager::Host(), XrdProofdProofServ::ID(), XrdProofdManager::Image(), XrdProofdManager::IsSuperMst(), kXPD_MasterWorker, XrdOucString::length(), XrdProofdManager::LocalROOT(), XpdEnv::Matches(), XrdProofdManager::NetMgr(), XrdProofdProofServ::Ordinal(), p, XrdProofdManager::PoolURL(), XrdProofdManager::Port(), putenv, XrdOucHash< T >::Rep(), ResolveKeywords(), XrdProofdProofServ::ROOT(), SaveAFSkey(), XrdProofdProofServ::SetFileout(), SetProofServEnvOld(), XrdSecBuffer::size, sprintf(), strcpy(), XrdProofdAux::SymLink(), XrdProofdManager::TMPdir(), XrdOucString::tokenize(), TRACE, XrdProofdProofServ::UNIXSockPath(), XrdProofdProofServ::UserEnvs(), XrdProofdNetMgr::WorkerUsrCfg(), WriteSessEnvs(), WriteSessRCs(), XPD_LIBPATH, XPDFORM, and XPDLOC.

Referenced by Create(), SetProofServEnvOld(), and XrdROOTMgr::Validate().

int XrdProofdProofServMgr::SetProofServEnvOld ( XrdProofdProtocol p,
void *  in 
)

Definition at line 2473 of file XrdProofdProofServMgr.cxx.

References XrdProofdAux::AssertDir(), XrdSecBuffer::buffer, XrdOucString::c_str(), XrdProofdManager::ChangeOwn(), XrdROOT::Dir(), env, fclose(), fEnvsMutex, fMgr, fopen, fprintf(), fProofServEnvs, getenv(), Hash_keepdata, XrdProofdProofServ::ID(), kXPD_MasterWorker, XrdOucString::length(), XrdProofdManager::NetMgr(), XrdProofdProofServ::Ordinal(), p, XrdProofdManager::Port(), putenv, ResolveKeywords(), XrdProofdProofServ::ROOT(), SaveAFSkey(), XrdProofdProofServ::SetFileout(), SetProofServEnv(), XrdSecBuffer::size, sprintf(), strcpy(), XrdProofdAux::SymLink(), XrdProofdManager::TMPdir(), XrdOucString::tokenize(), TRACE, XrdProofdProofServ::UNIXSockPath(), XrdProofdProofServ::UserEnvs(), XrdProofdNetMgr::WorkerUsrCfg(), WriteSessEnvs(), and XPDLOC.

Referenced by SetProofServEnv().

int XrdProofdProofServMgr::SaveAFSkey ( XrdSecCredentials c,
const char *  fn,
XrdProofUI  ui 
)

Definition at line 3910 of file XrdProofdProofServMgr.cxx.

References c, XrdOucString::c_str(), XrdProofdAux::ChangeOwn(), close, open, out, stat, TRACE, XrdProofdAux::Write(), XPDLOC, and XrdSutFromHex().

Referenced by SetProofServEnv(), and SetProofServEnvOld().

int XrdProofdProofServMgr::SetUserEnvironment ( XrdProofdProtocol p  ) 

Definition at line 3851 of file XrdProofdProofServMgr.cxx.

References XrdProofdManager::ChangeOwn(), XrdSysPriv::ChangePerm(), XrdProofdAux::ChangeToDir(), fMgr, h, int, p, putenv, sprintf(), TRACE, u, XpdBadPGuard, and XPDLOC.

Referenced by XrdProofdAdmin::CpFile(), Create(), XrdProofdAdmin::ExecCmd(), XrdProofdAdmin::GetFile(), and XrdProofdAdmin::PutFile().

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

Definition at line 2736 of file XrdProofdProofServMgr.cxx.

References XrdProofdManager::BareLibPath(), putenv, sprintf(), XrdProofdManager::TMPdir(), TRACE, XPD_LIBPATH, and XPDLOC.

XrdProofdPipe* XrdProofdProofServMgr::Pipe (  )  [inline]

Definition at line 253 of file XrdProofdProofServMgr.h.

References fPipe.

Referenced by Destroy(), XrdProofdProtocol::PostSession(), Process(), XrdProofdProtocol::Recycle(), XrdProofdClientMgr::TerminateSessions(), XrdProofdClientCron(), and XrdProofdProofServCron().

int XrdProofdProofServMgr::DeleteFromSessions ( const char *  pid  ) 

Definition at line 660 of file XrdProofdProofServMgr.cxx.

References XrdOucString::c_str(), XrdOucHash< T >::Del(), XrdOucString::erase(), fActiveSessions, fCurrentSessions, XrdOucHash< T >::Find(), fMutex, fSessions, kXPD_wrkmortem, XrdOucString::replace(), XrdProofdProofServ::Reset(), XrdOucString::rfind(), TRACE, XPDFORM, and XPDLOC.

Referenced by XrdProofdProofServCron().

int XrdProofdProofServMgr::MvSession ( const char *  fpid  ) 

Definition at line 494 of file XrdProofdProofServMgr.cxx.

References XrdOucString::c_str(), fActiAdminPath, fTermAdminPath, rename, XrdOucString::replace(), TouchSession(), TRACE, unlink, XPDFORM, and XPDLOC.

Referenced by CheckActiveSessions(), CleanClientSessions(), PrepareSessionRecovering(), and XrdProofdProofServCron().

int XrdProofdProofServMgr::CheckActiveSessions ( bool  verify = 1  ) 

Definition at line 882 of file XrdProofdProofServMgr.cxx.

References XrdOucString::c_str(), XrdProofdManager::ChangeOwn(), XrdProofdProofServ::CheckSession(), closedir, dir(), fActiAdminPath, XrdOucHash< T >::Find(), fMgr, fMutex, fSessions, fShutdownDelay, fShutdownOpt, IsReconnecting(), IsSessionSocket(), XrdProofdProofServ::IsValid(), MvSession(), nc, opendir, XrdProofdAux::ParsePidPath(), readdir, XrdProofdProofServ::ROOT(), XrdROOT::SrvProtVers(), TRACE, XrdProofdProofServ::VerifyProofServ(), VerifySession(), XPD_LONGOK, and XPDLOC.

Referenced by XrdProofdProofServCron().

int XrdProofdProofServMgr::CheckTerminatedSessions (  ) 

Definition at line 964 of file XrdProofdProofServMgr.cxx.

References a, XrdOucString::c_str(), XrdProofdManager::ChangeOwn(), closedir, dir(), fMgr, fTermAdminPath, fTerminationTimeOut, XrdProofdAux::GetUserInfo(), info, XrdProofdAux::KillProcess(), opendir, XrdProofdAux::ParsePidPath(), readdir, RmSession(), stat, TRACE, XrdProofdAux::VerifyProcessByID(), XPD_LONGOK, XPDFORM, and XPDLOC.

Referenced by XrdProofdProofServCron().

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

Definition at line 1023 of file XrdProofdProofServMgr.cxx.

References a, c, XrdOucString::c_str(), XrdProofdManager::ChangeOwn(), XrdProofdManager::ClientMgr(), closedir, XrdOucHash< T >::Del(), dir(), fActiAdminPath, fMgr, fMutex, fSessions, fTermAdminPath, XrdProofdClientMgr::GetClient(), XrdProofdAux::GetUserInfo(), info, XrdProofdAux::KillProcess(), kXPD_AnyServer, MvSession(), opendir, XrdProofdAux::ParsePidPath(), readdir, RmSession(), TRACE, XrdProofdAux::VerifyProcessByID(), XPD_LONGOK, XPDFORM, and XPDLOC.

int XrdProofdProofServMgr::CleanupLostProofServ (  ) 

Definition at line 3332 of file XrdProofdProofServMgr.cxx.

References a, XrdOucRash< K, V >::Add(), XrdOucHash< T >::Add(), XrdOucString::c_str(), XrdProofdManager::ChangeOwn(), closedir, XrdProofdManager::EffectiveUser(), emsg(), fCheckLost, XrdOucHash< T >::Find(), XrdOucString::find(), XrdOucRash< K, V >::Find(), fMgr, fParentExecs, XrdProofdAux::GetIDFromPath(), XrdProofdAux::GetProcesses(), XrdProofdAux::GetUserInfo(), Hash_data_is_key, i, if(), XrdProofdAux::KillProcess(), ok, opendir, XrdProofdAux::ParsePidPath(), readdir, STR_NPOS, XrdOucString::tokenize(), TRACE, XrdProofdAux::VerifyProcessByID(), XPDFORM, and XPDLOC.

Referenced by XrdProofdProofServCron().

int XrdProofdProofServMgr::RecoverActiveSessions (  ) 

Definition at line 766 of file XrdProofdProofServMgr.cxx.

References XpdClientSessions::fMutex, XpdClientSessions::fProofServs, fRecoverClients, fRecoverDeadline, fRecoverMutex, fRecoverTimeOut, Recover(), SetReconnectTime(), TRACE, and XPDLOC.

Referenced by XrdProofdProofServRecover().


Member Data Documentation

XrdProofdManager* XrdProofdProofServMgr::fMgr [private]

Definition at line 123 of file XrdProofdProofServMgr.h.

Referenced by Accept(), Attach(), BroadcastPriorities(), CheckActiveSessions(), CheckTerminatedSessions(), CleanClientSessions(), CleanupLostProofServ(), CleanupProofServ(), Config(), Create(), Destroy(), DoDirectiveProofServMgr(), DoDirectiveShutdown(), GetTagDirs(), PrepareSessionRecovering(), ResolveSession(), SetProofServEnv(), SetProofServEnvOld(), SetUserEnvironment(), SetUserOwnerships(), and XrdProofdProofServMgr().

XrdSysRecMutex XrdProofdProofServMgr::fMutex [private]

Definition at line 124 of file XrdProofdProofServMgr.h.

Referenced by CheckActiveSessions(), CheckCounter(), CleanClientSessions(), Create(), CurrentSessions(), DeleteFromSessions(), DisconnectFromProofServ(), Mutex(), NextSessionsCheck(), SetNextSessionsCheck(), SetReconnectTime(), and UpdateCounter().

XrdSysRecMutex XrdProofdProofServMgr::fRecoverMutex [private]

Definition at line 125 of file XrdProofdProofServMgr.h.

Referenced by IsClientRecovering(), PrepareSessionRecovering(), RecoverActiveSessions(), and ResolveSession().

XrdSysRecMutex XrdProofdProofServMgr::fEnvsMutex [private]

Definition at line 126 of file XrdProofdProofServMgr.h.

Referenced by Config(), SetProofServEnv(), and SetProofServEnvOld().

XrdSysSemWait XrdProofdProofServMgr::fForkSem [private]

Definition at line 127 of file XrdProofdProofServMgr.h.

Referenced by Create().

XrdSysSemWait XrdProofdProofServMgr::fProcessSem [private]

Definition at line 128 of file XrdProofdProofServMgr.h.

Referenced by Process(), and ProcessSem().

XrdSysLogger* XrdProofdProofServMgr::fLogger [private]

Definition at line 129 of file XrdProofdProofServMgr.h.

Referenced by Create(), and XrdProofdProofServMgr().

int XrdProofdProofServMgr::fInternalWait [private]

Definition at line 130 of file XrdProofdProofServMgr.h.

Referenced by Config(), Create(), InternalWait(), RegisterDirectives(), and XrdProofdProofServMgr().

XrdOucString XrdProofdProofServMgr::fProofPlugin [private]

Definition at line 131 of file XrdProofdProofServMgr.h.

Referenced by RegisterDirectives(), and SetProofServEnv().

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

Definition at line 132 of file XrdProofdProofServMgr.h.

Referenced by Config(), DoDirectivePutEnv(), SetProofServEnv(), and SetProofServEnvOld().

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

Definition at line 133 of file XrdProofdProofServMgr.h.

Referenced by Config(), DoDirectivePutRc(), and SetProofServEnv().

int XrdProofdProofServMgr::fShutdownOpt [private]

Definition at line 135 of file XrdProofdProofServMgr.h.

Referenced by CheckActiveSessions(), Config(), DoDirectiveShutdown(), and XrdProofdProofServMgr().

int XrdProofdProofServMgr::fShutdownDelay [private]

Definition at line 136 of file XrdProofdProofServMgr.h.

Referenced by CheckActiveSessions(), Config(), DoDirectiveShutdown(), and XrdProofdProofServMgr().

XrdProofdPipe XrdProofdProofServMgr::fPipe [private]

Definition at line 138 of file XrdProofdProofServMgr.h.

Referenced by Pipe(), and XrdProofdProofServMgr().

int XrdProofdProofServMgr::fCheckFrequency [private]

Definition at line 140 of file XrdProofdProofServMgr.h.

Referenced by CheckFrequency(), DoDirectiveProofServMgr(), and XrdProofdProofServMgr().

int XrdProofdProofServMgr::fTerminationTimeOut [private]

Definition at line 141 of file XrdProofdProofServMgr.h.

Referenced by CheckTerminatedSessions(), DoDirectiveProofServMgr(), and XrdProofdProofServMgr().

int XrdProofdProofServMgr::fVerifyTimeOut [private]

Definition at line 142 of file XrdProofdProofServMgr.h.

Referenced by DoDirectiveProofServMgr(), VerifySession(), VerifyTimeOut(), and XrdProofdProofServMgr().

int XrdProofdProofServMgr::fReconnectTime [private]

Definition at line 143 of file XrdProofdProofServMgr.h.

Referenced by IsReconnecting(), SetReconnectTime(), and XrdProofdProofServMgr().

int XrdProofdProofServMgr::fReconnectTimeOut [private]

Definition at line 144 of file XrdProofdProofServMgr.h.

Referenced by IsReconnecting(), RegisterDirectives(), and XrdProofdProofServMgr().

int XrdProofdProofServMgr::fRecoverTimeOut [private]

Definition at line 145 of file XrdProofdProofServMgr.h.

Referenced by Attach(), DoDirectiveProofServMgr(), RecoverActiveSessions(), and XrdProofdProofServMgr().

int XrdProofdProofServMgr::fRecoverDeadline [private]

Definition at line 146 of file XrdProofdProofServMgr.h.

Referenced by IsClientRecovering(), RecoverActiveSessions(), and XrdProofdProofServMgr().

bool XrdProofdProofServMgr::fCheckLost [private]

Definition at line 147 of file XrdProofdProofServMgr.h.

Referenced by CleanupLostProofServ(), DoDirectiveProofServMgr(), and XrdProofdProofServMgr().

XrdOucString XrdProofdProofServMgr::fParentExecs [private]

Definition at line 148 of file XrdProofdProofServMgr.h.

Referenced by CleanupLostProofServ(), CleanupProofServ(), RegisterDirectives(), and XrdProofdProofServMgr().

int XrdProofdProofServMgr::fCounters[PSMMAXCNTS] [private]

Definition at line 150 of file XrdProofdProofServMgr.h.

Referenced by CheckCounter(), UpdateCounter(), and XrdProofdProofServMgr().

int XrdProofdProofServMgr::fCurrentSessions [private]

Definition at line 151 of file XrdProofdProofServMgr.h.

Referenced by Create(), CurrentSessions(), DeleteFromSessions(), and XrdProofdProofServMgr().

int XrdProofdProofServMgr::fNextSessionsCheck [private]

Definition at line 153 of file XrdProofdProofServMgr.h.

Referenced by NextSessionsCheck(), SetNextSessionsCheck(), and XrdProofdProofServMgr().

XrdOucString XrdProofdProofServMgr::fActiAdminPath [private]

Definition at line 155 of file XrdProofdProofServMgr.h.

Referenced by AddSession(), CheckActiveSessions(), CleanClientSessions(), Config(), Create(), IsSessionSocket(), MvSession(), PrepareSessionRecovering(), ResolveSession(), TouchSession(), and VerifySession().

XrdOucString XrdProofdProofServMgr::fTermAdminPath [private]

Definition at line 156 of file XrdProofdProofServMgr.h.

Referenced by CheckTerminatedSessions(), CleanClientSessions(), Config(), MvSession(), and RmSession().

XrdOucHash<XrdProofdProofServ> XrdProofdProofServMgr::fSessions [private]

Definition at line 158 of file XrdProofdProofServMgr.h.

Referenced by BroadcastPriorities(), CheckActiveSessions(), CleanClientSessions(), Create(), CurrentSessions(), DeleteFromSessions(), DisconnectFromProofServ(), GetActiveSession(), and Recover().

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

Definition at line 159 of file XrdProofdProofServMgr.h.

Referenced by ActiveSessions(), BroadcastClusterInfo(), Create(), DeleteFromSessions(), Recover(), and XrdProofdProofServMgr().

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

Definition at line 160 of file XrdProofdProofServMgr.h.

Referenced by IsClientRecovering(), PrepareSessionRecovering(), RecoverActiveSessions(), ResolveSession(), and XrdProofdProofServMgr().


The documentation for this class was generated from the following files:
Generated on Tue Jul 5 16:50:43 2011 for ROOT_528-00b_version by  doxygen 1.5.1