googleforgames / agones

Dedicated Game Server Hosting and Scaling for Multiplayer Games on Kubernetes
https://agones.dev
Apache License 2.0
6.12k stars 818 forks source link

Cannot Use Agones SDK Image on Windows 2022 Node Due to Missing os.version in Docker Manifest #3978

Open kangjk1017 opened 2 months ago

kangjk1017 commented 2 months ago

What happened: The Agones SDK image cannot be used on Windows 2022 nodes. This issue occurs consistently across all versions starting from 1.40. The root cause appears to be the absence of the os.version field in the Docker image manifest. Consequently, the image is always pulled as if it were for Windows 2019, regardless of whether the actual node OS is Windows 2022 or Windows 2019. https://console.cloud.google.com/artifacts/docker/agones-images/us/release/agones-sdk/sha256:3684e3e93891c8faf6a6e69aad2f86986011ee0596d26c3b84499e500b6bbade;tab=manifest

What you expected to happen: The Agones SDK Docker image should recognize and be compatible with the actual OS version of the node, whether it is Windows 2022 or Windows 2019. The os.version field should be present in the Docker image manifest to ensure the correct image is pulled according to the node's OS.

How to reproduce it (as minimally and precisely as possible): Attempt to deploy the Agones SDK Docker image on a Windows 2022 node.

Anything else we need to know?: This issue is not limited to the Agones SDK image; it is likely to affect other Agones Docker images as well.

Environment:

markmandel commented 1 month ago

Ooh weird!

A couple of potential thoughts:

1) We did move all image building to Cloud Build - there may be an issue with the older Docker server version they run (we would need to run that back to the Cloud Build team I think) 2) we also shifted to using docker buildx to create the manifest (line below). I wonder if that also caused issue with Cloud Build being an older Docker server version.

https://github.com/googleforgames/agones/blob/a27aeab7e2405e491f6cb27e43721131ea21c6e6/build/Makefile#L714

markmandel commented 1 month ago

Another quick thought, not sure if it will solve the issue, but in gcr.io/cloud-builders/docker there is a 24.0.9 tag -- maybe there is a bug fix in there. Might be worth upgrading and finding out.

e.g.:

https://github.com/googleforgames/agones/blob/main/build/release/post_cloudbuild.yaml#L61 (although it would need to be changed across the whole code base)

igooch commented 1 month ago

Adding a note that as a workaround you should be able to use the image tag for {$VERSION}-windows_amd64-ltsc2022. image

As Mark noted here there's a helm variable agones.image.tag to set the image tag.