xrootd / xrootd

The XRootD central repository https://my.cdash.org/index.php?project=XRootD
http://xrootd.org
Other
151 stars 151 forks source link

Fix MKCOL response when we have an EEXIST in Redirector #1360

Closed ddavila0 closed 1 year ago

ddavila0 commented 3 years ago

Sorry for the duplicated post. I already reported this in an already merged PR[1] that seems related to this issue.

I think the issue fixed in the aforementioned PR[1] is still happening at the redirector level, when the redirector is optimized to do the lookup of the file/directory instead of redirecting the request. For example, this configuration triggers the issue:

cms.dfs lookup central mdhold 20m and this doesn't cms.dfs lookup distrib mdhold 20m redirect immed

Here there is an example of what you'll see when trying to create an already existing directory with gfal-mkdir:

[root@27d1fc7f1d47 tpc_transfers]# gfal-mkdir https://xrootd.ultralight.org:1094/store/temp/user/ddavila/newdir/
gfal-mkdir error: 2 (No such file or directory) - HTTP 404 : File not found  with url https://xrootd.ultralight.org:1094/store/temp/user/ddavila/newdir/

We saw this in versions: 4.12.3-1 and 5.0.2-1 [1] https://github.com/xrootd/xrootd/pull/1164

ddavila0 commented 3 years ago

Hi @abh3 , I tried creating an already existing directory with the 'xroot' protocol instead and got a "File exist" which is the expected behavior.

[root@143e9b594cb7 tpc_transfers]# gfal-mkdir root://redirector.t2.ucsd.edu:1094//store/user/ddavila/newdir-001/
gfal-mkdir error: 17 (File exists) - Failed to create directory root://redirector.t2.ucsd.edu:1094//store/user/ddavila/newdir-001/ (File exists) 

I also noticed that the error is different between XRootD v4 and v5. The error message that I showed in the post above is from V4. This is what I get from v5:

[root@143e9b594cb7 tpc_transfers]# gfal-mkdir davs://redirector.t2.ucsd.edu:1094/store/user/ddavila/newdir-001/
gfal-mkdir error: 5 (Input/output error) - HTTP 500 : Unexpected server error: 500  with url davs://redirector.t2.ucsd.edu:1094/store/user/ddavila/newdir-001/

so: v4 -> 404 File not found v5 -> 500 Unexpected server error

abh3 commented 1 year ago

believe this has been fixed. in 5.4.3 If not please reopen tis.