Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/candidate-9.2.x' into candidate-…
Browse files Browse the repository at this point in the history
…9.4.x

Signed-off-by: Gavin Halliday <[email protected]>
  • Loading branch information
ghalliday committed Oct 13, 2023
2 parents 4944f9c + 8a3284e commit d609af7
Show file tree
Hide file tree
Showing 9 changed files with 45 additions and 13 deletions.
11 changes: 10 additions & 1 deletion dali/base/dautils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/platform-build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/vcpkg/platform-core-ubuntu-22.04.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/vcpkg/platform-core-ubuntu-22.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions esp/services/ws_fileio/ws_fileioservice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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))
{
Expand Down
16 changes: 10 additions & 6 deletions esp/smc/SMCLib/TpCommon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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))
{
Expand All @@ -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<IPropertyTree> dropZone;
if (isEmptyString(dropZoneName))
{
Expand Down Expand Up @@ -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()))
Expand Down
2 changes: 1 addition & 1 deletion roxie/ccd/ccdfile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
12 changes: 10 additions & 2 deletions system/jlib/jlog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

}
Expand Down
10 changes: 10 additions & 0 deletions system/jlib/jtrace.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -171,6 +177,10 @@ struct TraceOption { const char * name; TraceFlags value; };

constexpr std::initializer_list<TraceOption> roxieTraceOptions
{
TRACEOPT(traceNone),
TRACEOPT(traceStandard),
TRACEOPT(traceDetailed),
TRACEOPT(traceMax),
TRACEOPT(traceHttp),
TRACEOPT(traceSockets),
TRACEOPT(traceCassandra),
Expand Down

0 comments on commit d609af7

Please sign in to comment.