Skip to content

Add /healthcheck endpoint required by cl-mirrors mirrorservice#2

Open
amikhailov7 wants to merge 1 commit into
mainfrom
add-healthcheck-endpoint
Open

Add /healthcheck endpoint required by cl-mirrors mirrorservice#2
amikhailov7 wants to merge 1 commit into
mainfrom
add-healthcheck-endpoint

Conversation

@amikhailov7
Copy link
Copy Markdown
Collaborator

CloudLinux mirrorservice (https://repo.cloudlinux.com/cloudlinux/mirrorlists/cl-mirrors) filters mirrors lacking a fresh /healthcheck endpoint. Mirrors deployed via these playbooks previously registered in the service but never appeared in mirrorlist responses (status 404 on /healthcheck → marked unavailable).

CloudLinux mirrorservice (https://repo.cloudlinux.com/cloudlinux/mirrorlists/cl-mirrors)
filters mirrors lacking a fresh /healthcheck endpoint. Mirrors deployed via
these playbooks previously registered in the service but never appeared in
mirrorlist responses (status 404 on /healthcheck → marked unavailable).

This change wires up /healthcheck for all four playbooks (combined-mirror,
complete-swng-rsync, specific-version-rsync, yum-reposync):

1. Installs update-healthcheck.sh which writes /var/www/healthcheck.html in
   the format expected by the mirrorservice
   ("<source> | Status: OK | YYYY/MM/DD HH:MM:SS")
2. Exposes /healthcheck via nginx (HTTP + HTTPS) as a static alias
3. Adds ExecStartPost to the sync service so timestamp refreshes on every
   successful sync run
4. Generates initial /healthcheck during playbook run so the file exists
   before the first sync completes

Timestamp staleness threshold is 12h (mirrorservice config); the sync
schedule of every 4h keeps it well within the window.
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.

2 participants