Skip to content

Handle acme.sh renewal skip exit code - #72

Merged
Lash-L merged 1 commit into
mainfrom
agent/handle-acme-renew-skip
Aug 11, 2026
Merged

Handle acme.sh renewal skip exit code#72
Lash-L merged 1 commit into
mainfrom
agent/handle-acme-renew-skip

Conversation

@Lash-L

@Lash-L Lash-L commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Summary

  • treat acme.sh's documented RENEW_SKIP exit code (2) as a successful no-op
  • log when certificate renewal is skipped because it is not due
  • add regression coverage while preserving failures for other nonzero exit codes

Root cause

CertificateManager._run_acme() treated every nonzero acme.sh exit code as fatal. acme.sh uses exit code 2 when renewal is intentionally skipped, so a valid existing certificate could cause server startup to fail.

Impact

Server startup can continue and install/use the existing certificate when acme.sh reports that renewal is not due. Genuine ACME failures still raise RuntimeError.

Fixes #71

Validation

  • python -m pytest tests/test_certs.py -q — 6 passed
  • python -m pytest -q — 183 passed

@Lash-L
Lash-L marked this pull request as ready for review August 11, 2026 15:12
@Lash-L
Lash-L merged commit e1e2a0f into main Aug 11, 2026
3 checks passed
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.

certs.py treats acme.sh's benign "skip" exit code (2) as a fatal error

1 participant