minio / sidekick

High Performance HTTP Sidecar Load Balancer
GNU Affero General Public License v3.0
540 stars 82 forks source link

Getting "exec /sidekick: exec format error" while starting Docker container on s390x #90

Closed pantovad closed 1 year ago

pantovad commented 1 year ago

Expected Behavior

The sidekick should start with no error

Current Behavior

Getting error:

root@molecule-ubuntu-2204-s390x:~# uname -a
Linux molecule-ubuntu-2204-s390x 5.15.0-76-generic #83-Ubuntu SMP Thu Jun 15 19:17:22 UTC 2023 s390x s390x s390x GNU/Linux
root@molecule-ubuntu-2204-s390x:~# docker run --rm -it minio/sidekick:v3.0.4 --health-path /minio/health/ready --address :9000 http://minio:9000
exec /sidekick: exec format error

Possible Solution

Obviously the sidekick binary of amd64 is packed in s390x Docker layer - confirmed after unpacking the image on s390x and checking:

root@molecule-ubuntu-2204-s390x:~/sidekick/79fd9b7bf8e3b9ce9a946fb944dd9b9a5c32fec341b7407a621bcb8fbc44c5cf# tar xvf layer.tar 
sidekick
root@molecule-ubuntu-2204-s390x:~/sidekick/79fd9b7bf8e3b9ce9a946fb944dd9b9a5c32fec341b7407a621bcb8fbc44c5cf# ls -lrta
total 24572
-rwxrwxr-x 1 root root 12570624 Jul  8 00:40 sidekick
-rw-r--r-- 1 root root 12572160 Jul  8 00:40 layer.tar
-rw-r--r-- 1 root root      861 Jul  8 00:40 json
-rw-r--r-- 1 root root        3 Jul  8 00:40 VERSION
drwxr-xr-x 3 root root     4096 Aug 28 13:11 ..
drwxr-xr-x 2 root root     4096 Aug 28 13:11 .
root@molecule-ubuntu-2204-s390x:~/sidekick/79fd9b7bf8e3b9ce9a946fb944dd9b9a5c32fec341b7407a621bcb8fbc44c5cf# file sidekick
sidekick: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, Go BuildID=zb817YeBBYgvVJ7SZbL3/oM03Q_bBOrvhsCyegxkI/sAlWK_P4g-BvQDaHKy1K/A-3WHbw_LifNDEvDi_fG, stripped

Steps to Reproduce (for bugs)

On s390x machine (or Qemu s390x emulation) run:

docker run --rm -it minio/sidekick:v3.0.4
or
docker run --rm -it minio/sidekick:v3.0.4-s390x

Context

Regression

Your Environment

harshavardhana commented 1 year ago

fixed in master via 0d1c42cad7c4026df61bd8cc79623ab3e8280ff1