{"action":"opened","number":1009,"pull_request":{"url":"https://api.github.com/repos/opencontainers/runc/pulls/1009","id":83213370,"html_url":"https://github.com/opencontainers/runc/pull/1009","diff_url":"https://github.com/opencontainers/runc/pull/1009.diff","patch_url":"https://github.com/opencontainers/runc/pull/1009.patch","issue_url":"https://api.github.com/repos/opencontainers/runc/issues/1009","number":1009,"state":"open","locked":false,"title":"Fix default cgroup path","user":{"login":"hqhq","id":6415670,"avatar_url":"https://avatars.githubusercontent.com/u/6415670?v=3","gravatar_id":"","url":"https://api.github.com/users/hqhq","html_url":"https://github.com/hqhq","followers_url":"https://api.github.com/users/hqhq/followers","following_url":"https://api.github.com/users/hqhq/following{/other_user}","gists_url":"https://api.github.com/users/hqhq/gists{/gist_id}","starred_url":"https://api.github.com/users/hqhq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hqhq/subscriptions","organizations_url":"https://api.github.com/users/hqhq/orgs","repos_url":"https://api.github.com/users/hqhq/repos","events_url":"https://api.github.com/users/hqhq/events{/privacy}","received_events_url":"https://api.github.com/users/hqhq/received_events","type":"User","site_admin":false},"body":"Alternative of #895 , part of #892\r\n\r\nThe intension of current behavior if to create cgroup in\r\nparent cgroup of current process, but we did this in a\r\nwrong way, we used devices cgroup path of current process\r\nas the default parent path for all subsystems, this is\r\nwrong because we don't always have the same cgroup path\r\nfor all subsystems.\r\n\r\nSigned-off-by: Qiang Huang <h.huangqiang@huawei.com>\r\n\r\nFor example, the cgroup path of current process is:\r\n```\r\nqhuang@ubuntu-25:~/tools/runc$ cat /proc/self/cgroup\r\n11:hugetlb:/user/1000.user/64.session\r\n10:perf_event:/user/1000.user/64.session\r\n9:blkio:/user/1000.user/64.session\r\n8:freezer:/user/1000.user/64.session\r\n7:devices:/user/1000.user/64.session\r\n6:memory:/user\r\n5:name=systemd:/user/1000.user/64.session\r\n4:cpuacct:/user/1000.user/64.session\r\n3:cpu:/user/1000.user/64.session\r\n2:cpuset:/user/1000.user/64.session\r\n```\r\n\r\nBefore this patch, we create contianer cgroup in:\r\n```\r\nqhuang@ubuntu-25:~/tools/runc$ sudo runc run hq\r\nroot@runc:/# cat /proc/self/cgroup\r\n11:hugetlb:/user/1000.user/64.session/hq\r\n10:perf_event:/user/1000.user/64.session/hq\r\n9:blkio:/user/1000.user/64.session/hq\r\n8:freezer:/user/1000.user/64.session/hq\r\n7:devices:/user/1000.user/64.session/hq\r\n6:memory:/user/1000.user/64.session/hq       <<<<---- the difference\r\n5:name=systemd:/user/1000.user/64.session/hq\r\n4:cpuacct:/user/1000.user/64.session/hq\r\n3:cpu:/user/1000.user/64.session/hq\r\n2:cpuset:/user/1000.user/64.session/hq\r\n```\r\n\r\nAfter this patch:\r\n```\r\nqhuang@ubuntu-25:~/tools/runc$ sudo runc run hq\r\nroot@runc:/# cat /proc/self/cgroup\r\n11:hugetlb:/user/1000.user/64.session/hq\r\n10:perf_event:/user/1000.user/64.session/hq\r\n9:blkio:/user/1000.user/64.session/hq\r\n8:freezer:/user/1000.user/64.session/hq\r\n7:devices:/user/1000.user/64.session/hq\r\n6:memory:/user/hq                                    <<<<---- the difference\r\n5:name=systemd:/user/1000.user/64.session/hq\r\n4:cpuacct:/user/1000.user/64.session/hq\r\n3:cpu:/user/1000.user/64.session/hq\r\n2:cpuset:/user/1000.user/64.session/hq\r\n```","created_at":"2016-08-30T06:10:37Z","updated_at":"2016-08-30T06:10:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/opencontainers/runc/pulls/1009/commits","review_comments_url":"https://api.github.com/repos/opencontainers/runc/pulls/1009/comments","review_comment_url":"https://api.github.com/repos/opencontainers/runc/pulls/comments{/number}","comments_url":"https://api.github.com/repos/opencontainers/runc/issues/1009/comments","statuses_url":"https://api.github.com/repos/opencontainers/runc/statuses/9ec63e959234fb0b5e6bece037306b72c7132527","head":{"label":"hqhq:fix_default_cgroup_parent","ref":"fix_default_cgroup_parent","sha":"9ec63e959234fb0b5e6bece037306b72c7132527","user":{"login":"hqhq","id":6415670,"avatar_url":"https://avatars.githubusercontent.com/u/6415670?v=3","gravatar_id":"","url":"https://api.github.com/users/hqhq","html_url":"https://github.com/hqhq","followers_url":"https://api.github.com/users/hqhq/followers","following_url":"https://api.github.com/users/hqhq/following{/other_user}","gists_url":"https://api.github.com/users/hqhq/gists{/gist_id}","starred_url":"https://api.github.com/users/hqhq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hqhq/subscriptions","organizations_url":"https://api.github.com/users/hqhq/orgs","repos_url":"https://api.github.com/users/hqhq/repos","events_url":"https://api.github.com/users/hqhq/events{/privacy}","received_events_url":"https://api.github.com/users/hqhq/received_events","type":"User","site_admin":false},"repo":{"id":38405824,"name":"runc","full_name":"hqhq/runc","owner":{"login":"hqhq","id":6415670,"avatar_url":"https://avatars.githubusercontent.com/u/6415670?v=3","gravatar_id":"","url":"https://api.github.com/users/hqhq","html_url":"https://github.com/hqhq","followers_url":"https://api.github.com/users/hqhq/followers","following_url":"https://api.github.com/users/hqhq/following{/other_user}","gists_url":"https://api.github.com/users/hqhq/gists{/gist_id}","starred_url":"https://api.github.com/users/hqhq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hqhq/subscriptions","organizations_url":"https://api.github.com/users/hqhq/orgs","repos_url":"https://api.github.com/users/hqhq/repos","events_url":"https://api.github.com/users/hqhq/events{/privacy}","received_events_url":"https://api.github.com/users/hqhq/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hqhq/runc","description":"runc container cli tools","fork":true,"url":"https://api.github.com/repos/hqhq/runc","forks_url":"https://api.github.com/repos/hqhq/runc/forks","keys_url":"https://api.github.com/repos/hqhq/runc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hqhq/runc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hqhq/runc/teams","hooks_url":"https://api.github.com/repos/hqhq/runc/hooks","issue_events_url":"https://api.github.com/repos/hqhq/runc/issues/events{/number}","events_url":"https://api.github.com/repos/hqhq/runc/events","assignees_url":"https://api.github.com/repos/hqhq/runc/assignees{/user}","branches_url":"https://api.github.com/repos/hqhq/runc/branches{/branch}","tags_url":"https://api.github.com/repos/hqhq/runc/tags","blobs_url":"https://api.github.com/repos/hqhq/runc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hqhq/runc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hqhq/runc/git/refs{/sha}","trees_url":"https://api.github.com/repos/hqhq/runc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hqhq/runc/statuses/{sha}","languages_url":"https://api.github.com/repos/hqhq/runc/languages","stargazers_url":"https://api.github.com/repos/hqhq/runc/stargazers","contributors_url":"https://api.github.com/repos/hqhq/runc/contributors","subscribers_url":"https://api.github.com/repos/hqhq/runc/subscribers","subscription_url":"https://api.github.com/repos/hqhq/runc/subscription","commits_url":"https://api.github.com/repos/hqhq/runc/commits{/sha}","git_commits_url":"https://api.github.com/repos/hqhq/runc/git/commits{/sha}","comments_url":"https://api.github.com/repos/hqhq/runc/comments{/number}","issue_comment_url":"https://api.github.com/repos/hqhq/runc/issues/comments{/number}","contents_url":"https://api.github.com/repos/hqhq/runc/contents/{+path}","compare_url":"https://api.github.com/repos/hqhq/runc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hqhq/runc/merges","archive_url":"https://api.github.com/repos/hqhq/runc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hqhq/runc/downloads","issues_url":"https://api.github.com/repos/hqhq/runc/issues{/number}","pulls_url":"https://api.github.com/repos/hqhq/runc/pulls{/number}","milestones_url":"https://api.github.com/repos/hqhq/runc/milestones{/number}","notifications_url":"https://api.github.com/repos/hqhq/runc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hqhq/runc/labels{/name}","releases_url":"https://api.github.com/repos/hqhq/runc/releases{/id}","deployments_url":"https://api.github.com/repos/hqhq/runc/deployments","created_at":"2015-07-02T02:08:36Z","updated_at":"2016-01-12T03:21:30Z","pushed_at":"2016-08-30T06:07:55Z","git_url":"git://github.com/hqhq/runc.git","ssh_url":"git@github.com:hqhq/runc.git","clone_url":"https://github.com/hqhq/runc.git","svn_url":"https://github.com/hqhq/runc","homepage":"","size":3489,"stargazers_count":1,"watchers_count":1,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"opencontainers:master","ref":"master","sha":"189a2ab2f7acc59043e457cea25b58f631443f08","user":{"login":"opencontainers","id":12563465,"avatar_url":"https://avatars.githubusercontent.com/u/12563465?v=3","gravatar_id":"","url":"https://api.github.com/users/opencontainers","html_url":"https://github.com/opencontainers","followers_url":"https://api.github.com/users/opencontainers/followers","following_url":"https://api.github.com/users/opencontainers/following{/other_user}","gists_url":"https://api.github.com/users/opencontainers/gists{/gist_id}","starred_url":"https://api.github.com/users/opencontainers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opencontainers/subscriptions","organizations_url":"https://api.github.com/users/opencontainers/orgs","repos_url":"https://api.github.com/users/opencontainers/repos","events_url":"https://api.github.com/users/opencontainers/events{/privacy}","received_events_url":"https://api.github.com/users/opencontainers/received_events","type":"Organization","site_admin":false},"repo":{"id":36960321,"name":"runc","full_name":"opencontainers/runc","owner":{"login":"opencontainers","id":12563465,"avatar_url":"https://avatars.githubusercontent.com/u/12563465?v=3","gravatar_id":"","url":"https://api.github.com/users/opencontainers","html_url":"https://github.com/opencontainers","followers_url":"https://api.github.com/users/opencontainers/followers","following_url":"https://api.github.com/users/opencontainers/following{/other_user}","gists_url":"https://api.github.com/users/opencontainers/gists{/gist_id}","starred_url":"https://api.github.com/users/opencontainers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opencontainers/subscriptions","organizations_url":"https://api.github.com/users/opencontainers/orgs","repos_url":"https://api.github.com/users/opencontainers/repos","events_url":"https://api.github.com/users/opencontainers/events{/privacy}","received_events_url":"https://api.github.com/users/opencontainers/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/opencontainers/runc","description":"runc container cli tools","fork":false,"url":"https://api.github.com/repos/opencontainers/runc","forks_url":"https://api.github.com/repos/opencontainers/runc/forks","keys_url":"https://api.github.com/repos/opencontainers/runc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/opencontainers/runc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/opencontainers/runc/teams","hooks_url":"https://api.github.com/repos/opencontainers/runc/hooks","issue_events_url":"https://api.github.com/repos/opencontainers/runc/issues/events{/number}","events_url":"https://api.github.com/repos/opencontainers/runc/events","assignees_url":"https://api.github.com/repos/opencontainers/runc/assignees{/user}","branches_url":"https://api.github.com/repos/opencontainers/runc/branches{/branch}","tags_url":"https://api.github.com/repos/opencontainers/runc/tags","blobs_url":"https://api.github.com/repos/opencontainers/runc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/opencontainers/runc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/opencontainers/runc/git/refs{/sha}","trees_url":"https://api.github.com/repos/opencontainers/runc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/opencontainers/runc/statuses/{sha}","languages_url":"https://api.github.com/repos/opencontainers/runc/languages","stargazers_url":"https://api.github.com/repos/opencontainers/runc/stargazers","contributors_url":"https://api.github.com/repos/opencontainers/runc/contributors","subscribers_url":"https://api.github.com/repos/opencontainers/runc/subscribers","subscription_url":"https://api.github.com/repos/opencontainers/runc/subscription","commits_url":"https://api.github.com/repos/opencontainers/runc/commits{/sha}","git_commits_url":"https://api.github.com/repos/opencontainers/runc/git/commits{/sha}","comments_url":"https://api.github.com/repos/opencontainers/runc/comments{/number}","issue_comment_url":"https://api.github.com/repos/opencontainers/runc/issues/comments{/number}","contents_url":"https://api.github.com/repos/opencontainers/runc/contents/{+path}","compare_url":"https://api.github.com/repos/opencontainers/runc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/opencontainers/runc/merges","archive_url":"https://api.github.com/repos/opencontainers/runc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/opencontainers/runc/downloads","issues_url":"https://api.github.com/repos/opencontainers/runc/issues{/number}","pulls_url":"https://api.github.com/repos/opencontainers/runc/pulls{/number}","milestones_url":"https://api.github.com/repos/opencontainers/runc/milestones{/number}","notifications_url":"https://api.github.com/repos/opencontainers/runc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/opencontainers/runc/labels{/name}","releases_url":"https://api.github.com/repos/opencontainers/runc/releases{/id}","deployments_url":"https://api.github.com/repos/opencontainers/runc/deployments","created_at":"2015-06-05T23:30:45Z","updated_at":"2016-08-29T15:58:06Z","pushed_at":"2016-08-30T04:01:21Z","git_url":"git://github.com/opencontainers/runc.git","ssh_url":"git@github.com:opencontainers/runc.git","clone_url":"https://github.com/opencontainers/runc.git","svn_url":"https://github.com/opencontainers/runc","homepage":"https://www.opencontainers.org/","size":5952,"stargazers_count":3061,"watchers_count":3061,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":434,"mirror_url":null,"open_issues_count":81,"forks":434,"open_issues":81,"watchers":3061,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/opencontainers/runc/pulls/1009"},"html":{"href":"https://github.com/opencontainers/runc/pull/1009"},"issue":{"href":"https://api.github.com/repos/opencontainers/runc/issues/1009"},"comments":{"href":"https://api.github.com/repos/opencontainers/runc/issues/1009/comments"},"review_comments":{"href":"https://api.github.com/repos/opencontainers/runc/pulls/1009/comments"},"review_comment":{"href":"https://api.github.com/repos/opencontainers/runc/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/opencontainers/runc/pulls/1009/commits"},"statuses":{"href":"https://api.github.com/repos/opencontainers/runc/statuses/9ec63e959234fb0b5e6bece037306b72c7132527"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":2,"deletions":12,"changed_files":1}}
{"actor":{"display_login":"hqhq"}}