media: run qbit_manage under Dagu as apps, alert when a pass stops landing #388
No reviewers
Labels
No labels
audit-work
bug
docs
general-admin
major-upgrade
needs-vps-sync
new-service
on-hold
outside-work
post-podman
renovate
upstream
vps
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
mysticalsoap/docker!388
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/qbit-manage-dagu"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
qbit_manage scheduled itself inside its container with no completion signal anywhere, so when it started exiting at startup on qBittorrent 5.2.4 (#383) nothing noticed for six days. It also ran as root: the compose carried the privilege-drop cap set but never the
PUID/PGIDthat make the image's init drop, anddocker execwould bypass that init anyway. Thejust restart-invidious/just prunerecipes and the "ad-hoc run" docs line were broken the same way the bare Dagu CLI is (no auth env in the exec).Fix
sleep infinity,user: apps, caps dropped);dagu/dags/qbit-manage.yamlexecsmedia/qbit_manage/run.shevery six hours, which reads the API key from the secret and runs one--runpass. The schedule leaves the compose env.dagu/jobs/common/mark_success.sh(generic, in dagu-tools, which now mounts the textfile dir) writesqbit_manage_last_success_timestamp_secondsonly after the pass succeeds.QbitManageStale(>13h, two missed passes) andQbitManageMetricMissing(absent 6h), same shape as the backup and image-scan groups.just run-job <name>supplies the Dagu CLI's basic-auth env;restart-invidiousandpruneuse it.Verification
Live, 2026-10-07:
docker top qbit_manage: tini andsleep infinityasapps. Log and backup dirs reowned by hand first (the step the setup page now has).just run-job qbit-manage:Result: Succeeded; the pass log ends inExiting Qbit_manage, the log file is nowapps:apps;qbit_manage.promwrittenapps:appswith the timestamp.just recreate prometheus:promtool check rules36 rules OK;/api/v1/ruleslistsQbitManageStaleandQbitManageMetricMissing;time() - qbit_manage_last_success_timestamp_secondsreturns 26 s.QbitManageMetricMissingsat pending for the minutes between the recreate and the first pass, as designed, and clears with the metric present.just --listshowsrun-job;dagu statusinside the container works with the env the recipe sets.Closes #385
🤖 Generated with Claude Code