Open krotz-dieter opened 1 year ago
Looks like a platform matching issue with your Windows version and the data in the image? @dcantah or @jterry75 ?
Why is it working then with the docker daemon ? The container is the same: mcr.microsoft.com/windows/nanoserver:ltsc2022, it should behave the same with containerd also.
The Docker daemon has its own implementation of the registry client interactions; our platform matching code is probably different because of this. It's possible we have a bug or tighter restriction than Docker engine on the Windows matching; we will have to dig into that and understand why; that's why I copied in our Windows experts :)
Yea Phil nailed it, the platform matcher for CRI (k8s entrypoint) matches to the hosts build exactly and will reject anything else. So in this case 20348 != 22000 (win11). Reason for the restriction being hyper-v containers weren't supported until very recently through the CRI plugin here, so pulling any other image wasn't valid as windows used to mandate the host <-> container image build to match. That was actually relaxed recently, so the ltsc2022 image should work fine on any host that's higher in build number, so we should probably put in some logic for this as what you're trying to do is completely valid.
Thanks for the info, can you point me to the code of the platform matcher CRI ? Would like to try out myself to see if I can get it running. Also, do you plan to incorporate such a change for Windows containers ?
@SyngoPredevelopment Sure, https://github.com/containerd/containerd/blob/main/platforms/defaults_windows.go. And yes! Need to work out any edge cases but yes, it'd be a shame to not allow this functionality if it's supported in the platform now
OK, many thanks
@dcantah @SyngoPredevelopment any update here?
Hey, no updates on my end but https://github.com/containerd/containerd/pull/7856 looks to address platform matching discrepancies here a bit
We solved it in another way, we add in the manifest the supported OS versions.
Solution is cooking there, I guess: #8137
Dirty workaround is to match the os.version in manifest file to your client os version.
Description
On Windows 11 Version 10.0.22000.978
docker pull mcr.microsoft.com/windows/nanoserver:ltsc2022
works fine, it pulls the image and
docker run --isolation process -m 4G -it --rm --name test-run mcr.microsoft.com/windows/nanoserver:ltsc2022
also works ! With containerdcrictl pull mcr.microsoft.com/windows/nanoserver:ltsc2022
we get the error:
The logs from containerd service:
The expectation would be that it would work also within containerd.
Steps to reproduce the issue
crictl pull mcr.microsoft.com/windows/nanoserver:ltsc2022
Describe the results you received and expected
The expectation woould be that it would work also within containerd.
What version of containerd are you using?
containerd github.com/containerd/containerd v1.6.8 9cd3357b7fd7218e4aec3eae239db1f68a5a6ec6
Any other relevant information
crictl info
Show configuration if it is related to CRI plugin.