Skip to content

Fix: Implement fallback method for acmetool account URL retrieval #546

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

supere989
Copy link

This PR addresses an issue where the 'cmdeploy dns' command fails when unable to retrieve the Let's Encrypt account URL through the 'acmetool account-url' command.

Changes:

  • Implemented a fallback method in rdns.py to read the account URL directly from the filesystem
  • Added error handling for cases where the acmetool command fails
  • Ensures DNS deployment can proceed even if the primary method fails

The changes have been tested and verified to work in scenarios where the acmetool command fails to return the account URL.

When acmetool account-url command fails, directly read the URL from filesystem.
This ensures cmdeploy dns can proceed even if the acmetool command
is not functioning properly.

Fixes chatmail#545
for le_dir in le_dirs:
acct_dirs = glob.glob(os.path.join(le_dir, "*"))
for acct_dir in acct_dirs:
url_file = os.path.join(acct_dir, "url")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

on two hosts where i can ssh in, this 'url' file does not exist.

@missytake
Copy link
Contributor

Hm, we can't reproduce the issue...

The changes have been tested and verified to work in scenarios where the acmetool command fails to return the account URL.

have you more informations about these scenarios? Which operating systems did you test? Note that we recommend and only test on Debian 12 machines.

@hpk42
Copy link
Contributor

hpk42 commented Apr 10, 2025

Could you maybe supply the full output for "cmdeploy dns" resulting in acmetool-account-url problems?

@supere989
Copy link
Author

I have patched my running configuration already, i'll see if i have the logs still.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants