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

geoip sorting doesn't handle correctly the root proxies #6242

Closed
rcarpa opened this issue Jul 3, 2023 · 0 comments
Closed

geoip sorting doesn't handle correctly the root proxies #6242

rcarpa opened this issue Jul 3, 2023 · 0 comments
Assignees
Milestone

Comments

@rcarpa
Copy link
Contributor

rcarpa commented Jul 3, 2023

The root proxy is embedded early into the replica during list_replicas:

pfn = f"root://{selected_prefix}//{pfn.replace('davs://', 'root://')}"

At the same time, geoip sorting, uses the pfn hostname to compute the distance from client to the replica.

return __get_distance(urlparse(pfn).hostname, client_location, ignore_error)

As a consequence, the replica sorting uses the distance to the proxy (which is the same for all replicas) for sorting. Basically not doing anything.

@rcarpa rcarpa self-assigned this Jul 3, 2023
rcarpa added a commit to rcarpa/rucio that referenced this issue Jul 4, 2023


When proxy servers are used the distance must be computed towards
the inner hostname, because the outer one is the proxy address and
will be the same for all replicas.
rcarpa added a commit to rcarpa/rucio that referenced this issue Jul 4, 2023


When proxy servers are used the distance must be computed towards
the inner hostname, because the outer one is the proxy address and
will be the same for all replicas.
@bari12 bari12 closed this as completed in c6282d4 Jul 5, 2023
@bari12 bari12 added this to the 1.31.7 milestone Jul 5, 2023
bari12 pushed a commit that referenced this issue Jul 5, 2023
When proxy servers are used the distance must be computed towards
the inner hostname, because the outer one is the proxy address and
will be the same for all replicas.
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