#include <XrdOfsConfigCP.hh>
Definition at line 35 of file XrdOfsConfigCP.hh.
◆ Init()
bool XrdOfsConfigCP::Init |
( |
| ) |
|
|
static |
Definition at line 67 of file XrdOfsConfigCP.cc.
69 const int AMode = S_IRWXU|S_IRGRP|S_IXGRP;
70 const char *endMsg =
"completed.";
81 OfsEroute.
Say(
"++++++ Checkpoint initialization started.");
90 if (!(aPath = getenv(
"XRDADMINPATH")))
92 "Unable to determine adminpath for chkpnt files.");
108 if (!strncmp(
Path,
"/tmp/", 5))
110 "directory in '/tmp' is ill-advised!");
127 {Recover(nsX->
Path, stats);
136 snprintf(mBuff,
sizeof(mBuff),
137 "%d of %d checkpoints restored, %d failed, and %d skipped.",
138 stats.numRecov, stats.numFiles, stats.numError, stats.numSkipd);
141 {snprintf(mBuff,
sizeof(mBuff),
"%d", stats.numUnres);
142 OfsEroute.
Say(
"Config warning: ", mBuff,
" unresolved checkpoint "
143 "restore failures found!");
144 endMsg =
"requires attention!";
151 {
OfsEroute.
Say(
"Config warning: checkpoints disabled because the "
152 "checkpoint directory is rooted in '/tmp'!");
158 OfsEroute.
Say(
"++++++ Checkpoint initialization ", endMsg);
static char * genPath(const char *path, const char *inst, const char *psfx=0)
static const char * InstName(int TranOpt=0)
static int makePath(char *path, mode_t mode, bool reset=false)
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)
References XrdSysError::Emsg(), Enabled, EnForce, XrdOucUtils::genPath(), XrdOucNSWalk::Index(), XrdOucUtils::InstName(), isProxy, XrdOucUtils::makePath(), XrdOucNSWalk::NSEnt::Next, OfsEroute, Path, XrdOucNSWalk::NSEnt::Path, XrdOucNSWalk::retFile, XrdSysError::Say(), and XrdPosixGlobals::Stats.
Referenced by XrdOfs::Configure().
◆ Parse()
Definition at line 185 of file XrdOfsConfigCP.cc.
187 static const int minSZ = 1024*1024;
192 if (!(val =
Config.GetWord()) || !val[0])
193 {
OfsEroute.
Emsg(
"Config",
"chkpnt parameters not specified");
201 else if (!strcmp(val,
"cprerr"))
202 {
if (!strcmp(val,
"makero"))
cprErrNA =
false;
203 else if (!strcmp(val,
"stopio"))
cprErrNA =
true;
204 else {
OfsEroute.
Emsg(
"Config",
"invalid chkpnt cperr option -",val);
208 else if (!strcmp(val,
"maxsz"))
209 {
if (!(val =
Config.GetWord()) || !val[0])
210 {
OfsEroute.
Emsg(
"Config",
"chkpnt maxsz value not specified");
216 else if (!strcmp(val,
"path"))
217 {
if (!(val =
Config.GetWord()) || !val[0])
218 {
OfsEroute.
Emsg(
"Config",
"chkpnt path value not specified");
227 if (val[n-1] ==
'/')
Path = strdup(val);
229 pstr = val; pstr.append(
'/');
230 Path = strdup(pstr.c_str());
233 else {
OfsEroute.
Emsg(
"Config",
"invalid chkpnt parameter -", val);
237 }
while((val =
Config.GetWord()));
static int a2sz(XrdSysError &, const char *emsg, const char *item, long long *val, long long minv=-1, long long maxv=-1)
References XrdOuca2x::a2sz(), XrdOucString::append(), XrdOucString::c_str(), XrdCms::Config, cprErrNA, XrdSysError::Emsg(), Enabled, EnForce, MaxSZ, OfsEroute, and Path.
Referenced by XrdOfs::ConfigXeq().
◆ cprErrNA
bool XrdOfsConfigCP::cprErrNA = true |
|
static |
◆ Enabled
bool XrdOfsConfigCP::Enabled = true |
|
static |
◆ EnForce
bool XrdOfsConfigCP::EnForce = false |
|
static |
◆ isProxy
bool XrdOfsConfigCP::isProxy = false |
|
static |
◆ MaxSZ
long long XrdOfsConfigCP::MaxSZ = 1024*1024 |
|
static |
◆ MaxVZ
int XrdOfsConfigCP::MaxVZ = 16 |
|
static |
◆ Path
char * XrdOfsConfigCP::Path = 0 |
|
static |
The documentation for this class was generated from the following files: