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

fix: Do not add trailing slash in xrootd urls #1054

Merged
merged 4 commits into from Mar 13, 2024

Conversation

valsdav
Copy link
Contributor

@valsdav valsdav commented Mar 5, 2024

Now the sites map cache file is invalidated after 10 mins to avoid stale information.

Fixes #1053

@lgray
Copy link
Collaborator

lgray commented Mar 6, 2024

@nsmith- can you give this a try?

@lgray lgray force-pushed the fix-rucio-pnf-slash branch 2 times, most recently from b8e5a5a to a633fe1 Compare March 7, 2024 18:08
@lgray lgray requested a review from nsmith- March 11, 2024 13:27
Copy link
Member

@nsmith- nsmith- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I should point out that rather than parsing the SITECONF you can also ask rucio to give you the PFNs, e.g. on the commandline

rucio list-file-replicas cms:/SingleMuon/Run2018A-UL2018_MiniAODv2_NanoAODv9_GT36-v1/NANOAOD --rse 'rse_type=DISK&country=US' --protocol root

gives xrootd urls for files in that dataset

@@ -114,7 +124,8 @@ def _get_pfn_for_site(path, rules):
pfn = pfn.replace(f"${i+1}", grs[i])
return pfn
else:
return rules + "/" + path
# not adding any slash as the path usually starts with it
return rules + path
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be sure you could use rules + "/" + path.removeprefix("/")

@valsdav
Copy link
Contributor Author

valsdav commented Mar 12, 2024

I should point out that rather than parsing the SITECONF you can also ask rucio to give you the PFNs, e.g. on the commandline

rucio list-file-replicas cms:/SingleMuon/Run2018A-UL2018_MiniAODv2_NanoAODv9_GT36-v1/NANOAOD --rse 'rse_type=DISK&country=US' --protocol root

gives xrootd urls for files in that dataset

I agree, but the SITCONF hack was done to overcome the issue that not all the sites are returning root endpoints, sometimes only davs. Maybe the problem has been fixed in the meanwhile?

@lgray lgray enabled auto-merge March 13, 2024 02:27
@lgray lgray merged commit 39403c7 into CoffeaTeam:master Mar 13, 2024
14 checks passed
@nsmith-
Copy link
Member

nsmith- commented Mar 13, 2024

I should point out that rather than parsing the SITECONF you can also ask rucio to give you the PFNs, e.g. on the commandline

rucio list-file-replicas cms:/SingleMuon/Run2018A-UL2018_MiniAODv2_NanoAODv9_GT36-v1/NANOAOD --rse 'rse_type=DISK&country=US' --protocol root

gives xrootd urls for files in that dataset

I agree, but the SITCONF hack was done to overcome the issue that not all the sites are returning root endpoints, sometimes only davs. Maybe the problem has been fixed in the meanwhile?

Is there a ticket/thread with CMS DM ops / site support on the subject? If not, we should make one.

@valsdav
Copy link
Contributor Author

valsdav commented Mar 13, 2024

I should point out that rather than parsing the SITECONF you can also ask rucio to give you the PFNs, e.g. on the commandline

rucio list-file-replicas cms:/SingleMuon/Run2018A-UL2018_MiniAODv2_NanoAODv9_GT36-v1/NANOAOD --rse 'rse_type=DISK&country=US' --protocol root

gives xrootd urls for files in that dataset

I agree, but the SITCONF hack was done to overcome the issue that not all the sites are returning root endpoints, sometimes only davs. Maybe the problem has been fixed in the meanwhile?

Is there a ticket/thread with CMS DM ops / site support on the subject? If not, we should make one.

I will give it another try, it was more than 1 year ago and I haven't test it since then..

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

Successfully merging this pull request may close these issues.

Too many slashes in file urls from dataset_tools
3 participants