Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement raw_exec cgroups v2 support #12348

Closed
shoenig opened this issue Mar 22, 2022 · 2 comments
Closed

Implement raw_exec cgroups v2 support #12348

shoenig opened this issue Mar 22, 2022 · 2 comments
Assignees
Labels
Milestone

Comments

@shoenig
Copy link
Member

shoenig commented Mar 22, 2022

While working on #11289 (comment) (cpuset cgroup v2) I've noticed raw_exec not behaving on machines where cgroups v1 is not mounted.

Will Skip out these tests for now and come back to this.

➜ mount -l | grep cgroup
cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate)
    driver_test.go:387: 
        	Error Trace:	driver_test.go:387
        	            				asm_amd64.s:1581
        	Error:      	Received unexpected error:
        	            	rpc error: code = Unknown desc = executor Shutdown failed: rpc error: code = Unknown desc = 1 error occurred:
        	            		* not implemented for cgroup v2 unified hierarchy
        	            	
        	Test:       	TestRawExecDriver_Start_Kill_Wait_Cgroup
@shoenig shoenig self-assigned this Mar 22, 2022
@shoenig shoenig added the theme/cgroups cgroups issues label Mar 22, 2022
@shoenig shoenig added this to the 1.3.0 milestone Mar 22, 2022
shoenig added a commit that referenced this issue Mar 31, 2022
This PR adds support for the raw_exec driver on systems with only cgroups v2.

The raw exec driver is able to use cgroups to manage processes. This happens
only on Linux, when exec_driver is enabled, and the no_cgroups option is not
set. The driver uses the freezer controller to freeze processes of a task,
issue a sigkill, then unfreeze. Previously the implementation assumed cgroups
v1, and now it also supports cgroups v2.

There is a bit of refactoring in this PR, but the fundamental design remains
the same.

Closes #12351 #12348
shoenig added a commit that referenced this issue Apr 4, 2022
This PR adds support for the raw_exec driver on systems with only cgroups v2.

The raw exec driver is able to use cgroups to manage processes. This happens
only on Linux, when exec_driver is enabled, and the no_cgroups option is not
set. The driver uses the freezer controller to freeze processes of a task,
issue a sigkill, then unfreeze. Previously the implementation assumed cgroups
v1, and now it also supports cgroups v2.

There is a bit of refactoring in this PR, but the fundamental design remains
the same.

Closes #12351 #12348
@shoenig
Copy link
Member Author

shoenig commented Apr 5, 2022

Closed by #12419

@shoenig shoenig closed this as completed Apr 5, 2022
@github-actions
Copy link

github-actions bot commented Oct 9, 2022

I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant