]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/rook: copy updated dashboard cli and plugin into rook e2e test image
authorDavid Galloway <david.galloway@ibm.com>
Fri, 27 Mar 2026 13:39:01 +0000 (09:39 -0400)
committerDavid Galloway <david.galloway@ibm.com>
Fri, 27 Mar 2026 13:45:56 +0000 (09:45 -0400)
The base image's dashboard/cli.py imports Command directly from
mgr_module, which is incompatible with the new CLICommandBase API.
Copy the source tree's dashboard/cli.py and plugins/plugin.py into
the test image so that dashboard uses DBCommand, which is consistent
with the updated mgr_module.

Signed-off-by: David Galloway <david.galloway@ibm.com>
src/pybind/mgr/rook/ci/Dockerfile
src/pybind/mgr/rook/ci/scripts/bootstrap-rook-cluster.sh

index 8a4f2c9a60c34c996fb9180d20a7ade25a9f59f3..96919a53b342d485185e0dff75eaf220f4d46c84 100644 (file)
@@ -3,4 +3,5 @@ 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/
-
+COPY ./tmp_build/dashboard/cli.py /usr/share/ceph/mgr/dashboard/cli.py
+COPY ./tmp_build/dashboard_plugins/plugin.py /usr/share/ceph/mgr/dashboard/plugins/plugin.py
index a18f84d488232b3e34726cd5fd5987e1defb4680..b59c1a730e0cb5dce08af37b7e4e09fceed3850d 100755 (executable)
@@ -64,13 +64,18 @@ build_ceph_image() {
     CURR_CEPH_IMG=$(grep -E '^\s*image:\s+' $CLUSTER_SPEC | sed 's/.*image: *\([^ ]*\)/\1/')
 
     cd ${CEPH_DEV_FOLDER}/src/pybind/mgr/rook/ci
-    mkdir -p tmp_build/rook tmp_build/orchestrator
+    mkdir -p tmp_build/rook tmp_build/orchestrator tmp_build/dashboard tmp_build/dashboard_plugins
     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/
 
+    # Copy updated dashboard cli to match new mgr_module API
+    cp ${CEPH_DEV_FOLDER}/src/pybind/mgr/dashboard/cli.py tmp_build/dashboard/
+    cp ${CEPH_DEV_FOLDER}/src/pybind/mgr/dashboard/plugins/plugin.py tmp_build/dashboard_plugins/
+
     $CONTAINER_RUNTIME build --tag ${LOCAL_CEPH_IMG} .
     $CONTAINER_RUNTIME tag ${LOCAL_CEPH_IMG} ${CURR_CEPH_IMG}