charts icon indicating copy to clipboard operation
charts copied to clipboard

metallb chart doesn't respect node architecture

Open aug70 opened this issue 3 years ago • 1 comments

Name and Version

bitnami/metallb 4.0.2

What steps will reproduce the bug?

1- Install bitnami/metallb 4.0.2 chart on a hybrid k8s cluster with amd64 and arm64 nodes. 2- arm64 node speaker fails with standard_init_linux.go:228: exec user process caused: exec format error.

Are you using any custom parameters or values?

values.yaml

controller:
  logLevel: debug
speaker:
  logLevel: debug

What is the expected behavior?

Architecture should dictate the image to be pulled. Arm64 node must not pull amd64 image.

What do you see instead?

Describe failing pod

$ kubectl describe pod/metallb-speaker-458rp -n metallb-system
.....
  Normal  Pulled  2m51s (x362 over 87m)  kubelet  Container image "docker.io/bitnami/metallb-speaker:0.13.4-debian-11-r7" already present on machine

Node images.

$ sudo crictl image docker.io/bitnami/metallb-speaker:0.13.4-debian-11-r7 -v
IMAGE                               TAG                   IMAGE ID            SIZE
docker.io/bitnami/metallb-speaker   0.13.4-debian-11-r7   225c88c0afb58       140MB

Additional information

See arch in the imageSpec (reads amd64 not arch64)

$ crictl inspecti docker.io/bitnami/metallb-speaker:0.13.4-debian-11-r7
{
  "status": {
    "id": "225c88c0afb5809658c120923eb1421e41e82c6c8c9123426936562f514ce2eb",
    "repoTags": [
      "docker.io/bitnami/metallb-speaker:0.13.4-debian-11-r7"
    ],
    "repoDigests": [
      "docker.io/bitnami/metallb-speaker@sha256:e32d8839efb7652e1b01a041ca017901a0c23c99dc8334780fd7fe394032527f"
    ],
    "size": "140437821",
    "uid": {
      "value": "1001"
    },
    "username": "",
    "spec": null,
    "pinned": false
  },
  "info": {
    "imageSpec": {
      "created": "2022-08-09T04:01:59.409408543Z",
      "architecture": "amd64",
      "os": "linux",
      "config": {
        "User": "1001",
        "Env": [
          "PATH=/opt/bitnami/metallb-speaker/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
          "HOME=/",
          "OS_ARCH=amd64",
          "OS_FLAVOUR=debian-11",
          "OS_NAME=linux",
          "APP_VERSION=0.13.4",
          "BITNAMI_APP_NAME=metallb-speaker"
        ],
        "Entrypoint": [
          "speaker"
        ],
        "Cmd": [
          "--help"
        ]
      },
      "rootfs": {
        "type": "layers",
        "diff_ids": [
          "sha256:d745f418fc70bf8570f4b4ebefbd27fb868cda7d46deed2278b9749349b00ce2",
          "sha256:47fa0b1dab9da6a65982c3c1c49c73dfebeaeb2e8ccd57ce2ad22556d8f652f4",
          "sha256:682ae4ea9e3d77353330ae8874c2471c21993b0cd64782cbc18ee50fa60f0a64",
          "sha256:b5284f95ff9a31945e0f016713f0e165c2de1a8fcc52e013645ef6d292ecf52b",
          "sha256:4a03d8083dd06c35544ee40033377c43ea50565f88b42efd5a3d1e61d76480be",
          "sha256:1d2053c5cbdab3d24b5797e5d643fb39048f747dfc1bc02db04286f129750f71"
        ]
      },
      "history": [
        {
          "created": "2022-07-20T00:12:01.269341908Z",
          "comment": "from Bitnami with love"
        },
        {
          "created": "2022-08-09T04:01:46.222774726Z",
          "created_by": "/bin/sh -c #(nop)  ENV HOME=/ OS_ARCH=amd64 OS_FLAVOUR=debian-11 OS_NAME=linux",
          "empty_layer": true
        },
        {
          "created": "2022-08-09T04:01:46.395038588Z",
          "created_by": "/bin/sh -c #(nop) COPY dir:481b10e4208d08d420347febc7e2c89a4b47e148465c84ccc179cbead5c81e6e in / "
        },
        {
          "created": "2022-08-09T04:01:46.57465386Z",
          "created_by": "/bin/bash -o pipefail -c #(nop)  SHELL [/bin/bash -o pipefail -c]",
          "empty_layer": true
        },
        {
          "created": "2022-08-09T04:01:52.620818833Z",
          "created_by": "/bin/bash -o pipefail -c install_packages ca-certificates curl gzip libc6 procps tar wget"
        },
        {
          "created": "2022-08-09T04:01:54.327127502Z",
          "created_by": "/bin/bash -o pipefail -c wget -nc -P /tmp/bitnami/pkg/cache/ https://downloads.bitnami.com/files/stacksmith/metallb-speaker-0.13.4-1-linux-amd64-debian-11.tar.gz \u0026\u0026     echo \"0d4e67b23d5d1857cdb4db272735c60956a5443bc6b32af887c163607511af70  /tmp/bitnami/pkg/cache/metallb-speaker-0.13.4-1-linux-amd64-debian-11.tar.gz\" | sha256sum -c - \u0026\u0026     tar -zxf /tmp/bitnami/pkg/cache/metallb-speaker-0.13.4-1-linux-amd64-debian-11.tar.gz -P --transform 's|^[^/]*/files|/opt/bitnami|' --wildcards '*/files' \u0026\u0026     rm -rf /tmp/bitnami/pkg/cache/metallb-speaker-0.13.4-1-linux-amd64-debian-11.tar.gz"
        },
        {
          "created": "2022-08-09T04:01:57.858663758Z",
          "created_by": "/bin/bash -o pipefail -c apt-get update \u0026\u0026 apt-get upgrade -y \u0026\u0026     rm -r /var/lib/apt/lists /var/cache/apt/archives"
        },
        {
          "created": "2022-08-09T04:01:58.694035903Z",
          "created_by": "/bin/bash -o pipefail -c chmod g+rwX /opt/bitnami"
        },
        {
          "created": "2022-08-09T04:01:58.858807611Z",
          "created_by": "/bin/bash -o pipefail -c #(nop)  ENV APP_VERSION=0.13.4 BITNAMI_APP_NAME=metallb-speaker PATH=/opt/bitnami/metallb-speaker/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
          "empty_layer": true
        },
        {
          "created": "2022-08-09T04:01:59.058663846Z",
          "created_by": "/bin/bash -o pipefail -c #(nop)  USER 1001",
          "empty_layer": true
        },
        {
          "created": "2022-08-09T04:01:59.235661428Z",
          "created_by": "/bin/bash -o pipefail -c #(nop)  ENTRYPOINT [\"speaker\"]",
          "empty_layer": true
        },
        {
          "created": "2022-08-09T04:01:59.409408543Z",
          "created_by": "/bin/bash -o pipefail -c #(nop)  CMD [\"--help\"]",
          "empty_layer": true
        }
      ]
    }
  }
}

