-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Add support for CgroupsPath #397
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,6 +16,9 @@ type Cgroup struct { | |
| // name of parent cgroup or slice | ||
| Parent string `json:"parent"` | ||
|
|
||
| // CgroupsPath specifies the path to cgroups that are created and/or joined by the container. | ||
| CgroupsPath string `json:"cgroupsPath"` | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we want to avoid adding an additional field, we could overload Name and treat it as cgroupsPath if it is absolute. That way we don't need to have Parent, Name as well as CgroupsPath. WDYT?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, that's what I planed, when we merge this, we can start removing
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hmm i think we can just start removing them here ? I think it's also clearer when we integrate this with docker too since there will be complication errors :p |
||
|
|
||
| // If this is true allow access to any kind of device within the container. If false, allow access only to devices explicitly listed in the allowed_devices list. | ||
| AllowAllDevices bool `json:"allow_all_devices"` | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure we should just completely ignore parent and name if cgroupsPath is provided. Docker uses parent and name, and do we want to break compatibility? Also, cgroupsPath must always be relative to the cgroups mount on the system. I'm not sure if the same restriction applies to parent and name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It won't break compatibility, Docker can still use parent and name, but before it call runc apis, Docker needs to combine parent and name to CgroupPath. And yes, I think parent and name also have the restriction to be relative to cgroups mount point.