okd-project / okd

The self-managing, auto-upgrading, Kubernetes distribution for everyone
https://okd.io
Apache License 2.0
1.67k stars 289 forks source link

Release binaries after 4.13.0-0.okd-2023-09-30-084937 are broken on Alpine Linux #1913

Closed CVanF5 closed 2 months ago

CVanF5 commented 3 months ago

Not sure if intentional, but we deploy OpenShift via automation, and the machine we use is Alpine Linux 3.18.

version 4.13.0-0.okd-2023-09-30-084937 works fine version 4.13.0-0.okd-2023-10-28-065448 and later cannot be executed.

I wouldn't have expected a date release bump to break on musl based OSes.

# tar xf openshift-install-linux-4.13.0-0.okd-2023-09-30-084937.tar.gz

# ./openshift-install version
./openshift-install 4.13.0-0.okd-2023-09-30-084937
built from commit 7cbe79cbc9a8704552b95c96721b7c73e0d5e552
release image quay.io/openshift/okd@sha256:fc0dd43b87942f40d7eec16782ca2965199ced131906405127837884b5342b92
release architecture amd64
# tar xf openshift-install-linux-4.13.0-0.okd-2023-10-28-065448.tar.gz
# ./openshift-install version
bash: ./openshift-install: cannot execute: required file not found
codespearhead commented 2 months ago

Is openshift-install anywhere to be found after the extraction of the compressed file?

If so, try making it executable:

chmod +x ./openshift-install &&
./openshift-install
CVanF5 commented 2 months ago

Yes, the binary is there, and it already has execute permissions. Here's an example with the latest release, really easy to repro with Docker

repro steps

docker run -it alpine:3.18
Unable to find image 'alpine:3.18' locally
3.18: Pulling from library/alpine
619be1103602: Already exists 
Digest: sha256:11e21d7b981a59554b3f822c49f6e9f57b6068bb74f49c4cd5cc4c663c7e5160
Status: Downloaded newer image for alpine:3.18
/ # apk add curl
...
(7/7) Installing curl (8.5.0-r0)
Executing busybox-1.36.1-r5.trigger
Executing ca-certificates-20240226-r0.trigger
OK: 12 MiB in 22 packages
/ # curl -LO https://github.com/okd-project/okd/releases/download/4.15.0-0.okd-2024-03-10-010116/openshift-install-linux-4.15.0-0.okd-2024-03-10-010116.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  418M  100  418M    0     0  3640k      0  0:01:57  0:01:57 --:--:-- 3820k
/ # tar xf openshift-install-linux-4.15.0-0.okd-2024-03-10-010116.tar.gz
/ # ls -al openshift-install
-rwxr-xr-x    1 root     root     680601624 Mar  6 08:54 openshift-install
/ # ./openshift-install
/bin/sh: ./openshift-install: not found

If we add libc6-compat we get a little farther

/ # apk add libc6-compat
/ # ./openshift-install
Error loading shared library libresolv.so.2: No such file or directory (needed by ./openshift-install)
Error relocating ./openshift-install: __res_search: symbol not found

It just seems like musl compatibility was lost during between version 4.13.0-0.okd-2023-09-30-084937 version 4.13.0-0.okd-2023-10-28-065448

codespearhead commented 2 months ago

Run the following command mentioned in this comment and try again:

apk add gcompat
CVanF5 commented 2 months ago

That did it! Thank you @codespearhead Closing as resolved