runtime-rs: consider removing/disabling the RemoveContainer 10 seconds timeout

Author: danmihai1Created Sep 28, 2026Updated Sep 28, 2026
Labelsenhancementneeds-review

Copilot pointed out in https://github.com/kata-containers/kata-containers/pull/13891 that runtime-rs sets the timout field of RemoveContainerRequest to 10 seconds. That can have as effects:

  1. Leaving a Kata Agent clean-up task running in the background, after the Agent returns an ETIME error from the ttrpc request. remove_container_resources() doesn't seem to be called by the Agent after such timeout.

  2. Removing the Agent Policy state corresponding to the container before its removal finished. Consider a CoCo pod using container1 based on image image1. If we remove the Policy state of this container after hitting this timeout, the k8s control plane will be able to start container2 using the same image1 while container1 is still being removed.

I have not found a similar RemoveContainer timeout in runtime-go. So maybe we should consider removing this timeout value from runtime-rs too.

This is the relevant Agent code:

https://github.com/kata-containers/kata-containers/blob/e803883216e8f1f9357cec3850657d693b4b29fe/src/agent/src/rpc.rs#L468

CC: @kata-containers/architecture-committee

Source: kata-containers/kata-containers