{"action":"created","comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/89652306","pull_request_review_id":10197643,"id":89652306,"diff_hunk":"@@ -80,6 +80,32 @@ func (sc ServiceCheck) Check() (warnings, errors []error) {\n \treturn warnings, errors\n }\n \n+// FirewalldCheck checks if firewalld is enabled or active, and if so outputs a warning.\n+type FirewalldCheck struct {\n+\tports []int\n+}\n+\n+func (fc FirewalldCheck) Check() (warnings, errors []error) {\n+\tinitSystem, err := initsystem.GetInitSystem()\n+\tif err != nil {\n+\t\treturn []error{err}, nil\n+\t}\n+\n+\twarnings = []error{}\n+\n+\tif !initSystem.ServiceExists(\"firewalld\") {\n+\t\treturn nil, nil\n+\t}\n+\n+\tif initSystem.ServiceIsActive(\"firewalld\") {\n+\t\twarnings = append(warnings,\n+\t\t\tfmt.Errorf(\"firewalld is active, please ensure ports %v are open\",","path":"cmd/kubeadm/app/preflight/checks.go","position":23,"original_position":23,"commit_id":"6e40b2ee2c8186c6a77f141fb25c4a9881612007","original_commit_id":"6e40b2ee2c8186c6a77f141fb25c4a9881612007","user":{"login":"dgoodwin","id":51265,"avatar_url":"https://avatars.githubusercontent.com/u/51265?v=3","gravatar_id":"","url":"https://api.github.com/users/dgoodwin","html_url":"https://github.com/dgoodwin","followers_url":"https://api.github.com/users/dgoodwin/followers","following_url":"https://api.github.com/users/dgoodwin/following{/other_user}","gists_url":"https://api.github.com/users/dgoodwin/gists{/gist_id}","starred_url":"https://api.github.com/users/dgoodwin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dgoodwin/subscriptions","organizations_url":"https://api.github.com/users/dgoodwin/orgs","repos_url":"https://api.github.com/users/dgoodwin/repos","events_url":"https://api.github.com/users/dgoodwin/events{/privacy}","received_events_url":"https://api.github.com/users/dgoodwin/received_events","type":"User","site_admin":false},"body":"I think init will succeed even in this case, but join will fail, how about \"firewalld is active, please ensure ports %v are open or your cluster may not function correctly\"","created_at":"2016-11-25T19:31:54Z","updated_at":"2016-11-25T19:31:54Z","html_url":"https://github.com/kubernetes/kubernetes/pull/37498#discussion_r89652306","pull_request_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/37498","_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/89652306"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/37498#discussion_r89652306"},"pull_request":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/37498"}}},"pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/37498","id":95341680,"html_url":"https://github.com/kubernetes/kubernetes/pull/37498","diff_url":"https://github.com/kubernetes/kubernetes/pull/37498.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/37498.patch","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/37498","number":37498,"state":"open","locked":false,"title":"Warn if firewalld service is enabled.","user":{"login":"dgoodwin","id":51265,"avatar_url":"https://avatars.githubusercontent.com/u/51265?v=3","gravatar_id":"","url":"https://api.github.com/users/dgoodwin","html_url":"https://github.com/dgoodwin","followers_url":"https://api.github.com/users/dgoodwin/followers","following_url":"https://api.github.com/users/dgoodwin/following{/other_user}","gists_url":"https://api.github.com/users/dgoodwin/gists{/gist_id}","starred_url":"https://api.github.com/users/dgoodwin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dgoodwin/subscriptions","organizations_url":"https://api.github.com/users/dgoodwin/orgs","repos_url":"https://api.github.com/users/dgoodwin/repos","events_url":"https://api.github.com/users/dgoodwin/events{/privacy}","received_events_url":"https://api.github.com/users/dgoodwin/received_events","type":"User","site_admin":false},"body":"Fixes https://github.com/kubernetes/kubeadm/issues/21\r\n\r\nOutput will be:\r\n\r\n```\r\n(root@centos1 ~) $ kubeadm init             \r\nRunning pre-flight checks\r\nWARNING: firewalld is active, please ensure ports [6443 9898 10250] are open\r\n```\r\n\r\nI went with the port list from @errordeveloper 's ansible playbook here but it's possible there should be others listed.\n\n<!-- Reviewable:start -->\n---\nThis change is [<img src=\"https://reviewable.kubernetes.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/37498)\n<!-- Reviewable:end -->\n","created_at":"2016-11-25T19:21:26Z","updated_at":"2016-11-25T19:31:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d764c2937193ffb6603c3b49e556197b6ec74624","assignee":{"login":"luxas","id":5442475,"avatar_url":"https://avatars.githubusercontent.com/u/5442475?v=3","gravatar_id":"","url":"https://api.github.com/users/luxas","html_url":"https://github.com/luxas","followers_url":"https://api.github.com/users/luxas/followers","following_url":"https://api.github.com/users/luxas/following{/other_user}","gists_url":"https://api.github.com/users/luxas/gists{/gist_id}","starred_url":"https://api.github.com/users/luxas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luxas/subscriptions","organizations_url":"https://api.github.com/users/luxas/orgs","repos_url":"https://api.github.com/users/luxas/repos","events_url":"https://api.github.com/users/luxas/events{/privacy}","received_events_url":"https://api.github.com/users/luxas/received_events","type":"User","site_admin":false},"assignees":[{"login":"luxas","id":5442475,"avatar_url":"https://avatars.githubusercontent.com/u/5442475?v=3","gravatar_id":"","url":"https://api.github.com/users/luxas","html_url":"https://github.com/luxas","followers_url":"https://api.github.com/users/luxas/followers","following_url":"https://api.github.com/users/luxas/following{/other_user}","gists_url":"https://api.github.com/users/luxas/gists{/gist_id}","starred_url":"https://api.github.com/users/luxas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luxas/subscriptions","organizations_url":"https://api.github.com/users/luxas/orgs","repos_url":"https://api.github.com/users/luxas/repos","events_url":"https://api.github.com/users/luxas/events{/privacy}","received_events_url":"https://api.github.com/users/luxas/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/37498/commits","review_comments_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/37498/comments","review_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/37498/comments","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/6e40b2ee2c8186c6a77f141fb25c4a9881612007","head":{"label":"dgoodwin:firewalld-check","ref":"firewalld-check","sha":"6e40b2ee2c8186c6a77f141fb25c4a9881612007","user":{"login":"dgoodwin","id":51265,"avatar_url":"https://avatars.githubusercontent.com/u/51265?v=3","gravatar_id":"","url":"https://api.github.com/users/dgoodwin","html_url":"https://github.com/dgoodwin","followers_url":"https://api.github.com/users/dgoodwin/followers","following_url":"https://api.github.com/users/dgoodwin/following{/other_user}","gists_url":"https://api.github.com/users/dgoodwin/gists{/gist_id}","starred_url":"https://api.github.com/users/dgoodwin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dgoodwin/subscriptions","organizations_url":"https://api.github.com/users/dgoodwin/orgs","repos_url":"https://api.github.com/users/dgoodwin/repos","events_url":"https://api.github.com/users/dgoodwin/events{/privacy}","received_events_url":"https://api.github.com/users/dgoodwin/received_events","type":"User","site_admin":false},"repo":{"id":65905656,"name":"kubernetes","full_name":"dgoodwin/kubernetes","owner":{"login":"dgoodwin","id":51265,"avatar_url":"https://avatars.githubusercontent.com/u/51265?v=3","gravatar_id":"","url":"https://api.github.com/users/dgoodwin","html_url":"https://github.com/dgoodwin","followers_url":"https://api.github.com/users/dgoodwin/followers","following_url":"https://api.github.com/users/dgoodwin/following{/other_user}","gists_url":"https://api.github.com/users/dgoodwin/gists{/gist_id}","starred_url":"https://api.github.com/users/dgoodwin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dgoodwin/subscriptions","organizations_url":"https://api.github.com/users/dgoodwin/orgs","repos_url":"https://api.github.com/users/dgoodwin/repos","events_url":"https://api.github.com/users/dgoodwin/events{/privacy}","received_events_url":"https://api.github.com/users/dgoodwin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dgoodwin/kubernetes","description":"Production-Grade Container Scheduling and Management","fork":true,"url":"https://api.github.com/repos/dgoodwin/kubernetes","forks_url":"https://api.github.com/repos/dgoodwin/kubernetes/forks","keys_url":"https://api.github.com/repos/dgoodwin/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dgoodwin/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dgoodwin/kubernetes/teams","hooks_url":"https://api.github.com/repos/dgoodwin/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/dgoodwin/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/dgoodwin/kubernetes/events","assignees_url":"https://api.github.com/repos/dgoodwin/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/dgoodwin/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/dgoodwin/kubernetes/tags","blobs_url":"https://api.github.com/repos/dgoodwin/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dgoodwin/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dgoodwin/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/dgoodwin/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dgoodwin/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/dgoodwin/kubernetes/languages","stargazers_url":"https://api.github.com/repos/dgoodwin/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/dgoodwin/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/dgoodwin/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/dgoodwin/kubernetes/subscription","commits_url":"https://api.github.com/repos/dgoodwin/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/dgoodwin/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/dgoodwin/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/dgoodwin/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/dgoodwin/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/dgoodwin/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dgoodwin/kubernetes/merges","archive_url":"https://api.github.com/repos/dgoodwin/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dgoodwin/kubernetes/downloads","issues_url":"https://api.github.com/repos/dgoodwin/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/dgoodwin/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/dgoodwin/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/dgoodwin/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dgoodwin/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/dgoodwin/kubernetes/releases{/id}","deployments_url":"https://api.github.com/repos/dgoodwin/kubernetes/deployments","created_at":"2016-08-17T12:26:59Z","updated_at":"2016-08-17T12:30:41Z","pushed_at":"2016-11-25T19:16:59Z","git_url":"git://github.com/dgoodwin/kubernetes.git","ssh_url":"git@github.com:dgoodwin/kubernetes.git","clone_url":"https://github.com/dgoodwin/kubernetes.git","svn_url":"https://github.com/dgoodwin/kubernetes","homepage":"http://kubernetes.io","size":351498,"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":"master"}},"base":{"label":"kubernetes:master","ref":"master","sha":"545f749a0deb8535656ce93ac1f35a59887839bf","user":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars.githubusercontent.com/u/13629408?v=3","gravatar_id":"","url":"https://api.github.com/users/kubernetes","html_url":"https://github.com/kubernetes","followers_url":"https://api.github.com/users/kubernetes/followers","following_url":"https://api.github.com/users/kubernetes/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes/subscriptions","organizations_url":"https://api.github.com/users/kubernetes/orgs","repos_url":"https://api.github.com/users/kubernetes/repos","events_url":"https://api.github.com/users/kubernetes/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes/received_events","type":"Organization","site_admin":false},"repo":{"id":20580498,"name":"kubernetes","full_name":"kubernetes/kubernetes","owner":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars.githubusercontent.com/u/13629408?v=3","gravatar_id":"","url":"https://api.github.com/users/kubernetes","html_url":"https://github.com/kubernetes","followers_url":"https://api.github.com/users/kubernetes/followers","following_url":"https://api.github.com/users/kubernetes/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes/subscriptions","organizations_url":"https://api.github.com/users/kubernetes/orgs","repos_url":"https://api.github.com/users/kubernetes/repos","events_url":"https://api.github.com/users/kubernetes/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kubernetes/kubernetes","description":"Production-Grade Container Scheduling and Management","fork":false,"url":"https://api.github.com/repos/kubernetes/kubernetes","forks_url":"https://api.github.com/repos/kubernetes/kubernetes/forks","keys_url":"https://api.github.com/repos/kubernetes/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kubernetes/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kubernetes/kubernetes/teams","hooks_url":"https://api.github.com/repos/kubernetes/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/kubernetes/kubernetes/events","assignees_url":"https://api.github.com/repos/kubernetes/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/kubernetes/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/kubernetes/kubernetes/tags","blobs_url":"https://api.github.com/repos/kubernetes/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kubernetes/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kubernetes/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/kubernetes/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/kubernetes/kubernetes/languages","stargazers_url":"https://api.github.com/repos/kubernetes/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/kubernetes/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/kubernetes/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/kubernetes/kubernetes/subscription","commits_url":"https://api.github.com/repos/kubernetes/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/kubernetes/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/kubernetes/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/kubernetes/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kubernetes/kubernetes/merges","archive_url":"https://api.github.com/repos/kubernetes/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kubernetes/kubernetes/downloads","issues_url":"https://api.github.com/repos/kubernetes/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/kubernetes/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/kubernetes/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/kubernetes/kubernetes/releases{/id}","deployments_url":"https://api.github.com/repos/kubernetes/kubernetes/deployments","created_at":"2014-06-06T22:56:04Z","updated_at":"2016-11-25T18:57:33Z","pushed_at":"2016-11-25T19:21:35Z","git_url":"git://github.com/kubernetes/kubernetes.git","ssh_url":"git@github.com:kubernetes/kubernetes.git","clone_url":"https://github.com/kubernetes/kubernetes.git","svn_url":"https://github.com/kubernetes/kubernetes","homepage":"http://kubernetes.io","size":638855,"stargazers_count":18675,"watchers_count":18675,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":6191,"mirror_url":null,"open_issues_count":5346,"forks":6191,"open_issues":5346,"watchers":18675,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/37498"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/37498"},"issue":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/37498"},"comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/37498/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/37498/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/37498/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes/kubernetes/statuses/6e40b2ee2c8186c6a77f141fb25c4a9881612007"}}}}
{"actor":{"display_login":"dgoodwin"}}