CRI: remove disable_cgroup
				
					
				
			`disable_cgroup` was implemenetd in containerd/cri PR 970 (Nov 2018) for supporting very early version of Usernetes on cgroup v1 hosts, when most distros were still not ready to support cgroup v2. This configuration is no longer needed, as cgroup v2 delegation is now supported on almost all distros. Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
This commit is contained in:
		| @@ -1343,22 +1343,6 @@ func TestHostname(t *testing.T) { | ||||
| 	} | ||||
| } | ||||
|  | ||||
| func TestDisableCgroup(t *testing.T) { | ||||
| 	containerConfig, sandboxConfig, imageConfig, _ := getCreateContainerTestData() | ||||
| 	ociRuntime := config.Runtime{} | ||||
| 	c := newTestCRIService() | ||||
| 	c.config.DisableCgroup = true | ||||
| 	spec, err := c.buildContainerSpec(currentPlatform, "test-id", "sandbox-id", 1234, "", "container-name", testImageName, containerConfig, sandboxConfig, imageConfig, nil, ociRuntime, nil) | ||||
| 	require.NoError(t, err) | ||||
|  | ||||
| 	t.Log("resource limit should not be set") | ||||
| 	assert.Nil(t, spec.Linux.Resources.Memory) | ||||
| 	assert.Nil(t, spec.Linux.Resources.CPU) | ||||
|  | ||||
| 	t.Log("cgroup path should be empty") | ||||
| 	assert.Empty(t, spec.Linux.CgroupsPath) | ||||
| } | ||||
|  | ||||
| func TestGenerateUserString(t *testing.T) { | ||||
| 	type testcase struct { | ||||
| 		// the name of the test case | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Akihiro Suda
					Akihiro Suda