-
Notifications
You must be signed in to change notification settings - Fork 418
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
No source of entropy in _get_nearest_mirrors_by_network_data() #562
Comments
We do have https://github.com/AlmaLinux/mirrors/blob/mirrors_service/src/backend/api/handlers.py#L145 to randomize the geo-based ones a bit. Are you also wanting to have the network-based ones randomized? I don't think failure mode 1 that you cited is really an issue due to the randomized closest public mirrors. As for 2: I'm not aware of anyone using more than one mirror to serve a single network. Not that it couldn't happen, just seems like an odd use-case...though also an easy thing to just fix anyway. |
That is only used if the client doesn't match any network data for any mirrors. When a client matches a network service cone for any mirror, we don't use the https://github.com/AlmaLinux/mirrors/blob/mirrors_service/src/backend/api/handlers.py#L110 |
- No source of entropy in _get_nearest_mirrors_by_network_data() - _get_nearest_mirrors_by_network_data() fails to exclude near-by private mirrors for extra options. - Exclude the private mirrors from the mirrors list in the case of fallback behavior The Azure mirrors have allowed list of arches
- No source of entropy in _get_nearest_mirrors_by_network_data() - _get_nearest_mirrors_by_network_data() fails to exclude near-by private mirrors for extra options. - Exclude the private mirrors from the mirrors list in the case of fallback behavior The Azure mirrors have allowed list of arches
- No source of entropy in _get_nearest_mirrors_by_network_data() - _get_nearest_mirrors_by_network_data() fails to exclude near-by private mirrors for extra options. - Exclude the private mirrors from the mirrors list in the case of fallback behavior - The Azure mirrors have allowed list of arches - Decrease level of logging messages in some cases - Cache subnets of Azure/AWS cloud
- No source of entropy in _get_nearest_mirrors_by_network_data() - _get_nearest_mirrors_by_network_data() fails to exclude near-by private mirrors for extra options. - Exclude the private mirrors from the mirrors list in the case of fallback behavior - The Azure mirrors have allowed list of arches - Decrease level of logging messages in some cases - Cache subnets of Azure/AWS cloud
- No source of entropy in _get_nearest_mirrors_by_network_data() - _get_nearest_mirrors_by_network_data() fails to exclude near-by private mirrors for extra options. - Exclude the private mirrors from the mirrors list in the case of fallback behavior - The Azure mirrors have allowed list of arches - Decrease level of logging messages in some cases - Cache subnets of Azure/AWS cloud
- No source of entropy in _get_nearest_mirrors_by_network_data() - _get_nearest_mirrors_by_network_data() fails to exclude near-by private mirrors for extra options. - Exclude the private mirrors from the mirrors list in the case of fallback behavior - The Azure mirrors have allowed list of arches - Decrease level of logging messages in some cases - Cache subnets of Azure/AWS cloud
- No source of entropy in _get_nearest_mirrors_by_network_data() - _get_nearest_mirrors_by_network_data() fails to exclude near-by private mirrors for extra options. - Exclude the private mirrors from the mirrors list in the case of fallback behavior - The Azure mirrors have allowed list of arches - Decrease level of logging messages in some cases - Cache subnets of Azure/AWS cloud
|
- No source of entropy in _get_nearest_mirrors_by_network_data() - _get_nearest_mirrors_by_network_data() fails to exclude near-by private mirrors for extra options. - Exclude the private mirrors from the mirrors list in the case of fallback behavior - The Azure mirrors have allowed list of arches - Decrease level of logging messages in some cases - Cache subnets of Azure/AWS cloud
The patch is deployed to production |
There are reports of this being broken. We might need to re-review it. |
That would probably be me (maintainer of ftp.linux.cz mirror). Currently I see two problems:
I think the long lifetime of the mirrorlist is caused by repeated access extending the cache lifetime: when I wget the mirrorlist every two minutes or so, I am getting the same one for days. But when I stop for at least 1 hour from that IP address, the next wget gets a new different mirrorlist. So I guess large networks behind NAT could get the same mirrorlist almost indefinitely. I don't know how the caching front-end works, but it could help if the backend can generate the mirrorlist with some kind of
Should I open a new issue for each of these two topics? Thanks, -Yenya |
For point 1 you were correct: #1075 Fix should hit prod soon. |
https://github.com/AlmaLinux/mirrors/blob/mirrors_service/src/backend/api/handlers.py#L73
When a client matches the network data service cone for any mirror, the offered mirror list is built using the following logic:
The issue is that this process is completely deterministic and there is no load balancing for clients that match on any mirror's network service cone. There is no shuffling happening in either the first list of suitable_mirrors or the geographically based extension of the list to meet the minimum number of mirrors to offer.
Failure modes:
Recommendation:
2 * LENGTH_CLOUD_MIRRORS_LIST
closest mirrors, shuffle this list, thensuitable_mirrors.extend(nearby_mirrors_shuffled)[:LENGTH_CLOUD_MIRRORS_LIST - len(suitable_mirrors)]
The text was updated successfully, but these errors were encountered: