From 79e5a1d5f128a4c491b4f3ad676b143ef9fc3ee1 Mon Sep 17 00:00:00 2001 From: Davanum Srinivas Date: Sat, 8 May 2021 15:52:06 -0400 Subject: [PATCH] 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 --- test/images/agnhost/Dockerfile | 3 +-- test/images/image-util.sh | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/test/images/agnhost/Dockerfile b/test/images/agnhost/Dockerfile index 65c783d6490..3cfe56c9cb2 100644 --- a/test/images/agnhost/Dockerfile +++ b/test/images/agnhost/Dockerfile @@ -27,8 +27,7 @@ CROSS_BUILD_COPY qemu-QEMUARCH-static /usr/bin/ # - iproute2: includes ss used in NodePort tests # from iperf image # install necessary packages: iperf, bash -RUN retry () { i=0; while [ $i -lt 9 ]; do "$@" && return || sleep 30; i="${i+1}"; done; "$@"; } \ - && retry apk --update add bind-tools curl netcat-openbsd iproute2 iperf bash && rm -rf /var/cache/apk/* \ +RUN 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 \ && ls -altrh /usr/local/bin/iperf diff --git a/test/images/image-util.sh b/test/images/image-util.sh index 6d11ca081bc..3d4cf5311b7 100755 --- a/test/images/image-util.sh +++ b/test/images/image-util.sh @@ -165,7 +165,7 @@ build() { if [[ $(id -u) -ne 0 ]]; then sudo="sudo" 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}" # Ensure we don't get surprised by umask settings chmod 0755 "${temp_dir}/qemu-${QEMUARCHS[$arch]}-static"