Skip to content

Commit

Permalink
Improve robustness on docker wget calls
Browse files Browse the repository at this point in the history
Build failures have occurred when the 'Connection timed out.' or
'Network is unreachable.' errors have been seen by wget calls to
download Kafka.  To make this more rebust add a set of retry parameters
to all usages of wget during docker builds.

Signed-off-by: Peter Nied <[email protected]>
  • Loading branch information
peternied committed Aug 8, 2024
1 parent a2c0a8d commit e53f481
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ RUN dnf install -y --setopt=install_weak_deps=False \

# Install HDF5 from source for Opensearch Benchmark compatibility with ARM
ARG HDF5_VERSION=1.14.4
RUN wget -q https://github.com/HDFGroup/hdf5/archive/refs/tags/hdf5_${HDF5_VERSION}.tar.gz -O /tmp/hdf5.tar.gz && \
RUN wget --tries=5 --retry-connrefused --waitretry=15 -q https://github.com/HDFGroup/hdf5/archive/refs/tags/hdf5_${HDF5_VERSION}.tar.gz -O /tmp/hdf5.tar.gz && \
mkdir /tmp/hdf5 && \
tar -xzf /tmp/hdf5.tar.gz -C /tmp/hdf5 --strip-components=1 && \
rm /tmp/hdf5.tar.gz
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ RUN mkdir /root/kafka-tools/aws

WORKDIR /root/kafka-tools
# Get kafka distribution and unpack to 'kafka'
RUN wget -O- https://archive.apache.org/dist/kafka/3.6.0/kafka_2.13-3.6.0.tgz | tar --transform 's!^[^/]*!kafka!' -xvz
RUN wget -O kafka/libs/msk-iam-auth.jar https://github.com/aws/aws-msk-iam-auth/releases/download/v2.0.3/aws-msk-iam-auth-2.0.3-all.jar
RUN wget --tries=5 --retry-connrefused --waitretry=15 -O- https://archive.apache.org/dist/kafka/3.6.0/kafka_2.13-3.6.0.tgz | tar --transform 's!^[^/]*!kafka!' -xvz
RUN wget --tries=5 --retry-connrefused --waitretry=15 -O kafka/libs/msk-iam-auth.jar https://github.com/aws/aws-msk-iam-auth/releases/download/v2.0.3/aws-msk-iam-auth-2.0.3-all.jar
WORKDIR /root

# Add Traffic Replayer jars for running KafkaPrinter from this container
Expand Down

0 comments on commit e53f481

Please sign in to comment.