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

Transfers: Implement pluggable LFN2PFN algorithms. Fixes #570 #585

Merged
merged 20 commits into from Feb 9, 2018

Conversation

bbockelm
Copy link
Contributor

@bbockelm bbockelm commented Feb 4, 2018

This adds the ability for a Rucio server configuration to specify a module that can register additional lfn2pfn algorithm implementations. The configuration file may also specify the default LFN2PFN algorithm (for example, replacing hash with identity or a VO-specific algorithm).

The callout algorithms receive a scope, LFN name, RSE name, RSE attributes, and protocol attributes. It should return the path portion of a PFN (not the full PFN).

The server instance's default can still be overridden by setting the lfn2pfn_algorithm attribute on the RSE.

This is the next version of #584.

@vingar
Copy link
Contributor

vingar commented Feb 5, 2018

Running flake8

lib/rucio/tests/test_rse_lfn2path.py:106:9: E306 expected 1 blank line before a nested definition, found 0

@bbockelm bbockelm force-pushed the patch-570-transfers_pluggable_lfn2pfn branch from 155afac to 36e0a32 Compare February 5, 2018 14:17
@bbockelm bbockelm force-pushed the patch-570-transfers_pluggable_lfn2pfn branch from 57832d3 to 6f59ad3 Compare February 8, 2018 04:26
@bbockelm
Copy link
Contributor Author

bbockelm commented Feb 8, 2018

@mlassnig @vingar @bari12 - we can continue the conversation in this PR.

@vingar vingar changed the title Transfers: Implement pluggable LFN2PFN algoirthms. Fixes #570 Transfers: Implement pluggable LFN2PFN algorithms. Fixes #570 Feb 9, 2018
vingar
vingar previously approved these changes Feb 9, 2018
Copy link
Contributor

@vingar vingar left a comment

Choose a reason for hiding this comment

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

it can go in testing for me.
@bbockelm please fix the docsting of the functions

@@ -60,6 +60,24 @@ def config_get_items(section):
return __CONFIG.items(section)


def config_remove_option(section, option):
"""Remove the specified option from a given section.
Copy link
Contributor

Choose a reason for hiding this comment

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

the docstring is incomplete . e.g.:

:param section
:param option

same comment for most of them

@bbockelm
Copy link
Contributor Author

bbockelm commented Feb 9, 2018

In Slack, @vingar asked about how this could impact current code:

  1. LFN2PFN calls from the client to the server are now done with a new Rucio REST API.

    • This is used instead of listing replicas when the client needs the server to generate the PFN. This is true for the case where the RSE is non-deterministic or (new) if the client doesn't have the deterministic algorithm used.
    • On the server-side, LFN2PFN will invoke the deterministic algorithm (if it's a deterministic protocol) or do the non-deterministic lookup using list-replicas as before.
  2. The new LFN2PFN calls are done if the deterministic algorithm listed in the RSE settings is not available on the client. This implies that the VO is responsible for potential mismatches (i.e., if I put an algorithm named ligo on the server, it better be the same ligo algorithm on the client -- or not present on the client at all).

  3. Old clients can talk to new or old servers. New clients cannot talk to old servers for non-deterministic.

Copy link
Contributor

@mlassnig mlassnig left a comment

Choose a reason for hiding this comment

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

ok, even after going through it in detail i can't find something obviously wrong with this (except that the client and server should have the same version of the algorithm, which is fine). in any case we will see quickly if this breaks our integration testbed ;-) thanks @bbockelm !

@bbockelm
Copy link
Contributor Author

bbockelm commented Feb 9, 2018

Alright - merging. Thanks to everyone for sticking with me on this!

@bbockelm bbockelm merged commit aba7638 into rucio:next Feb 9, 2018
@bbockelm bbockelm deleted the patch-570-transfers_pluggable_lfn2pfn branch February 9, 2018 17:15
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.

None yet

3 participants