From c47d528f403fbe9bb5e15f52a1ad7d2ea99d8524 Mon Sep 17 00:00:00 2001 From: Anoop C S Date: Thu, 7 Nov 2024 10:55:52 +0530 Subject: [PATCH 1/4] Revert "containers: work around protobuf package issues" This reverts commit df3b6a95ad1f21c107c6d6c727dfa828608d94a2. --- testing/containers/ceph/Dockerfile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/testing/containers/ceph/Dockerfile b/testing/containers/ceph/Dockerfile index 339da0740..3e3a7b1da 100644 --- a/testing/containers/ceph/Dockerfile +++ b/testing/containers/ceph/Dockerfile @@ -11,11 +11,10 @@ ENV GO_CEPH_VERSION=${GO_CEPH_VERSION:-$CEPH_VERSION} RUN true \ && echo "Check: [ ${CEPH_VERSION} = ${GO_CEPH_VERSION} ]" \ && [ "${CEPH_VERSION}" = "${GO_CEPH_VERSION}" ] \ - && enablerepos="--enablerepo=crb" \ - && . /etc/os-release ; if [ "$ID" = centos -a "$VERSION" = 8 ]; then enablerepos=""; find /etc/yum.repos.d/ -name '*.repo' -exec sed -i -e 's|^mirrorlist=|#mirrorlist=|g' -e 's|^#baseurl=http://mirror.centos.org|baseurl=https://vault.centos.org|g' {} \; ; fi \ - && yum update -y $enablerepos \ + && (. /etc/os-release ; if [ "$ID" = centos -a "$VERSION" = 8 ]; then find /etc/yum.repos.d/ -name '*.repo' -exec sed -i -e 's|^mirrorlist=|#mirrorlist=|g' -e 's|^#baseurl=http://mirror.centos.org|baseurl=https://vault.centos.org|g' {} \; ; fi ) \ + && yum update -y --disablerepo=ganesha \ && cv="$(rpm -q --queryformat '%{version}-%{release}' ceph-common)" \ - && yum install $enablerepos -y \ + && yum install -y \ git wget /usr/bin/curl make \ /usr/bin/cc /usr/bin/c++ gdb \ "libcephfs-devel-${cv}" \ From 41f44d7566a7fbe20af4210c13785f16f7f84404 Mon Sep 17 00:00:00 2001 From: Anoop C S Date: Thu, 7 Nov 2024 11:00:19 +0530 Subject: [PATCH 2/4] Revert "containers: workaround for ganesha package error on reef" This reverts commit d4eac7d990bed98d373b65ded7e0f46b5d556fc9. --- testing/containers/ceph/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing/containers/ceph/Dockerfile b/testing/containers/ceph/Dockerfile index 3e3a7b1da..a8939f0d4 100644 --- a/testing/containers/ceph/Dockerfile +++ b/testing/containers/ceph/Dockerfile @@ -12,7 +12,7 @@ RUN true \ && echo "Check: [ ${CEPH_VERSION} = ${GO_CEPH_VERSION} ]" \ && [ "${CEPH_VERSION}" = "${GO_CEPH_VERSION}" ] \ && (. /etc/os-release ; if [ "$ID" = centos -a "$VERSION" = 8 ]; then find /etc/yum.repos.d/ -name '*.repo' -exec sed -i -e 's|^mirrorlist=|#mirrorlist=|g' -e 's|^#baseurl=http://mirror.centos.org|baseurl=https://vault.centos.org|g' {} \; ; fi ) \ - && yum update -y --disablerepo=ganesha \ + && yum update -y \ && cv="$(rpm -q --queryformat '%{version}-%{release}' ceph-common)" \ && yum install -y \ git wget /usr/bin/curl make \ From 17dff09117dd6d5d6eae613f2ddb6b27db2fadd6 Mon Sep 17 00:00:00 2001 From: Anoop C S Date: Thu, 7 Nov 2024 11:04:52 +0530 Subject: [PATCH 3/4] containers: Remove the yum update step In general it is not desirable to blindly update packages as a whole while building another from a base container image. Historically this step was required due to the introduction of version specific installation[1] of packages i.e, we extract the package version that comes with the base container image and try to install the matching development libraries which might be unavailable close to a new release happening in upstream. In order to overcome this short gap we came up with the idea of `yum update`[2] to fetch whatever is the latest and then extract the version for further installation of development libraries. This seemed to work until we discovered a different issue where updated versions for particular dependencies are pushed to standard repositories causing problems[3] during `yum update`. Ceph repositories(and packages) are now more robust and DNF is capable of handling such situations to figure out the new/updated versions for packages even if a match is not found with the already installed package versions. Ideally it can never be the case that matching packages for each version are missing from a particular repository directory(only the links to the directories is supposed to change). Thus in our best interest we avoid running `yum update`. [1] https://github.com/ceph/go-ceph/pull/331 [2] https://github.com/ceph/go-ceph/pull/510 [3] https://github.com/ceph/go-ceph/pull/1038 Signed-off-by: Anoop C S --- testing/containers/ceph/Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/testing/containers/ceph/Dockerfile b/testing/containers/ceph/Dockerfile index a8939f0d4..ff77f5d93 100644 --- a/testing/containers/ceph/Dockerfile +++ b/testing/containers/ceph/Dockerfile @@ -12,7 +12,6 @@ RUN true \ && echo "Check: [ ${CEPH_VERSION} = ${GO_CEPH_VERSION} ]" \ && [ "${CEPH_VERSION}" = "${GO_CEPH_VERSION}" ] \ && (. /etc/os-release ; if [ "$ID" = centos -a "$VERSION" = 8 ]; then find /etc/yum.repos.d/ -name '*.repo' -exec sed -i -e 's|^mirrorlist=|#mirrorlist=|g' -e 's|^#baseurl=http://mirror.centos.org|baseurl=https://vault.centos.org|g' {} \; ; fi ) \ - && yum update -y \ && cv="$(rpm -q --queryformat '%{version}-%{release}' ceph-common)" \ && yum install -y \ git wget /usr/bin/curl make \ From adba45263a476deb0125b9ffb9883d751afa7731 Mon Sep 17 00:00:00 2001 From: Anoop C S Date: Thu, 7 Nov 2024 11:56:53 +0530 Subject: [PATCH 4/4] containers: Avoid version specific installation of packages Now that we have removed the `yum update` step, it doesn't make sense to install the matching development packages based on the version already present with the base container image. This is due to the fact that their availability is not always guaranteed. Instead leave it up to DNF to figure out if higher versions are available with the repositories. Signed-off-by: Anoop C S --- testing/containers/ceph/Dockerfile | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/testing/containers/ceph/Dockerfile b/testing/containers/ceph/Dockerfile index ff77f5d93..ff71ec1e7 100644 --- a/testing/containers/ceph/Dockerfile +++ b/testing/containers/ceph/Dockerfile @@ -12,14 +12,13 @@ RUN true \ && echo "Check: [ ${CEPH_VERSION} = ${GO_CEPH_VERSION} ]" \ && [ "${CEPH_VERSION}" = "${GO_CEPH_VERSION}" ] \ && (. /etc/os-release ; if [ "$ID" = centos -a "$VERSION" = 8 ]; then find /etc/yum.repos.d/ -name '*.repo' -exec sed -i -e 's|^mirrorlist=|#mirrorlist=|g' -e 's|^#baseurl=http://mirror.centos.org|baseurl=https://vault.centos.org|g' {} \; ; fi ) \ - && cv="$(rpm -q --queryformat '%{version}-%{release}' ceph-common)" \ && yum install -y \ git wget /usr/bin/curl make \ /usr/bin/cc /usr/bin/c++ gdb \ - "libcephfs-devel-${cv}" \ - "librados-devel-${cv}" \ - "librbd-devel-${cv}" \ - "libradosstriper-devel-${cv}" \ + libcephfs-devel \ + librados-devel \ + librbd-devel \ + libradosstriper-devel \ libcephfs2-debuginfo \ librados2-debuginfo \ librbd1-debuginfo \