cdist/cdist
Evil Ham a696f3cf00 [__letsencrypt_cert] Revamp explorers, add locking.
This would fix #839

Certbot uses locking [1] even for read-only operations and does not properly
use exit codes, which means that sometimes it would print:
"Another instance of Certbot is already running" and exit with success.

However, the previous explorers would take that as the certificate being absent
and would trigger code generation.

The issue was made worse by having many explorers running certbot, so for N
certificates, we'd run certbot N*4 times, potentially "in parallel".

[1]: https://certbot.eff.org/docs/using.html#id5

This patch joins all explorers in one to avoid starting multiple remote python
processes and uses a cdist-specific lock in /tmp/certbot.cdist.lock with a
60 seconds timeout.

It has been tested with certbot 0.31.0 and 0.17 that the:

    from certbot.main import main

trick works. It is somewhat well documented so it can be somewhat relied upon.
2021-05-10 12:10:00 +02:00
..
conf [__letsencrypt_cert] Revamp explorers, add locking. 2021-05-10 12:10:00 +02:00
core Improve unfinished object requirements bool check 2021-04-06 19:35:14 +02:00
exec Unify string formatting 2021-03-31 08:19:34 +02:00
preos/debootstrap Fix log message string formatting 2021-03-31 08:19:28 +02:00
scan Unify string formatting 2021-03-31 08:19:34 +02:00
sphinxext Fix man build failure in newer sphinx versions 2020-06-01 20:22:40 +02:00
test Unify string formatting 2021-03-31 08:19:34 +02:00
util Unify string formatting 2021-03-31 08:19:34 +02:00
__init__.py [bin/cdist] Fix Python version check 2021-04-17 09:57:10 +02:00
argparse.py Fix log message string formatting 2021-03-31 08:19:28 +02:00
autil.py Add archiving support. 2017-08-09 16:56:02 +02:00
banner.py Some pylint cleaning. 2017-08-22 10:58:30 +02:00
config.py Minor refactoring and remove code duplication 2021-04-07 10:25:26 +02:00
configuration.py Restrict colored_output value to always/never/auto. 2020-06-06 13:45:31 +02:00
emulator.py Unify string formatting 2021-03-31 08:19:34 +02:00
flock.py Fix emulator colored logging 2020-06-11 14:16:37 +02:00
hostsource.py Do not subclass object 2020-06-21 16:53:47 +02:00
info.py Merge branch 'lint/py3-classes' into 'master' 2020-06-21 17:54:56 +02:00
install.py Fix log message string formatting 2021-03-31 08:19:28 +02:00
integration.py Fix paths to cdist executable 2020-11-11 15:05:04 +01:00
inventory.py Fix log message string formatting 2021-03-31 08:19:28 +02:00
log.py Merge branch 'lint/no-python-shebangs' into 'master' 2020-06-21 17:53:44 +02:00
message.py Unify string formatting 2021-03-31 08:19:34 +02:00
mputil.py Further improve parallel execution. 2017-07-26 17:39:07 +02:00
preos.py Fix log message string formatting 2021-03-31 08:19:28 +02:00
shell.py Unify string formatting 2021-03-31 08:19:34 +02:00