Add a global lock file to Certbot (#4369)

* add fasteners as a dependency

* add LOCK_FILE constant

* Add lock file to Certbot

* Move code to _run_subcommand

* move lock file path into CLI_CONSTANTS

* add --lock-path flag

* move locking code to separate function

* Add TestAcquireFileLock

* assert we log

* test lock contention

* add fasteners to certbot-auto

* Use a different lock file for each test in MainTest
This commit is contained in:
Brad Warren
2017-03-20 15:48:39 -07:00
committed by Peter Eckersley
parent 8011fb2879
commit 32122cfa21
8 changed files with 123 additions and 2 deletions
+1
View File
@@ -33,6 +33,7 @@ CLI_DEFAULTS = dict(
auth_cert_path="./cert.pem",
auth_chain_path="./chain.pem",
strict_permissions=False,
lock_path="/tmp/.certbot.lock",
debug_challenges=False,
)
STAGING_URI = "https://acme-staging.api.letsencrypt.org/directory"