From c4e99c14623c37638cd8add8824f90d594003722 Mon Sep 17 00:00:00 2001 From: Blaine Gardner Date: Mon, 3 Jun 2024 13:57:08 -0600 Subject: [PATCH] build: remove iproute build dependency on centos repo Multus requires that the 'ip' tool be installed in the Rook image. Today, it is present in the upstream Ceph base image that is used, but that is expected to change in the future. The Ceph project intends to switch to CentOS 9 minimal images, and the 'ip' tool will likely be removed from the base image at that point. However, Rook CI has occasionally had issues with the current 'dnf install' command when CentOS repos go down, or when there is otherwise some problem. Because the package is already installed today, there is no need to hamstring Rook builds when CentOS is having problems. But we do want to make sure that Rook builds don't silently succeed in the eventual future when 'ip' tool is removed from the Ceph image. For now, replace the 'dnf install' with a check to verify that 'ip' tool is installed, and add a shorter form of this note as a comment above it to help Rook maintainers know how to resolve future 'ip' tool removal. Signed-off-by: Blaine Gardner --- images/ceph/Dockerfile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/images/ceph/Dockerfile b/images/ceph/Dockerfile index e1fdf1230b4f..b5bc029e4dc2 100644 --- a/images/ceph/Dockerfile +++ b/images/ceph/Dockerfile @@ -19,8 +19,12 @@ FROM BASEIMAGE ARG S5CMD_VERSION ARG S5CMD_ARCH -# install 'ip' tool for Multus -RUN dnf install -y --repo baseos --setopt=install_weak_deps=False iproute && dnf clean all +# 'ip' tool must be installed for Multus. It's present in the base image today, but it will likely +# be removed in the future. Doing a 'dnf install' sometimes breaks CI when centos repos go down or +# have other package build errors. In order to make sure Rook CI catches the eventual removal and +# also limit Rook CI breakage due to centos breakage, simply check that 'ip' is present. +# Eventually: dnf install -y --repo baseos --setopt=install_weak_deps=False iproute && dnf clean all +RUN which ip # Install the s5cmd package to interact with s3 gateway RUN curl --fail -sSL -o /s5cmd.tar.gz https://github.com/peak/s5cmd/releases/download/v${S5CMD_VERSION}/s5cmd_${S5CMD_VERSION}_${S5CMD_ARCH}.tar.gz && \