Skip to content
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

can we export XRDLCLROOT when N2N lib is used? #1341

Closed
wyang007 opened this issue Nov 27, 2020 · 7 comments
Closed

can we export XRDLCLROOT when N2N lib is used? #1341

wyang007 opened this issue Nov 27, 2020 · 7 comments

Comments

@wyang007
Copy link
Member

In https://github.com/xrootd/xrootd/blob/master/src/XrdOuc/XrdOucN2NLoader.cc#L60, XRDLCLROOT is exported where there is no N2N library to load, but is not exported when a N2N library is in use.

Is there a reason to not export XRDLCLROOT when a N2N library is used? Can we export XRDLCLROOT in all cases?

@abh3
Copy link
Member

abh3 commented Nov 30, 2020 via email

@wyang007
Copy link
Member Author

I found that In XrdOucName2Name::lfn2pfn(), the returned pfn has to include localroot otherwise it won't work.

@abh3
Copy link
Member

abh3 commented Nov 30, 2020

Could you give me more context here? There is no requirement for lfn2pfn to include localroot and many do not.

@wyang007
Copy link
Member Author

wyang007 commented Dec 1, 2020

For example, I have the following in xrootd config:

all.export /data
oss.localroot /tmp

For a test, I use an dummy N2N that does nothing but return a pfn=lfn. When user access this file /data/myfile, xrootd will call XrdOucName2Name::lfn2pfn(lfn=/data/myfile, pfn, len).

If I return pfn=/data/myfile, xrootd will tell user that the file is not found / can not open. If I return pfn=/tmp/data/myfile, then everything will be OK.

@abh3
Copy link
Member

abh3 commented Dec 1, 2020

OK, but you wrote the N2N so you know that you will be using the localroot. When the plugin gets loaded you are told what the localroot is set to. So, use that information. See XrdOucName2Name::XrdOucgetName2Name and just follow the recipe.

@wyang007
Copy link
Member Author

wyang007 commented Dec 1, 2020

Indeed that is what I need. Thanks!

@wyang007 wyang007 closed this as completed Dec 1, 2020
@wyang007
Copy link
Member Author

wyang007 commented Dec 1, 2020

close

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants