Skip to content

Commit

Permalink
containers: Remove the yum update step
Browse files Browse the repository at this point in the history
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] #331
[2] #510
[3] #1038

Signed-off-by: Anoop C S <[email protected]>
  • Loading branch information
anoopcs9 authored and phlogistonjohn committed Dec 11, 2024
1 parent 41f44d7 commit 17dff09
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion testing/containers/ceph/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down

0 comments on commit 17dff09

Please sign in to comment.