From 21bf74287c485d194e45de83d372ac9b8b63150c Mon Sep 17 00:00:00 2001 From: David Galloway Date: Thu, 26 Mar 2026 16:48:34 -0400 Subject: [PATCH] mgr/rook: copy all mgr Python modules into rook e2e test image The base image (quay.io/ceph/daemon-base:latest-main) may lag behind the source tree for any number of mgr Python modules. Rather than copying files individually as mismatches are discovered, copy all *.py files from src/pybind/mgr/ into /usr/share/ceph/mgr/ so the test image always reflects the current state of the codebase. Signed-off-by: David Galloway --- src/pybind/mgr/rook/ci/Dockerfile | 2 ++ src/pybind/mgr/rook/ci/scripts/bootstrap-rook-cluster.sh | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/pybind/mgr/rook/ci/Dockerfile b/src/pybind/mgr/rook/ci/Dockerfile index a4a134f03f6d..8a4f2c9a60c3 100644 --- a/src/pybind/mgr/rook/ci/Dockerfile +++ b/src/pybind/mgr/rook/ci/Dockerfile @@ -2,3 +2,5 @@ FROM quay.io/ceph/daemon-base:latest-main COPY ./tmp_build/orchestrator /usr/share/ceph/mgr/orchestrator COPY ./tmp_build/rook /usr/share/ceph/mgr/rook COPY ./tmp_build/ceph/ /usr/lib/python3.9/site-packages/ceph/ +COPY ./tmp_build/*.py /usr/share/ceph/mgr/ + diff --git a/src/pybind/mgr/rook/ci/scripts/bootstrap-rook-cluster.sh b/src/pybind/mgr/rook/ci/scripts/bootstrap-rook-cluster.sh index c8b56ccfb548..b0c33cc0ad88 100755 --- a/src/pybind/mgr/rook/ci/scripts/bootstrap-rook-cluster.sh +++ b/src/pybind/mgr/rook/ci/scripts/bootstrap-rook-cluster.sh @@ -68,6 +68,8 @@ build_ceph_image() { cp ./../../orchestrator/*.py tmp_build/orchestrator cp ../*.py tmp_build/rook cp -r ../../../../../src/python-common/ceph/ tmp_build/ + # Copy all mgr Python modules from source tree to override stale versions in base image + cp ${CEPH_DEV_FOLDER}/src/pybind/mgr/*.py tmp_build/ $CONTAINER_RUNTIME build --tag ${LOCAL_CEPH_IMG} . $CONTAINER_RUNTIME tag ${LOCAL_CEPH_IMG} ${CURR_CEPH_IMG} -- 2.47.3