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

Logstash docker images from 8.12.0 do not work on arm64 #15913

Closed
Blefish opened this issue Feb 7, 2024 · 1 comment · Fixed by #15980
Closed

Logstash docker images from 8.12.0 do not work on arm64 #15913

Blefish opened this issue Feb 7, 2024 · 1 comment · Fixed by #15980

Comments

@Blefish
Copy link

Blefish commented Feb 7, 2024

Description of the problem including expected versus actual behavior:
arm64 containers published in Docker Hub cannot be used on arm64 machines due to statically compiled env2yaml for x86_64
https://hub.docker.com/_/logstash/tags
https://github.com/elastic/dockerfiles/blob/8.12/logstash/env2yaml/env2yaml

file env2yaml 
env2yaml: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, Go BuildID=140w3zQetTF9vuXn8SKh/6VTmqmUurR6W4U1d2djn/ygzO-s0DW7lKAPv4StdI/yrDHA-k7UMQhDh1cXjqi, with debug_info, not stripped

Steps to reproduce:

  1. Use an arm64 architecture machine
  2. docker run logstash:8.12.0
@jsvd
Copy link
Member

jsvd commented Feb 7, 2024

Good catch! It seems the jobs creating the "logstash:" images are not flexible enough to rebuild the env2yaml for each arch, while the ones created by elastic are:

logstash:8.12.0

❯ docker run -q --platform=linux/arm64 --rm --entrypoint cat logstash:8.12.0 /usr/local/bin/env2yaml > env2yaml && file env2yaml
env2yaml: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, Go BuildID=140w3zQetTF9vuXn8SKh/6VTmqmUurR6W4U1d2djn/ygzO-s0DW7lKAPv4StdI/yrDHA-k7UMQhDh1cXjqi, with debug_info, not stripped

❯ docker run -q --platform=linux/amd64 --rm --entrypoint cat logstash:8.12.0 /usr/local/bin/env2yaml > env2yaml && file env2yaml
env2yaml: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, Go BuildID=140w3zQetTF9vuXn8SKh/6VTmqmUurR6W4U1d2djn/ygzO-s0DW7lKAPv4StdI/yrDHA-k7UMQhDh1cXjqi, with debug_info, not stripped

docker.elastic.co/logstash/logstash:8.12.0

❯ docker run -q --platform=linux/arm64 --rm --entrypoint cat docker.elastic.co/logstash/logstash:8.12.0 /usr/local/bin/env2yaml > env2yaml && file env2yaml
env2yaml: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, Go BuildID=QYY-PtaHFDEDpFjmTufT/PjrWinQ9r2i2vz0aIqwX/QIJ5qqkDzlYatd5vGwbG/5PkcWW24n8AsRkRjSP0z, with debug_info, not stripped

❯ docker run -q --platform=linux/amd64 --rm --entrypoint cat docker.elastic.co/logstash/logstash:8.12.0 /usr/local/bin/env2yaml > env2yaml && file env2yaml
env2yaml: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, Go BuildID=140w3zQetTF9vuXn8SKh/6VTmqmUurR6W4U1d2djn/ygzO-s0DW7lKAPv4StdI/yrDHA-k7UMQhDh1cXjqi, with debug_info, not stripped

robbavey added a commit to robbavey/logstash that referenced this issue Mar 7, 2024
This commit builds env2yaml in arm64 and amd64 flavors, and uses
$TARGETARCH in the Dockerfile to ensure that the correct version is used
when building for alternative architectures

Fixes: elastic#15913
robbavey added a commit to robbavey/logstash that referenced this issue Mar 7, 2024
This commit builds env2yaml in arm64 and amd64 flavors, and uses
$TARGETARCH in the Dockerfile to ensure that the correct version is used
when building for alternative architectures

Fixes: elastic#15913
robbavey added a commit to robbavey/logstash that referenced this issue Mar 7, 2024
This commit builds env2yaml in arm64 and amd64 flavors, and uses
$TARGETARCH in the Dockerfile to ensure that the correct version is used
when building for alternative architectures

Fixes: elastic#15913
robbavey added a commit that referenced this issue Mar 8, 2024
* Add arm64 support for env2yaml

This commit builds env2yaml in arm64 and amd64 flavors, and uses
$TARGETARCH in the Dockerfile to ensure that the correct version is used
when building for alternative architectures

Fixes: #15913

* Add env2yaml executables to build context

* Split `COPY_FILES` for readability

Co-authored-by: Andrea Selva <[email protected]>

---------

Co-authored-by: Andrea Selva <[email protected]>
github-actions bot pushed a commit that referenced this issue Mar 8, 2024
* Add arm64 support for env2yaml

This commit builds env2yaml in arm64 and amd64 flavors, and uses
$TARGETARCH in the Dockerfile to ensure that the correct version is used
when building for alternative architectures

Fixes: #15913

* Add env2yaml executables to build context

* Split `COPY_FILES` for readability

Co-authored-by: Andrea Selva <[email protected]>

---------

Co-authored-by: Andrea Selva <[email protected]>
(cherry picked from commit b640e7e)
kaisecheng pushed a commit that referenced this issue Mar 28, 2024
* Add arm64 support for env2yaml

This commit builds env2yaml in arm64 and amd64 flavors, and uses
$TARGETARCH in the Dockerfile to ensure that the correct version is used
when building for alternative architectures

Fixes: #15913

* Add env2yaml executables to build context

* Split `COPY_FILES` for readability

Co-authored-by: Andrea Selva <[email protected]>

---------

Co-authored-by: Andrea Selva <[email protected]>
(cherry picked from commit b640e7e)

Co-authored-by: Rob Bavey <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants