Skip to content

Commit 7c8549f

Browse files
committed
MGM: Add more debug info for the EOS HTTP plugin
1 parent 271b4bb commit 7c8549f

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

mgm/http/xrdhttp/EosMgmHttpHandler.cc

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ EosMgmHttpHandler::GetOfsLibPath(const std::string& cfg_line)
514514
auto tokens = StringTokenizer::split<std::vector<std::string>>(cfg_line, ' ');
515515

516516
if (tokens.size() < 2) {
517-
eos_err("msg=\"failed parsing xrootd.ofslib directive\" line=\"%s\"",
517+
eos_err("msg=\"failed parsing xrootd.fslib directive\" line=\"%s\"",
518518
cfg_line.c_str());
519519
return lib_path;
520520
}
@@ -525,7 +525,7 @@ EosMgmHttpHandler::GetOfsLibPath(const std::string& cfg_line)
525525
// Account for different specifications of the OFS plugin
526526
if (lib_path == "-2") {
527527
if (tokens.size() < 3) {
528-
eos_err("msg=\"failed parsing xrootd.ofslib directive\" line=\"%s\"",
528+
eos_err("msg=\"failed parsing xrootd.fslib directive\" line=\"%s\"",
529529
cfg_line.c_str());
530530
lib_path.clear();
531531
return lib_path;
@@ -613,6 +613,13 @@ EosMgmHttpHandler::GetOfsPlugin(XrdSysError* eDest, const std::string& lib_path,
613613
XrdSysPlugin ofs_plugin(eDest, resolve_path, "mgmofs", &compiledVer, 1);
614614
void* ofs_addr = ofs_plugin.getPlugin(ofs_symbol.c_str(), 0, 0);
615615
ofs_plugin.Persist();
616+
617+
if (ofs_addr == nullptr) {
618+
eDest->Emsg("Config", "Failed to get the OFS plugin address from ",
619+
lib_path.c_str());
620+
return mgm_ofs_handler;
621+
}
622+
616623
ep = (XrdSfsFileSystem * (*)(XrdSfsFileSystem*, XrdSysLogger*, const char*))
617624
(ofs_addr);
618625
XrdSfsFileSystem* sfs_fs {nullptr};

0 commit comments

Comments
 (0)