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

problem with xrdfs query prepare call #1786

Closed
maksiks opened this issue Sep 22, 2022 · 9 comments
Closed

problem with xrdfs query prepare call #1786

maksiks opened this issue Sep 22, 2022 · 9 comments

Comments

@maksiks
Copy link

maksiks commented Sep 22, 2022

Hi,

I am having problems with executing this call on the redirector.
On any door this works fine, when I try it on redirector I get the error (and from I can tell this never goes to any door):

220922 13:36:01 14054 XrootdXeq: maksiks.28781:37@t2srv0017.cmsaf.mit.edu pub IPv4 login as maxi
220922 13:36:01 14054 maksiks.28781:37@t2srv0017.cmsaf.mit.edu Xrootd_Protocol: 0100 req=query dlen=102
220922 13:36:01 14054 maksiks.28781:37@t2srv0017.cmsaf.mit.edu Xrootd_Response: 0100 sending err 3000: Prepare requestid owned by an unknown server

Our redirector does not have direct access to the underlying FS, but commands like xrdfs ls work with no problems. Please help me to understand what needs to be done here.

Thank you, --Max

@abh3
Copy link
Member

abh3 commented Sep 24, 2022 via email

@maksiks
Copy link
Author

maksiks commented Sep 24, 2022

Hi Andy, the call is issued by the FTS in order to check if the file on our tape robot (T2_US_MIT_Tape) is available for transfer or needs to be staged in from a tape cartridge into disk cache (like any standard T1 system). While when I issue such a call by hand to any of our doors everything works, however the redirector produces an error that I posted. Our understanding is that the redirector tries to handle this call itself, and in our case it has no access to the underlying FS. Hence the question: is there any options that can force redirector to forward this call to a door? Or we have to have a redirector with an access to the FS?
Thank you, --Max

@abh3
Copy link
Member

abh3 commented Sep 28, 2022

I took a deeper dive into this and a properly constructed prepare request ID, a server (data or redirector) receiving a query using that id will redirect the client to the server that actually created that request id. If a receiving sever created the id it will handle it. So, we need to find out what is wrong with that request id. It should only contains ASCII text so please either post one exhibiting this behavior or send it to me via email.

@maksiks
Copy link
Author

maksiks commented Sep 28, 2022

Hi, here is the command that I try to execute from some server:
xrdfs tapexrd.cmsaf.mit.edu:1094 query prepare 111 /store/data/Run2022A/ZeroBias9/RAW/v1/000/352/322/00000/6a445e3f-4677-4af4-81dd-5f6809e982db.root
[ERROR] Server responded with an error: [3000] Prepare requestid owned by an unknown server

111 is just some random number that I try to supply as a request id, I do not know how this id should look like. If I skip that field with id the outcome of the command will be the same. tapexrd is our redirector that does not have access to underlying FS. If I issue same command using any door the call goes through.
--Max

@maksiks
Copy link
Author

maksiks commented Oct 4, 2022

Hi, any update on this issue?
Thank you, --Max

@abh3
Copy link
Member

abh3 commented Oct 4, 2022

OK, the problem here is that when you issue a prepare the server hands back a prepare request ID. That request ID must be used for any future query as it encodes the actual request and the server can then use it to find the actual request. Handing a random number will never work. When you issued the prepare using xrdfs the request ID should have been displayed.

@maksiks
Copy link
Author

maksiks commented Oct 18, 2022

That you for the explanation, but it got me lost. What should the command look like when I issue it? Above I pasted how it should look like in my head, from your reply I understand that I am doing something wrong, so what should it be?

@abh3
Copy link
Member

abh3 commented Nov 1, 2022

Sorry for the late reply but I was away. When you issue a prepare for a resource that will take some time to prepare (e.g. get a file from a tape) the response will include a request handle. You use that request handle in a subsequent query to find out the request's status. For quick requests (e.g. prime a redirector's location cache) there is no point in the query because the request would have been processed by the time you get a response. So, the key here is that you need to use the request handle sent in he response (xrdfs or xprep should display it) in the subsequent query.

@abh3
Copy link
Member

abh3 commented Jan 30, 2023

I hope the last comment clarified the situation. The query request simply needs to be issued with the server supplied request handle (.k.a ID). Then this should work if the request is still active.

@abh3 abh3 closed this as completed Jan 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants