41 #include <sys/param.h>
42 #include <sys/resource.h>
44 #include <sys/types.h>
47 #include "XrdVersion.hh"
127 (
const char *hostname,
128 const struct sockaddr &netaddr,
188 #define TS_Lib(x, y, z) if (!strcmp(x, var)) \
189 return (XrdOucUtils::parseLib(*eDest, CFile, x, y, z) ? 0 : 1);
191 #define TS_String(x,m) if (!strcmp(x,var)) {free(m); m = strdup(val); return 0;}
193 #define TS_Xeq(x,m) if (!strcmp(x,var)) return m(eDest, CFile);
194 #define TS_Xer(x,m,v) if (!strcmp(x,var)) return m(eDest, CFile, v);
196 #define TS_Set(x,v) if (!strcmp(x,var)) {v=1; CFile.Echo(true); return 0;}
198 #define TS_unSet(x,v) if (!strcmp(x,var)) {v=0; CFile.Echo(true); return 0;}
211 myName = strdup(pi->
myName);
212 PortTCP = (pi->
Port < 0 ? 0 : pi->
Port);
213 myInsName = strdup(pi->
myInst);
214 myProg = strdup(pi->
myProg);
248 int NoGo = 0, immed = 0;
250 extern int opterr,
optopt;
255 if (argc > 1 &&
'-' == *argv[1])
256 while ((c=getopt(argc,argv,
"iw")) && ((
unsigned char)c != 0xff))
261 case 'w': immed = -1;
263 default: buff[0] =
'-'; buff[1] =
optopt; buff[2] =
'\0';
264 Say.
Say(
"Config warning: unrecognized option, ",buff,
", ignored.");
271 {
if (!strcmp(argv[
optind],
"manager")) isManager = 1;
272 else if (!strcmp(argv[
optind],
"server" )) isServer = 1;
273 else if (!strcmp(argv[
optind],
"super" )) isServer = isManager = 1;
274 else Say.
Say(
"Config warning: unrecognized parameter, ",
275 argv[
optind],
", ignored.");
280 inArgv = argv; inArgc = argc;
281 if ((!(ConfigFN = cfn) && !(ConfigFN = getenv(
"XrdCmsCONFIGFN")))
283 {
Say.
Emsg(
"Config",
"Required config file not specified.");
290 myInstance = strdup(buff);
299 Say.
Say(
"++++++ ", myInstance,
" phase 1 initialization started.");
304 if (!(isManager || isServer))
305 if (!(NoGo |= ConfigProc(1)) && !(isManager || isServer))
306 {
Say.
Say(
"Config warning: role not specified; manager role assumed.");
312 if (!NoGo) NoGo |= ConfigProc();
320 if (immed) doWait = (immed > 0 ? 0 : 1);
324 if (isManager < 0) isManager = 1;
325 if (isPeer < 0) isPeer = 1;
326 if (isProxy < 0) isProxy = 1;
327 if (isServer < 0) isServer = 1;
347 myRoleID =
static_cast<int>(rid);
359 {
if ((isManager && !isServer) || isPeer)
361 {
Say.
Emsg(
"Config",
"port for this", myRole,
"not specified.");
365 else if ((isManager && isServer)) PortTCP = PortSUP;
378 {
if (P_cpu|P_io|P_load|P_mem|P_pag)
379 {
if (!prfLib && !perfpgm)
380 Say.
Say(
"Config warning: metric scheduling requested without a "
381 "metrics supplier!");
383 if ( prfLib || perfpgm)
384 Say.
Say(
"Config warning: metrics supplier specified without "
385 "any scheduling metrics!");
391 sprintf(buff,
" phase 1 %s initialization %s.", myRole,
392 (NoGo ?
"failed" :
"completed"));
393 Say.
Say(
"------ ", myInstance, buff);
418 const char *override_hn = getenv(
"OVERRIDEXRDHOST");
420 {envData +=
"&ovHN=";
421 envData += override_hn;
426 sprintf(buff,
" phase 2 %s initialization started.", myRole);
427 Say.
Say(
"++++++ ", myInstance, buff);
432 if (!isMeta) QryMinum = 0;
433 else if (QryMinum < 2) QryMinum = 0;
434 else if (QryMinum > 64) QryMinum = 64;
435 if (P_gshr < 0) P_gshr = 0;
436 else if (P_gshr > 100) P_gshr = 100;
441 if (QryDelay < 0) QryDelay = LUPDelay;
447 if (!strncmp(AdminPath,
"/tmp/", 5))
448 Say.
Say(
"Config warning: adminpath resides in /tmp and may be unstable!");
461 (isManager|isPeer ?
"olbd.nimda":
"olbd.admin"),AdminMode));
466 {
if (!(
mySID = setupSid())) NoGo = 1;
468 Say.
Say(
"Config ",
"Global System Identification: ",
mySID);
470 {envData +=
"&site=";
478 envCGI = (envData.length() > 0 ? strdup(envData.c_str()) : 0);
482 if ((LocalRoot || RemotRoot || N2N_Lib) && ConfigN2N()) NoGo = 1;
486 if (!NoGo) NoGo = ConfigOSS();
492 if (!NoGo && isManager) NoGo = setupManager();
493 if (!NoGo && (isServer || ManList)) NoGo = setupServer();
501 if (isPeer && isSolo)
505 if (isMeta) {SUPCount = 1; SUPLevel = 0;}
508 if (isManager) Who = (isServer ? -1 : 1);
514 if (!NoGo) NoGo |= Manifest();
518 sprintf(buff,
" phase 2 %s initialization %s.", myRole,
519 (NoGo ?
"failed" :
"completed"));
520 Say.
Say(
"------ ", myInstance, buff);
541 if (
eDest) dynamic = 1;
555 TS_Xeq(
"adminpath", xapath);
558 TS_Xeq(
"blacklist", xblk);
560 TS_Xeq(
"defaults", xdefs);
564 TS_Xeq(
"localroot", xlclrt);
567 TS_Lib(
"namelib", N2N_Lib, &N2N_Parms);
569 TS_Lib(
"osslib", ossLib, &ossParms);
572 TS_Xeq(
"prepmsg", xprepm);
573 TS_Xeq(
"remoteroot", xrmtrt);
574 TS_Xeq(
"repstats", xreps);
577 TS_Xeq(
"subcluster", xsubc);
578 TS_Xeq(
"superport", xsupp);
582 TS_Xer(
"whitelist", xblk,
true);
587 if (!strcmp(var,
"conwait")
588 || !strcmp(var,
"request"))
return 0;
592 if (!strcmp(var,
"pidpath"))
593 {
Say.
Say(
"Config warning: 'cms.pidpath' no longer "
594 "supported; use 'all.pidpath'.");
596 Say.
Say(
"Config warning: ignoring unknown directive '", var,
"'.");
610 time_t eTime = time(0);
617 if (isManager && !isServer && !ManList) doWait = 0;
618 else if (isServer && adsMon) doWait = 1;
624 0,
"Notification handler"))
625 Say.
Emsg(
"cmsd", errno,
"start notification handler");
630 (
void *)0, 0,
"Prep handler"))
631 Say.
Emsg(
"cmsd", errno,
"start prep handler");
637 (
void *)0, 0,
"supervisor"))
638 {
Say.
Emsg(
"cmsd", errno,
"start", myRole);
654 Say.
Emsg(
"cmsd", errno,
"start admin handler");
666 {
Say.
Emsg(
"Config", errno,
"create state monitor thread");
672 if ((isManager || isPeer) && SRVDelay)
673 {wTime = SRVDelay -
static_cast<int>((time(0) - eTime));
681 Say.
Emsg(
"Config", myRole,
"service enabled.");
708 void XrdCmsConfig::ConfigDefaults(
void)
711 int myTZ, isEast = 0;
715 myName = (
char *)
"localhost";
730 MaxLoad = 0x7fffffff;
731 MaxRetries= 0x7fffffff;
760 myPaths = (
char *)
"";
762 sched_RR = sched_Pack = sched_AffPC = sched_Level = sched_LoadR = 0; sched_Force = 1;
802 pendplife= 60*60*24*7;
811 RefTurn = 3*
STMax*(DiskLinger+1);
837 if (myTZ <= 0) {isEast = 0x10; myTZ = -myTZ;}
838 if (myTZ > 12) myTZ = 12;
839 TimeZone = (myTZ | isEast);
846 int XrdCmsConfig::ConfigN2N()
852 if (!(xeq_N2N = n2nLoader.Load(N2N_Lib, *myVInfo, &
theEnv)))
return 1;
856 if (N2N_Lib || LocalRoot) lcl_N2N = xeq_N2N;
868 int XrdCmsConfig::ConfigOSS()
871 const char *,
XrdOucEnv *, XrdVersionInfo &);
883 if (!ossLib && isProxy) ossLib = strdup(
"libXrdPss.so");
888 if (!ossFS)
return 1;
892 if (!isManager && isServer && (arFunc =
theEnv.
GetPtr(
"XrdOssStatInfo2*")))
901 int XrdCmsConfig::ConfigProc(
int getrole)
904 int cfgFD, retc, NoGo = 0;
910 if ( (cfgFD =
open(ConfigFN, O_RDONLY, 0)) < 0)
911 {
Say.
Emsg(
"Config", errno,
"open config file", ConfigFN);
918 if (getrole) CFile.SetEroute(0);
922 while((var = CFile.GetMyFirstWord()))
924 {
if (!strcmp(
"all.role", var) || !strcmp(
"olb.role", var))
925 if (xrole(&
Say, CFile))
926 {CFile.SetEroute(&
Say); CFile.Echo(); NoGo = 1;
930 else if (!strncmp(var,
"cms.", 4)
931 || !strncmp(var,
"olb.", 4)
932 || !strcmp(var,
"ofs.osslib")
933 || !strcmp(var,
"oss.defaults")
934 || !strcmp(var,
"oss.localroot")
935 || !strcmp(var,
"oss.remoteroot")
936 || !strcmp(var,
"oss.namelib")
937 || !strcmp(var,
"all.export")
938 || !strcmp(var,
"all.manager")
939 || !strcmp(var,
"all.role")
940 || !strcmp(var,
"all.seclib")
941 || !strcmp(var,
"all.subcluster"))
942 {
if (ConfigXeq(var+4, CFile, 0)) {CFile.Echo(); NoGo = 1;}}
943 else if (!strcmp(var,
"oss.stagecmd")) DiskSS =
true;
947 if ((retc = CFile.LastError()))
948 NoGo =
Say.
Emsg(
"Config", retc,
"read config file", ConfigFN);
953 if (!getrole && (ManList || SanList)) NoGo |= MergeP();
966 char buff[512], pp, *mp = prog;
970 while(*mp && *mp !=
' ') mp++;
976 {sprintf(buff,
"find %s executable", ptype);
977 eDest->
Emsg(
"Config", errno, buff, prog);
992 int XrdCmsConfig::Manifest()
995 const char *clID, *xop = 0;
1000 if (!xrdEnv || !(envFN = xrdEnv->Get(
"envFile")))
return 0;
1002 if ((clID = index(
mySID,
' '))) clID++;
1005 if ((xfd =
open(envFN, O_WRONLY|O_APPEND)) < 0) xop =
"open";
1006 else {
bool bad =
false;
1008 bad =
write(xfd,(
void *)
"&pfx=",5) < 0
1009 ||
write(xfd,(
void *)LocalRoot,strlen(LocalRoot)) < 0;
1010 if (!bad && AdminPath)
1011 bad =
write(xfd,(
void *)
"&ap=", 4) < 0
1012 ||
write(xfd,(
void *)AdminPath,strlen(AdminPath)) < 0;
1013 if (!bad) bad =
write(xfd,(
void *)
"&cn=", 4) < 0
1014 ||
write(xfd,(
void *)clID, strlen(clID)) < 0;
1015 if (bad) xop =
"append to";
1019 if (xop)
Say.
Emsg(
"Config", errno, xop, envFN);
1028 int XrdCmsConfig::MergeP()
1039 unsigned long long Opts;
1040 int pbLen = 0, NoGo = 0, export2MM = isManager && !isServer;
1049 if (export2MM) npinfo.
ssvec = (
Opts & stage4MM ? 1 : 0);
1050 else npinfo.
ssvec = (
Opts & stageAny ? 1 : 0);
1051 if (!PathList.Add(plp->
Path(), &npinfo))
1052 Say.
Emsg(
"Config",
"Ignoring duplicate export path",plp->
Path());
1053 else if (npinfo.
ssvec) DiskSS =
true;
1063 {
if (SanList) Who =
"subcluster manager:";
1064 else Who = (isServer ?
"manager:" :
"meta-manager:");
1065 }
else Who =
"redirector:";
1066 Say.
Say(
"The following paths are available to the ", Who);
1067 if (!(pp = PathList.First()))
Say.
Say(
"r /");
1069 {ptype = pp->
PType();
1070 Say.
Say(ptype, (strlen(ptype) > 1 ?
" " :
" "), pp->
Path());
1071 pbLen += strlen(pp->
Path())+8; pp = pp->
Next();
1079 if (pbLen != 0 && (pp = PathList.First()))
1080 {pbP = myPaths = (
char *)malloc(pbLen);
1082 {pbP += sprintf(pbP,
"\n%s %s", pp->
PType(), pp->
Path());
1098 int XrdCmsConfig::setupManager()
1108 const char *urDom, *myDom = index(myName,
'.');
1110 while(tP) {nP = tP; tP = tP->
next;
delete nP;}
1111 ManList = tP = SanList;
1112 if (myDom)
while(tP)
1113 {
if ((urDom = index(tP->
text,
'.')) && strcmp(urDom, myDom))
1114 {
Say.
Emsg(
"Config",
"Subcluster's manager", tP->
text,
1115 "is in a different domain.");
1120 if (isBad) {
Say.
Emsg(
"Config",
"Cross domain subclusters disallowed!");
1131 sched_RR = (100 == P_fuzz) || !AskPerf
1132 || !(P_cpu || P_io || P_load || P_mem || P_pag);
1134 {
Say.
Say(
"Config round robin scheduling in effect.");
1141 0,
"Performance monitor")))
1142 {
Say.
Emsg(
"Config", rc,
"create perf monitor thread");
1148 RefTurn = 3*
STMax*(DiskLinger+1);
1151 0,
"Refcount monitor")))
1152 {
Say.
Emsg(
"Config", rc,
"create refcount monitor thread");
1167 if (!isServer && blkChk)
1179 int XrdCmsConfig::setupServer()
1187 {
Say.
Emsg(
"Config",
"Manager node not specified for", myRole,
"role");
1194 while(tp) {n++; tp = tp->
next;}
1196 {
Say.
Emsg(
"Config",
"Too many managers have been specified");
return 1;}
1200 if (MaxDelay < 0) MaxDelay = AskPerf*AskPing+30;
1201 if (DiskWT < 0) DiskWT = AskPerf*AskPing+30;
1206 (isManager|isPeer ?
"olbd.seton":
"olbd.notes"),
1212 if (isManager || isPeer)
return 0;
1213 SUPCount = 0; SUPLevel = 0;
1214 if (isProxy)
return 0;
1219 if (DiskSS)
PrepQ.
Reset(myInsName, AdminPath, AdminMode);
1225 Say.
Say(
"Config warning: load based scheduling disabled.");
1236 char *XrdCmsConfig::setupSid()
1244 if (getenv(
"XRDIFADDRS")) ifList = strdup(getenv(
"XRDIFADDRS"));
1248 if ((mySite = getenv(
"XRDSITE")) && *mySite) mySite = strdup(mySite);
1253 if (isManager && isServer) sfx =
'u';
1254 else sfx = (isManager ?
'm' :
's');
1255 if (isProxy) sfx = toupper(sfx);
1261 if (!myVNID)
return 0;
1267 if (!sidVal || *sidVal ==
'!')
1269 if (!sidVal) msg =
"too many managers.";
1270 else msg = sidVal+1;
1271 Say.
Emsg(
"cmsd",
"Unable to generate system ID; ", msg);
1281 void XrdCmsConfig::Usage(
int rc)
1283 std::cerr <<
"\nUsage: cmsd [xrdopts] [-i] [-m] [-s] -c <cfile>" <<std::endl;
1309 if (!isManager)
return CFile.
noEcho();
1312 {
eDest->
Emsg(
"Config",
"allow type not specified");
return 1;}
1314 if (!strcmp(val,
"host")) ishost = 1;
1315 else if (!strcmp(val,
"netgroup")) ishost = 0;
1316 else {
eDest->
Emsg(
"Config",
"invalid allow type -", val);
1321 {
eDest->
Emsg(
"Config",
"allow target name not specified");
return 1;}
1324 if (ishost) Police->AddHost(val);
1325 else Police->AddNetGroup(val);
1355 if (isManager)
return CFile.
noEcho();
1358 {
eDest->
Emsg(
"Config",
"protocol not specified");
return 1;}
1360 if (strcmp(val,
"xroot"))
1361 {
eDest->
Emsg(
"Config",
"unsupported protocol, '", val,
"'.");
return 1;}
1362 if (adsProt) free(adsProt);
1363 adsProt = strdup(val);
1366 {
eDest->
Emsg(
"Config",
"data server port not specified");
return 1;}
1373 {
eDest->
Emsg(
"Config",
"Unable to find tcp service '",val,
"'.");
1377 if (!(val = CFile.
GetWord()) || !strcmp(val,
"monitor")) adsMon = 1;
1378 else if (!strcmp(val,
"nomonitor")) adsMon = 0;
1379 else {
eDest->
Emsg(
"Config",
"invalid option, '", val,
"'.");
1404 mode_t mode = S_IRWXU;
1409 if (!pval || !pval[0])
1410 {
eDest->
Emsg(
"Config",
"adminpath not specified");
return 1;}
1415 {
eDest->
Emsg(
"Config",
"adminpath not absolute");
return 1;}
1416 pval = strdup(pval);
1420 if ((val = CFile.
GetWord()) && val[0])
1421 {
if (!strcmp(
"group", val)) mode |= S_IRWXG;
1422 else {
eDest->
Emsg(
"Config",
"invalid admin path modifier -", val);
1423 free(pval);
return 1;
1429 if (AdminPath) free(AdminPath);
1452 const char *fType = (iswl ?
"whitelist" :
"blacklist");
1457 if (!isManager || isServer)
return CFile.
noEcho();
1462 if (blkList) {free(blkList); blkList = 0;}
1466 if (!val || !val[0])
1473 do {
if (!strcmp(val,
"check"))
1474 {
if (!(val = CFile.
GetWord()) || !val[0])
1475 {
eDest->
Emsg(
"Config",fType,
"check interval not specified");
1481 }
while((val = CFile.
GetWord()));
1485 if (iswl) blkChk = -blkChk;
1489 if (!val || !val[0])
return 0;
1491 {
eDest->
Emsg(
"Config",
"blacklist path not absolute");
return 1;}
1495 blkList = strdup(val);
1518 if (!(val = CFile.
GetWord()) || !val[0])
1519 {
eDest->
Emsg(
"Config",
"tag not specified");
return 1;}
1523 if ((
int)strlen(val) > 16)
1524 {
eDest->
Emsg(
"Config",
"tag is > 16 characters");
return 1;}
1528 if (cidTag) free(cidTag);
1529 cidTag = strdup(val);
1575 const char *etxt =
"invalid delay option";
1576 int i, ppp, minV = 1, ispercent = 0, noStage = 0;
1577 static struct delayopts {
const char *opname;
int *oploc;
int istime;}
1580 {
"delnode", &DELDelay, 1},
1581 {
"discard", &MsgTTL, 0},
1582 {
"drop", &DRPDelay, 1},
1583 {
"full", &DiskWT, -1},
1584 {
"hold", &LUPHold, 0},
1585 {
"lookup", &LUPDelay, 1},
1586 {
"nostage", &noStage, 01},
1587 {
"overload", &MaxDelay,-1},
1588 {
"peer", &PSDelay, 1},
1589 {
"qdl", &QryDelay, 1},
1590 {
"qdn", &QryMinum, 0},
1591 {
"rw", &RWDelay, 0},
1592 {
"servers", &SUPCount, 0},
1593 {
"service", &SUPDelay, 1},
1594 {
"startup", &SRVDelay, 1},
1595 {
"suspend", &SUSDelay, 1}
1597 int numopts =
sizeof(dyopts)/
sizeof(
struct delayopts);
1599 if (!isManager && !isPeer)
return CFile.
noEcho();
1602 {
eDest->
Emsg(
"Config",
"delay arguments not specified");
return 1;}
1605 {
for (i = 0; i < numopts; i++)
1606 if (!strcmp(val, dyopts[i].opname))
1607 {
if (!(val = CFile.
GetWord()))
1608 {
eDest->
Emsg(
"Config",
"delay ", dyopts[i].opname,
1609 " argument not specified.");
1612 if (dyopts[i].istime < 0 && !strcmp(val,
"*")) ppp = -1;
1613 else if (dyopts[i].istime)
1617 if (*dyopts[i].opname ==
'r')
1621 if (*dyopts[i].opname ==
's')
1622 {ppp = strlen(val); SUPLevel = 0; minV = 0;
1623 if (val[ppp-1] ==
'%')
1624 {ispercent = 1; val[ppp-1] =
'\0';}
1629 if (!ispercent) *dyopts[i].oploc = ppp;
1630 else {ispercent = 0; SUPCount = 1; SUPLevel = ppp;}
1634 eDest->
Say(
"Config warning: ignoring invalid delay option '",val,
"'.");
1711 int Hold = 0, limCent = 0, limFix = 0, limV = 0, qMax = 0, rTry = -1;
1716 if (isMeta || isPeer)
return CFile.
noEcho();
1721 {
eDest->
Emsg(
"Config",
"dfs option not specified");
return 1;}
1725 do{
if (!strcmp(
"mdhold", val))
1726 {
if (!(val = CFile.
GetWord()))
1727 {
eDest->
Emsg(
"Config",
"mdhold value not specified.");
return 1;}
1730 else if (!strcmp(
"limit", val))
1731 {
if (!(val = CFile.
GetWord()))
1732 {
eDest->
Emsg(
"Config",
"limit value not specified.");
return 1;}
1733 if ((limCent = !strcmp(
"central",val)) && !(val = CFile.
GetWord()))
1734 {
eDest->
Emsg(
"Config",
"limit value not specified.");
return 1;}
1735 if ((limFix = (*val ==
'=')) && *(val+1)) val++;
1738 else if (!strcmp(
"lookup", val))
1739 {
if (!(val = CFile.
GetWord()))
1740 {
eDest->
Emsg(
"Config",
"lookup value not specified.");
return 1;}
1743 else {
eDest->
Emsg(
"Config",
"invalid lookup value '", val,
"'.");
1747 else if (!strcmp(
"qmax", val))
1748 {
if (!(val = CFile.
GetWord()))
1749 {
eDest->
Emsg(
"Config",
"qmax value not specified.");
return 1;}
1752 else if (!strcmp(
"redirect",val))
1753 {
if (!(val = CFile.
GetWord()))
1754 {
eDest->
Emsg(
"Config",
"redirect value not specified.");
return 1;}
1757 else {
eDest->
Emsg(
"Config",
"invalid redirect value -", val);
1761 else if (!strcmp(
"retries", val))
1762 {
if (!(val = CFile.
GetWord()))
1763 {
eDest->
Emsg(
"Config",
"retries value not specified.");
return 1;}
1766 else {
eDest->
Emsg(
"Config",
"invalid dfs option '",val,
"'.");
return 1;}
1767 }
while((val = CFile.
GetWord()));
1772 if (isManager && isServer)
1780 {
if (limFix) limV = -limV;
1782 else if (isManager) limV = 0;
1838 struct xeqopts {
const char *opname;
int doset;
XrdOucProg **pgm;} xqopts[] =
1840 {
"chmod", 0, &ProgCH},
1841 {
"mkdir", 0, &ProgMD},
1842 {
"mkpath", 0, &ProgMP},
1845 {
"rmdir", 0, &ProgRD},
1846 {
"trunc", 0, &ProgTR}
1848 int i, xtval = 0, numopts =
sizeof(xqopts)/
sizeof(
struct xeqopts);
1853 if (!isServer)
return CFile.
noEcho();
1858 while (val && *val !=
'/')
1859 {
for (i = 0; i < numopts; i++)
1860 if (!strcmp(val, xqopts[i].opname))
1861 {xqopts[i].doset = 1;
1866 eDest->
Say(
"Config warning: ignoring invalid fsxeq type option '",val,
"'.");
1873 {
eDest->
Emsg(
"Config",
"fsxeq type option not specified");
return 1;}
1878 {
eDest->
Emsg(
"Config",
"fsxeq program not specified");
return 1;}
1886 for (i = 0; i < numopts; i++)
1887 if (xqopts[i].doset)
1888 {
if (!*xqopts[i].pgm) *(xqopts[i].pgm) =
new XrdOucProg(0);
1889 if ((*(xqopts[i].pgm))->Setup(val,
eDest))
return 1;
1918 if (!isManager)
return CFile.
noEcho();
1921 {
eDest->
Emsg(
"Config",
"fxhold value not specified.");
return 1;}
1923 if (!strcmp(val,
"noloc"))
1924 {
if (!(val = CFile.
GetWord()))
1925 {
eDest->
Emsg(
"Config",
"fxhold noloc value not specified.");
return 1;}
1929 if (!(val = CFile.
GetWord()))
return 0;
1960 if (!isServer)
return CFile.
noEcho();
1965 if (!val || !val[0])
1966 {
eDest->
Emsg(
"Config",
"localroot path not specified");
return 1;}
1968 {
eDest->
Emsg(
"Config",
"localroot path not absolute");
return 1;}
1973 while (i && val[i] ==
'/') val[i--] =
'\0';
1978 {
if (LocalRoot) free(LocalRoot);
1979 LocalRoot = strdup(val);
2019 StorageHelper(
char **v1,
char **v2) : val1(v1), val2(v2) {}
2020 ~StorageHelper() {
if (*val1) free(*val1);
2021 if (*val2) free(*val2);
2023 char **val1, **val2;
2027 char *val, *hSpec = 0, *hPort = 0;
2028 StorageHelper SHelp(&hSpec, &hPort);
2029 int rc, xMeta = 0, xPeer = 0, xProxy = 0, *myPort = 0;
2034 {
if ((xMeta = !strcmp(
"meta", val))
2035 || (xPeer = !strcmp(
"peer", val))
2036 || (xProxy = !strcmp(
"proxy", val)))
2037 {
if ((xMeta && (isServer || isPeer))
2038 || (xPeer && !isPeer)
2039 || (xProxy && !isProxy))
return CFile.
noEcho();
2041 }
else if (isPeer)
return CFile.
noEcho();
2047 if (!strcmp(
"any", val) || !strcmp(
"all", val)) val = CFile.
GetWord();
2052 {
eDest->
Emsg(
"Config",
"manager host name not specified");
return 1;}
2053 hSpec = strdup(val);
2062 {
if (strcmp(val,
"if"))
2063 {
eDest->
Emsg(
"Config",
"expecting manager 'if' but",val,
"found");
2067 myName,myInsName,myProg))<=0)
2068 {
if (!rc) CFile.
noEcho();
return rc < 0;}
2073 if (isManager && !isServer)
2075 {
if (((xMeta && isMeta) || (!xMeta && !isMeta)))
2077 if (isMeta) theList = 0;
2078 else theList = (xMeta ? &ManList : &NanList);
2107 if (!isManager)
return CFile.
noEcho();
2110 {
eDest->
Emsg(
"Config",
"mode type not specified");
return 1;}
2112 if (!strcmp(val,
"r/o") || !strcmp(val,
"readonly")) forceRO =
true;
2113 else if (!strcmp(val,
"r/w") || !strcmp(val,
"readwrite")) forceRO =
false;
2114 else {
eDest->
Emsg(
"Config",
"invalid mode type -", val);
2141 char *val, xopt[16];
2143 bool xAll =
false, xOff =
false, xRmt =
false;
2148 {
if ((xAll = !strcmp(
"all", val))
2149 || (xOff = !strcmp(
"off", val))
2150 || (xRmt = !strcmp(
"remote", val)))
2151 {
if (xAll) nbSQ = 2;
2152 else if (xRmt) nbSQ = 1;
2156 }
else {
eDest->
Emsg(
"Config",
"nbsendq option not specified");
return 1;}
2161 {
size_t size =
sizeof(xopt)-1;
2162 strncpy(xopt, val, size);
2164 if (!(val= CFile.
GetWord()) || *val == 0)
2165 {
eDest->
Emsg(
"Config",
"nbsendq ", xopt,
" argument not specified");
2168 if (!strcmp(xopt,
"maxq"))
2169 {
if (!strcmp(
"val",
"none")) ival = -1;
2174 else if (!strcmp(xopt,
"warn"))
2178 else eDest->
Say(
"Config warning: ignoring invalid nbsendq option '",xopt,
"'.");
2205 {
char *pgm=0, *val, rest[2048];
2207 if (!isServer)
return CFile.
noEcho();
2210 {
eDest->
Emsg(
"Config",
"perf options not specified");
return 1;}
2212 if (!strcmp(
"xrootd", val))
return CFile.
noEcho();
2215 do {
if (!strcmp(
"int", val))
2216 {
if (!(val = CFile.
GetWord()))
2217 {
eDest->
Emsg(
"Config",
"perf int value not specified");
2222 else if (!strcmp(
"lib", val))
2223 {
if (perfpgm) {free(perfpgm); perfpgm = 0;}
2225 prfLib, &prfParms) ? 0 : 1);
2228 else if (!strcmp(
"pgm", val))
2229 {
if (!CFile.
GetRest(rest,
sizeof(rest)))
2230 {
eDest->
Emsg(
"Config",
"perf pgm parameters too long");
2234 {
eDest->
Emsg(
"Config",
"perf pgm value not specified");
2240 else eDest->
Say(
"Config warning: ignoring invalid perf option '",val,
"'.");
2241 }
while((val = CFile.
GetWord()));
2245 if (perfpgm) {free(perfpgm); perfpgm = 0;}
2246 if (prfLib) {free(prfLib); prfLib = 0;}
2247 if (prfParms){free(prfParms);prfParms = 0;}
2248 if (pgm) {
if (!isExec(
eDest,
"perf", pgm))
return 1;
2249 else perfpgm = strdup(pgm);
2279 {
int pnum = AskPerf, lnum = LogPerf, ping;
2283 {
eDest->
Emsg(
"Config",
"ping value not specified");
return 1;}
2285 if (ping < 3) ping = 3;
2287 while((val = CFile.
GetWord()))
2288 {
if (!strcmp(
"log", val))
2289 {
if (!(val = CFile.
GetWord()))
2290 {
eDest->
Emsg(
"Config",
"ping log value not specified");
2295 else if (!strcmp(
"usage", val))
2296 {
if (!(val = CFile.
GetWord()))
2297 {
eDest->
Emsg(
"Config",
"ping usage value not specified");
2333 {
int reset=0, scrub=0, echo = 0, doset = 0;
2334 char *prepif=0, *val, rest[2048];
2336 if (!isServer)
return CFile.
noEcho();
2340 do {
if (!strcmp(
"echo", val)) doset = echo = 1;
2341 else if (!strcmp(
"reset", val))
2342 {
if (!(val = CFile.
GetWord()))
2343 {
eDest->
Emsg(
"Config",
"prep reset value not specified");
2349 else if (!strcmp(
"scrub", val))
2350 {
if (!(val = CFile.
GetWord()))
2351 {
eDest->
Emsg(
"Config",
"prep scrub value not specified");
2357 else if (!strcmp(
"ifpgm", val))
2358 {
if (!CFile.
GetRest(rest,
sizeof(rest)))
2359 {
eDest->
Emsg(
"Config",
"prep ifpgm parameters too long");
return 1;}
2361 {
eDest->
Emsg(
"Config",
"prep ifpgm value not specified");
2367 else eDest->
Say(
"Config warning: ignoring invalid prep option '",val,
"'.");
2368 }
while((val = CFile.
GetWord()));
2374 if (scrub) pendplife = scrub;
2376 if (prepif) {
if (!isExec(
eDest,
"prep", prepif))
return 1;
2399 char *val, buff[2048];
2405 {
eDest->
Emsg(
"Config",
"no value for prepmsg directive");
2414 if (!CFile.
GetRest(buff,
sizeof(buff)))
2415 {
eDest->
Emsg(
"Config",
"prepmsg arguments too long");
2442 static struct repsopts {
const char *opname;
int opval;} rsopts[] =
2444 {
"all", RepStat_All},
2445 {
"frq", RepStat_frq},
2446 {
"shr", RepStat_shr}
2448 int i, neg, rsval = 0, numopts =
sizeof(rsopts)/
sizeof(
struct repsopts);
2451 {
eDest->
Emsg(
"config",
"repstats option not specified");
return 1;}
2453 {
if (!strcmp(val,
"off")) rsval = 0;
2454 else {
if ((neg = (val[0] ==
'-' && val[1]))) val++;
2455 for (i = 0; i < numopts; i++)
2456 {
if (!strcmp(val, rsopts[i].opname))
2457 {
if (neg) rsval &= ~rsopts[i].opval;
2458 else rsval |= rsopts[i].opval;
2463 eDest->
Say(
"Config warning: ignoring invalid repstats option '",val,
"'.");
2489 char *val, *colon, *slash;
2494 if (isManager)
return CFile.
noEcho();
2499 if (!val || !val[0])
2500 {
eDest->
Emsg(
"Config",
"remoteroot path not specified");
return 1;}
2505 {colon = index(val,
':'); slash = index(val,
'/');
2506 if ((colon+1) != slash)
2507 {
eDest->
Emsg(
"Config",
"remoteroot path not absolute");
return 1;}
2513 while (i && val[i] ==
'/') val[i--] =
'\0';
2518 {
if (RemotRoot) free(RemotRoot);
2519 RemotRoot = strdup(val);
2576 char *val, *Tok1, *Tok2;
2577 int rc, xMeta=0, xPeer=0, xProxy=0, xServ=0, xMan=0, xSolo=0;
2581 if (!(val = CFile.
GetWord()) || !strcmp(val,
"if"))
2582 {
eDest->
Emsg(
"Config",
"role not specified");
return 1;}
2587 if ((val = CFile.
GetWord()) && strcmp(val,
"if"))
2588 {Tok2 = strdup(val);
2594 if (val && !strcmp(
"if", val))
2596 myName,myInsName,myProg)) <= 0)
2597 {free(Tok1);
if (Tok2) free(Tok2);
2619 default:
eDest->
Emsg(
"Config",
"invalid role -", Tok1, Tok2); rc = 1;
2625 if (Tok2) free(Tok2);
2630 if (isServer > 0 || isManager > 0 || isProxy > 0 || isPeer > 0)
2631 {
eDest->
Say(
"Config warning: role directive over-ridden by command line.");
2637 isServer = xServ; isManager = xMan; isProxy = xProxy;
2638 isPeer = xPeer; isSolo = xSolo; isMeta = xMeta;
2639 if (myRole) free(myRole);
2641 myRoleID =
static_cast<int>(roleID);
2679 int i, ppp, V_hntry = -1;
2680 static struct schedopts {
const char *opname;
int maxv;
int *oploc;}
2683 {
"cpu", 100, &P_cpu},
2684 {
"fuzz", 100, &P_fuzz},
2685 {
"gsdflt", 100, &P_gsdf},
2686 {
"gshr", 100, &P_gshr},
2688 {
"runq", 100, &P_load},
2689 {
"mem", 100, &P_mem},
2690 {
"pag", 100, &P_pag},
2691 {
"space", 100, &P_dsk},
2692 {
"maxload", 100, &MaxLoad},
2693 {
"refreset", -1, &RefReset},
2694 {
"affinity", -2, 0},
2696 {
"tryhname", 1, &V_hntry}
2698 int numopts =
sizeof(scopts)/
sizeof(
struct schedopts);
2701 {
eDest->
Emsg(
"Config",
"sched option not specified");
return 1;}
2704 {
for (i = 0; i < numopts; i++)
2705 if (!strcmp(val, scopts[i].opname))
2706 {
if (!(val = CFile.
GetWord()))
2707 {
eDest->
Emsg(
"Config",
"sched ", scopts[i].opname,
2708 "argument not specified.");
2711 if (scopts[i].maxv == -2)
2712 {
if (!xschedm(val,
eDest, CFile))
return 1;
2715 if (scopts[i].maxv == -3)
2716 {
if (!xschedp(val,
eDest, CFile))
return 1;
2719 if (scopts[i].maxv < 0)
2724 0, scopts[i].maxv))
return 1;
2725 *scopts[i].oploc = ppp;
2729 {
int rc = xschedx(val,
eDest, CFile);
2730 if (rc < 0)
return 1;
2731 if (rc > 0)
eDest->
Say(
"Config warning: "
2732 "ignoring invalid sched option '",val,
"'.");
2739 if (V_hntry >= 0) DoHnTry =
static_cast<char>(V_hntry);
2749 if (!strcmp(val,
"default"))
2752 {
eDest->
Emsg(
"Config",
"sched affinity not specified");
return 0;}
2753 }
else sched_Force = 1;
2755 if (!strcmp(val,
"none"))
2756 {sched_Pack = sched_Level = 0;
2760 sched_Pack = sched_Level = 1;
2762 if (!strcmp(val,
"weak"))
return 1;
2766 if (!strcmp(val,
"strong"))
return 1;
2768 if (!strcmp(val,
"strict"))
2773 if (!strcmp(val,
"randomized"))
2778 eDest->
Emsg(
"Config",
"Invalid sched affinity -", val);
2786 int afpsign, afpval;
2788 if (!strcmp(val,
"all"))
2793 if (!strcmp(val,
"first")) afpsign = 1;
2794 else if (!strcmp(val,
"last")) afpsign = -1;
2795 else {
eDest->
Emsg(
"Config",
"sched affpath option invalid -", val);
2800 {
eDest->
Emsg(
"Config",
"sched affpath argument not specified");
return 0;}
2805 sched_AffPC =
static_cast<char>(afpval*afpsign);
2816 if (!strcmp(val,
"maxretries"))
2817 {
if (!(val = CFile.
GetWord()))
2818 {
eDest->
Emsg(
"Config",
"sched ",
"maxretries argument not specified.");
2821 if (!xschedy(val,
eDest, mrRdrHost, mrRdrHLen, mrRdrPort))
return -1;
2828 if (!strcmp(val,
"nomultisrc"))
2840 if (!strncmp(val,
"nomultisrc@", 11))
2841 {
if (!xschedy(val,
eDest, msRdrHost, msRdrHLen, msRdrPort))
return -1;
2852 int &hlen,
int &port)
2854 const char *badTarget =
"Invalid sched redirect target '%s'%s";
2857 const char *eText =
"not a redirect target";
2861 if (host) {free(host); host = 0; hlen = port = 0;}
2865 if (!(at = index(val,
'@')))
return true;
2867 {snprintf(hName,
sizeof(hName),
2868 "Missing sched redirect target after '%s'.", val);
2872 *at = 0; val = at + 1;
2877 {snprintf(hName,
sizeof(hName), badTarget, val,
".");
2884 if ((eText = netAddr.
Set(val)))
2885 {snprintf(hName,
sizeof(hName), badTarget, val,
";");
2894 {snprintf(hName,
sizeof(hName), badTarget, val,
".");
2901 host = strdup(hName);
2902 hlen = strlen(hName)+1;
2903 port = netAddr.
Port();
2927 if (!isManager)
return CFile.
noEcho();
2977 int i, alinger = -1, arecalc = -1, minfP = -1, hwmP = -1;
2978 long long minf = -1, hwm = -1;
2979 bool haveopt =
false;
2981 while((val = CFile.
GetWord()))
2982 {
if (!strcmp(
"linger", val))
2983 {
if (!(val = CFile.
GetWord()))
2984 {
eDest->
Emsg(
"Config",
"linger value not specified");
return 1;}
2987 else if (!strcmp(
"recalc", val))
2988 {
if (!(val = CFile.
GetWord()))
2989 {
eDest->
Emsg(
"Config",
"recalc value not specified");
return 1;}
2992 else if (!strcmp(
"min", val))
2993 {
if (!(val = CFile.
GetWord()) || !isdigit(*val))
2994 {
eDest->
Emsg(
"Config",
"space min value not specified");
return 1;}
2997 else if (!strcmp(
"mwfiles", val)) {DoMWChk = 0; haveopt =
true;}
2998 else if (isdigit(*val))
break;
2999 else {
eDest->
Emsg(
"Config",
"invalid space parameters");
return 1;}
3002 if (val && isdigit(*val))
3004 if (val[i-1] ==
'%')
3011 if (val && isdigit(*val))
3013 if (val[i-1] !=
'%')
3019 if (minfP >= 0 && minf < 0)
3020 {
eDest->
Emsg(
"Config",
"absolute min value not specified");
return 1;}
3022 if (val && isdigit(*val))
3024 if (val[i-1] ==
'%')
3031 if (val && isdigit(*val))
3033 if (val[i-1] !=
'%')
3039 if (hwmP >= 0 && hwm < 0)
3040 {
eDest->
Emsg(
"Config",
"absolute high watermark value not specified");
return 1;}
3042 if (val) {
eDest->
Emsg(
"Config",
"invalid space parameter -", val);
return 1;}
3044 if (!haveopt && alinger < 0 && arecalc < 0 && minf < 0)
3045 {
eDest->
Emsg(
"Config",
"no space values specified");
return 1;}
3047 if (alinger >= 0) DiskLinger = alinger;
3048 if (arecalc >= 0) DiskAsk = arecalc;
3051 {
if (hwmP < minfP) hwmP = minfP + 1;
3052 DiskMinP = minfP; DiskHWMP = hwmP;
3053 }
else DiskMinP = DiskHWMP = 0;
3056 {
if (hwm < minf) hwm = minf+1073741824;
3057 minf = minf >> 20LL; hwm = hwm >> 20LL;
3058 if (minf >> 31LL) {minf = 0x7fefffff; hwm = 0x7fffffff;}
3059 else if (hwm >> 31LL) minf = 0x7fffffff;
3060 DiskMin =
static_cast<int>(minf);
3061 DiskHWM =
static_cast<int>(hwm);
3083 StorageHelper(
char **v1,
char **v2) : val1(v1), val2(v2) {}
3084 ~StorageHelper() {
if (*val1) free(*val1);
3085 if (*val2) free(*val2);
3087 char **val1, **val2;
3090 char *val, *hSpec = 0, *hPort = 0;
3091 StorageHelper SHelp(&hSpec, &hPort);
3095 if (isMeta || isServer || isPeer || isProxy)
return CFile.
noEcho();
3100 if (val && !strcmp(
"of", val)) val = CFile.
GetWord();
3105 {
eDest->
Emsg(
"Config",
"cluster manager host name not specified");
3108 hSpec = strdup(val);
3135 {
const char *invp =
"superport port";
3136 char *val, cport[32];
3140 {
eDest->
Emsg(
"Config",
"tcp port not specified");
return 1;}
3142 strncpy(cport, val,
sizeof(cport)-1); cport[
sizeof(cport)-1] =
'\0';
3144 if ((val = CFile.
GetWord()) && !strcmp(
"if", val))
3146 myName,myInsName,myProg))<=0)
3147 {
if (!rc) CFile.
noEcho();
return rc < 0;}
3149 if (!strcmp(cport,
"any")) pnum = 0;
3150 else if (!strcmp(cport,
"-p")) pnum = PortTCP;
3151 else if (isdigit(*cport))
3154 {
eDest->
Emsg(
"Config",
"Unable to find superport", cport);
3179 static struct traceopts {
const char *opname;
int opval;} tropts[] =
3190 int i, neg, trval = 0, numopts =
sizeof(tropts)/
sizeof(
struct traceopts);
3193 {
eDest->
Emsg(
"config",
"trace option not specified");
return 1;}
3195 {
if (!strcmp(val,
"off")) trval = 0;
3196 else {
if ((neg = (val[0] ==
'-' && val[1]))) val++;
3197 for (i = 0; i < numopts; i++)
3198 {
if (!strcmp(val, tropts[i].opname))
3199 {
if (neg) trval &= ~tropts[i].opval;
3200 else trval |= tropts[i].opval;
3205 eDest->
Say(
"Config warning: ignoring invalid trace option '",val,
"'.");
3232 char *val, parms[1024];
3236 if (!(val = CFile.
GetWord()) || !val[0])
3237 {
eDest->
Emsg(
"Config",
"vnid not specified");
return 1;}
3241 if (VNID_Lib) free(VNID_Lib);
3242 VNID_Lib = strdup(val);
3246 if (VNID_Parms) {free(VNID_Parms); VNID_Parms = 0;}
3247 if (*VNID_Lib ==
'@')
3248 {
if (!CFile.
GetRest(parms,
sizeof(parms)))
3249 {
eDest->
Emsg(
"Config",
"vnid plug-in parameters too long");
return 1;}
3250 if (*parms) VNID_Parms = strdup(parms);
void Usage(const char *msg)
void * XrdCmsStartAdmin(void *carg)
void * XrdCmsStartMonPerf(void *carg)
void * XrdCmsStartMonStat(void *carg)
void * XrdCmsStartAnote(void *carg)
void * XrdCmsStartMonRefs(void *carg)
void * XrdCmsStartSupervising(void *carg)
void * XrdCmsStartPreparing(void *carg)
#define XrdCmsMAX_PATH_LEN
static XrdSysError eDest(0,"crypto_")
XrdOss * XrdOssGetSS(XrdSysLogger *Logger, const char *config_fn, const char *OssLib, const char *OssParms, XrdOucEnv *envP, XrdVersionInfo &urVer)
int open(const char *path, int oflag,...)
ssize_t write(int fildes, const void *buf, size_t nbyte)
int access(const char *path, int amode)
static bool InitAREvents(void *arFunc)
void * Start(XrdNetSocket *AdminSock)
static void setSync(XrdSysSemaphore *sync)
void * Notes(XrdNetSocket *AdminSock)
void SetTries(bool xdfs, int tcnt)
void Init(int Opts, int DMlife, int DPLife)
static void Init(XrdScheduler *sP, XrdCmsCluster *cP, const char *blfn, int chkt=600)
int Init(int fxHold, int fxDelay, int fxQuery, int seFS, int nxHold)
static const int min_nxTime
int GenLocalPath(const char *oldp, char *newp)
int Configure1(int argc, char **argv, char *cfn)
int ConfigXeq(char *var, XrdOucStream &CFile, XrdSysError *eDest)
int Configure0(XrdProtocol_Config *pi)
static bool Start(const XrdOucTList *mL)
int Monitor(char *pgm, int itv)
void setVirtual(vType vVal)
static void do_StateDFS(XrdCmsBaseFR *rP, int rc)
int setParms(int rcnt, int stime, int deco=0)
void Reset(const char *iName, const char *aPath, int aMode)
int Init(int Tint=0, int Tdly=0)
static const char * Name(RoleID rid)
static RoleID Convert(const char *Tok1, const char *Tok2)
static const char * Type(RoleID rid)
static char * getVnId(XrdSysError &eDest, const char *cfgFN, const char *nidlib, const char *nidparm, char nidType)
static char * setSystemID(XrdOucTList *tp, const char *iVNID, const char *iTag, char iType)
static int Configure(const char *Lib, const char *Cfn=0)
void Update(StateType StateT, int ActivVal, int StageVal=0)
static int Init(const char *AdminPath, int AdminMode)
static char * ParseManPort(XrdSysError *eDest, XrdOucStream &CFile, char *hSpec)
static bool ParseMan(XrdSysError *eDest, XrdOucTList **oldMans, char *hSpec, char *hPort, int *sPort=0, bool hush=false)
static const int noPort
Do not add port number.
int Format(char *bAddr, int bLen, fmtUse fmtType=fmtAuto, int fmtOpts=0)
@ fmtAuto
Hostname if already resolved o/w use fmtAddr.
const char * Set(const char *hSpec, int pNum=PortInSpec)
static XrdNetSocket * Create(XrdSysError *Say, const char *path, const char *fn, mode_t mode, int isudp=0)
static int ServPort(const char *sName, bool isUDP=false, const char **eText=0)
static int Export(const char *Var, const char *Val)
void * GetPtr(const char *varname)
void PutPtr(const char *varname, void *value)
static unsigned long long ParseDefs(XrdOucStream &Config, XrdSysError &Eroute, unsigned long long Flags)
static XrdOucPList * ParsePath(XrdOucStream &Config, XrdSysError &Eroute, XrdOucPListAnchor &Export, unsigned long long Defopts)
unsigned long long Flag()
char * GetWord(int lowcase=0)
XrdOucEnv * SetEnv(XrdOucEnv *newEnv)
int GetRest(char *theBuf, int Blen, int lowcase=0)
static char * genPath(const char *path, const char *inst, const char *psfx=0)
static bool parseLib(XrdSysError &eDest, XrdOucStream &Config, const char *libName, char *&path, char **libparm)
static const char * InstName(int TranOpt=0)
static int doIf(XrdSysError *eDest, XrdOucStream &Config, const char *what, const char *hname, const char *nname, const char *pname)
static int a2i(XrdSysError &, const char *emsg, const char *item, int *val, int minv=-1, int maxv=-1)
static int a2sz(XrdSysError &, const char *emsg, const char *item, long long *val, long long minv=-1, long long maxv=-1)
static int a2tm(XrdSysError &, const char *emsg, const char *item, int *val, int minv=-1, int maxv=-1)
void Schedule(XrdJob *jp)
static void SetQW(unsigned int qwVal)
static void SetQM(unsigned int qmVal)
int Emsg(const char *esfx, int ecode, const char *text1, const char *text2=0)
void Say(const char *text1, const char *text2=0, const char *txt3=0, const char *text4=0, const char *text5=0, const char *txt6=0)
XrdSysLogger * logger(XrdSysLogger *lp=0)
static int Run(pthread_t *, void *(*proc)(void *), void *arg, int opts=0, const char *desc=0)
static void Wait(int milliseconds)
void SetLogger(XrdSysLogger *logp)
XrdVERSIONINFODEF(myVersion, cmsclient, XrdVNUMBER, XrdVERSION)
Generic structure to pass security information back and forth.