Class | LoggingMixin | Common logging class for archive and releases mirror messages. |
Class | RequestManager | Undocumented |
Class | MultiLock | Lock that acquires multiple underlying locks before it is acquired. |
Class | ProberProtocol | Simple HTTP client to probe path existence via HEAD. |
Class | RedirectAwareProberProtocol | A specialized version of ProberProtocol that follows HTTP redirects. |
Class | ProberFactory | Factory using ProberProtocol to probe single URL existence. |
Class | RedirectAwareProberFactory | Undocumented |
Class | ProberError | A generic prober error. |
Class | ProberTimeout | The initialized URL did not return in time. |
Class | BadResponseCode | Undocumented |
Class | RedirectToDifferentFile | Undocumented |
Class | InfiniteLoopDetected | Undocumented |
Class | ConnectionSkipped | Undocumented |
Class | UnknownURLScheme | Undocumented |
Class | UnknownURLSchemeAfterRedirect | Undocumented |
Class | ArchiveMirrorProberCallbacks | No class docstring; 5/7 methods documented |
Class | MirrorCDImageProberCallbacks | No class docstring; 1/3 methods documented |
Function | get_expected_cdimage_paths | Get all paths where we can find CD image files on a cdimage mirror. |
Function | checkComplete | Check if we finished probing all mirrors, and call reactor.stop(). |
Function | probe_archive_mirror | Probe an archive mirror for its contents and freshness. |
Function | probe_cdimage_mirror | Probe a cdimage mirror for its contents. |
Function | should_skip_host | Return True if the requests/timeouts ratio on this host is too low. |
Class | DistroMirrorProber | Main entry point for the distribution mirror prober. |
Function | _get_cdimage_file_list | Undocumented |
Function | _parse | Parse the given URL returning the scheme, host, port and path. |
Return a list containing, for each Ubuntu DistroSeries and flavour, a list of CD image file paths for that DistroSeries and flavour.
This list is read from a file located at http://releases.ubuntu.com, so if something goes wrong while reading that file, an UnableToFetchCDImageFileList exception will be raised.
First we issue a set of HTTP HEAD requests on some key files to find out what is mirrored there, then we check if some packages that we know the publishing time are available on that mirror, giving us an idea of when it was last synced to the main archive.
This is done by checking the list of files for each flavour and series returned by get_expected_cdimage_paths(). If a mirror contains all files for a given series and flavour, then we consider that mirror is actually mirroring that series and flavour.