![]() |
CernVM-FS
2.13.0
|
#include <download.h>
Classes | |
struct | HostInfo |
struct | ProxyInfo |
Public Types | |
enum | ProxySetModes { kSetProxyRegular = 0, kSetProxyFallback, kSetProxyBoth } |
Public Member Functions | |
DownloadManager (const unsigned max_pool_handles, const perf::StatisticsTemplate &statistics, const std::string &name="standard") | |
~DownloadManager () | |
void | Spawn () |
DownloadManager * | Clone (const perf::StatisticsTemplate &statistics, const std::string &cloned_name) |
Failures | Fetch (JobInfo *info) |
void | SetCredentialsAttachment (CredentialsAttachment *ca) |
std::string | GetDnsServer () const |
void | SetDnsServer (const std::string &address) |
void | SetDnsParameters (const unsigned retries, const unsigned timeout_ms) |
void | SetDnsTtlLimits (const unsigned min_seconds, const unsigned max_seconds) |
void | SetIpPreference (const dns::IpPreference preference) |
void | SetTimeout (const unsigned seconds_proxy, const unsigned seconds_direct) |
void | GetTimeout (unsigned *seconds_proxy, unsigned *seconds_direct) |
void | SetLowSpeedLimit (const unsigned low_speed_limit) |
void | SetMetalinkChain (const std::string &metalink_list) |
void | SetMetalinkChain (const std::vector< std::string > &metalink_list) |
void | GetMetalinkInfo (std::vector< std::string > *metalink_chain, unsigned *current_metalink) |
void | SwitchMetalink () |
bool | CheckMetalinkChain (const time_t now) |
void | SetHostChain (const std::string &host_list) |
void | SetHostChain (const std::vector< std::string > &host_list) |
void | GetHostInfo (std::vector< std::string > *host_chain, std::vector< int > *rtt, unsigned *current_host) |
void | ProbeHosts () |
bool | ProbeGeo () |
bool | GeoSortServers (std::vector< std::string > *servers, std::vector< uint64_t > *output_order=NULL) |
void | SwitchHost () |
void | SetProxyChain (const std::string &proxy_list, const std::string &fallback_proxy_list, const ProxySetModes set_mode) |
void | GetProxyInfo (std::vector< std::vector< ProxyInfo > > *proxy_chain, unsigned *current_group, unsigned *fallback_group) |
std::string | GetProxyList () |
std::string | GetFallbackProxyList () |
void | ShardProxies () |
void | RebalanceProxies () |
void | SwitchProxyGroup () |
void | SetProxyGroupResetDelay (const unsigned seconds) |
void | SetMetalinkResetDelay (const unsigned seconds) |
void | SetHostResetDelay (const unsigned seconds) |
void | SetRetryParameters (const unsigned max_retries, const unsigned backoff_init_ms, const unsigned backoff_max_ms) |
void | SetMaxIpaddrPerProxy (unsigned limit) |
void | SetProxyTemplates (const std::string &direct, const std::string &forced) |
void | EnableInfoHeader () |
void | EnableRedirects () |
void | EnableIgnoreSignatureFailures () |
void | EnableHTTPTracing () |
void | AddHTTPTracingHeader (const std::string &header) |
void | UseSystemCertificatePath () |
bool | SetShardingPolicy (const ShardingPolicySelector type) |
void | SetFailoverIndefinitely () |
void | SetFqrn (const std::string &fqrn) |
unsigned | num_hosts () |
unsigned | num_metalinks () |
dns::IpPreference | opt_ip_preference () const |
Static Public Member Functions | |
static int | ParseHttpCode (const char digits[3]) |
Static Public Attributes | |
static const int | kProbeUnprobed = -1 |
static const int | kProbeDown = -2 |
static const int | kProbeGeo = -3 |
static const unsigned | kDnsDefaultRetries = 1 |
static const unsigned | kDnsDefaultTimeoutMs = 3000 |
static const unsigned | kProxyMapScale = 16 |
Private Member Functions | |
FRIEND_TEST (T_Download, ValidateGeoReply) | |
FRIEND_TEST (T_Download, StripDirect) | |
FRIEND_TEST (T_Download, EscapeUrl) | |
bool | StripDirect (const std::string &proxy_list, std::string *cleaned_list) |
bool | ValidateGeoReply (const std::string &reply_order, const unsigned expected_size, std::vector< uint64_t > *reply_vals) |
void | SwitchHostInfo (const std::string &typ, HostInfo &info, JobInfo *jobinfo) |
void | SwitchMetalink (JobInfo *info) |
void | SwitchHost (JobInfo *info) |
void | SwitchProxy (JobInfo *info) |
ProxyInfo * | ChooseProxyUnlocked (const shash::Any *hash) |
void | UpdateProxiesUnlocked (const std::string &reason) |
void | RebalanceProxiesUnlocked (const std::string &reason) |
CURL * | AcquireCurlHandle () |
void | ReleaseCurlHandle (CURL *handle) |
void | ReleaseCredential (JobInfo *info) |
void | InitializeRequest (JobInfo *info, CURL *handle) |
void | SetUrlOptions (JobInfo *info) |
bool | ValidateProxyIpsUnlocked (const std::string &url, const dns::Host &host) |
void | UpdateStatistics (CURL *handle) |
bool | CanRetry (const JobInfo *info) |
void | Backoff (JobInfo *info) |
void | SetNocache (JobInfo *info) |
void | SetRegularCache (JobInfo *info) |
void | ProcessLink (JobInfo *info) |
bool | VerifyAndFinalize (const int curl_error, JobInfo *info) |
void | InitHeaders () |
void | CloneProxyConfig (DownloadManager *clone) |
void | CheckHostInfoReset (const std::string &typ, HostInfo &info, JobInfo *jobinfo, time_t &now) |
bool | EscapeUrlChar (unsigned char input, char output[3]) |
std::string | EscapeUrl (const int64_t jobinfo_id, const std::string &url) |
unsigned | EscapeHeader (const std::string &header, char *escaped_buf, size_t buf_size) |
std::vector< ProxyInfo > * | current_proxy_group () const |
Static Private Member Functions | |
static int | CallbackCurlSocket (CURL *easy, curl_socket_t s, int action, void *userp, void *socketp) |
static void * | MainDownload (void *data) |
Note when adding new fields: Clone() probably needs to be adjusted, too. TODO(jblomer): improve ordering of members
Definition at line 119 of file download.h.
Enumerator | |
---|---|
kSetProxyRegular | |
kSetProxyFallback | |
kSetProxyBoth |
Definition at line 152 of file download.h.
download::DownloadManager::DownloadManager | ( | const unsigned | max_pool_handles, |
const perf::StatisticsTemplate & | statistics, | ||
const std::string & | name = "standard" |
||
) |
Definition at line 1880 of file download.cc.
Referenced by Clone().
download::DownloadManager::~DownloadManager | ( | ) |
|
private |
Gets an idle CURL handle from the pool. Creates a new one and adds it to the pool if necessary.
Definition at line 877 of file download.cc.
Referenced by Fetch(), and MainDownload().
void download::DownloadManager::AddHTTPTracingHeader | ( | const std::string & | header | ) |
Definition at line 3171 of file download.cc.
Referenced by MountPoint::CreateDownloadManagers().
|
private |
Backoff for retry to introduce a jitter into a cluster of requesting cvmfs nodes. Retry only when HTTP caching is on.
Definition at line 1326 of file download.cc.
|
staticprivate |
Called when new curl sockets arrive or existing curl sockets depart.
Definition at line 489 of file download.cc.
Referenced by DownloadManager().
|
private |
Retry if possible if not on no-cache and if not already done too often.
Definition at line 1310 of file download.cc.
bool download::DownloadManager::CheckMetalinkChain | ( | const time_t | now | ) |
Definition at line 2437 of file download.cc.
|
private |
DownloadManager * download::DownloadManager::Clone | ( | const perf::StatisticsTemplate & | statistics, |
const std::string & | cloned_name | ||
) |
Creates a copy of the existing download manager. Must only be called in single-threaded stage because it calls curl_global_init().
Definition at line 3200 of file download.cc.
Referenced by MountPoint::SetupExternalDownloadMgr().
|
private |
Definition at line 3247 of file download.cc.
Referenced by Clone().
|
inlineprivate |
Definition at line 299 of file download.h.
Referenced by SwitchProxy(), and UpdateProxiesUnlocked().
void download::DownloadManager::EnableHTTPTracing | ( | ) |
Definition at line 3169 of file download.cc.
Referenced by MountPoint::CreateDownloadManagers().
void download::DownloadManager::EnableIgnoreSignatureFailures | ( | ) |
Definition at line 3165 of file download.cc.
Referenced by MountPoint::CreateDownloadManagers().
void download::DownloadManager::EnableInfoHeader | ( | ) |
Definition at line 3160 of file download.cc.
Referenced by MountPoint::SetupHttpTuning().
void download::DownloadManager::EnableRedirects | ( | ) |
Definition at line 3163 of file download.cc.
Referenced by MountPoint::CreateDownloadManagers(), MountPoint::SetupExternalDownloadMgr(), and MountPoint::SetupHttpTuning().
|
private |
escaped array needs to be sufficiently large. Its size is calculated by passing NULL to EscapeHeader.
Definition at line 442 of file download.cc.
Referenced by Fetch().
|
private |
Escape special chars from the URL, except for ':' and '/', which should keep their meaning.
Definition at line 420 of file download.cc.
|
private |
Definition at line 397 of file download.cc.
Downloads data from an insecure outside channel (currently HTTP or file).
Definition at line 1984 of file download.cc.
Referenced by download::AutoProxy(), manifest::DoFetch(), manifest::DoVerify(), HttpObjectFetcher< CatalogT, HistoryT, ReflogT >::Download(), swissknife::CommandCheck::DownloadPiece(), publish::DownloadRootObjects(), swissknife::CommandCheck::Exists(), cvmfs::Fetcher::Fetch(), swissknife::Assistant::FetchObject(), swissknife::CommandCheck::FetchPath(), GeoSortServers(), publish::IsMasterReplica(), catalog::SimpleCatalogManager::LoadCatalogByHash(), swissknife::MainWorker(), ProbeHosts(), and StreamingCacheManager::Stream().
|
private |
|
private |
|
private |
bool download::DownloadManager::GeoSortServers | ( | std::vector< std::string > * | servers, |
std::vector< uint64_t > * | output_order = NULL |
||
) |
Definition at line 2506 of file download.cc.
Referenced by ProbeGeo(), and MountPoint::SetupExternalDownloadMgr().
std::string download::DownloadManager::GetDnsServer | ( | ) | const |
Gets the DNS sever.
Definition at line 2104 of file download.cc.
Referenced by TalkManager::MainResponder().
string download::DownloadManager::GetFallbackProxyList | ( | ) |
Definition at line 2979 of file download.cc.
void download::DownloadManager::GetHostInfo | ( | std::vector< std::string > * | host_chain, |
std::vector< int > * | rtt, | ||
unsigned * | current_host | ||
) |
Retrieves the currently set chain of hosts, their round trip times, and the currently used host.
Definition at line 2269 of file download.cc.
Referenced by MountPoint::CreateDownloadManagers(), ExternalHostMagicXattr::FinalizeValue(), HostMagicXattr::FinalizeValue(), HostListMagicXattr::FinalizeValue(), ExternalURLMagicXattr::FinalizeValue(), TalkManager::FormatHostInfo(), GeoSortServers(), download::ParsePac(), ProbeGeo(), ProbeHosts(), and MountPoint::SetupExternalDownloadMgr().
void download::DownloadManager::GetMetalinkInfo | ( | std::vector< std::string > * | metalink_chain, |
unsigned * | current_metalink | ||
) |
Retrieves the currently set chain of metalink hosts and the currently used metalink host.
Definition at line 2221 of file download.cc.
Referenced by TalkManager::FormatMetalinkInfo().
void download::DownloadManager::GetProxyInfo | ( | std::vector< std::vector< ProxyInfo > > * | proxy_chain, |
unsigned * | current_group, | ||
unsigned * | fallback_group | ||
) |
Retrieves the proxy chain, optionally the currently active load-balancing group, and optionally the index of the first fallback proxy group. If there are no fallback proxies, the index will equal the size of the proxy chain.
Definition at line 2954 of file download.cc.
Referenced by ProxyMagicXattr::FinalizeValue(), TalkManager::FormatProxyInfo(), ListProxy(), and ProbeGeo().
string download::DownloadManager::GetProxyList | ( | ) |
Definition at line 2977 of file download.cc.
void download::DownloadManager::GetTimeout | ( | unsigned * | seconds_proxy, |
unsigned * | seconds_direct | ||
) |
Receives the currently active timeout values.
Definition at line 2184 of file download.cc.
Referenced by ExternalTimeoutMagicXattr::FinalizeValue(), TimeoutMagicXattr::FinalizeValue(), TimeoutDirectMagicXattr::FinalizeValue(), TalkManager::MainResponder(), and MountPoint::SetupExternalDownloadMgr().
|
private |
Definition at line 1857 of file download.cc.
Referenced by DownloadManager().
|
private |
HTTP request options: set the URL and other options such as timeout and proxy.
Definition at line 918 of file download.cc.
Referenced by Fetch(), and MainDownload().
|
staticprivate |
Worker thread event loop. Waits on new JobInfo structs on a pipe.
Definition at line 568 of file download.cc.
Referenced by Spawn().
|
inline |
Definition at line 246 of file download.h.
Referenced by manifest::Fetch().
|
inline |
Definition at line 252 of file download.h.
|
inline |
Definition at line 258 of file download.h.
Referenced by ResolvConfEventHandler::SetDnsAddress().
|
static |
-1 of digits is not a valid Http return code
Definition at line 473 of file download.cc.
bool download::DownloadManager::ProbeGeo | ( | ) |
Uses the Geo-API of Stratum 1s to let any of them order the list of servers and fallback proxies (if any). Tries at most three random Stratum 1s before giving up. If you change the host list in between by SetHostChain() or the fallback proxy list by SetProxyChain(), they will be overwritten by this function.
Definition at line 2607 of file download.cc.
Referenced by MountPoint::CreateDownloadManagers(), and TalkManager::MainResponder().
void download::DownloadManager::ProbeHosts | ( | ) |
Orders the hostlist according to RTT of downloading .cvmfschecksum. Sets the current host to the best-responsive host. If you change the host list in between by SetHostChain(), it will be overwritten by this function.
Definition at line 2452 of file download.cc.
Referenced by TalkManager::MainResponder().
|
private |
Parses Link header and uses it to set a new host chain. See rfc6249.
Definition at line 1406 of file download.cc.
void download::DownloadManager::RebalanceProxies | ( | ) |
Definition at line 3084 of file download.cc.
Referenced by TalkManager::MainResponder().
|
private |
Selects a new random proxy in the current load-balancing group. Resets the "burned" counter.
Definition at line 3074 of file download.cc.
Referenced by RebalanceProxies(), ShardProxies(), and SwitchProxyGroup().
|
private |
Frees the storage associated with the authz attachment from the job
Definition at line 1379 of file download.cc.
|
private |
Definition at line 900 of file download.cc.
Referenced by Fetch(), and MainDownload().
void download::DownloadManager::SetCredentialsAttachment | ( | CredentialsAttachment * | ca | ) |
Used by the client to connect the authz session manager to the download manager.
Definition at line 2096 of file download.cc.
Referenced by MountPoint::CreateDownloadManagers().
void download::DownloadManager::SetDnsParameters | ( | const unsigned | retries, |
const unsigned | timeout_ms | ||
) |
Sets the DNS query timeout parameters.
Definition at line 2129 of file download.cc.
Referenced by Clone(), and MountPoint::SetupDnsTuning().
void download::DownloadManager::SetDnsServer | ( | const std::string & | address | ) |
Sets a DNS server. Only for testing as it cannot be reverted to the system default.
Definition at line 2110 of file download.cc.
Referenced by Clone(), TalkManager::MainResponder(), ResolvConfEventHandler::SetDnsAddress(), and MountPoint::SetupDnsTuning().
void download::DownloadManager::SetDnsTtlLimits | ( | const unsigned | min_seconds, |
const unsigned | max_seconds | ||
) |
Definition at line 2143 of file download.cc.
Referenced by Clone(), and MountPoint::SetupDnsTuning().
void download::DownloadManager::SetFailoverIndefinitely | ( | ) |
Definition at line 3192 of file download.cc.
Referenced by MountPoint::CreateDownloadManagers().
|
inline |
Definition at line 244 of file download.h.
Referenced by MountPoint::CreateDownloadManagers().
void download::DownloadManager::SetHostChain | ( | const std::string & | host_list | ) |
Referenced by MountPoint::CreateDownloadManagers(), download::MainResolveProxyDescription(), TalkManager::MainResponder(), and MountPoint::SetupExternalDownloadMgr().
void download::DownloadManager::SetHostChain | ( | const std::vector< std::string > & | host_list | ) |
Definition at line 2244 of file download.cc.
void download::DownloadManager::SetHostResetDelay | ( | const unsigned | seconds | ) |
Definition at line 3128 of file download.cc.
Referenced by MountPoint::SetupHttpTuning().
void download::DownloadManager::SetIpPreference | ( | const dns::IpPreference | preference | ) |
Definition at line 2151 of file download.cc.
Referenced by MountPoint::SetupDnsTuning().
void download::DownloadManager::SetLowSpeedLimit | ( | const unsigned | low_speed_limit | ) |
Sets contains the average transfer speed in bytes per second that the transfer should be below during CURLOPT_LOW_SPEED_TIME seconds for libcurl to consider it to be too slow and abort. Only effective for new connections.
Definition at line 2175 of file download.cc.
Referenced by MountPoint::SetupHttpTuning().
void download::DownloadManager::SetMaxIpaddrPerProxy | ( | unsigned | limit | ) |
Definition at line 3146 of file download.cc.
Referenced by Clone(), and MountPoint::SetupDnsTuning().
void download::DownloadManager::SetMetalinkChain | ( | const std::string & | metalink_list | ) |
Referenced by MountPoint::CreateDownloadManagers(), TalkManager::MainResponder(), and MountPoint::SetupExternalDownloadMgr().
void download::DownloadManager::SetMetalinkChain | ( | const std::vector< std::string > & | metalink_list | ) |
Definition at line 2201 of file download.cc.
void download::DownloadManager::SetMetalinkResetDelay | ( | const unsigned | seconds | ) |
Definition at line 3120 of file download.cc.
Referenced by MountPoint::SetupHttpTuning().
|
private |
void download::DownloadManager::SetProxyChain | ( | const std::string & | proxy_list, |
const std::string & | fallback_proxy_list, | ||
const ProxySetModes | set_mode | ||
) |
Parses a list of ';'- and '|'-separated proxy servers and fallback proxy servers for the proxy groups. The empty string for both removes the proxy chain. The set_mode parameter can be used to set either proxies (leaving fallback proxies unchanged) or fallback proxies (leaving regular proxies unchanged) or both.
Definition at line 2795 of file download.cc.
Referenced by MountPoint::CreateDownloadManagers(), TalkManager::MainResponder(), publish::Repository(), and MountPoint::SetupExternalDownloadMgr().
void download::DownloadManager::SetProxyGroupResetDelay | ( | const unsigned | seconds | ) |
Definition at line 3110 of file download.cc.
Referenced by MountPoint::SetupHttpTuning().
void download::DownloadManager::SetProxyTemplates | ( | const std::string & | direct, |
const std::string & | forced | ||
) |
Definition at line 3152 of file download.cc.
Referenced by MountPoint::CreateDownloadManagers().
|
private |
Reverse operation of SetNocache. Makes sure that "no-cache" header disappears from the list of headers to let proxies work normally.
Definition at line 1366 of file download.cc.
void download::DownloadManager::SetRetryParameters | ( | const unsigned | max_retries, |
const unsigned | backoff_init_ms, | ||
const unsigned | backoff_max_ms | ||
) |
Definition at line 3136 of file download.cc.
Referenced by MountPoint::SetupHttpTuning().
bool download::DownloadManager::SetShardingPolicy | ( | const ShardingPolicySelector | type | ) |
Definition at line 3179 of file download.cc.
Referenced by MountPoint::CreateDownloadManagers().
void download::DownloadManager::SetTimeout | ( | const unsigned | seconds_proxy, |
const unsigned | seconds_direct | ||
) |
Sets two timeout values for proxied and for direct connections, respectively. The timeout counts for all sorts of connection phases, DNS, HTTP connect, etc.
Definition at line 2162 of file download.cc.
Referenced by TalkManager::MainResponder(), MountPoint::SetupExternalDownloadMgr(), and MountPoint::SetupHttpTuning().
|
private |
Sets the URL specific options such as host to use and timeout. It might also set an error code, in which case the further processing should react on.
Definition at line 1027 of file download.cc.
Referenced by Fetch(), and MainDownload().
void download::DownloadManager::ShardProxies | ( | ) |
Enable proxy sharding
Definition at line 3065 of file download.cc.
Referenced by MountPoint::CreateDownloadManagers().
void download::DownloadManager::Spawn | ( | ) |
Spawns the I/O worker thread and switches the module in multi-threaded mode. No way back except Fini(); Init();
Definition at line 1963 of file download.cc.
Referenced by LibContext::EnableMultiThreaded(), and Spawn().
|
private |
Removes DIRECT from a list of ';' and '|' separated proxies.
Definition at line 2757 of file download.cc.
Referenced by SetProxyChain().
void download::DownloadManager::SwitchHost | ( | ) |
Definition at line 2427 of file download.cc.
Referenced by manifest::Fetch(), and TalkManager::MainResponder().
|
private |
|
private |
Switches to the next host in the chain. If jobinfo is set, switch only if the current host is identical to the one used by jobinfo, otherwise another transfer has already done the switch.
Definition at line 2364 of file download.cc.
Referenced by SwitchHost(), and SwitchMetalink().
void download::DownloadManager::SwitchMetalink | ( | ) |
Definition at line 2435 of file download.cc.
Referenced by TalkManager::MainResponder().
|
private |
|
private |
Jumps to the next proxy in the ring of forward proxy servers. Selects one randomly from a load-balancing group.
Allow for the fact that the proxy may have already been failed by another transfer, or that the proxy may no longer be part of the current load-balancing group.
Definition at line 2294 of file download.cc.
void download::DownloadManager::SwitchProxyGroup | ( | ) |
Switches to the next load-balancing group of proxy servers.
Definition at line 3093 of file download.cc.
Referenced by TalkManager::MainResponder().
|
private |
Update currently selected proxy
Definition at line 3002 of file download.cc.
Referenced by CloneProxyConfig(), ProbeGeo(), RebalanceProxiesUnlocked(), SetProxyChain(), and SwitchProxy().
|
private |
Adds transfer time and downloaded bytes to the global counters.
Definition at line 1292 of file download.cc.
void download::DownloadManager::UseSystemCertificatePath | ( | ) |
Definition at line 3175 of file download.cc.
Referenced by MountPoint::CreateDownloadManagers(), and publish::Repository().
|
private |
Validates a string of the form "1,4,2,3" representing in which order the the expected_size number of hosts should be put for optimal geographic proximity. Returns false if the reply_order string is invalid, otherwise fills in the reply_vals array with zero-based order indexes (e.g. [0,3,1,2]) and returns true.
Definition at line 2719 of file download.cc.
Referenced by GeoSortServers().
|
private |
Checks if the name resolving information is still up to date. The host object should be one from the current load-balance group. If the information changed, gather new set of resolved IPs and, if different, exchange them in the load-balance group on the fly. In the latter case, also rebalance the proxies. The options mutex needs to be open.
Returns true if proxies may have changed.
Definition at line 1227 of file download.cc.
|
private |
Checks the result of a curl download and implements the failure logic, such as changing the proxy server. Takes care of cleanup.
Definition at line 1470 of file download.cc.
Referenced by Fetch(), and MainDownload().
|
private |
Writes and reads should be atomic because reading happens in a different thread than writing.
Definition at line 470 of file download.h.
Referenced by Fetch(), MainDownload(), SwitchHostInfo(), and SwitchProxy().
|
private |
Definition at line 464 of file download.h.
Referenced by Clone(), and SetCredentialsAttachment().
|
private |
Definition at line 309 of file download.h.
Referenced by DownloadManager(), and MainDownload().
|
private |
Definition at line 311 of file download.h.
|
private |
Definition at line 343 of file download.h.
Referenced by Clone(), EnableHTTPTracing(), and Fetch().
|
private |
Definition at line 333 of file download.h.
Referenced by Clone(), EnableInfoHeader(), and Fetch().
|
private |
Endless retries for a failed download (hard failures will result in abort)
Definition at line 419 of file download.h.
Referenced by Clone(), and SetFailoverIndefinitely().
|
private |
Definition at line 335 of file download.h.
Referenced by Clone(), and EnableRedirects().
|
private |
Repo name. Needed for the re-try logic if a download was unsuccessful Used in sharding policy && Interrupted()
Definition at line 424 of file download.h.
|
private |
Definition at line 310 of file download.h.
|
private |
Health check for the proxies
Health check is shared between all download managers. As such shared pointers are used to allow for proper clean-up afterwards in the destructor (We cannot assume the order in which the download managers are stopped)
Definition at line 415 of file download.h.
|
private |
Definition at line 344 of file download.h.
Referenced by AddHTTPTracingHeader(), and Clone().
|
private |
Ignore signature failures during download. In general it is a bad idea to do this!
Definition at line 341 of file download.h.
Referenced by Clone(), and EnableIgnoreSignatureFailures().
|
static |
Definition at line 172 of file download.h.
Referenced by DownloadManager(), and MountPoint::SetupDnsTuning().
|
static |
Definition at line 173 of file download.h.
Referenced by DownloadManager(), and MountPoint::SetupDnsTuning().
|
static |
The rtt to a stratum 1 could not be determined because the stratum 1 was unreachable.
Definition at line 166 of file download.h.
Referenced by TalkManager::FormatHostInfo(), and ProbeHosts().
|
static |
The stratum 1 server was put in order according to a Geo-API result
Definition at line 170 of file download.h.
Referenced by TalkManager::FormatHostInfo(), and ProbeGeo().
|
static |
No attempt was made to order stratum 1 servers
Definition at line 161 of file download.h.
Referenced by TalkManager::FormatHostInfo(), and SetHostChain().
|
static |
Definition at line 174 of file download.h.
Referenced by UpdateProxiesUnlocked().
|
private |
Definition at line 324 of file download.h.
Referenced by DownloadManager(), GeoSortServers(), GetHostInfo(), GetMetalinkInfo(), GetProxyInfo(), GetTimeout(), ProbeGeo(), ProbeHosts(), RebalanceProxies(), SetCredentialsAttachment(), SetDnsParameters(), SetDnsServer(), SetDnsTtlLimits(), SetHostChain(), SetHostResetDelay(), SetIpPreference(), SetLowSpeedLimit(), SetMaxIpaddrPerProxy(), SetMetalinkChain(), SetMetalinkResetDelay(), SetProxyChain(), SetProxyGroupResetDelay(), SetProxyTemplates(), SetRetryParameters(), SetTimeout(), SwitchHostInfo(), SwitchProxy(), and SwitchProxyGroup().
|
private |
Definition at line 325 of file download.h.
Referenced by DownloadManager(), and Fetch().
|
private |
Definition at line 315 of file download.h.
Referenced by DownloadManager(), Fetch(), and Spawn().
|
private |
Name of the download manager (default is "standard")
Definition at line 429 of file download.h.
Referenced by Fetch(), GeoSortServers(), MainDownload(), ProbeHosts(), SetDnsServer(), SetProxyChain(), SetShardingPolicy(), Spawn(), SwitchHostInfo(), SwitchProxy(), and UpdateProxiesUnlocked().
|
private |
Definition at line 331 of file download.h.
Referenced by Clone(), and SetRetryParameters().
|
private |
Definition at line 332 of file download.h.
Referenced by Clone(), and SetRetryParameters().
|
private |
Definition at line 326 of file download.h.
Referenced by Clone(), GetDnsServer(), and SetDnsServer().
|
private |
Definition at line 351 of file download.h.
Referenced by Clone(), GetHostInfo(), num_hosts(), ProbeGeo(), ProbeHosts(), SetHostChain(), SetHostResetDelay(), SwitchHost(), and UpdateProxiesUnlocked().
|
private |
Created by SetHostChain(), filled by probe_hosts. Contains time to get .cvmfschecksum in ms. -1 is unprobed, -2 is error.
Definition at line 356 of file download.h.
Referenced by Clone(), GetHostInfo(), ProbeGeo(), ProbeHosts(), and SetHostChain().
|
private |
If a proxy has IPv4 and IPv6 addresses, which one to prefer
Definition at line 439 of file download.h.
Referenced by Clone(), opt_ip_preference(), SetIpPreference(), and SetProxyChain().
|
private |
Definition at line 334 of file download.h.
Referenced by DownloadManager(), and SetDnsParameters().
|
private |
Definition at line 329 of file download.h.
Referenced by Clone(), and SetLowSpeedLimit().
|
private |
Definition at line 330 of file download.h.
Referenced by Clone(), and SetRetryParameters().
|
private |
Definition at line 347 of file download.h.
Referenced by CheckMetalinkChain(), Clone(), GetMetalinkInfo(), num_metalinks(), SetMetalinkChain(), SetMetalinkResetDelay(), and SwitchMetalink().
|
private |
Definition at line 348 of file download.h.
Referenced by CheckMetalinkChain().
|
private |
Overall number of proxies summed over all the groups.
Definition at line 377 of file download.h.
Referenced by CloneProxyConfig(), ProbeGeo(), and SetProxyChain().
|
private |
Sorted list of currently active proxy URLs (for log messages)
Definition at line 393 of file download.h.
Referenced by UpdateProxiesUnlocked().
|
private |
The original proxy fallback list provided to SetProxyChain.
Definition at line 385 of file download.h.
Referenced by CloneProxyConfig(), GetFallbackProxyList(), and SetProxyChain().
|
private |
Definition at line 359 of file download.h.
Referenced by ChooseProxyUnlocked(), CloneProxyConfig(), current_proxy_group(), GetProxyInfo(), ProbeGeo(), RebalanceProxiesUnlocked(), SetProxyChain(), SwitchProxy(), SwitchProxyGroup(), and UpdateProxiesUnlocked().
|
private |
The current load-balancing group (first dimension in opt_proxy_groups_).
Definition at line 363 of file download.h.
Referenced by CloneProxyConfig(), current_proxy_group(), GetProxyInfo(), ProbeGeo(), SetProxyChain(), SwitchProxy(), and SwitchProxyGroup().
|
private |
Number of proxy servers that failed within current load-balance group. Between 0 and (*opt_proxy_groups_)[opt_proxy_groups_current_].size().
Definition at line 368 of file download.h.
Referenced by CloneProxyConfig(), ProbeGeo(), RebalanceProxiesUnlocked(), SetProxyChain(), SwitchProxy(), and UpdateProxiesUnlocked().
|
private |
The index of the first fallback proxy group. If there are none, it is set to the number of regular proxy groups.
Definition at line 373 of file download.h.
Referenced by CloneProxyConfig(), GetProxyInfo(), ProbeGeo(), and SetProxyChain().
|
private |
Definition at line 462 of file download.h.
Referenced by Clone(), SetProxyGroupResetDelay(), and SwitchProxy().
|
private |
The original proxy list provided to SetProxyChain.
Definition at line 381 of file download.h.
Referenced by CloneProxyConfig(), GetProxyList(), and SetProxyChain().
|
private |
Load-balancing map of currently active proxies
Definition at line 389 of file download.h.
Referenced by ChooseProxyUnlocked(), ProbeGeo(), SetProxyChain(), and UpdateProxiesUnlocked().
|
private |
Shard requests across multiple proxies via consistent hashing
Definition at line 397 of file download.h.
Referenced by CloneProxyConfig(), ShardProxies(), and UpdateProxiesUnlocked().
|
private |
Definition at line 328 of file download.h.
Referenced by Clone(), GetTimeout(), and SetTimeout().
|
private |
Definition at line 327 of file download.h.
Referenced by Clone(), GetTimeout(), and SetTimeout().
|
private |
More than one proxy group can be considered as group of primary proxies followed by backup proxy groups, e.g. at another site. If opt_proxy_groups_reset_after_ is > 0, cvmfs will reset its proxy group to the first one after opt_proxy_groups_reset_after_ seconds are elapsed.
Definition at line 460 of file download.h.
Referenced by SetProxyChain(), SetProxyGroupResetDelay(), SwitchProxy(), and SwitchProxyGroup().
|
private |
Definition at line 461 of file download.h.
Referenced by RebalanceProxiesUnlocked(), SetProxyChain(), SetProxyGroupResetDelay(), and SwitchProxy().
|
private |
Definition at line 318 of file download.h.
Referenced by Fetch(), MainDownload(), and Spawn().
|
private |
Definition at line 316 of file download.h.
Referenced by MainDownload(), and Spawn().
|
private |
Definition at line 306 of file download.h.
|
private |
Definition at line 307 of file download.h.
Referenced by MainDownload().
|
private |
Definition at line 308 of file download.h.
Referenced by Clone(), and DownloadManager().
|
private |
Definition at line 305 of file download.h.
Referenced by DownloadManager(), GeoSortServers(), and UpdateProxiesUnlocked().
|
private |
Used to replace @ in the Geo-API calls to order Stratum 1 servers, in case the active proxy is DIRECT (no proxy). Should be a UUID identifying the host.
Definition at line 446 of file download.h.
Referenced by Clone(), and SetProxyTemplates().
|
private |
Used to force a value for @ in the Geo-API calls to order Stratum 1 servers. If empty, the fully qualified domain name of the active proxy server is used.
Definition at line 452 of file download.h.
Referenced by Clone(), and SetProxyTemplates().
|
private |
Used to resolve proxy addresses (host addresses are resolved by the proxy).
Definition at line 434 of file download.h.
Referenced by Clone(), DownloadManager(), SetDnsParameters(), SetDnsServer(), SetDnsTtlLimits(), SetMaxIpaddrPerProxy(), and SetProxyChain().
|
private |
Sharding policy deciding which proxy should be chosen for each download request
Sharding policy is shared between all download managers. As such shared pointers are used to allow for proper clean-up afterwards in the destructor (We cannot assume the order in which the download managers are stopped)
Definition at line 407 of file download.h.
Referenced by Clone(), and SetProxyChain().
|
private |
Carries the path settings for SSL certificates
Definition at line 475 of file download.h.
Referenced by Clone(), and UseSystemCertificatePath().
|
private |
Definition at line 314 of file download.h.
Referenced by Spawn().
|
private |
Definition at line 312 of file download.h.
|
private |
Definition at line 319 of file download.h.
Referenced by CallbackCurlSocket(), and MainDownload().
|
private |
Definition at line 321 of file download.h.
Referenced by CallbackCurlSocket(), and MainDownload().
|
private |
Definition at line 322 of file download.h.
Referenced by CallbackCurlSocket(), and DownloadManager().
|
private |
Definition at line 320 of file download.h.
Referenced by CallbackCurlSocket(), and MainDownload().