| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Funny enough, a mirror address may be many different address. For ex:
ipv4/ipv6.
During testing (after a reboot) the ipv6 address was the first to be
returned when the server was built with an ipv4 address, therefor one of
tests was failing.
This commit adds support for probing all the different addresses that
may be linked to a given mirror url, if any address replies, the probe
is successful.
The caveat is that there will be N probes now with a fallback_timeout
possible time used, which will increase the probing time N times.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The implementation is done using nonblocking IO and then using select
to probe that the socket is writable once it is open.
This is not covering the case of the mirror host not being resolved,
this would fail with a nasty error.
There are at least 3 possible cases of probing:
* the socket is writtable just fine, which probes as true
* the socket fails to `select`, this means that the packets are being
dropped or that there is nothing listening there
* the socket fails to get a valid tcp connection, there is something
listening, but it is rejecting packets: closed connection
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When requesting a Mirrors object to return a mirror for a given URI
it will only return the mirrored uri if the mirror is valid.
When the mirror only has the uri and a fallback timeout of 0 it will
be considered as valid.
When the mirror has a fallback timeout, it will be probed (only once)
to check if we can actually open a connection to this address.
Depending on how this test goes out (returning true or false) this will
end up in setting the mirror as valid or invalid.
If Mirrors cannot find a valid mirror for a given URI it will return a
mirror with just the original URI so it is managed as a direct
connection and not a mirrored one.
|
|
|
|
|
|
| |
precedence
Still no implementation for probing
|
| |
|
| |
|
| |
|
|
|