fix: certbot deploy hook uses Podman REST API via Python; fix EL9 cgr…#71
Merged
ShawnMcKee merged 1 commit intomasterfrom Feb 24, 2026
Merged
Conversation
…oup/SELinux settings
Root cause: certbot container (Alpine-based) does not include the `podman`
binary, so the v1.0.0 deploy hook failed silently when trying to run
`podman restart`. Separately, the compose files used `cgroupns: private`
which crashes the testpoint container's internal systemd on EL9 hosts.
Diagnosed and fixed on psum01.aglt2.org (Feb 2026).
certbot-deploy-hook.sh (v1.0.0 → v2.0.0):
- Replace `podman restart` CLI call with Python HTTP client talking to
the Podman REST API over the mounted Unix socket
(/run/podman/podman.sock). python3 is available in the Alpine certbot
image; no additional packages required.
- Removes dependency on the `podman` binary inside the container.
- Add SHA256 checksum file (certbot-deploy-hook.sh.sha256).
docker-compose.testpoint-le{,-auto}.yml:
- testpoint: replace `privileged: true` + `cgroupns: private` with
`cgroup: host` + `/sys/fs/cgroup` volume mount + `tty: true`.
The old settings prevented systemd from running inside the container
on EL9. Remove `CAP_SYS_ADMIN` and `CAP_SYS_PTRACE` (not needed).
Increase healthcheck start_period to 60s (allows systemd more time).
- certbot: add `security_opt: label=disable` so SELinux does not block
the container from accessing the host Podman socket.
install-perfsonar-testpoint.md:
- Correct deploy hook troubleshooting path from /opt/certbot/deploy-hook.sh
to the correct /etc/letsencrypt/renewal-hooks/deploy/certbot-deploy-hook.sh.
- Expand deploy hook description: note Python REST API usage and the
SELinux security_opt requirement for EL9 hosts.
- Add actionable verification commands to the troubleshooting section.
55c270e to
968303b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…oup/SELinux settings
Root cause: certbot container (Alpine-based) does not include the
podmanbinary, so the v1.0.0 deploy hook failed silently when trying to runpodman restart. Separately, the compose files usedcgroupns: privatewhich crashes the testpoint container's internal systemd on EL9 hosts. Diagnosed and fixed on psum01.aglt2.org (Feb 2026).certbot-deploy-hook.sh (v1.0.0 → v2.0.0):
podman restartCLI call with Python HTTP client talking to the Podman REST API over the mounted Unix socket (/run/podman/podman.sock). python3 is available in the Alpine certbot image; no additional packages required.podmanbinary inside the container.docker-compose.testpoint-le{,-auto}.yml:
privileged: true+cgroupns: privatewithcgroup: host+/sys/fs/cgroupvolume mount +tty: true. The old settings prevented systemd from running inside the container on EL9. RemoveCAP_SYS_ADMINandCAP_SYS_PTRACE(not needed). Increase healthcheck start_period to 60s (allows systemd more time).security_opt: label=disableso SELinux does not block the container from accessing the host Podman socket.install-perfsonar-testpoint.md: