mirror of
https://github.com/containerd/containerd.git
synced 2026-11-06 13:27:16 +00:00
Three related bugs prevented Windows CPU affinity from round-tripping through UpdateContainerResources and ContainerStatus: 1. WithWindowsResources silently dropped AffinityCpus, so the kubelet's CPU manager reconcile loop never applied affinity changes to running containers. Add translation from CRI AffinityCpus to OCI WindowsCPUGroupAffinity. 2. copyResourcesToStatus never read the Affinity field from the OCI spec, so the stored container status always had AffinityCpus = nil. Add the read-back loop. 3. deepCopyOf omitted AffinityCpus when snapshotting Windows resources, silently dropping the field on every Status.Get(). Add the deep copy. Signed-off-by: zylxjtu <zhang.yuanliang@hotmail.com>