{"action":"created","comment":{"url":"https://api.github.com/repos/kata-containers/runtime/pulls/comments/196700930","pull_request_review_id":130292531,"id":196700930,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NjcwMDkzMA==","diff_hunk":"@@ -463,6 +466,8 @@ type Sandbox struct {\n \twg *sync.WaitGroup\n \n \tshmSize uint64\n+\n+\tcgroups cgroupsManager","path":"virtcontainers/sandbox.go","position":15,"original_position":15,"commit_id":"301f5a20b222a8250226c2d7a6c717f613847209","original_commit_id":"301f5a20b222a8250226c2d7a6c717f613847209","user":{"login":"jingxiaolu","id":13136554,"node_id":"MDQ6VXNlcjEzMTM2NTU0","avatar_url":"https://avatars2.githubusercontent.com/u/13136554?v=4","gravatar_id":"","url":"https://api.github.com/users/jingxiaolu","html_url":"https://github.com/jingxiaolu","followers_url":"https://api.github.com/users/jingxiaolu/followers","following_url":"https://api.github.com/users/jingxiaolu/following{/other_user}","gists_url":"https://api.github.com/users/jingxiaolu/gists{/gist_id}","starred_url":"https://api.github.com/users/jingxiaolu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jingxiaolu/subscriptions","organizations_url":"https://api.github.com/users/jingxiaolu/orgs","repos_url":"https://api.github.com/users/jingxiaolu/repos","events_url":"https://api.github.com/users/jingxiaolu/events{/privacy}","received_events_url":"https://api.github.com/users/jingxiaolu/received_events","type":"User","site_admin":false},"body":"Yes, I adding this to enclose the implementations and data of cgroups handlings in `cgroups.go` (will be `cgroups_linux.go` and `cgroups_unsupported.go`)","created_at":"2018-06-20T09:07:43Z","updated_at":"2018-06-20T09:08:16Z","html_url":"https://github.com/kata-containers/runtime/pull/416#discussion_r196700930","pull_request_url":"https://api.github.com/repos/kata-containers/runtime/pulls/416","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/kata-containers/runtime/pulls/comments/196700930"},"html":{"href":"https://github.com/kata-containers/runtime/pull/416#discussion_r196700930"},"pull_request":{"href":"https://api.github.com/repos/kata-containers/runtime/pulls/416"}},"in_reply_to_id":196456122},"pull_request":{"url":"https://api.github.com/repos/kata-containers/runtime/pulls/416","id":195813264,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk1ODEzMjY0","html_url":"https://github.com/kata-containers/runtime/pull/416","diff_url":"https://github.com/kata-containers/runtime/pull/416.diff","patch_url":"https://github.com/kata-containers/runtime/pull/416.patch","issue_url":"https://api.github.com/repos/kata-containers/runtime/issues/416","number":416,"state":"open","locked":false,"title":"[WIP] Refactor cgroup handling","user":{"login":"jingxiaolu","id":13136554,"node_id":"MDQ6VXNlcjEzMTM2NTU0","avatar_url":"https://avatars2.githubusercontent.com/u/13136554?v=4","gravatar_id":"","url":"https://api.github.com/users/jingxiaolu","html_url":"https://github.com/jingxiaolu","followers_url":"https://api.github.com/users/jingxiaolu/followers","following_url":"https://api.github.com/users/jingxiaolu/following{/other_user}","gists_url":"https://api.github.com/users/jingxiaolu/gists{/gist_id}","starred_url":"https://api.github.com/users/jingxiaolu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jingxiaolu/subscriptions","organizations_url":"https://api.github.com/users/jingxiaolu/orgs","repos_url":"https://api.github.com/users/jingxiaolu/repos","events_url":"https://api.github.com/users/jingxiaolu/events{/privacy}","received_events_url":"https://api.github.com/users/jingxiaolu/received_events","type":"User","site_admin":false},"body":"According to #344, this PR is trying to refactor cgroups handling in `runtime`.\r\n\r\nWhat I've done in this PR:\r\n1. introduce `libcontainer/cgroups` package for cgroups handling;\r\n2. move cgroups handlings from CLI to sandbox level; refactor the handlings by the help of `libcontainer/cgroups`;\r\n\r\nWorks to be continue:\r\n1. Add tests as @jodh-intel mentioned;\r\n2. Add handling to `UpdateContainer()`;\r\n3. Remove old cgroups handling codes\r\n\r\nFixes: #344\r\n\r\nSigned-off-by: Jingxiao Lu lujingxiao@huawei.com","created_at":"2018-06-19T12:40:17Z","updated_at":"2018-06-20T09:08:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"337058d0caa2f8cf22f3fd56b599dba1b1e6d494","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/kata-containers/runtime/pulls/416/commits","review_comments_url":"https://api.github.com/repos/kata-containers/runtime/pulls/416/comments","review_comment_url":"https://api.github.com/repos/kata-containers/runtime/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kata-containers/runtime/issues/416/comments","statuses_url":"https://api.github.com/repos/kata-containers/runtime/statuses/301f5a20b222a8250226c2d7a6c717f613847209","head":{"label":"jingxiaolu:refactor_cgroup_handling","ref":"refactor_cgroup_handling","sha":"301f5a20b222a8250226c2d7a6c717f613847209","user":{"login":"jingxiaolu","id":13136554,"node_id":"MDQ6VXNlcjEzMTM2NTU0","avatar_url":"https://avatars2.githubusercontent.com/u/13136554?v=4","gravatar_id":"","url":"https://api.github.com/users/jingxiaolu","html_url":"https://github.com/jingxiaolu","followers_url":"https://api.github.com/users/jingxiaolu/followers","following_url":"https://api.github.com/users/jingxiaolu/following{/other_user}","gists_url":"https://api.github.com/users/jingxiaolu/gists{/gist_id}","starred_url":"https://api.github.com/users/jingxiaolu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jingxiaolu/subscriptions","organizations_url":"https://api.github.com/users/jingxiaolu/orgs","repos_url":"https://api.github.com/users/jingxiaolu/repos","events_url":"https://api.github.com/users/jingxiaolu/events{/privacy}","received_events_url":"https://api.github.com/users/jingxiaolu/received_events","type":"User","site_admin":false},"repo":{"id":137703954,"node_id":"MDEwOlJlcG9zaXRvcnkxMzc3MDM5NTQ=","name":"runtime","full_name":"jingxiaolu/runtime","owner":{"login":"jingxiaolu","id":13136554,"node_id":"MDQ6VXNlcjEzMTM2NTU0","avatar_url":"https://avatars2.githubusercontent.com/u/13136554?v=4","gravatar_id":"","url":"https://api.github.com/users/jingxiaolu","html_url":"https://github.com/jingxiaolu","followers_url":"https://api.github.com/users/jingxiaolu/followers","following_url":"https://api.github.com/users/jingxiaolu/following{/other_user}","gists_url":"https://api.github.com/users/jingxiaolu/gists{/gist_id}","starred_url":"https://api.github.com/users/jingxiaolu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jingxiaolu/subscriptions","organizations_url":"https://api.github.com/users/jingxiaolu/orgs","repos_url":"https://api.github.com/users/jingxiaolu/repos","events_url":"https://api.github.com/users/jingxiaolu/events{/privacy}","received_events_url":"https://api.github.com/users/jingxiaolu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jingxiaolu/runtime","description":"Kata Containers runtime","fork":true,"url":"https://api.github.com/repos/jingxiaolu/runtime","forks_url":"https://api.github.com/repos/jingxiaolu/runtime/forks","keys_url":"https://api.github.com/repos/jingxiaolu/runtime/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jingxiaolu/runtime/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jingxiaolu/runtime/teams","hooks_url":"https://api.github.com/repos/jingxiaolu/runtime/hooks","issue_events_url":"https://api.github.com/repos/jingxiaolu/runtime/issues/events{/number}","events_url":"https://api.github.com/repos/jingxiaolu/runtime/events","assignees_url":"https://api.github.com/repos/jingxiaolu/runtime/assignees{/user}","branches_url":"https://api.github.com/repos/jingxiaolu/runtime/branches{/branch}","tags_url":"https://api.github.com/repos/jingxiaolu/runtime/tags","blobs_url":"https://api.github.com/repos/jingxiaolu/runtime/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jingxiaolu/runtime/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jingxiaolu/runtime/git/refs{/sha}","trees_url":"https://api.github.com/repos/jingxiaolu/runtime/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jingxiaolu/runtime/statuses/{sha}","languages_url":"https://api.github.com/repos/jingxiaolu/runtime/languages","stargazers_url":"https://api.github.com/repos/jingxiaolu/runtime/stargazers","contributors_url":"https://api.github.com/repos/jingxiaolu/runtime/contributors","subscribers_url":"https://api.github.com/repos/jingxiaolu/runtime/subscribers","subscription_url":"https://api.github.com/repos/jingxiaolu/runtime/subscription","commits_url":"https://api.github.com/repos/jingxiaolu/runtime/commits{/sha}","git_commits_url":"https://api.github.com/repos/jingxiaolu/runtime/git/commits{/sha}","comments_url":"https://api.github.com/repos/jingxiaolu/runtime/comments{/number}","issue_comment_url":"https://api.github.com/repos/jingxiaolu/runtime/issues/comments{/number}","contents_url":"https://api.github.com/repos/jingxiaolu/runtime/contents/{+path}","compare_url":"https://api.github.com/repos/jingxiaolu/runtime/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jingxiaolu/runtime/merges","archive_url":"https://api.github.com/repos/jingxiaolu/runtime/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jingxiaolu/runtime/downloads","issues_url":"https://api.github.com/repos/jingxiaolu/runtime/issues{/number}","pulls_url":"https://api.github.com/repos/jingxiaolu/runtime/pulls{/number}","milestones_url":"https://api.github.com/repos/jingxiaolu/runtime/milestones{/number}","notifications_url":"https://api.github.com/repos/jingxiaolu/runtime/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jingxiaolu/runtime/labels{/name}","releases_url":"https://api.github.com/repos/jingxiaolu/runtime/releases{/id}","deployments_url":"https://api.github.com/repos/jingxiaolu/runtime/deployments","created_at":"2018-06-18T02:47:31Z","updated_at":"2018-06-19T12:03:12Z","pushed_at":"2018-06-19T13:19:14Z","git_url":"git://github.com/jingxiaolu/runtime.git","ssh_url":"git@github.com:jingxiaolu/runtime.git","clone_url":"https://github.com/jingxiaolu/runtime.git","svn_url":"https://github.com/jingxiaolu/runtime","homepage":"","size":4209,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"kata-containers:master","ref":"master","sha":"6f409b9528b66c46814eacf72083e2a54645ee89","user":{"login":"kata-containers","id":33289952,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMzMjg5OTUy","avatar_url":"https://avatars3.githubusercontent.com/u/33289952?v=4","gravatar_id":"","url":"https://api.github.com/users/kata-containers","html_url":"https://github.com/kata-containers","followers_url":"https://api.github.com/users/kata-containers/followers","following_url":"https://api.github.com/users/kata-containers/following{/other_user}","gists_url":"https://api.github.com/users/kata-containers/gists{/gist_id}","starred_url":"https://api.github.com/users/kata-containers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kata-containers/subscriptions","organizations_url":"https://api.github.com/users/kata-containers/orgs","repos_url":"https://api.github.com/users/kata-containers/repos","events_url":"https://api.github.com/users/kata-containers/events{/privacy}","received_events_url":"https://api.github.com/users/kata-containers/received_events","type":"Organization","site_admin":false},"repo":{"id":110539997,"node_id":"MDEwOlJlcG9zaXRvcnkxMTA1Mzk5OTc=","name":"runtime","full_name":"kata-containers/runtime","owner":{"login":"kata-containers","id":33289952,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMzMjg5OTUy","avatar_url":"https://avatars3.githubusercontent.com/u/33289952?v=4","gravatar_id":"","url":"https://api.github.com/users/kata-containers","html_url":"https://github.com/kata-containers","followers_url":"https://api.github.com/users/kata-containers/followers","following_url":"https://api.github.com/users/kata-containers/following{/other_user}","gists_url":"https://api.github.com/users/kata-containers/gists{/gist_id}","starred_url":"https://api.github.com/users/kata-containers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kata-containers/subscriptions","organizations_url":"https://api.github.com/users/kata-containers/orgs","repos_url":"https://api.github.com/users/kata-containers/repos","events_url":"https://api.github.com/users/kata-containers/events{/privacy}","received_events_url":"https://api.github.com/users/kata-containers/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kata-containers/runtime","description":"Kata Containers runtime","fork":false,"url":"https://api.github.com/repos/kata-containers/runtime","forks_url":"https://api.github.com/repos/kata-containers/runtime/forks","keys_url":"https://api.github.com/repos/kata-containers/runtime/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kata-containers/runtime/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kata-containers/runtime/teams","hooks_url":"https://api.github.com/repos/kata-containers/runtime/hooks","issue_events_url":"https://api.github.com/repos/kata-containers/runtime/issues/events{/number}","events_url":"https://api.github.com/repos/kata-containers/runtime/events","assignees_url":"https://api.github.com/repos/kata-containers/runtime/assignees{/user}","branches_url":"https://api.github.com/repos/kata-containers/runtime/branches{/branch}","tags_url":"https://api.github.com/repos/kata-containers/runtime/tags","blobs_url":"https://api.github.com/repos/kata-containers/runtime/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kata-containers/runtime/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kata-containers/runtime/git/refs{/sha}","trees_url":"https://api.github.com/repos/kata-containers/runtime/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kata-containers/runtime/statuses/{sha}","languages_url":"https://api.github.com/repos/kata-containers/runtime/languages","stargazers_url":"https://api.github.com/repos/kata-containers/runtime/stargazers","contributors_url":"https://api.github.com/repos/kata-containers/runtime/contributors","subscribers_url":"https://api.github.com/repos/kata-containers/runtime/subscribers","subscription_url":"https://api.github.com/repos/kata-containers/runtime/subscription","commits_url":"https://api.github.com/repos/kata-containers/runtime/commits{/sha}","git_commits_url":"https://api.github.com/repos/kata-containers/runtime/git/commits{/sha}","comments_url":"https://api.github.com/repos/kata-containers/runtime/comments{/number}","issue_comment_url":"https://api.github.com/repos/kata-containers/runtime/issues/comments{/number}","contents_url":"https://api.github.com/repos/kata-containers/runtime/contents/{+path}","compare_url":"https://api.github.com/repos/kata-containers/runtime/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kata-containers/runtime/merges","archive_url":"https://api.github.com/repos/kata-containers/runtime/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kata-containers/runtime/downloads","issues_url":"https://api.github.com/repos/kata-containers/runtime/issues{/number}","pulls_url":"https://api.github.com/repos/kata-containers/runtime/pulls{/number}","milestones_url":"https://api.github.com/repos/kata-containers/runtime/milestones{/number}","notifications_url":"https://api.github.com/repos/kata-containers/runtime/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kata-containers/runtime/labels{/name}","releases_url":"https://api.github.com/repos/kata-containers/runtime/releases{/id}","deployments_url":"https://api.github.com/repos/kata-containers/runtime/deployments","created_at":"2017-11-13T11:29:03Z","updated_at":"2018-06-20T07:01:35Z","pushed_at":"2018-06-20T09:06:07Z","git_url":"git://github.com/kata-containers/runtime.git","ssh_url":"git@github.com:kata-containers/runtime.git","clone_url":"https://github.com/kata-containers/runtime.git","svn_url":"https://github.com/kata-containers/runtime","homepage":"","size":4173,"stargazers_count":320,"watchers_count":320,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":75,"mirror_url":null,"archived":false,"open_issues_count":123,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":75,"open_issues":123,"watchers":320,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kata-containers/runtime/pulls/416"},"html":{"href":"https://github.com/kata-containers/runtime/pull/416"},"issue":{"href":"https://api.github.com/repos/kata-containers/runtime/issues/416"},"comments":{"href":"https://api.github.com/repos/kata-containers/runtime/issues/416/comments"},"review_comments":{"href":"https://api.github.com/repos/kata-containers/runtime/pulls/416/comments"},"review_comment":{"href":"https://api.github.com/repos/kata-containers/runtime/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kata-containers/runtime/pulls/416/commits"},"statuses":{"href":"https://api.github.com/repos/kata-containers/runtime/statuses/301f5a20b222a8250226c2d7a6c717f613847209"}},"author_association":"NONE"}}
{"actor":{"display_login":"jingxiaolu"}}