Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add linux/arm to build-base target platform. #3664

Closed

Conversation

vdemeester
Copy link
Member

@vdemeester vdemeester commented Jan 7, 2021

Changes

gcr.io/distroless/static:nonroot does support this platform. We need
to build our base image for it too, otherwise the arm version of
pipeline is broken as it cannot run creds-init and git-init images.

Fixes #3647

Long term, we might need to specify by hand the platform we support when we release as we may run into this next time distroless supports a new platform.

Signed-off-by: Vincent Demeester vdemeest@redhat.com

/cc @afrittoli @bobcatfish @barthy1

/kind bug

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

  • Includes tests (if functionality changed/added)
  • Includes docs (if user facing)
  • Commit messages follow commit message best practices
  • Release notes block has been filled in or deleted (only if no user facing changes)

See the contribution guide for more details.

Double check this list of stuff that's easy to miss:

Reviewer Notes

If API changes are included, additive changes must be approved by at least two OWNERS and backwards incompatible changes must be approved by more than 50% of the OWNERS, and they must first be added in a backwards compatible way.

Release Notes

Build `git-init` and `creds-init` image for linux/arm too

`gcr.io/distroless/static:nonroot` does support this platform. We need
to build our base image for it too, otherwise the `arm` version of
pipeline is broken as it cannot run `creds-init` and `git-init` images.

Signed-off-by: Vincent Demeester <vdemeest@redhat.com>
@vdemeester vdemeester added this to the Pipelines v0.20 milestone Jan 7, 2021
@tekton-robot tekton-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/bug Categorizes issue or PR as related to a bug. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jan 7, 2021
Copy link
Member

@afrittoli afrittoli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thank you!
/approve

@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: afrittoli

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 7, 2021
@vdemeester
Copy link
Member Author

/hold

 => ERROR [linux/arm/v7 2/2] RUN apk add --update git git-lfs openssh-client     && apk update     && apk u  3.2s
 => CANCELED [linux/arm64 2/2] RUN apk add --update git git-lfs openssh-client     && apk update     && apk  3.1s
------
 > [linux/arm/v7 2/2] RUN apk add --update git git-lfs openssh-client     && apk update     && apk upgrade:
#10 0.241 fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/main/armv7/APKINDEX.tar.gz
#10 0.697 fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/community/armv7/APKINDEX.tar.gz
#10 1.359 (1/13) Installing ca-certificates (20191127-r2)
#10 1.397 (2/13) Installing nghttp2-libs (1.40.0-r1)
#10 1.405 (3/13) Installing libcurl (7.67.0-r3)
#10 1.419 (4/13) Installing libgcc (9.3.0-r0)
#10 1.425 (5/13) Installing expat (2.2.9-r1)
#10 1.432 (6/13) Installing pcre2 (10.34-r1)
#10 1.448 (7/13) Installing git (2.24.3-r0)
#10 1.774 (8/13) Installing git-lfs (2.9.2-r1)
#10 2.870 Executing git-lfs-2.9.2-r1.post-install
#10 2.873 ERROR: git-lfs-2.9.2-r1.post-install: script exited with error 1
#10 2.873 (9/13) Installing openssh-keygen (8.1_p1-r0)
#10 2.886 (10/13) Installing ncurses-terminfo-base (6.1_p20200118-r4)
#10 2.898 (11/13) Installing ncurses-libs (6.1_p20200118-r4)
#10 2.912 (12/13) Installing libedit (20191211.3.1-r0)
#10 2.919 (13/13) Installing openssh-client (8.1_p1-r0)
#10 3.005 Executing busybox-1.31.1-r9.trigger
#10 3.007 ERROR: busybox-1.31.1-r9.trigger: script exited with error 1
#10 3.008 Executing ca-certificates-20191127-r2.trigger
#10 3.010 ERROR: ca-certificates-20191127-r2.trigger: script exited with error 1
#10 3.017 1 error; 30 MiB in 27 packages
------
Error: failed to solve: rpc error: code = Unknown desc = executor failed running [/dev/.buildkit_qemu_emulator /bin/sh -c apk add --update git git-lfs openssh-client     && apk update     && apk upgrade]: exit code: 1

@tekton-robot tekton-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 7, 2021
@vdemeester
Copy link
Member Author

The other option is to remove linux/arm from the release published platform 🙃

@barthy1
Copy link
Member

barthy1 commented Jan 7, 2021

@vdemeester how did you get the error?
I have to say I've got strange results with my local attempts.
With existing setup (can be broken because of active usage and tests though) I've got the same result as you listed.
However on new clean amd64 vm the image build was successful for existing archs + arm:

