-
Notifications
You must be signed in to change notification settings - Fork 669
Fix mirrors hang when /status endpoint is down #4031
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
base: master
Are you sure you want to change the base?
Conversation
…(4, 5, 6) Then fallsback to fully local list
|
Also had fun on another branch where we can use mirror endpoint from archlinux.de (or other models?) |
|
We could also fall back to And the regions are "there" in the shape of comments, so we'd just need to parse "which region are we currently on" and all subsequent mirror entries (even if commented out) belong to that region. |
|
It is already the fallback behavior problem was that timeout didn't work and the parent logic didn't know about the child status The extra options are totally optional and can be cherry picked if you don't want them (today's commits) |
|
Ah, I think I'm slowly waking up and getting the hang of this. So would the archinstall/archinstall/lib/args.py Lines 397 to 402 in 421892b
I'm not against it, just wondering if |
|
|
||
|
|
||
| def fetch_data_from_url(url: str, params: dict[str, str] | None = None) -> str: | ||
| def fetch_data_from_url(url: str, params: dict[str, str] | None = None, timeout: int = 3) -> str: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The default timeout can probably be increased to 15 or even 20.
As I know some regions struggle with latency and speeds.
Aims to fix #4029 or start a discussion about it (I've had this when the endpoint is down).
By assigning a bool to the def
load_remote_mirrorsin the parent (which was naïve about the state).This can be tested on the branch above and using something similar to block URL (temporarily):
echo "127.0.0.1 archlinux.org" | sudo tee -a /etc/hostsor when it's down like currently (15:00 UTC+1).Second thing I'm wondering about:
Another day another DDoS ? I'll ping thsi for the funny lore too #3974