{"action":"created","comment":{"url":"https://api.github.com/repos/deis/builder/pulls/comments/52688644","id":52688644,"diff_hunk":"@@ -43,10 +47,51 @@ func main() {\n \t\t\t\t\tpkglog.Err(\"getting config for %s [%s]\", serverConfAppName, err)\n \t\t\t\t\tos.Exit(1)\n \t\t\t\t}\n-\t\t\t\tpkglog.Info(\"starting fetcher on port %d\", cnf.FetcherPort)\n-\t\t\t\tgo fetcher.Serve(cnf.FetcherPort)\n-\t\t\t\tpkglog.Info(\"starting SSH server on %s:%d\", cnf.SSHHostIP, cnf.SSHHostPort)\n-\t\t\t\tos.Exit(pkg.Run(cnf.SSHHostIP, cnf.SSHHostPort, \"boot\"))\n+\t\t\t\tcirc := sshd.NewCircuit()\n+\n+\t\t\t\ts3Client, err := storage.GetClient(cnf.HealthSrvTestStorageRegion)\n+\t\t\t\tif err != nil {\n+\t\t\t\t\tlog.Printf(\"Error getting s3 client (%s)\", err)\n+\t\t\t\t\tos.Exit(1)\n+\t\t\t\t}\n+\t\t\t\tkubeClient, err := kcl.NewInCluster()\n+\t\t\t\tif err != nil {\n+\t\t\t\t\tlog.Printf(\"Error getting kubernetes client [%s]\", err)\n+\t\t\t\t\tos.Exit(1)\n+\t\t\t\t}\n+\t\t\t\tlog.Printf(\"Starting health check server on port %d\", cnf.HealthSrvPort)\n+\t\t\t\thealthSrvCh := make(chan error)\n+\t\t\t\tgo func() {\n+\t\t\t\t\tif err := healthsrv.Start(cnf.HealthSrvPort, kubeClient.Namespaces(), s3Client, circ); err != nil {\n+\t\t\t\t\t\thealthSrvCh <- err","path":"boot.go","position":54,"original_position":54,"commit_id":"c20fdb49191c77fa0eb30ed8b280ff728cb2d4fe","original_commit_id":"c20fdb49191c77fa0eb30ed8b280ff728cb2d4fe","user":{"login":"arschles","id":70865,"avatar_url":"https://avatars.githubusercontent.com/u/70865?v=3","gravatar_id":"","url":"https://api.github.com/users/arschles","html_url":"https://github.com/arschles","followers_url":"https://api.github.com/users/arschles/followers","following_url":"https://api.github.com/users/arschles/following{/other_user}","gists_url":"https://api.github.com/users/arschles/gists{/gist_id}","starred_url":"https://api.github.com/users/arschles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arschles/subscriptions","organizations_url":"https://api.github.com/users/arschles/orgs","repos_url":"https://api.github.com/users/arschles/repos","events_url":"https://api.github.com/users/arschles/events{/privacy}","received_events_url":"https://api.github.com/users/arschles/received_events","type":"User","site_admin":false},"body":"Well, the goal here is to check that the k8s API is accessible. Given that the builder has started, we can assume that the namespace under which it runs (also specified in `POD_NAMESPACE`) exists. The call that the health server makes is to just get a list of namespaces, and the goal there is only to see if the master is accessible.\r\n\r\nI think @aledbf had an idea for a cheaper method of determining whether the API server was accessible, but if you have ideas I'd like to hear them too.","created_at":"2016-02-12T00:04:36Z","updated_at":"2016-02-12T00:04:36Z","html_url":"https://github.com/deis/builder/pull/149#discussion_r52688644","pull_request_url":"https://api.github.com/repos/deis/builder/pulls/149","_links":{"self":{"href":"https://api.github.com/repos/deis/builder/pulls/comments/52688644"},"html":{"href":"https://github.com/deis/builder/pull/149#discussion_r52688644"},"pull_request":{"href":"https://api.github.com/repos/deis/builder/pulls/149"}}},"pull_request":{"url":"https://api.github.com/repos/deis/builder/pulls/149","id":58656065,"html_url":"https://github.com/deis/builder/pull/149","diff_url":"https://github.com/deis/builder/pull/149.diff","patch_url":"https://github.com/deis/builder/pull/149.patch","issue_url":"https://api.github.com/repos/deis/builder/issues/149","number":149,"state":"open","locked":false,"title":"fix(*): add readiness & liveness probes","user":{"login":"arschles","id":70865,"avatar_url":"https://avatars.githubusercontent.com/u/70865?v=3","gravatar_id":"","url":"https://api.github.com/users/arschles","html_url":"https://github.com/arschles","followers_url":"https://api.github.com/users/arschles/followers","following_url":"https://api.github.com/users/arschles/following{/other_user}","gists_url":"https://api.github.com/users/arschles/gists{/gist_id}","starred_url":"https://api.github.com/users/arschles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arschles/subscriptions","organizations_url":"https://api.github.com/users/arschles/orgs","repos_url":"https://api.github.com/users/arschles/repos","events_url":"https://api.github.com/users/arschles/events{/privacy}","received_events_url":"https://api.github.com/users/arschles/received_events","type":"User","site_admin":false},"body":"Fixes #92 \r\nFixes #89 \r\nRef deis/deis#4809\r\nWhen this is done, merge deis/charts#93\r\n\r\nStill TODO:\r\n\r\n- [x] Check k8s server on probe request\r\n- [x] Check that the server is actually running on probe request\r\n- [x] Tests for `healthZHandler`\r\n- [x] `TestOpenCloseConcurrent`\r\n- [x] `make test` output: `pkg/sshd/server_test.go:106: not enough arguments in call to Serve`","created_at":"2016-02-08T19:35:52Z","updated_at":"2016-02-12T00:04:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0c7c022cdd7b522a5476553ac51dc8de484d9d49","assignee":{"login":"arschles","id":70865,"avatar_url":"https://avatars.githubusercontent.com/u/70865?v=3","gravatar_id":"","url":"https://api.github.com/users/arschles","html_url":"https://github.com/arschles","followers_url":"https://api.github.com/users/arschles/followers","following_url":"https://api.github.com/users/arschles/following{/other_user}","gists_url":"https://api.github.com/users/arschles/gists{/gist_id}","starred_url":"https://api.github.com/users/arschles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arschles/subscriptions","organizations_url":"https://api.github.com/users/arschles/orgs","repos_url":"https://api.github.com/users/arschles/repos","events_url":"https://api.github.com/users/arschles/events{/privacy}","received_events_url":"https://api.github.com/users/arschles/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/deis/builder/milestones/2","html_url":"https://github.com/deis/builder/milestones/v2.0-beta1","labels_url":"https://api.github.com/repos/deis/builder/milestones/2/labels","id":1459775,"number":2,"title":"v2.0-beta1","description":"","creator":{"login":"mboersma","id":73019,"avatar_url":"https://avatars.githubusercontent.com/u/73019?v=3","gravatar_id":"","url":"https://api.github.com/users/mboersma","html_url":"https://github.com/mboersma","followers_url":"https://api.github.com/users/mboersma/followers","following_url":"https://api.github.com/users/mboersma/following{/other_user}","gists_url":"https://api.github.com/users/mboersma/gists{/gist_id}","starred_url":"https://api.github.com/users/mboersma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mboersma/subscriptions","organizations_url":"https://api.github.com/users/mboersma/orgs","repos_url":"https://api.github.com/users/mboersma/repos","events_url":"https://api.github.com/users/mboersma/events{/privacy}","received_events_url":"https://api.github.com/users/mboersma/received_events","type":"User","site_admin":false},"open_issues":26,"closed_issues":56,"state":"open","created_at":"2015-12-14T17:56:43Z","updated_at":"2016-02-11T23:54:02Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/deis/builder/pulls/149/commits","review_comments_url":"https://api.github.com/repos/deis/builder/pulls/149/comments","review_comment_url":"https://api.github.com/repos/deis/builder/pulls/comments{/number}","comments_url":"https://api.github.com/repos/deis/builder/issues/149/comments","statuses_url":"https://api.github.com/repos/deis/builder/statuses/c20fdb49191c77fa0eb30ed8b280ff728cb2d4fe","head":{"label":"arschles:probes","ref":"probes","sha":"c20fdb49191c77fa0eb30ed8b280ff728cb2d4fe","user":{"login":"arschles","id":70865,"avatar_url":"https://avatars.githubusercontent.com/u/70865?v=3","gravatar_id":"","url":"https://api.github.com/users/arschles","html_url":"https://github.com/arschles","followers_url":"https://api.github.com/users/arschles/followers","following_url":"https://api.github.com/users/arschles/following{/other_user}","gists_url":"https://api.github.com/users/arschles/gists{/gist_id}","starred_url":"https://api.github.com/users/arschles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arschles/subscriptions","organizations_url":"https://api.github.com/users/arschles/orgs","repos_url":"https://api.github.com/users/arschles/repos","events_url":"https://api.github.com/users/arschles/events{/privacy}","received_events_url":"https://api.github.com/users/arschles/received_events","type":"User","site_admin":false},"repo":{"id":46528663,"name":"deis-builder","full_name":"arschles/deis-builder","owner":{"login":"arschles","id":70865,"avatar_url":"https://avatars.githubusercontent.com/u/70865?v=3","gravatar_id":"","url":"https://api.github.com/users/arschles","html_url":"https://github.com/arschles","followers_url":"https://api.github.com/users/arschles/followers","following_url":"https://api.github.com/users/arschles/following{/other_user}","gists_url":"https://api.github.com/users/arschles/gists{/gist_id}","starred_url":"https://api.github.com/users/arschles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arschles/subscriptions","organizations_url":"https://api.github.com/users/arschles/orgs","repos_url":"https://api.github.com/users/arschles/repos","events_url":"https://api.github.com/users/arschles/events{/privacy}","received_events_url":"https://api.github.com/users/arschles/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/arschles/deis-builder","description":"[MIRROR] The Deis Buildpack / Dockerfile builder","fork":true,"url":"https://api.github.com/repos/arschles/deis-builder","forks_url":"https://api.github.com/repos/arschles/deis-builder/forks","keys_url":"https://api.github.com/repos/arschles/deis-builder/keys{/key_id}","collaborators_url":"https://api.github.com/repos/arschles/deis-builder/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/arschles/deis-builder/teams","hooks_url":"https://api.github.com/repos/arschles/deis-builder/hooks","issue_events_url":"https://api.github.com/repos/arschles/deis-builder/issues/events{/number}","events_url":"https://api.github.com/repos/arschles/deis-builder/events","assignees_url":"https://api.github.com/repos/arschles/deis-builder/assignees{/user}","branches_url":"https://api.github.com/repos/arschles/deis-builder/branches{/branch}","tags_url":"https://api.github.com/repos/arschles/deis-builder/tags","blobs_url":"https://api.github.com/repos/arschles/deis-builder/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/arschles/deis-builder/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/arschles/deis-builder/git/refs{/sha}","trees_url":"https://api.github.com/repos/arschles/deis-builder/git/trees{/sha}","statuses_url":"https://api.github.com/repos/arschles/deis-builder/statuses/{sha}","languages_url":"https://api.github.com/repos/arschles/deis-builder/languages","stargazers_url":"https://api.github.com/repos/arschles/deis-builder/stargazers","contributors_url":"https://api.github.com/repos/arschles/deis-builder/contributors","subscribers_url":"https://api.github.com/repos/arschles/deis-builder/subscribers","subscription_url":"https://api.github.com/repos/arschles/deis-builder/subscription","commits_url":"https://api.github.com/repos/arschles/deis-builder/commits{/sha}","git_commits_url":"https://api.github.com/repos/arschles/deis-builder/git/commits{/sha}","comments_url":"https://api.github.com/repos/arschles/deis-builder/comments{/number}","issue_comment_url":"https://api.github.com/repos/arschles/deis-builder/issues/comments{/number}","contents_url":"https://api.github.com/repos/arschles/deis-builder/contents/{+path}","compare_url":"https://api.github.com/repos/arschles/deis-builder/compare/{base}...{head}","merges_url":"https://api.github.com/repos/arschles/deis-builder/merges","archive_url":"https://api.github.com/repos/arschles/deis-builder/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/arschles/deis-builder/downloads","issues_url":"https://api.github.com/repos/arschles/deis-builder/issues{/number}","pulls_url":"https://api.github.com/repos/arschles/deis-builder/pulls{/number}","milestones_url":"https://api.github.com/repos/arschles/deis-builder/milestones{/number}","notifications_url":"https://api.github.com/repos/arschles/deis-builder/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/arschles/deis-builder/labels{/name}","releases_url":"https://api.github.com/repos/arschles/deis-builder/releases{/id}","deployments_url":"https://api.github.com/repos/arschles/deis-builder/deployments","created_at":"2015-11-20T00:24:34Z","updated_at":"2016-02-04T16:37:34Z","pushed_at":"2016-02-11T23:55:34Z","git_url":"git://github.com/arschles/deis-builder.git","ssh_url":"git@github.com:arschles/deis-builder.git","clone_url":"https://github.com/arschles/deis-builder.git","svn_url":"https://github.com/arschles/deis-builder","homepage":"https://github.com/deis/builder","size":47516,"stargazers_count":0,"watchers_count":0,"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":0,"default_branch":"dockerbuilder"}},"base":{"label":"deis:master","ref":"master","sha":"a3ebb95456fa173d3772ecaa81c080964598e4b9","user":{"login":"deis","id":6117407,"avatar_url":"https://avatars.githubusercontent.com/u/6117407?v=3","gravatar_id":"","url":"https://api.github.com/users/deis","html_url":"https://github.com/deis","followers_url":"https://api.github.com/users/deis/followers","following_url":"https://api.github.com/users/deis/following{/other_user}","gists_url":"https://api.github.com/users/deis/gists{/gist_id}","starred_url":"https://api.github.com/users/deis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deis/subscriptions","organizations_url":"https://api.github.com/users/deis/orgs","repos_url":"https://api.github.com/users/deis/repos","events_url":"https://api.github.com/users/deis/events{/privacy}","received_events_url":"https://api.github.com/users/deis/received_events","type":"Organization","site_admin":false},"repo":{"id":44639329,"name":"builder","full_name":"deis/builder","owner":{"login":"deis","id":6117407,"avatar_url":"https://avatars.githubusercontent.com/u/6117407?v=3","gravatar_id":"","url":"https://api.github.com/users/deis","html_url":"https://github.com/deis","followers_url":"https://api.github.com/users/deis/followers","following_url":"https://api.github.com/users/deis/following{/other_user}","gists_url":"https://api.github.com/users/deis/gists{/gist_id}","starred_url":"https://api.github.com/users/deis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deis/subscriptions","organizations_url":"https://api.github.com/users/deis/orgs","repos_url":"https://api.github.com/users/deis/repos","events_url":"https://api.github.com/users/deis/events{/privacy}","received_events_url":"https://api.github.com/users/deis/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/deis/builder","description":"Heroku buildpack builder for Deis v2","fork":false,"url":"https://api.github.com/repos/deis/builder","forks_url":"https://api.github.com/repos/deis/builder/forks","keys_url":"https://api.github.com/repos/deis/builder/keys{/key_id}","collaborators_url":"https://api.github.com/repos/deis/builder/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/deis/builder/teams","hooks_url":"https://api.github.com/repos/deis/builder/hooks","issue_events_url":"https://api.github.com/repos/deis/builder/issues/events{/number}","events_url":"https://api.github.com/repos/deis/builder/events","assignees_url":"https://api.github.com/repos/deis/builder/assignees{/user}","branches_url":"https://api.github.com/repos/deis/builder/branches{/branch}","tags_url":"https://api.github.com/repos/deis/builder/tags","blobs_url":"https://api.github.com/repos/deis/builder/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/deis/builder/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/deis/builder/git/refs{/sha}","trees_url":"https://api.github.com/repos/deis/builder/git/trees{/sha}","statuses_url":"https://api.github.com/repos/deis/builder/statuses/{sha}","languages_url":"https://api.github.com/repos/deis/builder/languages","stargazers_url":"https://api.github.com/repos/deis/builder/stargazers","contributors_url":"https://api.github.com/repos/deis/builder/contributors","subscribers_url":"https://api.github.com/repos/deis/builder/subscribers","subscription_url":"https://api.github.com/repos/deis/builder/subscription","commits_url":"https://api.github.com/repos/deis/builder/commits{/sha}","git_commits_url":"https://api.github.com/repos/deis/builder/git/commits{/sha}","comments_url":"https://api.github.com/repos/deis/builder/comments{/number}","issue_comment_url":"https://api.github.com/repos/deis/builder/issues/comments{/number}","contents_url":"https://api.github.com/repos/deis/builder/contents/{+path}","compare_url":"https://api.github.com/repos/deis/builder/compare/{base}...{head}","merges_url":"https://api.github.com/repos/deis/builder/merges","archive_url":"https://api.github.com/repos/deis/builder/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/deis/builder/downloads","issues_url":"https://api.github.com/repos/deis/builder/issues{/number}","pulls_url":"https://api.github.com/repos/deis/builder/pulls{/number}","milestones_url":"https://api.github.com/repos/deis/builder/milestones{/number}","notifications_url":"https://api.github.com/repos/deis/builder/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/deis/builder/labels{/name}","releases_url":"https://api.github.com/repos/deis/builder/releases{/id}","deployments_url":"https://api.github.com/repos/deis/builder/deployments","created_at":"2015-10-20T22:49:18Z","updated_at":"2016-02-11T22:56:14Z","pushed_at":"2016-02-11T23:55:34Z","git_url":"git://github.com/deis/builder.git","ssh_url":"git@github.com:deis/builder.git","clone_url":"https://github.com/deis/builder.git","svn_url":"https://github.com/deis/builder","homepage":"http://deis.io","size":47545,"stargazers_count":12,"watchers_count":12,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":14,"mirror_url":null,"open_issues_count":40,"forks":14,"open_issues":40,"watchers":12,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/deis/builder/pulls/149"},"html":{"href":"https://github.com/deis/builder/pull/149"},"issue":{"href":"https://api.github.com/repos/deis/builder/issues/149"},"comments":{"href":"https://api.github.com/repos/deis/builder/issues/149/comments"},"review_comments":{"href":"https://api.github.com/repos/deis/builder/pulls/149/comments"},"review_comment":{"href":"https://api.github.com/repos/deis/builder/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/deis/builder/pulls/149/commits"},"statuses":{"href":"https://api.github.com/repos/deis/builder/statuses/c20fdb49191c77fa0eb30ed8b280ff728cb2d4fe"}}}}