From ed2a1af871a3c0d06eeedeaf1cce4db3bff2331a Mon Sep 17 00:00:00 2001 From: Lucas Yoon <94267691+JslYoon@users.noreply.github.com> Date: Wed, 1 Jul 2026 04:34:32 -0400 Subject: [PATCH] =?UTF-8?q?backport=201.10=20-=20fix(lightspeed):=20pre-cr?= =?UTF-8?q?eate=20/rag-content/vector=5Fdb/notebooks=20in=20init=20?= =?UTF-8?q?=E2=80=A6=20(#449)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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. Signed-off-by: Lucas * Apply suggestions from code review Co-authored-by: Armel Soro --------- Signed-off-by: Lucas Co-authored-by: Armel Soro --- .github/actions/test-charts/action.yml | 2 -- charts/backstage/Chart.yaml | 2 +- charts/backstage/README.md | 4 ++-- charts/backstage/values.schema.json | 2 +- charts/backstage/values.yaml | 6 ++++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/actions/test-charts/action.yml b/.github/actions/test-charts/action.yml index 53dc7a8c..0db175b7 100644 --- a/.github/actions/test-charts/action.yml +++ b/.github/actions/test-charts/action.yml @@ -199,8 +199,6 @@ runs: "--set route.enabled=false" "--set upstream.ingress.enabled=true" "--set global.host=rhdh.127.0.0.1.sslip.io" - "--set upstream.backstage.podSecurityContext.runAsUser=1001" - "--set upstream.backstage.podSecurityContext.runAsGroup=1001" "--set upstream.backstage.podSecurityContext.fsGroup=1001" ) fi diff --git a/charts/backstage/Chart.yaml b/charts/backstage/Chart.yaml index e125f335..fc802cef 100644 --- a/charts/backstage/Chart.yaml +++ b/charts/backstage/Chart.yaml @@ -47,4 +47,4 @@ sources: [] # Versions are expected to follow Semantic Versioning (https://semver.org/) # Note that when this chart is published to https://github.com/openshift-helm-charts/charts # it will follow the RHDH versioning 1.y.z -version: 6.1.1 +version: 6.1.2 diff --git a/charts/backstage/README.md b/charts/backstage/README.md index fbfda8ed..5f4ac3b2 100644 --- a/charts/backstage/README.md +++ b/charts/backstage/README.md @@ -1,7 +1,7 @@ # RHDH Backstage Helm Chart for OpenShift -![Version: 6.1.1](https://img.shields.io/badge/Version-6.1.1-informational?style=flat-square) +![Version: 6.1.2](https://img.shields.io/badge/Version-6.1.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) A Helm chart for deploying Red Hat Developer Hub, which is a Red Hat supported version of Backstage. @@ -29,7 +29,7 @@ For the **Generally Available** version of this chart, see: helm repo add bitnami https://charts.bitnami.com/bitnami helm repo add redhat-developer https://redhat-developer.github.io/rhdh-chart -helm install my-backstage redhat-developer/backstage --version 6.1.1 +helm install my-backstage redhat-developer/backstage --version 6.1.2 ``` ## Introduction diff --git a/charts/backstage/values.schema.json b/charts/backstage/values.schema.json index 2309f7e5..d31f14cc 100644 --- a/charts/backstage/values.schema.json +++ b/charts/backstage/values.schema.json @@ -185,7 +185,7 @@ "enabled": true, "initContainer": { "args": [ - "mkdir -p /tmp/data && echo 'Copying Lightspeed RAG data...' && cp -r /rag/vector_db /rag-content/ && cp -r /rag/embeddings_model /rag-content/ && echo 'Copy complete.'" + "mkdir -p /tmp/data && echo 'Copying Lightspeed RAG data...' && cp -r --no-preserve=mode,ownership /rag/vector_db /rag-content/ && cp -r --no-preserve=mode,ownership /rag/embeddings_model /rag-content/ && mkdir -p /rag-content/vector_db/notebooks && chmod -R a+rwX /rag-content/embeddings_model /rag-content/vector_db && echo 'Copy complete.'" ], "command": [ "sh", diff --git a/charts/backstage/values.yaml b/charts/backstage/values.yaml index 46fa1727..5f83aca7 100644 --- a/charts/backstage/values.yaml +++ b/charts/backstage/values.yaml @@ -135,8 +135,10 @@ global: - >- mkdir -p /tmp/data && echo 'Copying Lightspeed RAG data...' && - cp -r /rag/vector_db /rag-content/ && - cp -r /rag/embeddings_model /rag-content/ && + cp -r --no-preserve=mode,ownership /rag/vector_db /rag-content/ && + cp -r --no-preserve=mode,ownership /rag/embeddings_model /rag-content/ && + mkdir -p /rag-content/vector_db/notebooks && + chmod -R a+rwX /rag-content/embeddings_model /rag-content/vector_db && echo 'Copy complete.' env: [] # -- Resource requests/limits for the Lightspeed RAG bootstrap init container.