{"action":"created","comment":{"url":"https://api.github.com/repos/coreos/rkt/pulls/comments/70568551","id":70568551,"diff_hunk":"@@ -773,13 +781,46 @@ func runAPIService(cmd *cobra.Command, args []string) (exit int) {\n \n \tv1alpha.RegisterPublicAPIServer(publicServer, v1AlphaAPIServer)\n \n-\tgo publicServer.Serve(tcpl)\n+\tfor _, l := range listeners {\n+\t\tdefer l.Close()\n+\t\tgo publicServer.Serve(l)\n+\t}\n \n-\tstderr.Printf(\"API service running on %v...\", flagAPIServiceListenAddr)\n+\tstderr.Printf(\"API service running\")\n \n \t<-exitCh\n \n \tstderr.Print(\"API service exiting...\")\n \n \treturn\n }\n+\n+// Open API sockets based on command line parameters and\n+// the magic environment variable from systemd\n+//\n+// see sd_listen_fds(3)\n+func openAPISockets() ([]net.Listener, error) {\n+\tlisteners := make([]net.Listener, 0, 1)\n+\n+\tif flagSocketListen {\n+\t\tfds := activation.Files(true) // Get the socket fds from systemd\n+\t\tif fds == nil || len(fds) == 0 {","path":"rkt/api_service.go","position":86,"original_position":86,"commit_id":"795587217bbc9caef598e64fdf99ede745288c96","original_commit_id":"795587217bbc9caef598e64fdf99ede745288c96","user":{"login":"s-urbaniak","id":375856,"avatar_url":"https://avatars.githubusercontent.com/u/375856?v=3","gravatar_id":"","url":"https://api.github.com/users/s-urbaniak","html_url":"https://github.com/s-urbaniak","followers_url":"https://api.github.com/users/s-urbaniak/followers","following_url":"https://api.github.com/users/s-urbaniak/following{/other_user}","gists_url":"https://api.github.com/users/s-urbaniak/gists{/gist_id}","starred_url":"https://api.github.com/users/s-urbaniak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/s-urbaniak/subscriptions","organizations_url":"https://api.github.com/users/s-urbaniak/orgs","repos_url":"https://api.github.com/users/s-urbaniak/repos","events_url":"https://api.github.com/users/s-urbaniak/events{/privacy}","received_events_url":"https://api.github.com/users/s-urbaniak/received_events","type":"User","site_admin":false},"body":"`if len(fds) == 0 {` is sufficient.","created_at":"2016-07-13T06:08:55Z","updated_at":"2016-07-13T06:08:55Z","html_url":"https://github.com/coreos/rkt/pull/2916#discussion_r70568551","pull_request_url":"https://api.github.com/repos/coreos/rkt/pulls/2916","_links":{"self":{"href":"https://api.github.com/repos/coreos/rkt/pulls/comments/70568551"},"html":{"href":"https://github.com/coreos/rkt/pull/2916#discussion_r70568551"},"pull_request":{"href":"https://api.github.com/repos/coreos/rkt/pulls/2916"}}},"pull_request":{"url":"https://api.github.com/repos/coreos/rkt/pulls/2916","id":77143849,"html_url":"https://github.com/coreos/rkt/pull/2916","diff_url":"https://github.com/coreos/rkt/pull/2916.diff","patch_url":"https://github.com/coreos/rkt/pull/2916.patch","issue_url":"https://api.github.com/repos/coreos/rkt/issues/2916","number":2916,"state":"open","locked":false,"title":"rkt/api: add --socket option to run as a systemd.socket(5) service","user":{"login":"squeed","id":551378,"avatar_url":"https://avatars.githubusercontent.com/u/551378?v=3","gravatar_id":"","url":"https://api.github.com/users/squeed","html_url":"https://github.com/squeed","followers_url":"https://api.github.com/users/squeed/followers","following_url":"https://api.github.com/users/squeed/following{/other_user}","gists_url":"https://api.github.com/users/squeed/gists{/gist_id}","starred_url":"https://api.github.com/users/squeed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/squeed/subscriptions","organizations_url":"https://api.github.com/users/squeed/orgs","repos_url":"https://api.github.com/users/squeed/repos","events_url":"https://api.github.com/users/squeed/events{/privacy}","received_events_url":"https://api.github.com/users/squeed/received_events","type":"User","site_admin":false},"body":"Fixes #2794. This allows rkt to run as a systemd socket-based unit.\r\n\r\nWhen this looks good, I'll include the recommended unit files in #2272.","created_at":"2016-07-12T15:45:40Z","updated_at":"2016-07-13T06:08:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a05e2b9c34ffb5da5cb07ad5dbb42efc23fdad39","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/coreos/rkt/pulls/2916/commits","review_comments_url":"https://api.github.com/repos/coreos/rkt/pulls/2916/comments","review_comment_url":"https://api.github.com/repos/coreos/rkt/pulls/comments{/number}","comments_url":"https://api.github.com/repos/coreos/rkt/issues/2916/comments","statuses_url":"https://api.github.com/repos/coreos/rkt/statuses/795587217bbc9caef598e64fdf99ede745288c96","head":{"label":"squeed:socket-service-activation","ref":"socket-service-activation","sha":"795587217bbc9caef598e64fdf99ede745288c96","user":{"login":"squeed","id":551378,"avatar_url":"https://avatars.githubusercontent.com/u/551378?v=3","gravatar_id":"","url":"https://api.github.com/users/squeed","html_url":"https://github.com/squeed","followers_url":"https://api.github.com/users/squeed/followers","following_url":"https://api.github.com/users/squeed/following{/other_user}","gists_url":"https://api.github.com/users/squeed/gists{/gist_id}","starred_url":"https://api.github.com/users/squeed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/squeed/subscriptions","organizations_url":"https://api.github.com/users/squeed/orgs","repos_url":"https://api.github.com/users/squeed/repos","events_url":"https://api.github.com/users/squeed/events{/privacy}","received_events_url":"https://api.github.com/users/squeed/received_events","type":"User","site_admin":false},"repo":{"id":62400350,"name":"rkt","full_name":"squeed/rkt","owner":{"login":"squeed","id":551378,"avatar_url":"https://avatars.githubusercontent.com/u/551378?v=3","gravatar_id":"","url":"https://api.github.com/users/squeed","html_url":"https://github.com/squeed","followers_url":"https://api.github.com/users/squeed/followers","following_url":"https://api.github.com/users/squeed/following{/other_user}","gists_url":"https://api.github.com/users/squeed/gists{/gist_id}","starred_url":"https://api.github.com/users/squeed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/squeed/subscriptions","organizations_url":"https://api.github.com/users/squeed/orgs","repos_url":"https://api.github.com/users/squeed/repos","events_url":"https://api.github.com/users/squeed/events{/privacy}","received_events_url":"https://api.github.com/users/squeed/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/squeed/rkt","description":"rkt is an App Container runtime for Linux","fork":true,"url":"https://api.github.com/repos/squeed/rkt","forks_url":"https://api.github.com/repos/squeed/rkt/forks","keys_url":"https://api.github.com/repos/squeed/rkt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/squeed/rkt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/squeed/rkt/teams","hooks_url":"https://api.github.com/repos/squeed/rkt/hooks","issue_events_url":"https://api.github.com/repos/squeed/rkt/issues/events{/number}","events_url":"https://api.github.com/repos/squeed/rkt/events","assignees_url":"https://api.github.com/repos/squeed/rkt/assignees{/user}","branches_url":"https://api.github.com/repos/squeed/rkt/branches{/branch}","tags_url":"https://api.github.com/repos/squeed/rkt/tags","blobs_url":"https://api.github.com/repos/squeed/rkt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/squeed/rkt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/squeed/rkt/git/refs{/sha}","trees_url":"https://api.github.com/repos/squeed/rkt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/squeed/rkt/statuses/{sha}","languages_url":"https://api.github.com/repos/squeed/rkt/languages","stargazers_url":"https://api.github.com/repos/squeed/rkt/stargazers","contributors_url":"https://api.github.com/repos/squeed/rkt/contributors","subscribers_url":"https://api.github.com/repos/squeed/rkt/subscribers","subscription_url":"https://api.github.com/repos/squeed/rkt/subscription","commits_url":"https://api.github.com/repos/squeed/rkt/commits{/sha}","git_commits_url":"https://api.github.com/repos/squeed/rkt/git/commits{/sha}","comments_url":"https://api.github.com/repos/squeed/rkt/comments{/number}","issue_comment_url":"https://api.github.com/repos/squeed/rkt/issues/comments{/number}","contents_url":"https://api.github.com/repos/squeed/rkt/contents/{+path}","compare_url":"https://api.github.com/repos/squeed/rkt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/squeed/rkt/merges","archive_url":"https://api.github.com/repos/squeed/rkt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/squeed/rkt/downloads","issues_url":"https://api.github.com/repos/squeed/rkt/issues{/number}","pulls_url":"https://api.github.com/repos/squeed/rkt/pulls{/number}","milestones_url":"https://api.github.com/repos/squeed/rkt/milestones{/number}","notifications_url":"https://api.github.com/repos/squeed/rkt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/squeed/rkt/labels{/name}","releases_url":"https://api.github.com/repos/squeed/rkt/releases{/id}","deployments_url":"https://api.github.com/repos/squeed/rkt/deployments","created_at":"2016-07-01T14:54:23Z","updated_at":"2016-07-01T14:54:25Z","pushed_at":"2016-07-12T16:19:46Z","git_url":"git://github.com/squeed/rkt.git","ssh_url":"git@github.com:squeed/rkt.git","clone_url":"https://github.com/squeed/rkt.git","svn_url":"https://github.com/squeed/rkt","homepage":"","size":22207,"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":"64e931a183d12a30e3e25deefbeab0753dca99bf","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}","deployments_url":"https://api.github.com/repos/coreos/rkt/deployments","created_at":"2014-11-11T23:13:18Z","updated_at":"2016-07-13T03:59:15Z","pushed_at":"2016-07-13T01:11:08Z","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":28820,"stargazers_count":5702,"watchers_count":5702,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":546,"mirror_url":null,"open_issues_count":353,"forks":546,"open_issues":353,"watchers":5702,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/coreos/rkt/pulls/2916"},"html":{"href":"https://github.com/coreos/rkt/pull/2916"},"issue":{"href":"https://api.github.com/repos/coreos/rkt/issues/2916"},"comments":{"href":"https://api.github.com/repos/coreos/rkt/issues/2916/comments"},"review_comments":{"href":"https://api.github.com/repos/coreos/rkt/pulls/2916/comments"},"review_comment":{"href":"https://api.github.com/repos/coreos/rkt/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/coreos/rkt/pulls/2916/commits"},"statuses":{"href":"https://api.github.com/repos/coreos/rkt/statuses/795587217bbc9caef598e64fdf99ede745288c96"}}}}
{"actor":{"display_login":"s-urbaniak"}}