From f95a56a99bac1e58f886fd111608d4e2287cd4a5 Mon Sep 17 00:00:00 2001 From: Dave Chen Date: Tue, 11 May 2021 10:10:20 +0800 Subject: [PATCH] Fix the ceph deploy for e2e testing for ARM64 - ceph deploy on ARM64 depends on "libec_jerasure_neon.so" which is not included in `ceph-base` package in fedora26 distro, updated the distro to fedora33 to fix the issue ``` sh ./mon.sh "$(hostname -i)" /usr/lib64/ceph/erasure-code/libec_jerasure_neon.so: cannot open shared object file ``` - default pool `rbd` is not created on arm64, need to created this pool manually. ``` rbd import --image-feature layering block foo rbd: error opening default pool 'rbd' ``` Signed-off-by: Dave Chen --- test/images/volume/rbd/BASEIMAGE | 6 +++--- test/images/volume/rbd/Dockerfile | 2 +- test/images/volume/rbd/bootstrap.sh | 9 +++++++++ 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/test/images/volume/rbd/BASEIMAGE b/test/images/volume/rbd/BASEIMAGE index 3c320a09162..85393293196 100644 --- a/test/images/volume/rbd/BASEIMAGE +++ b/test/images/volume/rbd/BASEIMAGE @@ -1,3 +1,3 @@ -linux/amd64=fedora:26 -linux/arm64=arm64v8/fedora:26 -linux/ppc64le=ppc64le/fedora:26 +linux/amd64=fedora:33 +linux/arm64=arm64v8/fedora:33 +linux/ppc64le=ppc64le/fedora:33 diff --git a/test/images/volume/rbd/Dockerfile b/test/images/volume/rbd/Dockerfile index 40742f60dec..fd82a4126a5 100644 --- a/test/images/volume/rbd/Dockerfile +++ b/test/images/volume/rbd/Dockerfile @@ -21,7 +21,7 @@ FROM $BASEIMAGE CROSS_BUILD_COPY qemu-QEMUARCH-static /usr/bin/ # Base Packages -RUN yum install -y wget strace psmisc procps-ng ceph ceph-fuse && yum clean all +RUN yum install -y wget strace psmisc procps-ng ceph ceph-fuse hostname && yum clean all # Get ports exposed EXPOSE 6789 diff --git a/test/images/volume/rbd/bootstrap.sh b/test/images/volume/rbd/bootstrap.sh index 8b8136f1e10..3414bfa949b 100755 --- a/test/images/volume/rbd/bootstrap.sh +++ b/test/images/volume/rbd/bootstrap.sh @@ -41,6 +41,15 @@ sh ./mds.sh # Prepare a RBD volume "foo" (only with layering feature, the others may # require newer clients). # NOTE: we need Ceph kernel modules on the host that runs the client! +# As the default pool `rbd` might not be created on arm64 platform for ceph deployment, +# should create it if it does not exist. +arch=$(uname -m) +if [[ ${arch} = 'aarch64' || ${arch} = 'arm64' ]]; then + if [[ $(ceph osd lspools) = "" ]]; then + ceph osd pool create rbd 8 + rbd pool init rbd + fi +fi rbd import --image-feature layering block foo # Prepare a cephfs volume