{"action":"created","comment":{"url":"https://api.github.com/repos/sosiouxme/origin/pulls/comments/30739331","id":30739331,"diff_hunk":"@@ -0,0 +1,100 @@\n+package client\n+\n+import (\n+\t\"errors\"\n+\t\"fmt\"\n+\n+\tkapi \"github.com/GoogleCloudPlatform/kubernetes/pkg/api\"\n+\tkclient \"github.com/GoogleCloudPlatform/kubernetes/pkg/client\"\n+\n+\t\"github.com/GoogleCloudPlatform/kubernetes/pkg/fields\"\n+\t\"github.com/GoogleCloudPlatform/kubernetes/pkg/labels\"\n+\t\"github.com/openshift/origin/pkg/diagnostics/log\"\n+\t\"github.com/openshift/origin/pkg/diagnostics/types/diagnostic\"\n+)\n+\n+const (\n+\tclientErrorGettingNodes = `Client error while retrieving node records. Client retrieved records\n+during discovery, so this is likely to be a transient error. Try running\n+diagnostics again. If this message persists, there may be a permissions\n+problem with getting node records. The error was:\n+\n+(%T) %[1]v`\n+\n+\tnodeNotReady = `Node {{.node}} is defined but is not marked as ready.\n+Ready status is {{.status}} because \"{{.reason}}\"\n+If the node is not intentionally disabled, check that the master can\n+reach the node hostname for a health check and the node is checking in\n+to the master with the same hostname.\n+\n+While in this state, pods should not be scheduled to deploy on the node,\n+and any existing scheduled pods will be considered failed and removed.\n+`\n+)\n+\n+// NodeDefinitions\n+type NodeDefinition struct {\n+\tKubeClient *kclient.Client\n+\n+\tLog *log.Logger\n+}\n+\n+func (d NodeDefinition) Description() string {\n+\treturn \"Check node records on master\"\n+}\n+func (d NodeDefinition) CanRun() (bool, error) {\n+\tif d.KubeClient == nil {\n+\t\t// TODO make prettier?\n+\t\treturn false, errors.New(\"must have kube client\")\n+\t}\n+\tif _, err := d.KubeClient.Nodes().List(labels.LabelSelector{}, fields.Everything()); err != nil {","path":"pkg/diagnostics/client/node_definitions.go","position":50,"original_position":50,"commit_id":"e2fb3fc8ea78e262554e55be9a2618d72957a7c9","original_commit_id":"e2fb3fc8ea78e262554e55be9a2618d72957a7c9","user":{"login":"deads2k","id":8225098,"avatar_url":"https://avatars.githubusercontent.com/u/8225098?v=3","gravatar_id":"","url":"https://api.github.com/users/deads2k","html_url":"https://github.com/deads2k","followers_url":"https://api.github.com/users/deads2k/followers","following_url":"https://api.github.com/users/deads2k/following{/other_user}","gists_url":"https://api.github.com/users/deads2k/gists{/gist_id}","starred_url":"https://api.github.com/users/deads2k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deads2k/subscriptions","organizations_url":"https://api.github.com/users/deads2k/orgs","repos_url":"https://api.github.com/users/deads2k/repos","events_url":"https://api.github.com/users/deads2k/events{/privacy}","received_events_url":"https://api.github.com/users/deads2k/received_events","type":"User","site_admin":false},"body":"\"You can't run this test because you don't have access\" is different than, \"this test failed because something is wrong in your environment\".  That makes the `CanRun` valuable and it doesn't take much additional work on the part of the `Diagnostic` author.","created_at":"2015-05-20T19:26:21Z","updated_at":"2015-05-20T19:26:21Z","html_url":"https://github.com/sosiouxme/origin/pull/2#discussion_r30739331","pull_request_url":"https://api.github.com/repos/sosiouxme/origin/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/sosiouxme/origin/pulls/comments/30739331"},"html":{"href":"https://github.com/sosiouxme/origin/pull/2#discussion_r30739331"},"pull_request":{"href":"https://api.github.com/repos/sosiouxme/origin/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/sosiouxme/origin/pulls/2","id":35772395,"html_url":"https://github.com/sosiouxme/origin/pull/2","diff_url":"https://github.com/sosiouxme/origin/pull/2.diff","patch_url":"https://github.com/sosiouxme/origin/pull/2.patch","issue_url":"https://api.github.com/repos/sosiouxme/origin/issues/2","number":2,"state":"open","locked":false,"title":"tidy up client diagnostics","user":{"login":"deads2k","id":8225098,"avatar_url":"https://avatars.githubusercontent.com/u/8225098?v=3","gravatar_id":"","url":"https://api.github.com/users/deads2k","html_url":"https://github.com/deads2k","followers_url":"https://api.github.com/users/deads2k/followers","following_url":"https://api.github.com/users/deads2k/following{/other_user}","gists_url":"https://api.github.com/users/deads2k/gists{/gist_id}","starred_url":"https://api.github.com/users/deads2k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deads2k/subscriptions","organizations_url":"https://api.github.com/users/deads2k/orgs","repos_url":"https://api.github.com/users/deads2k/repos","events_url":"https://api.github.com/users/deads2k/events{/privacy}","received_events_url":"https://api.github.com/users/deads2k/received_events","type":"User","site_admin":false},"body":"@sosiouxme Take a look.  I didn't completely finish the client (I'll work on it tomorrow), but I wanted to get you something to look at before I left today.","created_at":"2015-05-19T20:40:38Z","updated_at":"2015-05-20T19:26:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0257c689c7fcd5c98b39678922fc8039667cde07","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sosiouxme/origin/pulls/2/commits","review_comments_url":"https://api.github.com/repos/sosiouxme/origin/pulls/2/comments","review_comment_url":"https://api.github.com/repos/sosiouxme/origin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sosiouxme/origin/issues/2/comments","statuses_url":"https://api.github.com/repos/sosiouxme/origin/statuses/e2fb3fc8ea78e262554e55be9a2618d72957a7c9","head":{"label":"deads2k:diagnostic-refactoring","ref":"diagnostic-refactoring","sha":"e2fb3fc8ea78e262554e55be9a2618d72957a7c9","user":{"login":"deads2k","id":8225098,"avatar_url":"https://avatars.githubusercontent.com/u/8225098?v=3","gravatar_id":"","url":"https://api.github.com/users/deads2k","html_url":"https://github.com/deads2k","followers_url":"https://api.github.com/users/deads2k/followers","following_url":"https://api.github.com/users/deads2k/following{/other_user}","gists_url":"https://api.github.com/users/deads2k/gists{/gist_id}","starred_url":"https://api.github.com/users/deads2k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deads2k/subscriptions","organizations_url":"https://api.github.com/users/deads2k/orgs","repos_url":"https://api.github.com/users/deads2k/repos","events_url":"https://api.github.com/users/deads2k/events{/privacy}","received_events_url":"https://api.github.com/users/deads2k/received_events","type":"User","site_admin":false},"repo":{"id":24424126,"name":"origin","full_name":"deads2k/origin","owner":{"login":"deads2k","id":8225098,"avatar_url":"https://avatars.githubusercontent.com/u/8225098?v=3","gravatar_id":"","url":"https://api.github.com/users/deads2k","html_url":"https://github.com/deads2k","followers_url":"https://api.github.com/users/deads2k/followers","following_url":"https://api.github.com/users/deads2k/following{/other_user}","gists_url":"https://api.github.com/users/deads2k/gists{/gist_id}","starred_url":"https://api.github.com/users/deads2k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deads2k/subscriptions","organizations_url":"https://api.github.com/users/deads2k/orgs","repos_url":"https://api.github.com/users/deads2k/repos","events_url":"https://api.github.com/users/deads2k/events{/privacy}","received_events_url":"https://api.github.com/users/deads2k/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/deads2k/origin","description":"OpenShift 3 - build, deploy, and manage your applications with Docker and Kubernetes","fork":true,"url":"https://api.github.com/repos/deads2k/origin","forks_url":"https://api.github.com/repos/deads2k/origin/forks","keys_url":"https://api.github.com/repos/deads2k/origin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/deads2k/origin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/deads2k/origin/teams","hooks_url":"https://api.github.com/repos/deads2k/origin/hooks","issue_events_url":"https://api.github.com/repos/deads2k/origin/issues/events{/number}","events_url":"https://api.github.com/repos/deads2k/origin/events","assignees_url":"https://api.github.com/repos/deads2k/origin/assignees{/user}","branches_url":"https://api.github.com/repos/deads2k/origin/branches{/branch}","tags_url":"https://api.github.com/repos/deads2k/origin/tags","blobs_url":"https://api.github.com/repos/deads2k/origin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/deads2k/origin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/deads2k/origin/git/refs{/sha}","trees_url":"https://api.github.com/repos/deads2k/origin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/deads2k/origin/statuses/{sha}","languages_url":"https://api.github.com/repos/deads2k/origin/languages","stargazers_url":"https://api.github.com/repos/deads2k/origin/stargazers","contributors_url":"https://api.github.com/repos/deads2k/origin/contributors","subscribers_url":"https://api.github.com/repos/deads2k/origin/subscribers","subscription_url":"https://api.github.com/repos/deads2k/origin/subscription","commits_url":"https://api.github.com/repos/deads2k/origin/commits{/sha}","git_commits_url":"https://api.github.com/repos/deads2k/origin/git/commits{/sha}","comments_url":"https://api.github.com/repos/deads2k/origin/comments{/number}","issue_comment_url":"https://api.github.com/repos/deads2k/origin/issues/comments{/number}","contents_url":"https://api.github.com/repos/deads2k/origin/contents/{+path}","compare_url":"https://api.github.com/repos/deads2k/origin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/deads2k/origin/merges","archive_url":"https://api.github.com/repos/deads2k/origin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/deads2k/origin/downloads","issues_url":"https://api.github.com/repos/deads2k/origin/issues{/number}","pulls_url":"https://api.github.com/repos/deads2k/origin/pulls{/number}","milestones_url":"https://api.github.com/repos/deads2k/origin/milestones{/number}","notifications_url":"https://api.github.com/repos/deads2k/origin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/deads2k/origin/labels{/name}","releases_url":"https://api.github.com/repos/deads2k/origin/releases{/id}","created_at":"2014-09-24T17:02:12Z","updated_at":"2015-05-08T15:45:28Z","pushed_at":"2015-05-20T18:52:21Z","git_url":"git://github.com/deads2k/origin.git","ssh_url":"git@github.com:deads2k/origin.git","clone_url":"https://github.com/deads2k/origin.git","svn_url":"https://github.com/deads2k/origin","homepage":"https://openshift.github.io","size":112734,"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":"sosiouxme:diagnostics","ref":"diagnostics","sha":"fa2ecd9cea86614c3c9ac50af8408887aeeab5b6","user":{"login":"sosiouxme","id":29690,"avatar_url":"https://avatars.githubusercontent.com/u/29690?v=3","gravatar_id":"","url":"https://api.github.com/users/sosiouxme","html_url":"https://github.com/sosiouxme","followers_url":"https://api.github.com/users/sosiouxme/followers","following_url":"https://api.github.com/users/sosiouxme/following{/other_user}","gists_url":"https://api.github.com/users/sosiouxme/gists{/gist_id}","starred_url":"https://api.github.com/users/sosiouxme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sosiouxme/subscriptions","organizations_url":"https://api.github.com/users/sosiouxme/orgs","repos_url":"https://api.github.com/users/sosiouxme/repos","events_url":"https://api.github.com/users/sosiouxme/events{/privacy}","received_events_url":"https://api.github.com/users/sosiouxme/received_events","type":"User","site_admin":false},"repo":{"id":26488206,"name":"origin","full_name":"sosiouxme/origin","owner":{"login":"sosiouxme","id":29690,"avatar_url":"https://avatars.githubusercontent.com/u/29690?v=3","gravatar_id":"","url":"https://api.github.com/users/sosiouxme","html_url":"https://github.com/sosiouxme","followers_url":"https://api.github.com/users/sosiouxme/followers","following_url":"https://api.github.com/users/sosiouxme/following{/other_user}","gists_url":"https://api.github.com/users/sosiouxme/gists{/gist_id}","starred_url":"https://api.github.com/users/sosiouxme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sosiouxme/subscriptions","organizations_url":"https://api.github.com/users/sosiouxme/orgs","repos_url":"https://api.github.com/users/sosiouxme/repos","events_url":"https://api.github.com/users/sosiouxme/events{/privacy}","received_events_url":"https://api.github.com/users/sosiouxme/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sosiouxme/origin","description":"OpenShift 3 - build, deploy, and manage your applications with Docker and Kubernetes","fork":true,"url":"https://api.github.com/repos/sosiouxme/origin","forks_url":"https://api.github.com/repos/sosiouxme/origin/forks","keys_url":"https://api.github.com/repos/sosiouxme/origin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sosiouxme/origin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sosiouxme/origin/teams","hooks_url":"https://api.github.com/repos/sosiouxme/origin/hooks","issue_events_url":"https://api.github.com/repos/sosiouxme/origin/issues/events{/number}","events_url":"https://api.github.com/repos/sosiouxme/origin/events","assignees_url":"https://api.github.com/repos/sosiouxme/origin/assignees{/user}","branches_url":"https://api.github.com/repos/sosiouxme/origin/branches{/branch}","tags_url":"https://api.github.com/repos/sosiouxme/origin/tags","blobs_url":"https://api.github.com/repos/sosiouxme/origin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sosiouxme/origin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sosiouxme/origin/git/refs{/sha}","trees_url":"https://api.github.com/repos/sosiouxme/origin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sosiouxme/origin/statuses/{sha}","languages_url":"https://api.github.com/repos/sosiouxme/origin/languages","stargazers_url":"https://api.github.com/repos/sosiouxme/origin/stargazers","contributors_url":"https://api.github.com/repos/sosiouxme/origin/contributors","subscribers_url":"https://api.github.com/repos/sosiouxme/origin/subscribers","subscription_url":"https://api.github.com/repos/sosiouxme/origin/subscription","commits_url":"https://api.github.com/repos/sosiouxme/origin/commits{/sha}","git_commits_url":"https://api.github.com/repos/sosiouxme/origin/git/commits{/sha}","comments_url":"https://api.github.com/repos/sosiouxme/origin/comments{/number}","issue_comment_url":"https://api.github.com/repos/sosiouxme/origin/issues/comments{/number}","contents_url":"https://api.github.com/repos/sosiouxme/origin/contents/{+path}","compare_url":"https://api.github.com/repos/sosiouxme/origin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sosiouxme/origin/merges","archive_url":"https://api.github.com/repos/sosiouxme/origin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sosiouxme/origin/downloads","issues_url":"https://api.github.com/repos/sosiouxme/origin/issues{/number}","pulls_url":"https://api.github.com/repos/sosiouxme/origin/pulls{/number}","milestones_url":"https://api.github.com/repos/sosiouxme/origin/milestones{/number}","notifications_url":"https://api.github.com/repos/sosiouxme/origin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sosiouxme/origin/labels{/name}","releases_url":"https://api.github.com/repos/sosiouxme/origin/releases{/id}","created_at":"2014-11-11T14:22:34Z","updated_at":"2015-05-07T14:35:38Z","pushed_at":"2015-05-20T13:32:41Z","git_url":"git://github.com/sosiouxme/origin.git","ssh_url":"git@github.com:sosiouxme/origin.git","clone_url":"https://github.com/sosiouxme/origin.git","svn_url":"https://github.com/sosiouxme/origin","homepage":"https://openshift.github.io","size":103778,"stargazers_count":1,"watchers_count":1,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sosiouxme/origin/pulls/2"},"html":{"href":"https://github.com/sosiouxme/origin/pull/2"},"issue":{"href":"https://api.github.com/repos/sosiouxme/origin/issues/2"},"comments":{"href":"https://api.github.com/repos/sosiouxme/origin/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/sosiouxme/origin/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/sosiouxme/origin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sosiouxme/origin/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/sosiouxme/origin/statuses/e2fb3fc8ea78e262554e55be9a2618d72957a7c9"}}}}