{"action":"created","comment":{"url":"https://api.github.com/repos/coreos/rkt/pulls/comments/30899887","id":30899887,"diff_hunk":"@@ -295,6 +316,167 @@ func forwardedPorts(pod *Pod) ([]networking.ForwardedPort, error) {\n \treturn fps, nil\n }\n \n+func parseCgroups() (map[int][]string, error) {\n+\tf, err := os.Open(\"/proc/cgroups\")\n+\tif err != nil {\n+\t\treturn nil, err\n+\t}\n+\tdefer f.Close()\n+\n+\tsc := bufio.NewScanner(f)\n+\n+\tsc.Scan()","path":"stage1/init/init.go","position":60,"original_position":60,"commit_id":"2f67f43db32f71e972d7106b7ca0b13c6ff4d65e","original_commit_id":"2f67f43db32f71e972d7106b7ca0b13c6ff4d65e","user":{"login":"alban","id":27575,"avatar_url":"https://avatars.githubusercontent.com/u/27575?v=3","gravatar_id":"","url":"https://api.github.com/users/alban","html_url":"https://github.com/alban","followers_url":"https://api.github.com/users/alban/followers","following_url":"https://api.github.com/users/alban/following{/other_user}","gists_url":"https://api.github.com/users/alban/gists{/gist_id}","starred_url":"https://api.github.com/users/alban/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alban/subscriptions","organizations_url":"https://api.github.com/users/alban/orgs","repos_url":"https://api.github.com/users/alban/repos","events_url":"https://api.github.com/users/alban/events{/privacy}","received_events_url":"https://api.github.com/users/alban/received_events","type":"User","site_admin":false},"body":"Add a comment to say that `sc.Scan()` is to skip the first line because it is a comment?\r\n```\r\n#subsys_name\thierarchy\tnum_cgroups\tenabled\r\n```","created_at":"2015-05-22T14:34:47Z","updated_at":"2015-05-22T14:34:47Z","html_url":"https://github.com/coreos/rkt/pull/920#discussion_r30899887","pull_request_url":"https://api.github.com/repos/coreos/rkt/pulls/920","_links":{"self":{"href":"https://api.github.com/repos/coreos/rkt/pulls/comments/30899887"},"html":{"href":"https://github.com/coreos/rkt/pull/920#discussion_r30899887"},"pull_request":{"href":"https://api.github.com/repos/coreos/rkt/pulls/920"}}},"pull_request":{"url":"https://api.github.com/repos/coreos/rkt/pulls/920","id":35836064,"html_url":"https://github.com/coreos/rkt/pull/920","diff_url":"https://github.com/coreos/rkt/pull/920.diff","patch_url":"https://github.com/coreos/rkt/pull/920.patch","issue_url":"https://api.github.com/repos/coreos/rkt/issues/920","number":920,"state":"open","locked":false,"title":"stage1: support per-app memory and cpu isolators","user":{"login":"iaguis","id":507354,"avatar_url":"https://avatars.githubusercontent.com/u/507354?v=3","gravatar_id":"","url":"https://api.github.com/users/iaguis","html_url":"https://github.com/iaguis","followers_url":"https://api.github.com/users/iaguis/followers","following_url":"https://api.github.com/users/iaguis/following{/other_user}","gists_url":"https://api.github.com/users/iaguis/gists{/gist_id}","starred_url":"https://api.github.com/users/iaguis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iaguis/subscriptions","organizations_url":"https://api.github.com/users/iaguis/orgs","repos_url":"https://api.github.com/users/iaguis/repos","events_url":"https://api.github.com/users/iaguis/events{/privacy}","received_events_url":"https://api.github.com/users/iaguis/received_events","type":"User","site_admin":false},"body":"To allow systemd inside stage1 to set resource limits for apps we mount\r\nthe cgroup controllers hierarchy in rkt. We need this because\r\nsystemd-nspawn mounts cgroup controllers as read-only.\r\n\r\nWe mimic systemd-nspawn cgroup mounts with the difference that we\r\nbind-mount the apps' subdirectories over themselves so they stay\r\nread-write. We leave the mounting of systemd's cgroup hierarchy to\r\nnspawn.\r\n\r\nAddresses (partially) #811","created_at":"2015-05-20T14:15:10Z","updated_at":"2015-05-22T14:34:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6fd3ae33a366a0cbf32e8efa3c618b70f15292ec","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/coreos/rkt/pulls/920/commits","review_comments_url":"https://api.github.com/repos/coreos/rkt/pulls/920/comments","review_comment_url":"https://api.github.com/repos/coreos/rkt/pulls/comments{/number}","comments_url":"https://api.github.com/repos/coreos/rkt/issues/920/comments","statuses_url":"https://api.github.com/repos/coreos/rkt/statuses/2f67f43db32f71e972d7106b7ca0b13c6ff4d65e","head":{"label":"endocode:iaguis/create-cgroups","ref":"iaguis/create-cgroups","sha":"2f67f43db32f71e972d7106b7ca0b13c6ff4d65e","user":{"login":"endocode","id":4068543,"avatar_url":"https://avatars.githubusercontent.com/u/4068543?v=3","gravatar_id":"","url":"https://api.github.com/users/endocode","html_url":"https://github.com/endocode","followers_url":"https://api.github.com/users/endocode/followers","following_url":"https://api.github.com/users/endocode/following{/other_user}","gists_url":"https://api.github.com/users/endocode/gists{/gist_id}","starred_url":"https://api.github.com/users/endocode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/endocode/subscriptions","organizations_url":"https://api.github.com/users/endocode/orgs","repos_url":"https://api.github.com/users/endocode/repos","events_url":"https://api.github.com/users/endocode/events{/privacy}","received_events_url":"https://api.github.com/users/endocode/received_events","type":"Organization","site_admin":false},"repo":{"id":28082853,"name":"rkt","full_name":"endocode/rkt","owner":{"login":"endocode","id":4068543,"avatar_url":"https://avatars.githubusercontent.com/u/4068543?v=3","gravatar_id":"","url":"https://api.github.com/users/endocode","html_url":"https://github.com/endocode","followers_url":"https://api.github.com/users/endocode/followers","following_url":"https://api.github.com/users/endocode/following{/other_user}","gists_url":"https://api.github.com/users/endocode/gists{/gist_id}","starred_url":"https://api.github.com/users/endocode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/endocode/subscriptions","organizations_url":"https://api.github.com/users/endocode/orgs","repos_url":"https://api.github.com/users/endocode/repos","events_url":"https://api.github.com/users/endocode/events{/privacy}","received_events_url":"https://api.github.com/users/endocode/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/endocode/rkt","description":"App Container runtime","fork":true,"url":"https://api.github.com/repos/endocode/rkt","forks_url":"https://api.github.com/repos/endocode/rkt/forks","keys_url":"https://api.github.com/repos/endocode/rkt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/endocode/rkt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/endocode/rkt/teams","hooks_url":"https://api.github.com/repos/endocode/rkt/hooks","issue_events_url":"https://api.github.com/repos/endocode/rkt/issues/events{/number}","events_url":"https://api.github.com/repos/endocode/rkt/events","assignees_url":"https://api.github.com/repos/endocode/rkt/assignees{/user}","branches_url":"https://api.github.com/repos/endocode/rkt/branches{/branch}","tags_url":"https://api.github.com/repos/endocode/rkt/tags","blobs_url":"https://api.github.com/repos/endocode/rkt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/endocode/rkt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/endocode/rkt/git/refs{/sha}","trees_url":"https://api.github.com/repos/endocode/rkt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/endocode/rkt/statuses/{sha}","languages_url":"https://api.github.com/repos/endocode/rkt/languages","stargazers_url":"https://api.github.com/repos/endocode/rkt/stargazers","contributors_url":"https://api.github.com/repos/endocode/rkt/contributors","subscribers_url":"https://api.github.com/repos/endocode/rkt/subscribers","subscription_url":"https://api.github.com/repos/endocode/rkt/subscription","commits_url":"https://api.github.com/repos/endocode/rkt/commits{/sha}","git_commits_url":"https://api.github.com/repos/endocode/rkt/git/commits{/sha}","comments_url":"https://api.github.com/repos/endocode/rkt/comments{/number}","issue_comment_url":"https://api.github.com/repos/endocode/rkt/issues/comments{/number}","contents_url":"https://api.github.com/repos/endocode/rkt/contents/{+path}","compare_url":"https://api.github.com/repos/endocode/rkt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/endocode/rkt/merges","archive_url":"https://api.github.com/repos/endocode/rkt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/endocode/rkt/downloads","issues_url":"https://api.github.com/repos/endocode/rkt/issues{/number}","pulls_url":"https://api.github.com/repos/endocode/rkt/pulls{/number}","milestones_url":"https://api.github.com/repos/endocode/rkt/milestones{/number}","notifications_url":"https://api.github.com/repos/endocode/rkt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/endocode/rkt/labels{/name}","releases_url":"https://api.github.com/repos/endocode/rkt/releases{/id}","created_at":"2014-12-16T10:52:13Z","updated_at":"2015-04-30T07:44:22Z","pushed_at":"2015-05-22T09:56:11Z","git_url":"git://github.com/endocode/rkt.git","ssh_url":"git@github.com:endocode/rkt.git","clone_url":"https://github.com/endocode/rkt.git","svn_url":"https://github.com/endocode/rkt","homepage":"","size":7405,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"coreos:master","ref":"master","sha":"f1ffa2020d9e8370d1e0d015f38304b508fcfff8","user":{"login":"coreos","id":3730757,"avatar_url":"https://avatars.githubusercontent.com/u/3730757?v=3","gravatar_id":"","url":"https://api.github.com/users/coreos","html_url":"https://github.com/coreos","followers_url":"https://api.github.com/users/coreos/followers","following_url":"https://api.github.com/users/coreos/following{/other_user}","gists_url":"https://api.github.com/users/coreos/gists{/gist_id}","starred_url":"https://api.github.com/users/coreos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coreos/subscriptions","organizations_url":"https://api.github.com/users/coreos/orgs","repos_url":"https://api.github.com/users/coreos/repos","events_url":"https://api.github.com/users/coreos/events{/privacy}","received_events_url":"https://api.github.com/users/coreos/received_events","type":"Organization","site_admin":false},"repo":{"id":26509369,"name":"rkt","full_name":"coreos/rkt","owner":{"login":"coreos","id":3730757,"avatar_url":"https://avatars.githubusercontent.com/u/3730757?v=3","gravatar_id":"","url":"https://api.github.com/users/coreos","html_url":"https://github.com/coreos","followers_url":"https://api.github.com/users/coreos/followers","following_url":"https://api.github.com/users/coreos/following{/other_user}","gists_url":"https://api.github.com/users/coreos/gists{/gist_id}","starred_url":"https://api.github.com/users/coreos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coreos/subscriptions","organizations_url":"https://api.github.com/users/coreos/orgs","repos_url":"https://api.github.com/users/coreos/repos","events_url":"https://api.github.com/users/coreos/events{/privacy}","received_events_url":"https://api.github.com/users/coreos/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/coreos/rkt","description":"rkt is an App Container runtime for Linux","fork":false,"url":"https://api.github.com/repos/coreos/rkt","forks_url":"https://api.github.com/repos/coreos/rkt/forks","keys_url":"https://api.github.com/repos/coreos/rkt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/coreos/rkt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/coreos/rkt/teams","hooks_url":"https://api.github.com/repos/coreos/rkt/hooks","issue_events_url":"https://api.github.com/repos/coreos/rkt/issues/events{/number}","events_url":"https://api.github.com/repos/coreos/rkt/events","assignees_url":"https://api.github.com/repos/coreos/rkt/assignees{/user}","branches_url":"https://api.github.com/repos/coreos/rkt/branches{/branch}","tags_url":"https://api.github.com/repos/coreos/rkt/tags","blobs_url":"https://api.github.com/repos/coreos/rkt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/coreos/rkt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/coreos/rkt/git/refs{/sha}","trees_url":"https://api.github.com/repos/coreos/rkt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/coreos/rkt/statuses/{sha}","languages_url":"https://api.github.com/repos/coreos/rkt/languages","stargazers_url":"https://api.github.com/repos/coreos/rkt/stargazers","contributors_url":"https://api.github.com/repos/coreos/rkt/contributors","subscribers_url":"https://api.github.com/repos/coreos/rkt/subscribers","subscription_url":"https://api.github.com/repos/coreos/rkt/subscription","commits_url":"https://api.github.com/repos/coreos/rkt/commits{/sha}","git_commits_url":"https://api.github.com/repos/coreos/rkt/git/commits{/sha}","comments_url":"https://api.github.com/repos/coreos/rkt/comments{/number}","issue_comment_url":"https://api.github.com/repos/coreos/rkt/issues/comments{/number}","contents_url":"https://api.github.com/repos/coreos/rkt/contents/{+path}","compare_url":"https://api.github.com/repos/coreos/rkt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/coreos/rkt/merges","archive_url":"https://api.github.com/repos/coreos/rkt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/coreos/rkt/downloads","issues_url":"https://api.github.com/repos/coreos/rkt/issues{/number}","pulls_url":"https://api.github.com/repos/coreos/rkt/pulls{/number}","milestones_url":"https://api.github.com/repos/coreos/rkt/milestones{/number}","notifications_url":"https://api.github.com/repos/coreos/rkt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/coreos/rkt/labels{/name}","releases_url":"https://api.github.com/repos/coreos/rkt/releases{/id}","created_at":"2014-11-11T23:13:18Z","updated_at":"2015-05-22T09:43:05Z","pushed_at":"2015-05-22T13:18:39Z","git_url":"git://github.com/coreos/rkt.git","ssh_url":"git@github.com:coreos/rkt.git","clone_url":"https://github.com/coreos/rkt.git","svn_url":"https://github.com/coreos/rkt","homepage":"","size":16855,"stargazers_count":4187,"watchers_count":4187,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":316,"mirror_url":null,"open_issues_count":117,"forks":316,"open_issues":117,"watchers":4187,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/coreos/rkt/pulls/920"},"html":{"href":"https://github.com/coreos/rkt/pull/920"},"issue":{"href":"https://api.github.com/repos/coreos/rkt/issues/920"},"comments":{"href":"https://api.github.com/repos/coreos/rkt/issues/920/comments"},"review_comments":{"href":"https://api.github.com/repos/coreos/rkt/pulls/920/comments"},"review_comment":{"href":"https://api.github.com/repos/coreos/rkt/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/coreos/rkt/pulls/920/commits"},"statuses":{"href":"https://api.github.com/repos/coreos/rkt/statuses/2f67f43db32f71e972d7106b7ca0b13c6ff4d65e"}}}}