From c07b29ddb6e85c49491725a51c7108a7928f1861 Mon Sep 17 00:00:00 2001 From: Jake Smith Date: Thu, 10 Jun 2021 10:46:04 +0100 Subject: [PATCH] HPCC-26013 Avoid a couple of spurious env. calls in container mode Signed-off-by: Jake Smith --- ecl/eclagent/eclagent.cpp | 2 +- fs/dafsclient/rmtfile.cpp | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ecl/eclagent/eclagent.cpp b/ecl/eclagent/eclagent.cpp index b011bcab04b..827abb0055a 100644 --- a/ecl/eclagent/eclagent.cpp +++ b/ecl/eclagent/eclagent.cpp @@ -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 diff --git a/fs/dafsclient/rmtfile.cpp b/fs/dafsclient/rmtfile.cpp index 566c0ae73db..1a1d3fd31fa 100644 --- a/fs/dafsclient/rmtfile.cpp +++ b/fs/dafsclient/rmtfile.cpp @@ -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 }