Recover Katello event daemon after forced restart
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 55/100
Research direction
Start with the Katello event daemon startup logic that uses Process.kill(0, pid_from_file), then review the linked CI failures and the sosreport sequence. Done means startup ownership uses a lifetime file lock that is released after SIGKILL, while the PID file remains diagnostic and the replacement container starts the daemon again.
Written by the indexing model from the issue text.
Description
Repeated foremanctl CI runs can leave katello_events permanently reported as Not running after the Foreman container is restarted.
The failure is visible in multiple unrelated PRs, for example:
- https://github.com/theforeman/foremanctl/actions/runs/36239740124/job/108397884953
- https://github.com/theforeman/foremanctl/actions/runs/36239516915/job/108397273654
- https://github.com/theforeman/foremanctl/actions/runs/36239516915/job/108397273714
The sosreport from the first job shows the sequence clearly:
foreman.servicestarts the Katello event daemon and writes its PID.- A later restart exceeds the 10-second container stop timeout and Podman sends
SIGKILL. - The runtime directory persists across replacement containers, so the daemon PID file survives.
- The replacement Foreman container serves requests, but there is no new
Katello event daemon startedlog entry and/api/v2/pingreportskatello_events: Not running.
Katello currently considers the daemon started when Process.kill(0, pid_from_file) succeeds. A stale PID can therefore point at an unrelated process after the container is replaced and prevent the daemon from starting indefinitely.
The startup ownership should use a lifetime file lock instead. The kernel releases that lock even after SIGKILL, while the PID file can remain available for diagnostics without being the source of truth.
- Dominant language
- Python
- Stars
- 26
- Forks
- 56
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 34
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from theforeman/foremanctl
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
theforeman/foremanctl#982 · 1 comment ·
Maintainers usually reply within 1 day
-
Stop checking the removed Katello event daemonPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
theforeman/foremanctl#913 ·
Maintainers usually reply within 1 day
-
Wait for Foreman tasks in backup integration testsPossibly taken @jakduch claimed this 43 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
theforeman/foremanctl#894 ·
Maintainers usually reply within 1 day
-
Serialize image service pullsPossibly taken @jakduch claimed this 43 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
theforeman/foremanctl#881 ·
Maintainers usually reply within 1 day
-
Use a larger fapolicyd subject cache in deployment testsPossibly taken @jakduch claimed this 43 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
theforeman/foremanctl#880 ·
Maintainers usually reply within 1 day
All issues in theforeman/foremanctl
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
bigbio/sdrf-pipelines#372 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 84/100
521xueweihan/HelloGitHub#4297 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
aws-samples/sample-per-model-bedrock#822 ·
Maintainers usually reply within 1 day
-
area:study-data p2-high ready-for-agent type:chore
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
fderuiter/deruiter.dev#3706 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
awslabs/visual-asset-management-system#1234 ·
Maintainers usually reply within 1 day