-
Notifications
You must be signed in to change notification settings - Fork 305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HPCC-30570 Use default data plane if no destGroup req in FileSpray.Copy #18013
Conversation
https://track.hpccsystems.com/browse/HPCC-30570 |
esp/services/ws_fs/ws_fsService.cpp
Outdated
{ | ||
getNodeGroupFromLFN(context, srcname, destNodeGroup); | ||
if(isContainerized() && !isEmptyString(srcDali)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If dali specified performing a copy in containerized...
That should normally be forbidden, it is at least very unusual (implies containerized has been configured with allowForeign=true).
I don't think that was what @cloLN was testing when he hit the problem.
As you can see from the JIRA srcDali was blank (as you'd expect),
destGroup was also blank, and it's that that caused the problem.
I think the issue is that the file was ~remote, and getNodeGroupFromLFN isn't using wsdfs::lookup.
(anywhere that might lookup files from a remote source should now be using wsdfs::lookup)
@wangkx - can you check 'lookupLogicalName' in esp/smc/SMCLib/LogicFileWrapper.cpp, change to wsdfs::lookup and test ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jakesmith I am adding the code to call the wsdfs::lookup if the srcname isRemote. I got the error "Remote storage 'test_remote_storage_name' not found". It is because, I think, I haven't set the remote storage 'test_remote_storage_name'. To test/debug, I am going to test the remote copy between HPCCs on my local Ubuntu VM and on my local Docker Desktop. Is it possible? How should I configure my environment.xml and my values.yaml to test the remote copy?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if the srcname isRemote.
you should not need the test. wsdfs::lookup, will fallback to legacy DFS if needed.
I think, I haven't set the remote storage 'test_remote_storage_name'.
you need to setup a definition on the bare-metal side.
See: https://track.hpccsystems.com/browse/HPCC-27688 (also, looking at the 160x setup may be helpful).
copy between HPCCs on my local Ubuntu VM and on my local Docker Desktop. Is it possible?
Yes, you can hit a local k8s hpcc running in DD.
Reach out to me on Teams if you need guidance.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I copied the setup from 160x (will need your guidance on how to hit the local k8s later). I still got the same "Remote storage 'name' not found" error. In #16123, I saw the changes on several xsl files (no esp related?). Not sure that ESP can reach out the setup.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jakesmith when I tried to remote copy a file from my local DD to my local bare-metal VM, I got this error: 'Bare metal does not support remote file access to planes without hosts'. Is it possible to add the hosts to the DD planes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wangkx - please see comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wangkx - see reply.
esp/smc/SMCLib/LogicFileWrapper.cpp
Outdated
@@ -107,7 +108,7 @@ IDistributedFile* lookupLogicalName(IEspContext& context, const char* logicalNam | |||
userDesc->set(userID, context.queryPassword(), context.querySignature()); | |||
} | |||
|
|||
Owned<IDistributedFile> df = queryDistributedFileDirectory().lookup(logicalName, userDesc, accessMode, | |||
Owned<IDistributedFile> df = wsdfs::lookup(logicalName, userDesc, accessMode, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wangkx - is this change directly related to the issue that's being fixed?
i.e. is this lookupLogicalName used in the context of a copy from a remote file ? (I'm not sure I see where from CFileSprayEx::onCopy)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May not be related to this issue. I changed it because of your comment in #18013 (comment), and because it is called by CFileSprayEx::onCopy through the getNodeGroupFromLFN(). If you want, I can change it back.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right, if it had to call getNodeGroupFromLFN .. then wouldn't work unless it was using wsdfs::, but as discussed it doesn't make sense for getNodeGroupFromLFN to be used in the context of a out of environment logical file, at least not for this purpose.
I think it better that this change be removed from this PR, but it probably does make sense as part of a separate change. Anything that might be used to lookup a remote file should use wsdfs, please open a separate JIRA.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wangkx - see question.
@jakesmith the changes related to the wsdfs::lookup call have been removed. I created https://track.hpccsystems.com/browse/HPCC-30985. |
esp/services/ws_fs/ws_fsService.cpp
Outdated
if(!isEmptyString(srcDali) || lfn.isForeign() || lfn.isRemote()) | ||
{ | ||
//makes no sense to get the srcname's current group, if a logical file is from a different environment. | ||
getDefaultStoragePlane(destNodeGroup); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also noticed that the getDefaultStoragePlane() does not return a plane for bare metal.
In that case, yes, there is only the concept of a default plane in containerized...
This should not call it in bare-metal.
But that means, in bare-metal if no destNodeGroup is supplied - it should fire an error - there is no sensible default.
We could consider allowing a default to be defined in bare-metal to be more consistent, for such times, but I'm not sure it's worth it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wangkx - see comment re. no default , should fire an error in bare-metal.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wangkx - looks good. Please squash.
esp/services/ws_fs/ws_fsService.cpp
Outdated
const char* destNodeGroupReq = req.getDestGroup(); | ||
if(!destNodeGroupReq || !*destNodeGroupReq) | ||
if(isEmptyString(destNodeGroupReq)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
picky: there was probably a mix before, but worth making formatting consistent within a function you're modifying, e.g. missing space after if here and on new code on line 2700.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do
Use default data plane for remote/foreign copy if no destGroup req Signed-off-by: wangkx <kevin.wang@lexisnexis.com>
Squashed. Rebased. Tested. |
Use default data plane for remote/foreign copy if no destGroup req.
Type of change:
Checklist:
Smoketest:
Testing: