mirror of
https://github.com/containerd/containerd.git
synced 2026-10-28 17:45:13 +08:00
The UpdateSandboxRequest and UpdateSandboxResponse messages have been present since the Sandbox API was introduced, but no RPC ever used them, and controllerLocal.Update was an unconditional no-op. A shim therefore had no way to learn about an update of the sandbox metadata object, a CRI pod level resource resize for example. Add the missing UpdateSandbox RPC and extend UpdateSandboxRequest with the sandbox object and the updated fieldpaths, mirroring the daemon side ControllerUpdateRequest, which is what Controller.Update carries. The pre-existing resources and annotations fields are kept but marked deprecated, containerd has no input to populate them from. controllerLocal.Update now calls the new RPC. Implementing it is optional: shims that don't support updates answer with a ttrpc Unimplemented error, which maps to errdefs.ErrNotImplemented and is already tolerated by the CRI caller in UpdatePodSandboxResources. next.txtpb additionally picks up unrelated churn, the committed descriptor set does not match what the pinned buf version produces. Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>