l.r.s.distributionmirror_prober : module documentation

Part of lp.registry.scripts

No module docstring
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 restore_http_proxy Restore the http_proxy environment variable to the given value.
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 _build_request_for_cdimage_file_list Undocumented
Function _get_cdimage_file_list Undocumented
Function _parse Parse the given URL returning the scheme, host, port and path.
def _build_request_for_cdimage_file_list(url):
Undocumented
def _get_cdimage_file_list():
Undocumented
def restore_http_proxy(http_proxy):
Restore the http_proxy environment variable to the given value.
def get_expected_cdimage_paths():
Get all paths where we can find CD image files on a cdimage mirror.

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.

def checkComplete(result, key, unchecked_keys):
Check if we finished probing all mirrors, and call reactor.stop().
def probe_archive_mirror(mirror, logfile, unchecked_keys, logger):
Probe an archive mirror for its contents and freshness.

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.

def probe_cdimage_mirror(mirror, logfile, unchecked_keys, logger):
Probe a cdimage mirror for its contents.

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.

def should_skip_host(host):
Return True if the requests/timeouts ratio on this host is too low.
def _parse(url, defaultPort=80):
Parse the given URL returning the scheme, host, port and path.
API Documentation for Launchpad, generated by pydoctor at 2018-02-23 00:00:09.