backport 1.10 - fix(lightspeed): pre-create /rag-content/vector_db/notebooks in init …#449
Conversation
PR Summary by QodoFix Lightspeed RAG init to pre-create notebooks dir and relax /rag-content perms Description
Diagram
High-Level Assessment
Files changed (1)
|
Code Review by Qodo
Context used✅ Tickets:
RHDHBUGS-3371 1.
|
There was a problem hiding this comment.
@JslYoon You'll need to also bump the chart version, run the pre-commit hooks and push the resulting changes. See the checklist on the PR description. Thanks.
Jdubrick
left a comment
There was a problem hiding this comment.
@JslYoon @rm3l , I think we need a combination of podSecurityContext and making sure the permissions aren't copied during init. I was testing this locally and chmod fails on its own. This issue is really stemming from the fact the RAG containers UID is 65532 and not 1001, but this suggestion should match what OCP already does, which is set a blanket UID for the Pod. Since this is only failing on vanilla Kubernetes. What do you think?
3fea267 to
0caaa25
Compare
rm3l
left a comment
There was a problem hiding this comment.
I think we need a combination of
podSecurityContextand making sure the permissions aren't copied during init. I was testing this locally andchmodfails on its own. This issue is really stemming from the fact the RAG containers UID is65532and not1001, but this suggestion should match what OCP already does, which is set a blanket UID for the Pod. Since this is only failing on vanilla Kubernetes. What do you think?
@Jdubrick @JslYoon In the current non-OCP install docs (e.g., EKS), we've been instructing users to only set upstream.backstage.podSecurity.fsGroup to a random value. I feel like we only need to set this here (even the runAsUser or runAsGroup seem unncessary). The most important point IMO is that the chmod -R a+rwX /rag-content won't work as the root volume is still owned by root. So you would need to chmod the subdirectories instead (chmod -R a+rwX /rag-content/vector_db /rag-content/embeddings_model).
Having fsGroup set on non-OCP would be sufficient to get the supplementary GID propagated to the container process.
5984355 to
15579c7
Compare
…id immutable upgrade errors (redhat-developer#427) The `<release>-create-sonataflow-database` Job uses a fixed name across chart versions. When a field in the rendered pod spec changes between versions (e.g. the pinned PostgreSQL image digest), an in-place `helm upgrade` of an Orchestrator-enabled release tries to patch the Job's immutable `spec.template` and fails: Job.batch "<release>-create-sonataflow-database" is invalid: spec.template: ... field is immutable Use a versioned name `<release>-create-sf-db-<chart-version>` so each chart version gets a distinct Job (recreated instead of patched). This is the minimal part of redhat-developer#407 needed to fix the upgrade; the fail-hard / configurable backoffLimit changes (RHDHBUGS-2577) are intentionally left out of the 1.10 line. Fixes RHDHBUGS-3325. Targets 1.10.1. Signed-off-by: Gustavo Lira <guga.java@gmail.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Lucas <lyoon@redhat.com>
15579c7 to
15a15c5
Compare
|



…container
On EKS/AKS, the RAG init container populates /rag-content/ but never creates the notebooks subdirectory. At runtime, llama-stack tries to write /rag-content/vector_db/notebooks/faiss_store.db and fails with PermissionError because it cannot create the directory on a volume it doesn't own. OCP avoids this via fsGroup/supplemental group defaults.
The fix pre-creates the directory and widens permissions before the sidecar starts, matching the fix the operator already applies via chmod -R 777 for the rest of vector_db.
Fixes: RHDHBUGS-3371
Description of the change
Which issue(s) does this PR fix or relate to
How to test changes / Special notes to the reviewer
Checklist
Chart.yamlaccording to Semantic Versioning.values.yamland added to the corresponding README.md. The pre-commit utility can be used to generate the necessary content. Runpre-commit run --all-filesto run the hooks and then push any resulting changes. The pre-commit Workflow will enforce this and warn you if needed.pre-commithook.ct lintcommand.