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

arm64 support not working #390

Closed
omrirosner-clx opened this issue Nov 29, 2022 · 3 comments · Fixed by #404
Closed

arm64 support not working #390

omrirosner-clx opened this issue Nov 29, 2022 · 3 comments · Fixed by #404
Labels
bug Something isn't working

Comments

@omrirosner-clx
Copy link

Deploying redis operator on a arm64 linux machine (Ubuntu 20.04.4 LTS) not working with versions v0.13.0 and v0.13.0-arm64.

Both cause error:
exec /manager: exec format error

while using these images on amd machines does work.

kubectl version v1.25.0.

@omrirosner-clx omrirosner-clx added the bug Something isn't working label Nov 29, 2022
@jaysonsantos
Copy link

I just came because of this as well, there are two problems, the binary in the arm64 image is actually amd64 and the manifest only contains one, ideally the pipeline should converge into a last step where docker manifest create is used to "merge" the two images, so one does not have to pull individual images and docker can decide which one to pull

example of the wrong binary

 docker cp $(docker create quay.io/opstree/redis-operator:v0.13.0-arm64):/manager . && file manager
manager: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, Go BuildID=03sesutLMK030oMans6P/D3RYcHF21Tf_wDetqsvy/pbrO2uB39VyJnjT4v9nN/KJDjzAvOzenhMYxoMvAq, not stripped

@jaysonsantos
Copy link

@omrirosner-clx maybe not ideal to you using an rando's image but, i have it built for both platforms here https://github.com/jaysonsantos/bunderwar/pkgs/container/bunderwar/49862207?tag=redis-operator-0.13.0

@mprimeaux
Copy link
Contributor

I'm trying to deploy the redis-operator on arm64 and it is failing as if it were Intel-based with the following error:

exec /manager: exec format error

Same error as @omrirosner-clx.

Logs
│ Events:                                                                                                                                                    │
│   Type     Reason     Age                    From               Message                                                                                    │
│   ----     ------     ----                   ----               -------                                                                                    │
│   Normal   Scheduled  6m44s                  default-scheduler  Successfully assigned go-scriptures/redis-operator-868f7457d4-48zvg to minikube            │
│   Normal   Pulled     5m53s                  kubelet            Successfully pulled image "quay.io/opstree/redis-operator:latest-arm64" in 50.030980085s   │
│   Normal   Pulled     5m42s                  kubelet            Successfully pulled image "quay.io/opstree/redis-operator:latest-arm64" in 10.134411461s   │
│   Normal   Pulled     5m27s                  kubelet            Successfully pulled image "quay.io/opstree/redis-operator:latest-arm64" in 315.338751ms    │
│   Normal   Created    4m58s (x4 over 5m53s)  kubelet            Created container redis-operator                                                           │
│   Normal   Started    4m58s (x4 over 5m53s)  kubelet            Started container redis-operator                                                           │
│   Normal   Pulled     4m58s                  kubelet            Successfully pulled image "quay.io/opstree/redis-operator:latest-arm64" in 267.926509ms    │
│   Normal   Pulling    4m7s (x5 over 6m43s)   kubelet            Pulling image "quay.io/opstree/redis-operator:latest-arm64"                                │
│   Warning  BackOff    96s (x20 over 5m41s)   kubelet            Back-off restarting failed container

Here's values file I am using:

redisOperator:
  imageTag: latest-arm64

I've used other container image tags here that have the -arm64 suffix but they all result in the same error.

Executing nerdctl inspect quay.io/opstree/redis-operator:latest-arm64 returns the following, which indicates the manifest is for arm64.

[
    {
        "Id": "sha256:282ab6d872920e53a754e05db82a4296489f303d3cdacc4d547aed5024c15760",
        "RepoTags": [
            "quay.io/opstree/redis-operator:latest-arm64"
        ],
        "RepoDigests": [
            "quay.io/opstree/redis-operator@sha256:4b2c75a1548fff6838d8e3a8ad376b38be72c0484b256bd3bf87b769514e3a60"
        ],
        "Comment": "",
        "Created": "2022-12-28T08:37:51.145092927Z",
        "Author": "",
        "Config": {
            "User": "65532:65532",
            "AttachStdin": false,
            "Env": [
                "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                "SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt"
            ],
            "WorkingDir": "/",
            "Entrypoint": [
                "/manager"
            ],
            "Labels": {
                "com.azure.dev.image.build.buildnumber": "20221228.1",
                "com.azure.dev.image.build.builduri": "vstfs:///Build/Build/631",
                "com.azure.dev.image.build.definitionname": "redis-operator",
                "com.azure.dev.image.build.repository.name": "OT-CONTAINER-KIT/redis-operator",
                "com.azure.dev.image.build.repository.uri": "https://github.com/OT-CONTAINER-KIT/redis-operator",
                "com.azure.dev.image.build.sourcebranchname": "master",
                "com.azure.dev.image.build.sourceversion": "0e975e11c37dab8c040ef53291a0efd06b61a486",
                "com.azure.dev.image.system.teamfoundationcollectionuri": "https://dev.azure.com/opstreedevops/",
                "com.azure.dev.image.system.teamproject": "DevOps",
                "maintainer": "The Opstree Opensource \u003c[email protected]\u003e"
            }
        },
        "Architecture": "arm64",
        "Os": "linux",
        "RootFS": {
            "Type": "layers",
            "Layers": [
                "sha256:fba4381f2bb70de24aadfb483fb2b5254e81b0f8db1959526a1beec8370363bc",
                "sha256:0dc39eeb34aec57418acce4ae77151071d41d9faa92f2af41d7b607fd8d8bb6b"
            ]
        },
        "Metadata": {
            "LastTagTime": "0001-01-01T00:00:00Z"
        }
    }
]

I do see an ARCH variable for the Dockerfile here. However, the Dockerfile is structured to build amd64 container images.

I'll see about submitting a PR.

iamabhishek-dubey pushed a commit that referenced this issue Jan 16, 2023
* Addresses issue
[#390](#391) by
adding support for multi-architecture container images.

* Removed --platform due to linting rule constraints.

* Removed echo statements due to lint rules.

Signed-off-by: Michael Primeaux <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants