瀏覽代碼

Merge pull request #4309 from crosbymichael/change-cgroup-subsystem

Use the cpu cgroup subsystem instead of memory because its non optional
Guillaume J. Charmes 11 年之前
父節點
當前提交
b6d4c27fcd
共有 1 個文件被更改,包括 2 次插入3 次删除
  1. 2 3
      execdriver/lxc/driver.go

+ 2 - 3
execdriver/lxc/driver.go

@@ -301,9 +301,8 @@ func (d *driver) Info(id string) execdriver.Info {
 func (d *driver) GetPidsForContainer(id string) ([]int, error) {
 func (d *driver) GetPidsForContainer(id string) ([]int, error) {
 	pids := []int{}
 	pids := []int{}
 
 
-	// memory is chosen randomly, any cgroup used by docker works
-	subsystem := "memory"
-
+	// cpu is chosen because it is the only non optional subsystem in cgroups
+	subsystem := "cpu"
 	cgroupRoot, err := cgroups.FindCgroupMountpoint(subsystem)
 	cgroupRoot, err := cgroups.FindCgroupMountpoint(subsystem)
 	if err != nil {
 	if err != nil {
 		return pids, err
 		return pids, err