aug70 avatar Aug 10 '22 16:08 aug70

Metallb supports arm64 (see arm64 images https://quay.io/repository/metallb/metallb-operator/manifest/sha256:c3400e45f04ed1ae12da7ccb2401509d17c0b6ca6ca146dfe29bf4d6a6cc3689 ) Do you guys not support arm64? https://hub.docker.com/r/bitnami/metallb-speaker/tags?page=1&name=0.13.4 All images here are amd64 :-/

aug70 avatar Aug 10 '22 16:08 aug70

Hi, Yes currently our images are AMD64 only. Could you take a look to this pinned issue ? https://github.com/bitnami/charts/issues/7305

rafariossaa avatar Aug 11 '22 06:08 rafariossaa

@rafariossaa thank you for looking at this, closing this ticket.

aug70 avatar Aug 11 '22 14:08 aug70

Hi all, we are more than happy to announce that from now on the Bitnami container catalog is available as multi-arch in Docker Hub 🎉 🎉

Screenshot 2023-02-24 at 08 16 50

This means you don’t need to specify anything when pulling the container images from Docker Hub, Docker (or any other software) will automatically pull the container image matching the host platform from which the pull command was issued.

Here you can find more info about this announcement.


As usual, please create a new GitHub issue if you would like to report any bug or problem or directly contribute by creating a PR. Here you can find the contributing guidelines.

carrodher avatar Feb 24 '23 08:02 carrodher