Skip to content

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

@ppalucki

Description

@ppalucki

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

func (m *resmgr) syncWithCRI(ctx context.Context) ([]cache.Container, []cache.Container, error) {

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions