Skip to content

cri-integration: TestUpdateContainerResources_MemoryLimit fails on cgroup v2 hosts #7890

@AkihiroSuda

Description

@AkihiroSuda
$ GITHUB_WORKSPACE="" ENABLE_CRI_SANDBOXES="" CONTAINERD_RUNTIME=io.containerd.runc.v2 FOCUS=TestUpdateContainerResources_Memory make cri-integration
...
=== RUN   TestUpdateContainerResources_MemorySwap                                                                                                                                                                                                    
    container_update_resources_test.go:157: Swap or swap accounting are not enabled. Swap is required for this test                                                                                                                                  
--- SKIP: TestUpdateContainerResources_MemorySwap (0.00s)                                                                                                                                                                                            
=== RUN   TestUpdateContainerResources_MemoryLimit                                                                                                                                                                                                       container_update_resources_test.go:233: Create a sandbox                                                                                                                                                                                         
INFO[0000] Using the following image list: {Alpine:docker.io/library/alpine:latest BusyBox:docker.io/library/busybox:latest Pause:registry.k8s.io/pause:3.8 ResourceConsumer:registry.k8s.io/e2e-test-images/resource-consumer:1.10 VolumeCopyUp:ghcr
.io/containerd/volume-copy-up:2.1 VolumeOwnership:ghcr.io/containerd/volume-ownership:2.1}                                                                                                                                                           
    main_test.go:663: Image "registry.k8s.io/pause:3.8" already exists, not pulling.                                                                                                                                                                 
    container_update_resources_test.go:246: Create a container with memory limit                                                                                                                                                                     
    container_update_resources_test.go:257: Check memory limit in container OCI spec                                                                                                                                                                 
    container_update_resources_test.go:57:                                                                                                                                                                                                           
                Error Trace:    /home/suda/gopath/src/github.com/containerd/containerd/container_update_resources_test.go:57                                                                                                                         
                                                        /home/suda/gopath/src/github.com/containerd/containerd/container_update_resources_test.go:263                                                                                                
                Error:          Not equal: 
                                expected: 0
                                actual  : 209715200
                Test:           TestUpdateContainerResources_MemoryLimit
    container_update_resources_test.go:265: Update container memory limit after created
    container_update_resources_test.go:271: Check memory limit in container OCI spec
    container_update_resources_test.go:57: 
                Error Trace:    /home/suda/gopath/src/github.com/containerd/containerd/container_update_resources_test.go:57
                                                        /home/suda/gopath/src/github.com/containerd/containerd/container_update_resources_test.go:275
                Error:          Not equal: 
                                expected: 0
                                actual  : 419430400
                Test:           TestUpdateContainerResources_MemoryLimit
    container_update_resources_test.go:277: Start the container
    container_update_resources_test.go:282: Check memory limit in cgroup
    container_update_resources_test.go:286: 
                Error Trace:    /home/suda/gopath/src/github.com/containerd/containerd/container_update_resources_test.go:286
                Error:          Not equal: 
                                expected: 0x19000000
                                actual  : 0x0
                Test:           TestUpdateContainerResources_MemoryLimit
    container_update_resources_test.go:288: Update container memory limit after started
    container_update_resources_test.go:294: Check memory limit in container OCI spec
    container_update_resources_test.go:57: 
                Error Trace:    /home/suda/gopath/src/github.com/containerd/containerd/container_update_resources_test.go:57
                                                        /home/suda/gopath/src/github.com/containerd/containerd/container_update_resources_test.go:298
                Error:          Not equal: 
                                expected: 0
                                actual  : 838860800
                Test:           TestUpdateContainerResources_MemoryLimit
    container_update_resources_test.go:300: Check memory limit in cgroup
    container_update_resources_test.go:304: 
                Error Trace:    /home/suda/gopath/src/github.com/containerd/containerd/container_update_resources_test.go:304
                Error:          Not equal: 
                                expected: 0x32000000
                                actual  : 0x0
                Test:           TestUpdateContainerResources_MemoryLimit
--- FAIL: TestUpdateContainerResources_MemoryLimit (1.14s)
FAIL

containerd d769f03 , runc v1.1.4, Ubuntu 22.04
RAM: 16GB, Swap: 0

This was not caught in the CI so far because the cgroup v2 CI lacks cri-integration (#7889)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions