Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HPCC-26013 Avoid a couple of spurious env. calls in container mode #15034

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#else
return false;

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ghalliday - whoops, now added

}


Expand Down