You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
serviceHealth reports 'All containers healthy' for exited or missing containers #114
mcp-server/src/prompts.ts:22 (morning-health-check asks for "unhealthy, restarting or exited" containers via this tool)
Details
It uses docker ps without -a, so exited/dead containers are never listed.
--format "table ..." always prints a header row, so ps || "No containers found." never triggers.
Only health=unhealthy is checked, so anything not running is treated as healthy.
Impact
The main health tool, and the daily health-check prompt built on it, report a healthy lab while a service is down.
Steps to reproduce
docker stop <some container> on the Pi.
Call homelab_serviceHealth: the container is missing from the list and the result ends with "All containers healthy."
Call it with service: "doesnotexist": header row plus "All containers healthy."
Suggested fix
Use docker ps -a, list containers whose state is exited, dead, restarting or created as problems, keep the unhealthy check, and report "No containers matched" when there are no data rows.
Acceptance criteria
Exited and restarting containers are reported as problems.
A non-matching service returns a clear "no container" message.
Activity