cri-resource-manager icon indicating copy to clipboard operation
cri-resource-manager copied to clipboard

Container resources are not properly restored for out-of-sync containers.

Open ppalucki opened this issue 2 years ago • 2 comments

Describe the bug

When I remove cri-rm cache (/var/lib/cri-rm/cache) and restart cri-rm the mechanism for restoring list of containers misses some information - one of them is the resources requests/limits because such information is provided by ListContainerResponse.

Expected behavior When cache is removed or cri-resmgr is started for a first time - all the containers in cache have proper resources based on pod.spec.containers.resources.

To Reproduce

  1. Install cri-rm on some kubernetes worker node
  2. compare existing pods containers resource requests with those found in /var/lib/cri-resmgr/cache
 cat /var/lib/cri-resmgr/cache | jq '.Containers[].Resources'

all are empty

Environment SLES, 5.3.18

Additional context probably a limitation of ListContainerResponse (because resources info is not provider) in https://github.com/intel/cri-resource-manager/blob/2ce10b0922852c7ff413db14c17fdd83c77e2860/pkg/cri/resource-manager/requests.go#L170

ppalucki avatar Nov 15 '22 18:11 ppalucki