diff --git a/dali/base/dautils.cpp b/dali/base/dautils.cpp index 8affed148fd..a0709f3b3a3 100644 --- a/dali/base/dautils.cpp +++ b/dali/base/dautils.cpp @@ -1489,7 +1489,16 @@ bool CDfsLogicalFileName::getExternalPath(StringBuffer &dir, StringBuffer &tail, *e = makeStringExceptionV(-1, "plane:: does not support planes with more than one device '%s'", planeName.str()); return false; } - dir.append(plane->queryPrefix()); + const char * prefix = plane->queryPrefix(); + //If the prefix is a PathSepChar, it should not be appended to the dir here because + //a PathSepChar will be appended to the dir inside the expandExternalPath() if the s + //is started with the "::". + //Also a trailing pathsepchar in the prefix should be removed. + if (!isRootDirectory(prefix)) + { + dir.append(prefix); + removeTrailingPathSepChar(dir); + } } } } diff --git a/dockerfiles/platform-build/Dockerfile b/dockerfiles/platform-build/Dockerfile index 10db0858431..df535df8a63 100644 --- a/dockerfiles/platform-build/Dockerfile +++ b/dockerfiles/platform-build/Dockerfile @@ -44,7 +44,7 @@ RUN groupadd -g 10001 hpcc RUN useradd -s /bin/bash -r -m -N -c "hpcc runtime User" -u 10000 -g hpcc hpcc RUN passwd -l hpcc -RUN curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.18.18/bin/linux/amd64/kubectl && chmod +x ./kubectl && mv ./kubectl /usr/local/bin +RUN curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.27.6/bin/linux/amd64/kubectl && chmod +x ./kubectl && mv ./kubectl /usr/local/bin WORKDIR /hpcc-dev RUN mkdir build diff --git a/dockerfiles/vcpkg/platform-core-ubuntu-22.04.dockerfile b/dockerfiles/vcpkg/platform-core-ubuntu-22.04.dockerfile index 74eea1a1bdf..ff20fac4848 100644 --- a/dockerfiles/vcpkg/platform-core-ubuntu-22.04.dockerfile +++ b/dockerfiles/vcpkg/platform-core-ubuntu-22.04.dockerfile @@ -59,7 +59,7 @@ RUN apt-get install -y \ gdb \ nano -RUN curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.18.18/bin/linux/amd64/kubectl && \ +RUN curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.27.6/bin/linux/amd64/kubectl && \ chmod +x ./kubectl && \ mv ./kubectl /usr/local/bin diff --git a/dockerfiles/vcpkg/platform-core-ubuntu-22.04/Dockerfile b/dockerfiles/vcpkg/platform-core-ubuntu-22.04/Dockerfile index baf55e7edd8..7f55eb63a7d 100644 --- a/dockerfiles/vcpkg/platform-core-ubuntu-22.04/Dockerfile +++ b/dockerfiles/vcpkg/platform-core-ubuntu-22.04/Dockerfile @@ -59,7 +59,7 @@ RUN apt-get install -y \ gdb \ nano -RUN curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.18.18/bin/linux/amd64/kubectl && \ +RUN curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.27.6/bin/linux/amd64/kubectl && \ chmod +x ./kubectl && \ mv ./kubectl /usr/local/bin diff --git a/esp/services/ws_fileio/ws_fileioservice.cpp b/esp/services/ws_fileio/ws_fileioservice.cpp index f99b4df3f67..304adaa908d 100644 --- a/esp/services/ws_fileio/ws_fileioservice.cpp +++ b/esp/services/ws_fileio/ws_fileioservice.cpp @@ -97,6 +97,7 @@ bool CWsFileIOEx::onReadFileData(IEspContext &context, IEspReadFileDataRequest & return true; } + //Despite the "DestRelativePath" saying it's relative for legacy reason, it also supports absolute paths. const char* destRelativePath = req.getDestRelativePath(); if (!destRelativePath || (destRelativePath[0] == 0)) { diff --git a/esp/smc/SMCLib/TpCommon.cpp b/esp/smc/SMCLib/TpCommon.cpp index dfe5abad996..1d1fc12ba09 100644 --- a/esp/smc/SMCLib/TpCommon.cpp +++ b/esp/smc/SMCLib/TpCommon.cpp @@ -184,9 +184,6 @@ extern TPWRAPPER_API IPropertyTree* getDropZoneAndValidateHostAndPath(const char static SecAccessFlags getDropZoneScopePermissions(IEspContext& context, const IPropertyTree* dropZone, const char* dropZonePath) { - if (isEmptyString(dropZonePath)) - throw makeStringException(ECLWATCH_INVALID_CLUSTER_NAME, "getDropZoneScopePermissions(): DropZone path must be specified."); - //If the dropZonePath is an absolute path, change it to a relative path. if (isAbsolutePath(dropZonePath)) { @@ -203,9 +200,6 @@ static SecAccessFlags getDropZoneScopePermissions(IEspContext& context, const IP static SecAccessFlags getDZPathScopePermissions(IEspContext& context, const char* dropZoneName, const char* dropZonePath, const char* dropZoneHost) { - if (isEmptyString(dropZonePath)) - throw makeStringException(ECLWATCH_INVALID_CLUSTER_NAME, "getDZPathScopePermissions(): DropZone path must be specified."); - Owned dropZone; if (isEmptyString(dropZoneName)) { @@ -348,6 +342,16 @@ extern TPWRAPPER_API void validateDropZoneAccess(IEspContext& context, const cha if (!isHostInPlane(dropZone, hostReq, true)) throw makeStringExceptionV(ECLWATCH_INVALID_INPUT, "Host %s is not valid DropZone plane %s", hostReq, targetDZNameOrHost); } + + //If the dropZonePath is an absolute path, change it to a relative path. + if (isAbsolutePath(fileNameWithRelPath)) + { + const char* relativePath = getRelativePath(fileNameWithRelPath, dropZone->queryProp("@prefix")); + if (nullptr == relativePath) + throw makeStringExceptionV(ECLWATCH_INVALID_INPUT, "Invalid DropZone path %s.", fileNameWithRelPath); + fileNameWithRelPath = relativePath; + } + const char *dropZoneName = dropZone->queryProp("@name"); SecAccessFlags permission = getDZFileScopePermissions(context, dropZoneName, fileNameWithRelPath, hostReq); if ((permission < permissionReq) && getGlobalConfigSP()->getPropBool("expert/@failOverToLegacyPhysicalPerms", !isContainerized())) diff --git a/roxie/ccd/ccdfile.cpp b/roxie/ccd/ccdfile.cpp index d7762aafc86..63222365a95 100644 --- a/roxie/ccd/ccdfile.cpp +++ b/roxie/ccd/ccdfile.cpp @@ -1185,7 +1185,7 @@ class CRoxieFileCache : implements IRoxieFileCache, implements ICopyFileProgress throw MakeStringException(ROXIE_FILE_ERROR, "Local file %s does not match DFS information", localLocation); else { - if (doTrace(TraceFlags::Always, TraceFlags::Detailed)) + if (doTrace(TraceFlags::Always, TraceFlags::Standard)) { #ifndef _CONTAINERIZED DBGLOG("Failed to open file at any of the following %d local locations:", localLocations.length()); diff --git a/system/jlib/jlog.cpp b/system/jlib/jlog.cpp index 61f5aa69c1b..70efd4d3f84 100644 --- a/system/jlib/jlog.cpp +++ b/system/jlib/jlog.cpp @@ -3388,10 +3388,18 @@ TraceFlags loadTraceFlags(const IPropertyTree *ptree, const std::initializer_lis attrName.clear().appendf("_%s", o.name); if (ptree->hasProp(attrName)) { - if (ptree->getPropBool(attrName, false)) + if (o.value <= TraceFlags::LevelMask) + { + dft &= ~TraceFlags::LevelMask; dft |= o.value; + } else - dft &= ~o.value; + { + if (ptree->getPropBool(attrName, false)) + dft |= o.value; + else + dft &= ~o.value; + } } } diff --git a/system/jlib/jtrace.hpp b/system/jlib/jtrace.hpp index 69124de395b..a9ec14becca 100644 --- a/system/jlib/jtrace.hpp +++ b/system/jlib/jtrace.hpp @@ -134,6 +134,12 @@ BITMASK_ENUM(TraceFlags); // Feature trace flags for hthor, thor and Roxie engines +// Detail levels +constexpr TraceFlags traceNone = TraceFlags::None; +constexpr TraceFlags traceStandard = TraceFlags::Standard; +constexpr TraceFlags traceDetailed = TraceFlags::Detailed; +constexpr TraceFlags traceMax = TraceFlags::Max; + // Common to several engines constexpr TraceFlags traceHttp = TraceFlags::flag1; constexpr TraceFlags traceSockets = TraceFlags::flag2; @@ -171,6 +177,10 @@ struct TraceOption { const char * name; TraceFlags value; }; constexpr std::initializer_list roxieTraceOptions { + TRACEOPT(traceNone), + TRACEOPT(traceStandard), + TRACEOPT(traceDetailed), + TRACEOPT(traceMax), TRACEOPT(traceHttp), TRACEOPT(traceSockets), TRACEOPT(traceCassandra),