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

scripts: mirror-checker check all mirrors #2115

Merged

Conversation

Chris-Peterson444
Copy link
Collaborator

An update to the mirror checker script to add a command for checking all of the country mirrors. The check-all command takes all known country codes and then calculates the actual mirrors to test based on DNS records. The script will print out the DNS information for each attempted mirror (i.e., cc.archive.ubuntu.com), the calculated real mirrors, and a table with the status of each mirror. It will also save the results of each mirror check in the single mirror check mode style (which is now available under the check command), which can be specified with the -o flag.

By default it will omit reporting information about mirrors which don't exist (i.e., fallback to archive.ubuntu.com) but can be instructed to provide it with the --all flag.

Some examples of the output: https://people.canonical.com/~cpete/mirror-checker-example-output/

We could clean this up a little more at some point, filtering for real mirrors using DNS information got a little messy. I also expect some more iteration on this if we want to set it up for regular monitoring somewhere.

Copy link
Collaborator

@dbungert dbungert left a comment

Choose a reason for hiding this comment

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

Thank you for putting this together, this is a great tool to help identify problem archive mirrors. I have 2 non-blocking suggestions.

scripts/mirror-checker.py Outdated Show resolved Hide resolved
scripts/mirror-checker.py Show resolved Hide resolved
Chris-Peterson444 and others added 2 commits November 21, 2024 13:59
Theoretically a domain could have multiple CNAME records, even if
it's out of spec. Let's not try to debootstrap from these mirrors and
report them bad at the point of configuration.

Co-authored-by: Dan Bungert <[email protected]>
Print mirrors with "not ok" status at the bottom so they're easier to
find when reading the logs.

Co-authored-by: Dan Bungert <[email protected]>
@Chris-Peterson444
Copy link
Collaborator Author

Thanks for the feedback. I think both suggestions were great and went ahead and implemented them. I'm trying something new and added you as co-author for the commits that include your suggested changes.

@Chris-Peterson444 Chris-Peterson444 merged commit 764d202 into canonical:main Nov 23, 2024
10 checks passed
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.

2 participants