Skip to content
  • Andrey Vagin's avatar
    c5c7272c
    cgroups: don't take into account a leading / for the "/" parent · c5c7272c
    Andrey Vagin authored
    
    
    Without this patch, we dump somethin like this:
    {
    	cnames: "hugetlb"
    	dirs: 	{
    		dir_name: ""
    		children: 		{
    			dir_name: "ewroot"
    			children: <empty>
    			properties: <empty>
    		}
    
    		properties: <empty>
    	}
    
    }
    
    It's obvious, that dir_name should be newroot.
    
    The problem is reproduced, if a task leaves in "/" and has a subgroup.
    This issue was caught by a chance. The cgroup02 test doesn't clean up
    controllers and leaves the "newroot" there. So when we executed a cgroup
    test after cgroup02, we could find many directories like "ewroot",
    "wroot", etc. This patch fixes this issue.
    
    Signed-off-by: default avatarAndrew Vagin <avagin@openvz.org>
    Signed-off-by: default avatarPavel Emelyanov <xemul@parallels.com>
    c5c7272c
    cgroups: don't take into account a leading / for the "/" parent
    Andrey Vagin authored
    
    
    Without this patch, we dump somethin like this:
    {
    	cnames: "hugetlb"
    	dirs: 	{
    		dir_name: ""
    		children: 		{
    			dir_name: "ewroot"
    			children: <empty>
    			properties: <empty>
    		}
    
    		properties: <empty>
    	}
    
    }
    
    It's obvious, that dir_name should be newroot.
    
    The problem is reproduced, if a task leaves in "/" and has a subgroup.
    This issue was caught by a chance. The cgroup02 test doesn't clean up
    controllers and leaves the "newroot" there. So when we executed a cgroup
    test after cgroup02, we could find many directories like "ewroot",
    "wroot", etc. This patch fixes this issue.
    
    Signed-off-by: default avatarAndrew Vagin <avagin@openvz.org>
    Signed-off-by: default avatarPavel Emelyanov <xemul@parallels.com>
Loading