-
Notifications
You must be signed in to change notification settings - Fork 54
LCORE-166: add healthcheck for llama stack and lightspeed stack to docker compose #416
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LCORE-166: add healthcheck for llama stack and lightspeed stack to docker compose #416
Conversation
WalkthroughAdds healthcheck blocks for llama-stack and lightspeed-stack in docker-compose.yaml and changes lightspeed-stack’s depends_on to wait for llama-stack to be healthy via condition: service_healthy. No other files changed. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant DC as docker-compose
participant Llama as llama-stack
participant Light as lightspeed-stack
DC->>Llama: Start container
Note over Llama: Healthcheck: /v1/health<br/>interval 10s, timeout 5s, retries 3, start_period 15s
DC-->>Llama: Monitor health
DC->>Light: Start gated by<br/>llama-stack service_healthy
Note over Light: Healthcheck: /liveness<br/>interval 10s, timeout 5s, retries 3, start_period 5s
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. ✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (3)
docker-compose.yaml (3)
15-20: Healthcheck looks good; confirm curl availability and consider adding timeoutsThe exec-form healthcheck is fine, but it assumes curl is present in the llama-stack image. If curl isn’t installed, the container will be marked unhealthy regardless of service state. Also, adding connection and overall timeouts makes failures faster and less noisy.
Consider this tweak:
- test: ["CMD", "curl", "-f", "http://localhost:8321/v1/health"] + test: ["CMD-SHELL", "curl -fsS --connect-timeout 2 --max-time 3 http://127.0.0.1:8321/v1/health || exit 1"]
- If curl isn’t available, either switch to whatever tool you already have (wget/busybox wget) or install curl in the Dockerfile.
- Verify that 15s start_period is sufficient for llama initialization in your environment; if the model warms up longer, bump this value to avoid early unhealthy marks.
I can propose Dockerfile snippets for your base image to add curl if needed.
34-35: Ensure your Compose/CLI version supports depends_on.conditionUsing
depends_on: { llama-stack: { condition: service_healthy } }is supported by modern Docker Compose (Compose Spec). Some older Compose v3 implementations and Swarm ignore the condition. Please confirm the team’s local and CI environments run a Compose version that honors health-based conditions.Note: This only gates initial startup. If llama later becomes unhealthy, lightspeed won’t restart automatically because of this dependency. Make sure lightspeed handles reconnects, or consider service-level retry logic.
38-43: Add timeouts to the lightspeed healthcheck and verify the endpoint existsSame curl availability concern applies here. Also, adding timeouts is recommended. If the app sometimes boots slowly, consider increasing
start_periodfrom 5s.Suggested tweak:
- test: ["CMD", "curl", "-f", "http://localhost:8080/liveness"] + test: ["CMD-SHELL", "curl -fsS --connect-timeout 2 --max-time 3 http://127.0.0.1:8080/liveness || exit 1"]Please verify that
/livenessis the intended path (versus e.g.,/health,/livez, or/readyz) and that the server listens on 0.0.0.0:8080 inside the container.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
docker-compose.yaml(2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: build-pr
tisnik
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you
Description
added healthcheck for llama stack and lightspeed stack to docker compose
Type of change
Related Tickets & Documents
Checklist before requesting a review
Testing
Summary by CodeRabbit