Page MenuHomeSoftware Heritage

base-buster: Pin elasticsearch to exclude 7.10.0
ClosedPublic

Authored by ardumont on Dec 7 2020, 5:45 PM.

Details

Summary

We chose to exclude the broken version by pinning 7.10.0 to -1 instead of
pinning the currently working 7.9.3 version to 1001. This will make sure we
don't forget to upgrade once the bugfix is published.

Related to T2791

Test Plan

make base-buster happy

$ make base-buster
grep '^FROM \$REGISTRY/' base-buster/Dockerfile cypress/Dockerfile kafka/Dockerfile sphinx/Dockerfile tox/Dockerfile | \
        awk -F '/Dockerfile:FROM \\$REGISTRY/' '{ print $1 " " $2 }' | \
        sed 's@[:/]@\\:@g' | awk '{ print "swh-jenkins/" $1 ": " "swh-jenkins/" $2 }' > .depends.mk
docker build -t swh-jenkins/base-buster base-buster
[+] Building 252.6s (22/22) FINISHED
 => [internal] load build definition from Dockerfile                                                                                                                                                                                      0.0s
 => => transferring dockerfile: 6.83kB                                                                                                                                                                                                    0.0s
 => [internal] load .dockerignore                                                                                                                                                                                                         0.0s
 => => transferring context: 2B                                                                                                                                                                                                           0.0s
 => resolve image config for docker.io/docker/dockerfile:experimental                                                                                                                                                                     1.9s
 => CACHED docker-image://docker.io/docker/dockerfile:experimental@sha256:de85b2f3a3e8a2f7fe48e8e84a65f6fdd5cd5183afa6412fff9caa6871649c44                                                                                                0.0s
 => [internal] load build definition from Dockerfile                                                                                                                                                                                      0.0s
 => => transferring dockerfile: 6.83kB                                                                                                                                                                                                    0.0s
 => [internal] load .dockerignore                                                                                                                                                                                                         0.0s
 => [internal] load metadata for docker.io/library/openjdk:11-jdk-slim-buster                                                                                                                                                             0.6s
 => CACHED [internal] helper image for file operations                                                                                                                                                                                    0.0s
 => [stage-0  1/12] FROM docker.io/library/openjdk:11-jdk-slim-buster@sha256:333d2ca9faae137e2dedde915a308cbb5bb32d2efcfd2593f65c6bb5946a6c1a                                                                                             0.0s
 => [internal] load build context                                                                                                                                                                                                         0.0s
 => => transferring context: 4.63kB                                                                                                                                                                                                       0.0s
 => CACHED [stage-0  2/12] RUN rm -f /etc/apt/apt.conf.d/docker-clean; echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache                                                                         0.0s
 => [stage-0  3/12] RUN echo 'Explanation: profile: elasticsearch\nPackage: elasticsearch elasticsearch-oss\nPin: version 7.10.0\nPin-Priority: -1' > /etc/apt/preferences.d/elasticsearch.pref                                           0.4s
 => [stage-0  4/12] RUN --mount=type=cache,id=apt-cache,target=/var/cache/apt --mount=type=cache,id=apt-lists,target=/var/lib/apt   export DEBIAN_FRONTEND=noninteractive &&   apt-get update &&   apt-get install -y apt-transport-ht  236.2s
 => [stage-0  5/12] RUN groupadd -g 120 jenkins                                                                                                                                                                                           0.5s
 => [stage-0  6/12] RUN groupadd -g 999 docker                                                                                                                                                                                            0.5s
 => [stage-0  7/12] RUN useradd -c "Jenkins user" -d /home/jenkins -u 115 -g 120 -m jenkins                                                                                                                                               0.6s
 => [stage-0  8/12] RUN gpasswd -a jenkins docker                                                                                                                                                                                         0.5s
 => [stage-0  9/12] RUN curl --create-dirs -fsSLo /usr/share/jenkins/agent.jar https://repo.jenkins-ci.org/public/org/jenkins-ci/main/remoting/3.35/remoting-3.35.jar   && chmod 755 /usr/share/jenkins   && chmod 644 /usr/share/jenkin  1.7s
 => [stage-0 10/12] RUN mkdir /home/jenkins/.jenkins && mkdir -p /home/jenkins/agent                                                                                                                                                      0.6s
 => [stage-0 11/12] COPY jenkins-agent /usr/local/bin/jenkins-agent                                                                                                                                                                       0.2s
 => [stage-0 12/12] RUN chmod +x /usr/local/bin/jenkins-agent &&    ln -s /usr/local/bin/jenkins-agent /usr/local/bin/jenkins-slave                                                                                                       0.3s
 => exporting to image                                                                                                                                                                                                                    8.1s
 => => exporting layers                                                                                                                                                                                                                   8.1s
 => => writing image sha256:3447cbe737c07d9d846eb7489fda5cc96bdb8ddc4be33bdcc7d446cca58d1c37                                                                                                                                              0.0s
 => => naming to docker.io/swh-jenkins/base-buster                                                                                                                                                                                        0.0s

Diff Detail

Repository
rCDFJ Dockerfiles for Jenkins
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

olasd added a subscriber: olasd.

The change looks good (I also tested it locally).

However, I suggest excluding the broken version by pinning 7.10.0 to -1 instead of pinning the currently working version to 1001. This will make sure we don't forget to upgrade once the bugfix is published.

This revision is now accepted and ready to land.Dec 7 2020, 7:27 PM

However, I suggest excluding the broken version by pinning 7.10.0 to -1 instead of pinning the currently working version to 1001. This will make sure we don't forget to upgrade once the bugfix is published.

Sure, good idea.

I merely took the current apt/preferences.d/elasticsearch.pref from our shiny new vagrant/staging elasticsearch nodes which has that exact pinning ;)

Adapt according to suggestion

ardumont retitled this revision from base-buster: Pin elasticsearch to 7.9.3 properly with apt preferences to base-buster: Pin elasticsearch to exclude 7.10.0.Dec 7 2020, 9:55 PM
ardumont edited the summary of this revision. (Show Details)
ardumont edited the test plan for this revision. (Show Details)