Use tonistiigi/binfmt instead of our multi-arch register.sh

Looking deeper into the logs there are a lot of errors like:
`script exited with error 1`

Initial reaction was that there was a problem with download, but it
looks like the script we use to register the qemu emulators may be at
fault, let's try this alternate mechanism.

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
This commit is contained in:
Davanum Srinivas 2021-05-08 15:52:06 -04:00
parent 3dd0597843
commit 79e5a1d5f1
No known key found for this signature in database
GPG Key ID: 80D83A796103BF59
2 changed files with 2 additions and 3 deletions

View File

@ -27,8 +27,7 @@ CROSS_BUILD_COPY qemu-QEMUARCH-static /usr/bin/
# - iproute2: includes ss used in NodePort tests # - iproute2: includes ss used in NodePort tests
# from iperf image # from iperf image
# install necessary packages: iperf, bash # install necessary packages: iperf, bash
RUN retry () { i=0; while [ $i -lt 9 ]; do "$@" && return || sleep 30; i="${i+1}"; done; "$@"; } \ RUN apk --update add bind-tools curl netcat-openbsd iproute2 iperf bash && rm -rf /var/cache/apk/* \
&& retry apk --update add bind-tools curl netcat-openbsd iproute2 iperf bash && rm -rf /var/cache/apk/* \
&& ln -s /usr/bin/iperf /usr/local/bin/iperf \ && ln -s /usr/bin/iperf /usr/local/bin/iperf \
&& ls -altrh /usr/local/bin/iperf && ls -altrh /usr/local/bin/iperf

View File

@ -165,7 +165,7 @@ build() {
if [[ $(id -u) -ne 0 ]]; then if [[ $(id -u) -ne 0 ]]; then
sudo="sudo" sudo="sudo"
fi fi
${sudo} "${KUBE_ROOT}/third_party/multiarch/qemu-user-static/register/register.sh" --reset -p yes ${sudo} docker run --rm --privileged tonistiigi/binfmt:latest --install all
curl -sSL https://github.com/multiarch/qemu-user-static/releases/download/"${QEMUVERSION}"/x86_64_qemu-"${QEMUARCHS[$arch]}"-static.tar.gz | tar -xz -C "${temp_dir}" curl -sSL https://github.com/multiarch/qemu-user-static/releases/download/"${QEMUVERSION}"/x86_64_qemu-"${QEMUARCHS[$arch]}"-static.tar.gz | tar -xz -C "${temp_dir}"
# Ensure we don't get surprised by umask settings # Ensure we don't get surprised by umask settings
chmod 0755 "${temp_dir}/qemu-${QEMUARCHS[$arch]}-static" chmod 0755 "${temp_dir}/qemu-${QEMUARCHS[$arch]}-static"