1 |
Since key refresh is prone to failure, retry using exponential |
2 |
backoff with random jitter. This adds the following sync-openpgp-* |
3 |
configuration settings: |
4 |
|
5 |
sync-openpgp-key-refresh-retry-count = 40 |
6 |
|
7 |
Maximum number of times to retry key refresh if it fails. Between |
8 |
each key refresh attempt, there is an exponential delay with a |
9 |
constant multiplier and a uniform random multiplier between 0 and 1. |
10 |
|
11 |
sync-openpgp-key-refresh-retry-delay-exp-base = 2 |
12 |
|
13 |
The base of the exponential expression. The exponent is the number |
14 |
of previous refresh attempts. |
15 |
|
16 |
sync-openpgp-key-refresh-retry-delay-max = 60 |
17 |
|
18 |
Maximum delay between each retry attempt, in units of seconds. This |
19 |
places a limit on the length of the exponential delay. |
20 |
|
21 |
sync-openpgp-key-refresh-retry-delay-mult = 4 |
22 |
|
23 |
Multiplier for the exponential delay. |
24 |
|
25 |
sync-openpgp-key-refresh-retry-overall-timeout = 1200 |
26 |
|
27 |
Combined time limit for all refresh attempts, in units of seconds. |
28 |
|
29 |
Bug: https://bugs.gentoo.org/649276 |
30 |
|
31 |
Zac Medico (4): |
32 |
Add ForkExecutor (bug 649588) |
33 |
Add ExponentialBackoff and RandomExponentialBackoff |
34 |
Add retry decorator (API inspired by tenacity) |
35 |
rsync: add key refresh retry (bug 649276) |
36 |
|
37 |
cnf/repos.conf | 5 + |
38 |
man/portage.5 | 19 +++ |
39 |
pym/portage/repository/config.py | 22 ++++ |
40 |
pym/portage/sync/modules/rsync/rsync.py | 16 ++- |
41 |
pym/portage/sync/syncbase.py | 85 +++++++++++- |
42 |
pym/portage/tests/util/futures/test_retry.py | 147 +++++++++++++++++++++ |
43 |
pym/portage/util/_eventloop/EventLoop.py | 45 ++++++- |
44 |
pym/portage/util/backoff.py | 48 +++++++ |
45 |
pym/portage/util/futures/executor/__init__.py | 0 |
46 |
pym/portage/util/futures/executor/fork.py | 130 +++++++++++++++++++ |
47 |
pym/portage/util/futures/futures.py | 6 + |
48 |
pym/portage/util/futures/retry.py | 178 ++++++++++++++++++++++++++ |
49 |
12 files changed, 697 insertions(+), 4 deletions(-) |
50 |
create mode 100644 pym/portage/tests/util/futures/test_retry.py |
51 |
create mode 100644 pym/portage/util/backoff.py |
52 |
create mode 100644 pym/portage/util/futures/executor/__init__.py |
53 |
create mode 100644 pym/portage/util/futures/executor/fork.py |
54 |
create mode 100644 pym/portage/util/futures/retry.py |
55 |
|
56 |
-- |
57 |
2.13.6 |