{"action":"created","comment":{"url":"https://api.github.com/repos/kontena/pharos-cluster/pulls/comments/184662464","pull_request_review_id":115906151,"id":184662464,"diff_hunk":"@@ -89,15 +92,18 @@ def cpu_arch\n       # @return [Hash]\n       def host_checks\n         data = {}\n-        result = @ssh.exec(\"sudo curl -sSf --connect-timeout 1 --cacert /etc/kubernetes/pki/ca.crt https://localhost:6443/healthz\")\n-        data['api_healthy'] = (result.success? && result.stdout == 'ok')\n-        data['ca_exists'] = @ssh.file('/etc/kubernetes/pki/ca.key').exist?\n         data['kubelet_configured'] = @ssh.file('/etc/kubernetes/kubelet.conf').exist?\n+        data['ca_exists'] = @ssh.file('/etc/kubernetes/pki/ca.key').exist?\n+        data['etcd_ca_exists'] = @ssh.file('/etc/pharos/pki/ca-key.pem').exist?\n+\n+        if data['ca_exists']\n+          result = @ssh.exec(\"sudo curl -sSf --connect-timeout 1 --cacert /etc/kubernetes/pki/ca.crt https://localhost:6443/healthz\")","path":"lib/pharos/phases/validate_host.rb","position":29,"original_position":29,"commit_id":"08ebfda2ddb13de719f3f0ba3e5062a0a0aadb01","original_commit_id":"08ebfda2ddb13de719f3f0ba3e5062a0a0aadb01","user":{"login":"SpComb","id":3950373,"avatar_url":"https://avatars2.githubusercontent.com/u/3950373?v=4","gravatar_id":"","url":"https://api.github.com/users/SpComb","html_url":"https://github.com/SpComb","followers_url":"https://api.github.com/users/SpComb/followers","following_url":"https://api.github.com/users/SpComb/following{/other_user}","gists_url":"https://api.github.com/users/SpComb/gists{/gist_id}","starred_url":"https://api.github.com/users/SpComb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SpComb/subscriptions","organizations_url":"https://api.github.com/users/SpComb/orgs","repos_url":"https://api.github.com/users/SpComb/repos","events_url":"https://api.github.com/users/SpComb/events{/privacy}","received_events_url":"https://api.github.com/users/SpComb/received_events","type":"User","site_admin":false},"body":"Unrelated change, but we don't need to bother with the `curl` if the CA cert that it's using doesn't exist?","created_at":"2018-04-27T11:35:40Z","updated_at":"2018-04-27T11:35:40Z","html_url":"https://github.com/kontena/pharos-cluster/pull/336#discussion_r184662464","pull_request_url":"https://api.github.com/repos/kontena/pharos-cluster/pulls/336","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/kontena/pharos-cluster/pulls/comments/184662464"},"html":{"href":"https://github.com/kontena/pharos-cluster/pull/336#discussion_r184662464"},"pull_request":{"href":"https://api.github.com/repos/kontena/pharos-cluster/pulls/336"}}},"pull_request":{"url":"https://api.github.com/repos/kontena/pharos-cluster/pulls/336","id":184593785,"html_url":"https://github.com/kontena/pharos-cluster/pull/336","diff_url":"https://github.com/kontena/pharos-cluster/pull/336.diff","patch_url":"https://github.com/kontena/pharos-cluster/pull/336.patch","issue_url":"https://api.github.com/repos/kontena/pharos-cluster/issues/336","number":336,"state":"open","locked":false,"title":"Fix host role checks to skip unconfigured hosts","user":{"login":"SpComb","id":3950373,"avatar_url":"https://avatars2.githubusercontent.com/u/3950373?v=4","gravatar_id":"","url":"https://api.github.com/users/SpComb","html_url":"https://github.com/SpComb","followers_url":"https://api.github.com/users/SpComb/followers","following_url":"https://api.github.com/users/SpComb/following{/other_user}","gists_url":"https://api.github.com/users/SpComb/gists{/gist_id}","starred_url":"https://api.github.com/users/SpComb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SpComb/subscriptions","organizations_url":"https://api.github.com/users/SpComb/orgs","repos_url":"https://api.github.com/users/SpComb/repos","events_url":"https://api.github.com/users/SpComb/events{/privacy}","received_events_url":"https://api.github.com/users/SpComb/received_events","type":"User","site_admin":false},"body":"Fixes #332\r\n\r\nMinimal fix that does not change the checks. Tested to worker for `role` changes after a succesfull `pharos-cluster up`, but I think this will not work correctly if the cluster setup failed after the `ConfigureKubelet`/`ConfigureEtcd` phases but before the `ConfigureMaster`/`JoinNode` phases.","created_at":"2018-04-27T11:18:33Z","updated_at":"2018-04-27T11:35:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ab6df7c2f0257f68a4fc162fa760081ee5180a0f","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":844668571,"url":"https://api.github.com/repos/kontena/pharos-cluster/labels/bug","name":"bug","color":"d73a4a","default":true}],"milestone":null,"commits_url":"https://api.github.com/repos/kontena/pharos-cluster/pulls/336/commits","review_comments_url":"https://api.github.com/repos/kontena/pharos-cluster/pulls/336/comments","review_comment_url":"https://api.github.com/repos/kontena/pharos-cluster/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kontena/pharos-cluster/issues/336/comments","statuses_url":"https://api.github.com/repos/kontena/pharos-cluster/statuses/08ebfda2ddb13de719f3f0ba3e5062a0a0aadb01","head":{"label":"kontena:fix/validate-host-role-checks","ref":"fix/validate-host-role-checks","sha":"08ebfda2ddb13de719f3f0ba3e5062a0a0aadb01","user":{"login":"kontena","id":10419574,"avatar_url":"https://avatars2.githubusercontent.com/u/10419574?v=4","gravatar_id":"","url":"https://api.github.com/users/kontena","html_url":"https://github.com/kontena","followers_url":"https://api.github.com/users/kontena/followers","following_url":"https://api.github.com/users/kontena/following{/other_user}","gists_url":"https://api.github.com/users/kontena/gists{/gist_id}","starred_url":"https://api.github.com/users/kontena/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kontena/subscriptions","organizations_url":"https://api.github.com/users/kontena/orgs","repos_url":"https://api.github.com/users/kontena/repos","events_url":"https://api.github.com/users/kontena/events{/privacy}","received_events_url":"https://api.github.com/users/kontena/received_events","type":"Organization","site_admin":false},"repo":{"id":122439193,"name":"pharos-cluster","full_name":"kontena/pharos-cluster","owner":{"login":"kontena","id":10419574,"avatar_url":"https://avatars2.githubusercontent.com/u/10419574?v=4","gravatar_id":"","url":"https://api.github.com/users/kontena","html_url":"https://github.com/kontena","followers_url":"https://api.github.com/users/kontena/followers","following_url":"https://api.github.com/users/kontena/following{/other_user}","gists_url":"https://api.github.com/users/kontena/gists{/gist_id}","starred_url":"https://api.github.com/users/kontena/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kontena/subscriptions","organizations_url":"https://api.github.com/users/kontena/orgs","repos_url":"https://api.github.com/users/kontena/repos","events_url":"https://api.github.com/users/kontena/events{/privacy}","received_events_url":"https://api.github.com/users/kontena/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kontena/pharos-cluster","description":"The simple, solid, certified Kubernetes distribution that just works.","fork":false,"url":"https://api.github.com/repos/kontena/pharos-cluster","forks_url":"https://api.github.com/repos/kontena/pharos-cluster/forks","keys_url":"https://api.github.com/repos/kontena/pharos-cluster/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kontena/pharos-cluster/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kontena/pharos-cluster/teams","hooks_url":"https://api.github.com/repos/kontena/pharos-cluster/hooks","issue_events_url":"https://api.github.com/repos/kontena/pharos-cluster/issues/events{/number}","events_url":"https://api.github.com/repos/kontena/pharos-cluster/events","assignees_url":"https://api.github.com/repos/kontena/pharos-cluster/assignees{/user}","branches_url":"https://api.github.com/repos/kontena/pharos-cluster/branches{/branch}","tags_url":"https://api.github.com/repos/kontena/pharos-cluster/tags","blobs_url":"https://api.github.com/repos/kontena/pharos-cluster/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kontena/pharos-cluster/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kontena/pharos-cluster/git/refs{/sha}","trees_url":"https://api.github.com/repos/kontena/pharos-cluster/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kontena/pharos-cluster/statuses/{sha}","languages_url":"https://api.github.com/repos/kontena/pharos-cluster/languages","stargazers_url":"https://api.github.com/repos/kontena/pharos-cluster/stargazers","contributors_url":"https://api.github.com/repos/kontena/pharos-cluster/contributors","subscribers_url":"https://api.github.com/repos/kontena/pharos-cluster/subscribers","subscription_url":"https://api.github.com/repos/kontena/pharos-cluster/subscription","commits_url":"https://api.github.com/repos/kontena/pharos-cluster/commits{/sha}","git_commits_url":"https://api.github.com/repos/kontena/pharos-cluster/git/commits{/sha}","comments_url":"https://api.github.com/repos/kontena/pharos-cluster/comments{/number}","issue_comment_url":"https://api.github.com/repos/kontena/pharos-cluster/issues/comments{/number}","contents_url":"https://api.github.com/repos/kontena/pharos-cluster/contents/{+path}","compare_url":"https://api.github.com/repos/kontena/pharos-cluster/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kontena/pharos-cluster/merges","archive_url":"https://api.github.com/repos/kontena/pharos-cluster/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kontena/pharos-cluster/downloads","issues_url":"https://api.github.com/repos/kontena/pharos-cluster/issues{/number}","pulls_url":"https://api.github.com/repos/kontena/pharos-cluster/pulls{/number}","milestones_url":"https://api.github.com/repos/kontena/pharos-cluster/milestones{/number}","notifications_url":"https://api.github.com/repos/kontena/pharos-cluster/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kontena/pharos-cluster/labels{/name}","releases_url":"https://api.github.com/repos/kontena/pharos-cluster/releases{/id}","deployments_url":"https://api.github.com/repos/kontena/pharos-cluster/deployments","created_at":"2018-02-22T06:23:53Z","updated_at":"2018-04-27T10:23:11Z","pushed_at":"2018-04-27T11:35:11Z","git_url":"git://github.com/kontena/pharos-cluster.git","ssh_url":"git@github.com:kontena/pharos-cluster.git","clone_url":"https://github.com/kontena/pharos-cluster.git","svn_url":"https://github.com/kontena/pharos-cluster","homepage":"https://pharos.sh","size":570,"stargazers_count":34,"watchers_count":34,"language":"Ruby","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":44,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":1,"open_issues":44,"watchers":34,"default_branch":"master"}},"base":{"label":"kontena:master","ref":"master","sha":"d0f94dd067b6f65d2f59c9b8287367742c6c5c1c","user":{"login":"kontena","id":10419574,"avatar_url":"https://avatars2.githubusercontent.com/u/10419574?v=4","gravatar_id":"","url":"https://api.github.com/users/kontena","html_url":"https://github.com/kontena","followers_url":"https://api.github.com/users/kontena/followers","following_url":"https://api.github.com/users/kontena/following{/other_user}","gists_url":"https://api.github.com/users/kontena/gists{/gist_id}","starred_url":"https://api.github.com/users/kontena/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kontena/subscriptions","organizations_url":"https://api.github.com/users/kontena/orgs","repos_url":"https://api.github.com/users/kontena/repos","events_url":"https://api.github.com/users/kontena/events{/privacy}","received_events_url":"https://api.github.com/users/kontena/received_events","type":"Organization","site_admin":false},"repo":{"id":122439193,"name":"pharos-cluster","full_name":"kontena/pharos-cluster","owner":{"login":"kontena","id":10419574,"avatar_url":"https://avatars2.githubusercontent.com/u/10419574?v=4","gravatar_id":"","url":"https://api.github.com/users/kontena","html_url":"https://github.com/kontena","followers_url":"https://api.github.com/users/kontena/followers","following_url":"https://api.github.com/users/kontena/following{/other_user}","gists_url":"https://api.github.com/users/kontena/gists{/gist_id}","starred_url":"https://api.github.com/users/kontena/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kontena/subscriptions","organizations_url":"https://api.github.com/users/kontena/orgs","repos_url":"https://api.github.com/users/kontena/repos","events_url":"https://api.github.com/users/kontena/events{/privacy}","received_events_url":"https://api.github.com/users/kontena/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kontena/pharos-cluster","description":"The simple, solid, certified Kubernetes distribution that just works.","fork":false,"url":"https://api.github.com/repos/kontena/pharos-cluster","forks_url":"https://api.github.com/repos/kontena/pharos-cluster/forks","keys_url":"https://api.github.com/repos/kontena/pharos-cluster/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kontena/pharos-cluster/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kontena/pharos-cluster/teams","hooks_url":"https://api.github.com/repos/kontena/pharos-cluster/hooks","issue_events_url":"https://api.github.com/repos/kontena/pharos-cluster/issues/events{/number}","events_url":"https://api.github.com/repos/kontena/pharos-cluster/events","assignees_url":"https://api.github.com/repos/kontena/pharos-cluster/assignees{/user}","branches_url":"https://api.github.com/repos/kontena/pharos-cluster/branches{/branch}","tags_url":"https://api.github.com/repos/kontena/pharos-cluster/tags","blobs_url":"https://api.github.com/repos/kontena/pharos-cluster/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kontena/pharos-cluster/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kontena/pharos-cluster/git/refs{/sha}","trees_url":"https://api.github.com/repos/kontena/pharos-cluster/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kontena/pharos-cluster/statuses/{sha}","languages_url":"https://api.github.com/repos/kontena/pharos-cluster/languages","stargazers_url":"https://api.github.com/repos/kontena/pharos-cluster/stargazers","contributors_url":"https://api.github.com/repos/kontena/pharos-cluster/contributors","subscribers_url":"https://api.github.com/repos/kontena/pharos-cluster/subscribers","subscription_url":"https://api.github.com/repos/kontena/pharos-cluster/subscription","commits_url":"https://api.github.com/repos/kontena/pharos-cluster/commits{/sha}","git_commits_url":"https://api.github.com/repos/kontena/pharos-cluster/git/commits{/sha}","comments_url":"https://api.github.com/repos/kontena/pharos-cluster/comments{/number}","issue_comment_url":"https://api.github.com/repos/kontena/pharos-cluster/issues/comments{/number}","contents_url":"https://api.github.com/repos/kontena/pharos-cluster/contents/{+path}","compare_url":"https://api.github.com/repos/kontena/pharos-cluster/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kontena/pharos-cluster/merges","archive_url":"https://api.github.com/repos/kontena/pharos-cluster/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kontena/pharos-cluster/downloads","issues_url":"https://api.github.com/repos/kontena/pharos-cluster/issues{/number}","pulls_url":"https://api.github.com/repos/kontena/pharos-cluster/pulls{/number}","milestones_url":"https://api.github.com/repos/kontena/pharos-cluster/milestones{/number}","notifications_url":"https://api.github.com/repos/kontena/pharos-cluster/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kontena/pharos-cluster/labels{/name}","releases_url":"https://api.github.com/repos/kontena/pharos-cluster/releases{/id}","deployments_url":"https://api.github.com/repos/kontena/pharos-cluster/deployments","created_at":"2018-02-22T06:23:53Z","updated_at":"2018-04-27T10:23:11Z","pushed_at":"2018-04-27T11:35:11Z","git_url":"git://github.com/kontena/pharos-cluster.git","ssh_url":"git@github.com:kontena/pharos-cluster.git","clone_url":"https://github.com/kontena/pharos-cluster.git","svn_url":"https://github.com/kontena/pharos-cluster","homepage":"https://pharos.sh","size":570,"stargazers_count":34,"watchers_count":34,"language":"Ruby","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":44,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":1,"open_issues":44,"watchers":34,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kontena/pharos-cluster/pulls/336"},"html":{"href":"https://github.com/kontena/pharos-cluster/pull/336"},"issue":{"href":"https://api.github.com/repos/kontena/pharos-cluster/issues/336"},"comments":{"href":"https://api.github.com/repos/kontena/pharos-cluster/issues/336/comments"},"review_comments":{"href":"https://api.github.com/repos/kontena/pharos-cluster/pulls/336/comments"},"review_comment":{"href":"https://api.github.com/repos/kontena/pharos-cluster/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kontena/pharos-cluster/pulls/336/commits"},"statuses":{"href":"https://api.github.com/repos/kontena/pharos-cluster/statuses/08ebfda2ddb13de719f3f0ba3e5062a0a0aadb01"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"SpComb"}}