Skip to content

Commit

Permalink
HPCC-26013 Avoid a couple of spurious env. calls in container mode
Browse files Browse the repository at this point in the history
Signed-off-by: Jake Smith <jake.smith@lexisnexisrisk.com>
  • Loading branch information
jakesmith committed Jun 11, 2021
1 parent df3a291 commit c07b29d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ecl/eclagent/eclagent.cpp
Expand Up @@ -3659,13 +3659,13 @@ extern int HTHOR_API eclagent_main(int argc, const char *argv[], StringBuffer *
startLogMsgParentReceiver();
connectLogMsgManagerToDali();

#ifndef _CONTAINERIZED
StringBuffer baseDir;
if (getConfigurationDirectory(agentTopology->queryPropTree("Directories"),"data","eclagent",agentTopology->queryProp("@name"),baseDir.clear()))
setBaseDirectory(baseDir.str(), false);
if (getConfigurationDirectory(agentTopology->queryPropTree("Directories"),"mirror","eclagent",agentTopology->queryProp("@name"),baseDir.clear()))
setBaseDirectory(baseDir.str(), true);

#ifndef _CONTAINERIZED
if (agentTopology->getPropBool("@useNASTranslation", true))
envInstallNASHooks();
#endif
Expand Down
6 changes: 6 additions & 0 deletions fs/dafsclient/rmtfile.cpp
Expand Up @@ -2137,15 +2137,21 @@ IDaFileSrvHook *queryDaFileSrvHook()

void enableForceRemoteReads()
{
#ifndef _CONTAINERIZED
const char *forceRemotePattern = queryEnvironmentConf().queryProp("forceRemotePattern");
if (!isEmptyString(forceRemotePattern))
queryDaFileSrvHook()->forceRemote(forceRemotePattern);
#endif
}

bool testForceRemote(const char *path)
{
#ifndef _CONTAINERIZED
const char *forceRemotePattern = queryEnvironmentConf().queryProp("forceRemotePattern");
return !isEmptyString(forceRemotePattern) && WildMatch(path, forceRemotePattern, false);
#else
return false;
#endif
}


Expand Down

0 comments on commit c07b29d

Please sign in to comment.