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

PhEDEx data service API pfn2lfn fails to validate the PFN parameter #1115

Open
nataliaratnikova opened this issue Aug 27, 2018 · 1 comment

Comments

@nataliaratnikova
Copy link
Contributor

Example:
https://cmsweb.cern.ch/phedex/datasvc/perl/prod/pfn2lfn?node=T0_CH_CERN_Export&protocol=srmv2&pfn=/castor/cern.ch/cms/store/PhEDEx_LoadTest07_4/LoadTest07_CERN_60

Gives output:

400 Bad Request

developer error: 'pfn' is not a known validation function\n

@nataliaratnikova
Copy link
Contributor Author

This API has probably never worked as there is no validation function for the required "pfn" parameter. The fix would be to either add "pfn" to COMMON_VALIDATION hash in https://github.com/dmwm/PHEDEX/blob/master/perl_lib/PHEDEX/Web/Util.pm#L50-L92 , or remove the API from the cmsweb release, e.g. here:
https://github.com/cms-sw/cmsdist/blob/comp_gcc481/PHEDEX-datasvc.spec#L40
https://github.com/cms-sw/cmsdist/blob/comp_gcc630/PHEDEX-datasvc.spec#L46

The "pfn" validation function is much more tricky than "lfn", as depending on the format of the protocol it may contain various symbols.
The best we could do is to get the currently used patterns from the TFC cached in TMDB.

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

1 participant