Skip to content

Commit

Permalink
HPCC-30807 Fix foreign access to striped storage
Browse files Browse the repository at this point in the history
Pass plane info back to client, which is used to decide
whether to map. NB: also used by plane aliasing.

Signed-off-by: Jake Smith <[email protected]>
  • Loading branch information
jakesmith committed Nov 10, 2023
1 parent 0b0f217 commit dccec15
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions dali/base/dadfs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11173,12 +11173,21 @@ class CDaliDFSServer: public Thread, public CTransactionLogTracker, implements I
Owned<IPropertyTree> tree = getNamedPropTree(sroot,queryDfsXmlBranchName(DXB_File),"@name",tail.str(),false);
if (tree)
{
#ifdef _CONTAINERIZED
// This is for bare-metal clients using ~foreign pointing at a containerized/k8s setup,
// asking for the returned meta data to be remapped to point to the dafilesrv service.
if (hasMask(opts, GetFileTreeOpts::remapToService))
remapGroupsToDafilesrv(tree, &queryNamedGroupStore());
#endif
if (isContainerized())
{
// This is for bare-metal clients using ~foreign pointing at a containerized/k8s setup,
// asking for the returned meta data to be remapped to point to the dafilesrv service.
if (hasMask(opts, GetFileTreeOpts::remapToService))
{
remapGroupsToDafilesrv(tree, &queryNamedGroupStore());

const char *remotePlaneName = tree->queryProp("@group");
Owned<IPropertyTree> filePlane = getStoragePlane(remotePlaneName);
assertex(filePlane);
// Used by DFS clients to determine if stripe and/or alias translation needed
tree->setPropTree("Attr/_remoteStoragePlane", createPTreeFromIPT(filePlane));
}
}

Owned<IFileDescriptor> fdesc = deserializeFileDescriptorTree(tree,&queryNamedGroupStore(),IFDSF_EXCLUDE_CLUSTERNAMES);
mb.append((int)1); // 1 == standard file
Expand Down

0 comments on commit dccec15

Please sign in to comment.