From 75db89b9c59a657e826b250d9055f5867a5308e6 Mon Sep 17 00:00:00 2001 From: echonesis Date: Wed, 16 Jul 2025 18:07:44 +0800 Subject: [PATCH 1/4] HDDS-13446. Replace goofys with mountpoint-s3 in ozone-docker-runner --- Dockerfile | 30 ++++++++++++------------------ 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6942568..b1a60ad 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,21 +16,6 @@ FROM golang:1.17.8-buster AS go RUN go install github.com/rexray/gocsi/csc@latest -# Compile latest goofys for arm64 if necessary, which doesn't have a released binary -RUN set -eux ; \ - ARCH="$(arch)"; \ - if [ ${ARCH} = "aarch64" ]; then \ - git clone https://github.com/kahing/goofys.git ; \ - cd goofys ; \ - git checkout 08534b2 ; \ - go build ; \ - mv goofys /go/bin/ ; \ - elif [ ${ARCH} = "x86_64" ]; then \ - curl -L https://github.com/kahing/goofys/releases/download/v0.24.0/goofys -o /go/bin/goofys ; \ - else \ - echo "Unsupported architecture: ${ARCH}"; \ - exit 1 ; \ - fi FROM rockylinux:9.3 RUN set -eux ; \ @@ -57,7 +42,19 @@ RUN set -eux ; \ && ln -sf /usr/bin/python3 /usr/bin/python RUN sudo python3 -m pip install --upgrade pip +# CSI / k8s / fuse / goofys dependency COPY --from=go /go/bin/csc /usr/bin/csc +# S3 FUSE support +RUN set -eux ; \ + ARCH="$(arch)"; \ + case "${ARCH}" in \ + x86_64) arch='x86_64' ;; \ + aarch64) arch='arm64' ;; \ + *) echo "Unsupported architecture: ${ARCH}"; exit 1 ;; \ + esac; \ + curl -L -o /tmp/mount-s3.rpm "https://s3.amazonaws.com/mountpoint-s3-release/latest/${arch}/mount-s3.rpm"; \ + dnf install -y /tmp/mount-s3.rpm; \ + rm -f /tmp/mount-s3.rpm # Install rclone for smoketest ARG RCLONE_VERSION=1.69.3 @@ -178,9 +175,6 @@ RUN chown hadoop /opt RUN mkdir -p /etc/security/keytabs && chmod -R a+wr /etc/security/keytabs COPY --chmod=644 krb5.conf /etc/ -# CSI / k8s / fuse / goofys dependency -COPY --from=go --chmod=755 /go/bin/goofys /usr/bin/goofys - # Create hadoop and data directories. Grant all permission to all on them RUN mkdir -p /etc/hadoop && mkdir -p /var/log/hadoop && chmod 1777 /etc/hadoop && chmod 1777 /var/log/hadoop ENV OZONE_LOG_DIR=/var/log/hadoop From 4eaa04fafabbf3ef052c95423143769bc42efc8c Mon Sep 17 00:00:00 2001 From: echonesis Date: Thu, 17 Jul 2025 13:58:29 +0800 Subject: [PATCH 2/4] ARG version fix update --- Dockerfile | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index b1a60ad..16c19a8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -47,14 +47,15 @@ COPY --from=go /go/bin/csc /usr/bin/csc # S3 FUSE support RUN set -eux ; \ ARCH="$(arch)"; \ + MOUNTPOINT_S3_VERSION="1.19.0"; \ case "${ARCH}" in \ - x86_64) arch='x86_64' ;; \ - aarch64) arch='arm64' ;; \ + x86_64) url="https://s3.amazonaws.com/mountpoint-s3-release/${MOUNTPOINT_S3_VERSION}/x86_64/mount-s3-${MOUNTPOINT_S3_VERSION}-x86_64.rpm" ;; \ + aarch64) url="https://s3.amazonaws.com/mountpoint-s3-release/${MOUNTPOINT_S3_VERSION}/arm64/mount-s3-${MOUNTPOINT_S3_VERSION}-arm64.rpm" ;; \ *) echo "Unsupported architecture: ${ARCH}"; exit 1 ;; \ esac; \ - curl -L -o /tmp/mount-s3.rpm "https://s3.amazonaws.com/mountpoint-s3-release/latest/${arch}/mount-s3.rpm"; \ - dnf install -y /tmp/mount-s3.rpm; \ - rm -f /tmp/mount-s3.rpm + curl -L ${url} -o mount-s3.rpm ; \ + dnf install -y mount-s3.rpm ; \ + rm -f mount-s3.rpm # Install rclone for smoketest ARG RCLONE_VERSION=1.69.3 From fa5a5e9bff7e4578f1973fff64d28ac03e1d17a0 Mon Sep 17 00:00:00 2001 From: echonesis Date: Thu, 17 Jul 2025 14:01:56 +0800 Subject: [PATCH 3/4] ARG update --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 16c19a8..9a7b39f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -44,10 +44,10 @@ RUN sudo python3 -m pip install --upgrade pip # CSI / k8s / fuse / goofys dependency COPY --from=go /go/bin/csc /usr/bin/csc -# S3 FUSE support +# S3 FUSE support - mountpoint-s3 +ARG MOUNTPOINT_S3_VERSION=1.19.0 RUN set -eux ; \ ARCH="$(arch)"; \ - MOUNTPOINT_S3_VERSION="1.19.0"; \ case "${ARCH}" in \ x86_64) url="https://s3.amazonaws.com/mountpoint-s3-release/${MOUNTPOINT_S3_VERSION}/x86_64/mount-s3-${MOUNTPOINT_S3_VERSION}-x86_64.rpm" ;; \ aarch64) url="https://s3.amazonaws.com/mountpoint-s3-release/${MOUNTPOINT_S3_VERSION}/arm64/mount-s3-${MOUNTPOINT_S3_VERSION}-arm64.rpm" ;; \ From 7e70f6e3c45fe8a10f4fc02866defa401fb04311 Mon Sep 17 00:00:00 2001 From: echonesis Date: Fri, 18 Jul 2025 17:39:40 +0800 Subject: [PATCH 4/4] Reduce duplication --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9a7b39f..cca1cc8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -49,11 +49,11 @@ ARG MOUNTPOINT_S3_VERSION=1.19.0 RUN set -eux ; \ ARCH="$(arch)"; \ case "${ARCH}" in \ - x86_64) url="https://s3.amazonaws.com/mountpoint-s3-release/${MOUNTPOINT_S3_VERSION}/x86_64/mount-s3-${MOUNTPOINT_S3_VERSION}-x86_64.rpm" ;; \ - aarch64) url="https://s3.amazonaws.com/mountpoint-s3-release/${MOUNTPOINT_S3_VERSION}/arm64/mount-s3-${MOUNTPOINT_S3_VERSION}-arm64.rpm" ;; \ + x86_64) arch='x86_64' ;; \ + aarch64) arch='arm64' ;; \ *) echo "Unsupported architecture: ${ARCH}"; exit 1 ;; \ esac; \ - curl -L ${url} -o mount-s3.rpm ; \ + curl -L "https://s3.amazonaws.com/mountpoint-s3-release/${MOUNTPOINT_S3_VERSION}/${arch}/mount-s3-${MOUNTPOINT_S3_VERSION}-${arch}.rpm" -o mount-s3.rpm ; \ dnf install -y mount-s3.rpm ; \ rm -f mount-s3.rpm