-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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 and ARM airgap image tarballs should not contain AMD64 images #1285
Comments
Thanks for the info @gbritton! We definitely need to dig deeper into this. Strangely it appears that even tho the metadata says amd64, the extracted binaries look to be the appropriate architecture. Since we are using a simple docker command to download and save those images it appears to be an upstream docker issue (https://github.com/rancher/k3s/blob/master/scripts/package-airgap). |
These may be related: #1278 and #1094 (I've seen a few other complaints online, but these at least are here). These appear to be people hitting containerd errors when using the airgapped images on arm64. In my limited toying with "ctr i import airgap-images.tar" it fails on the mixed images. Curiously, this appears to succeed back on v0.9.1, and the few missing images got pulled from the internet. Newer versions I end up with containerd complaining about missing objects, I'm guessing because the import of improper data left things in a bad state. I wish I had time to debug this further, but this is at least the impression I've gotten from what little I've dug into. |
@erikwilson looking at |
I am also having the same problem. The three images that have amd64 as architecture are coredns, pause, and metrics server. It causes the container creation to hang because it can't resolve the platform type. |
I think I understand what the issue is (and have worked around it in my own setup which gathers a airgap images independently). The multiarch manifests refer to say amd64, arm, and arm64 images. Doing just "docker save" simply dumps the existing manifest as-is into the archive along with the single architecture's layers. When this is loaded into containerd, the manifest still refers to additional blobs that aren't needed, but containerd still complains aren't found. My workaround is to use skopeo in my build system to pull images down into local storage, then exporting that all as an oci bundle with self-consistent manifests. Unfortunately, it's not cleanly separable and isn't a drop-in fix for what k3s releases build, but hopefully this helps others fix it.
|
Thanks for the quick turnaround!
Since I’m new at this, my options were limited. I did a brute force of pulling the images from docker hub with the “--platform=arm64” option, pushed them to my private repository to acquire the matching digests as docker hub, did a docker save to tar, extracted the files to edit the json files that still had the amd64 architectures, and tarred them up again. It worked. Now with your explanation, I finally understand why the manifests were incorrect. Is there a docker save –platform<arch> option?
|
@shariperryman Thanks a lot this also worked for me. Nevertheless, are the any news on this topic? |
I just faceplanted into this issue. The airgapped install seems to be broken and all system ns pods are stuck at ContainerCreating.
Any updates or a recommended workaround? |
We were targeting a fix for v1.18.7 today, but due to complications we are going to postpone this. This is because the images that we would need to repush to fix this are also used by RKE. To safely ensure we don't break production, we need to have a more methodical and thorough approach that encompases testing BOTH RKE and K3S. HOWEVER, we may be able to fix this out of band and it is on our radar to try to get to this soon - just not in time for new patch releases today. We believe we need to do the following:
Our apologies for delay on this but we believe it's in everybody's best interests (we don't want to break people in production). I have also taken note of this issue in our August patch releases issue here: #2113 |
@rancher-max wait for #1908 to get in before test. These are both intertwined so should just wait. |
I will note that several of the upstream images are still misconfigured and claim to be the wrong arch, but are in fact correct. We are working around this by telling containerd to not skip loading layers for images that are incorrectly configured. |
Validated using
|
That's correct @rancher-max, and is what I was getting at in #1285 (comment). Upstream managed to build them such that they have the correct arch in the manifest list, and the correct arch for the binaries, but the wrong arch in the image config json. We are fine just ignoring this for now. Upstream has fixed this in newer releases of the images, but we don't want to bump those at the moment. |
Version:
v1.17.0+k3s.1
Describe the bug
ARM64 and ARM airgap image tarballs contain some AMD64 images instead of the correct arch.
To Reproduce
Examine released files. Unpacked k3s-airgap-images-arm.tar and examined content with:
for d in *.json; do [ $d != manifest.json ] && jq .architecture < $d; done
Expected behavior
Should only see "arm" for all images.
Actual behavior
"amd64"
"arm"
"arm"
"arm"
"amd64"
"amd64"
"arm"
Additional context
This appears to have been broken for a while, maybe it never worked correctly on arm/arm64.
The text was updated successfully, but these errors were encountered: