Commit 13aaafd
committed
Bugfix: can't write to cpuset cgroup
Using linux resource in spec:
```
"resources": {
"cpu": {
"period": 100000,
"quota": 40000
},
...
}
```
In this case, `resources.CPU` != nil but `resources.CPU.Cpus` and `resources.CPU.Mems`
are empty strings, `cgroups` lib will write "" to cpuset.cpus and cpuset.mems in
Cpuset group, then no process can be written in this cgroup any more.
In this case, empty value means copying from parent but doesn't mean no CPU can
be used in this cgroup.
Signed-off-by: Wei Zhang <[email protected]>1 parent 58556f5 commit 13aaafd
1 file changed
+5
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
| 60 | + | |
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
| 64 | + | |
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
| 68 | + | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
| 71 | + | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
| 74 | + | |
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| |||
0 commit comments