backport 1.10 - fix(lightspeed): pre-create /data/vector_db/notebooks in init container#3042
Conversation
On EKS/AKS, the RAG init container copies /rag/. to /data/ but never creates the notebooks subdirectory. At runtime, llama-stack tries to write /rag-content/vector_db/notebooks/faiss_store.db (same volume, mounted at /rag-content in the sidecar) and fails with PermissionError because it cannot create the directory. OCP avoids this via fsGroup defaults; EKS/AKS do not. The fix pre-creates /data/vector_db/notebooks before the existing chmod so the directory exists and is writable when the sidecar starts. Fixes: RHDHBUGS-3371 Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
|
PR Summary by QodoFix Lightspeed RAG permissions by creating vector_db/notebooks in init container Description
Diagram
High-Level Assessment
Files changed (3)
|
Code Review by Qodo
Context used✅ Tickets:
RHDHBUGS-3371 1. World-writable vector DB
|



On EKS/AKS, the RAG init container copies /rag/. to /data/ but never creates the notebooks subdirectory. At runtime, llama-stack tries to write /rag-content/vector_db/notebooks/faiss_store.db (same volume, mounted at /rag-content in the sidecar) and fails with PermissionError because it cannot create the directory. OCP avoids this via fsGroup defaults; EKS/AKS do not.
The fix pre-creates /data/vector_db/notebooks before the existing chmod so the directory exists and is writable when the sidecar starts.
Fixes: RHDHBUGS-3371
Description
Which issue(s) does this PR fix or relate to
PR acceptance criteria
How to test changes / Special notes to the reviewer