# docker buildx build --platform linux/amd64,linux/s390x,linux/ppc64le,linux/arm64,linux/arm --no-cache .
WARN[0000] No output specified for docker-container driver. Build result will only remain in the build cache. To push result image into registry use --push or to load image into docker use --load
[+] Building 10.8s (17/17) FINISHED
 => [internal] load build definition from Dockerfile                                                                                                                                                                                     0.0s
 => => transferring dockerfile: 146B                                                                                                                                                                                                     0.0s
 => [internal] load .dockerignore                                                                                                                                                                                                        0.0s
 => => transferring context: 2B                                                                                                                                                                                                          0.0s
 => [linux/arm/v7 internal] load metadata for docker.io/library/alpine:3.11                                                                                                                                                              2.7s
 => [linux/s390x internal] load metadata for docker.io/library/alpine:3.11                                                                                                                                                               2.7s
 => [linux/amd64 internal] load metadata for docker.io/library/alpine:3.11                                                                                                                                                               2.5s
 => [linux/ppc64le internal] load metadata for docker.io/library/alpine:3.11                                                                                                                                                             2.6s
 => [linux/arm64 internal] load metadata for docker.io/library/alpine:3.11                                                                                                                                                               2.6s
 => [linux/s390x 1/2] FROM docker.io/library/alpine:3.11@sha256:0bd0e9e03a022c3b0226667621da84fc9bf562a9056130424b5bfbd8bcb0397f                                                                                                         0.4s
 => => resolve docker.io/library/alpine:3.11@sha256:0bd0e9e03a022c3b0226667621da84fc9bf562a9056130424b5bfbd8bcb0397f                                                                                                                     0.0s
 => => sha256:ae4c90d25da4580c1cd02a35a672d9113b17e063183b4148c463df4d33079192 2.58MB / 2.58MB                                                                                                                                           0.2s
 => => extracting sha256:ae4c90d25da4580c1cd02a35a672d9113b17e063183b4148c463df4d33079192                                                                                                                                                0.2s
 => [linux/arm/v7 1/2] FROM docker.io/library/alpine:3.11@sha256:0bd0e9e03a022c3b0226667621da84fc9bf562a9056130424b5bfbd8bcb0397f                                                                                                        0.3s
 => => resolve docker.io/library/alpine:3.11@sha256:0bd0e9e03a022c3b0226667621da84fc9bf562a9056130424b5bfbd8bcb0397f                                                                                                                     0.0s
 => => sha256:71728559ce1f58d5e0ef30be5b1d7628ff967d4038f9202818dd3d8c76feb8ab 2.42MB / 2.42MB                                                                                                                                           0.2s
 => => extracting sha256:71728559ce1f58d5e0ef30be5b1d7628ff967d4038f9202818dd3d8c76feb8ab                                                                                                                                                0.1s
 => [linux/arm64 1/2] FROM docker.io/library/alpine:3.11@sha256:0bd0e9e03a022c3b0226667621da84fc9bf562a9056130424b5bfbd8bcb0397f                                                                                                         0.5s
 => => resolve docker.io/library/alpine:3.11@sha256:0bd0e9e03a022c3b0226667621da84fc9bf562a9056130424b5bfbd8bcb0397f                                                                                                                     0.0s
 => => sha256:20d8a246443a66e74e17f2a0e81a51fe774876ca0c2676691c37ee1b0e4d3cd5 2.73MB / 2.73MB                                                                                                                                           0.3s
 => => extracting sha256:20d8a246443a66e74e17f2a0e81a51fe774876ca0c2676691c37ee1b0e4d3cd5                                                                                                                                                0.2s
 => [linux/amd64 1/2] FROM docker.io/library/alpine:3.11@sha256:0bd0e9e03a022c3b0226667621da84fc9bf562a9056130424b5bfbd8bcb0397f                                                                                                         0.7s
 => => resolve docker.io/library/alpine:3.11@sha256:0bd0e9e03a022c3b0226667621da84fc9bf562a9056130424b5bfbd8bcb0397f                                                                                                                     0.0s
 => => sha256:0a6724ff3fcd51338afdfdc2b1d4ffd04569818e31efad957213d67c29b45101 2.81MB / 2.81MB                                                                                                                                           0.6s
 => => extracting sha256:0a6724ff3fcd51338afdfdc2b1d4ffd04569818e31efad957213d67c29b45101                                                                                                                                                0.1s
 => [linux/ppc64le 1/2] FROM docker.io/library/alpine:3.11@sha256:0bd0e9e03a022c3b0226667621da84fc9bf562a9056130424b5bfbd8bcb0397f                                                                                                       0.5s
 => => resolve docker.io/library/alpine:3.11@sha256:0bd0e9e03a022c3b0226667621da84fc9bf562a9056130424b5bfbd8bcb0397f                                                                                                                     0.0s
 => => sha256:2c090b1a59445fb94c5fb14edf51af12a8f8bc2259535b08191f26ea84a7bb05 2.82MB / 2.82MB                                                                                                                                           0.3s
 => => extracting sha256:2c090b1a59445fb94c5fb14edf51af12a8f8bc2259535b08191f26ea84a7bb05                                                                                                                                                0.2s
 => [linux/arm/v7 2/2] RUN apk add --update git git-lfs openssh-client     && apk update     && apk upgrade                                                                                                                              6.5s
 => [linux/s390x 2/2] RUN apk add --update git git-lfs openssh-client     && apk update     && apk upgrade                                                                                                                               7.3s
 => [linux/arm64 2/2] RUN apk add --update git git-lfs openssh-client     && apk update     && apk upgrade                                                                                                                               6.3s
 => [linux/ppc64le 2/2] RUN apk add --update git git-lfs openssh-client     && apk update     && apk upgrade                                                                                                                             6.9s
 => [linux/amd64 2/2] RUN apk add --update git git-lfs openssh-client     && apk update     && apk upgrade

@afrittoli
Copy link
Member

/test check-pr-has-kind-label

@vdemeester
Copy link
Member Author

Closing in favor of #3717
/close

@tekton-robot
Copy link
Collaborator

@vdemeester: Closed this PR.

In response to this:

Closing in favor of #3717
/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@vdemeester vdemeester deleted the add-arm-to-build-base-platform branch July 3, 2024 07:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. kind/bug Categorizes issue or PR as related to a bug. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support "git-init" for arm32v7 platform
5 participants