Skip to content

Commit

Permalink
Merge pull request hpcc-systems#18017 from jakesmith/HPCC-30807-forei…
Browse files Browse the repository at this point in the history
…gn-stripe-fix

HPCC-30807 Fix foreign access to striped storage

Reviewed-by: Gavin Halliday <[email protected]>
Merged-by: Gavin Halliday <[email protected]>
  • Loading branch information
ghalliday authored Nov 17, 2023
2 parents db180e0 + dccec15 commit 1c763f6
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 1c763f6

Please sign in to comment.