scripts: mirror-checker check all mirrors #2115
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 thecheck
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.