-
Notifications
You must be signed in to change notification settings - Fork 950
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
bugfix: mount /sys/fs/cgroup into container #1314
bugfix: mount /sys/fs/cgroup into container #1314
Conversation
ctrd/container.go
Outdated
// | ||
// TODO: The github.com/containerd/containerd/oci provides oci.WithMounts | ||
// in v1.1.0. Before we upgrade it, we use assign way to handle the case. | ||
container.Spec.Mounts = newOCILinuxMounts() |
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.
@fuweid , can you put these logic into file like daemon/mgr/spec_mount.go
, since this is oci spec related ?
Signed-off-by: Wei Fu <fhfuwei@163.com>
@Ace-Tang I have updated and Please take a look. Thanks |
Codecov Report
@@ Coverage Diff @@
## master #1314 +/- ##
========================================
- Coverage 17.4% 16.41% -1%
========================================
Files 189 183 -6
Lines 11767 11314 -453
========================================
- Hits 2048 1857 -191
+ Misses 9572 9321 -251
+ Partials 147 136 -11
|
LGTM |
I think we could add an integration test case for this feature, right? @fuweid |
@allencloud , yes. I will do that in the following PR.But Reasonable. |
Signed-off-by: Wei Fu fhfuwei@163.com
Ⅰ. Describe what this PR did
Mount
/sys/fs/cgroup
into the container.Ⅱ. Does this pull request fix one issue?
#1247
Ⅲ. Describe how you did it
Use oci.Spec and containerd will help us to do mount.
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews