kairos-io / kairos

:penguin: The immutable Linux meta-distribution for edge Kubernetes.
https://kairos.io
Apache License 2.0
1.1k stars 97 forks source link

osbuilder image is multiplatform, but the packaged `elemental` is not #451

Closed jbalonso closed 1 year ago

jbalonso commented 1 year ago

On an arm64 node:

$ kubectl logs -n hk-system opensuse-arm-rpi-v1-1-7-699d6bc7f4-tzfsd -c build-iso
+ /entrypoint.sh --debug --name opensuse-arm-rpi-v1-1-7 build-iso --date=false --overlay-iso /iso/iso-overlay --output /public dir:/rootfs
+ elemental --config-dir /config --debug --name opensuse-arm-rpi-v1-1-7 build-iso --date=false --overlay-iso /iso/iso-overlay --output /public dir:/rootfs
/entrypoint.sh: line 5: /usr/bin/elemental: cannot execute binary file: Exec format error

Without deeply investigating, it looks like /usr/bin/elemental is likely an amd64 binary rather than an arm64 binary, which would be required for the node in question.

mudler commented 1 year ago

good catch! and a good point, we are consuming there images from packages that are not built multi-arch.

@jimmykarily always had on top of my head - maybe we can do a simple post-ci process that links the various arches after builds happens on kairos-io/packages, or pick up luet to output multi-arch images directly.

jbalonso commented 1 year ago

It occurs to me that I found kairos-io/helm-charts#5 because I needed to use a nodeSelector... because I found that the controller (osbuilder manager) was not multiarch...

... which means I completely lost track of where the builder images come from (as opposed to the osbuilder manager).

Itxaka commented 1 year ago

wops, I fixed this as part of the 0.6.0 release https://github.com/kairos-io/osbuilder/releases/tag/v0.6.0 so now the arm64 images will have the arm64 elemental and x86 the x86 :D