{"action":"created","comment":{"url":"https://api.github.com/repos/rancher/rke/pulls/comments/183115593","pull_request_review_id":114058268,"id":183115593,"diff_hunk":"@@ -176,3 +181,28 @@ func saveCertToKubernetes(kubeClient *kubernetes.Clientset, crtName string, crt\n \t\treturn fmt.Errorf(\"[certificates] Timeout waiting for kubernetes to be ready\")\n \t}\n }\n+\n+func deployBackupCertificates(ctx context.Context, backupHosts []*hosts.Host, kubeCluster *Cluster) error {\n+\tvar errgrp errgroup.Group\n+\n+\tfor _, host := range backupHosts {\n+\t\trunHost := host\n+\t\terrgrp.Go(func() error {\n+\t\t\treturn pki.DeployCertificatesOnHost(ctx, runHost, kubeCluster.Certificates, kubeCluster.SystemImages.CertDownloader, pki.TempCertPath, kubeCluster.PrivateRegistriesMap)\n+\t\t})\n+\t}\n+\treturn errgrp.Wait()\n+}\n+\n+func fetchBackupCertificates(ctx context.Context, backupHosts []*hosts.Host, kubeCluster *Cluster) (map[string]pki.CertificatePKI, error) {\n+\tfor _, host := range backupHosts {\n+\t\tcertificates, err := pki.FetchCertificatesFromHost(ctx, kubeCluster.EtcdHosts, host, kubeCluster.SystemImages.Alpine, kubeCluster.LocalKubeConfigPath, kubeCluster.PrivateRegistriesMap)","path":"cluster/certificates.go","position":72,"original_position":72,"commit_id":"6fc7f7d8a15a88b7ca5d39e1bd023c3d36ff6ba4","original_commit_id":"6fc7f7d8a15a88b7ca5d39e1bd023c3d36ff6ba4","user":{"login":"moelsayed","id":4588065,"avatar_url":"https://avatars1.githubusercontent.com/u/4588065?v=4","gravatar_id":"","url":"https://api.github.com/users/moelsayed","html_url":"https://github.com/moelsayed","followers_url":"https://api.github.com/users/moelsayed/followers","following_url":"https://api.github.com/users/moelsayed/following{/other_user}","gists_url":"https://api.github.com/users/moelsayed/gists{/gist_id}","starred_url":"https://api.github.com/users/moelsayed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moelsayed/subscriptions","organizations_url":"https://api.github.com/users/moelsayed/orgs","repos_url":"https://api.github.com/users/moelsayed/repos","events_url":"https://api.github.com/users/moelsayed/events{/privacy}","received_events_url":"https://api.github.com/users/moelsayed/received_events","type":"User","site_admin":false},"body":"Not exactly. `pki.FetchCertificatesFromHost()` handles file not found internally, so `err != nil` will an actual error: something happened while doing a docker command, certificate parsing error..etc.","created_at":"2018-04-20T17:14:56Z","updated_at":"2018-04-20T17:14:56Z","html_url":"https://github.com/rancher/rke/pull/526#discussion_r183115593","pull_request_url":"https://api.github.com/repos/rancher/rke/pulls/526","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/rancher/rke/pulls/comments/183115593"},"html":{"href":"https://github.com/rancher/rke/pull/526#discussion_r183115593"},"pull_request":{"href":"https://api.github.com/repos/rancher/rke/pulls/526"}},"in_reply_to_id":183112983},"pull_request":{"url":"https://api.github.com/repos/rancher/rke/pulls/526","id":182955983,"html_url":"https://github.com/rancher/rke/pull/526","diff_url":"https://github.com/rancher/rke/pull/526.diff","patch_url":"https://github.com/rancher/rke/pull/526.patch","issue_url":"https://api.github.com/repos/rancher/rke/issues/526","number":526,"state":"open","locked":false,"title":"Backup certs","user":{"login":"moelsayed","id":4588065,"avatar_url":"https://avatars1.githubusercontent.com/u/4588065?v=4","gravatar_id":"","url":"https://api.github.com/users/moelsayed","html_url":"https://github.com/moelsayed","followers_url":"https://api.github.com/users/moelsayed/followers","following_url":"https://api.github.com/users/moelsayed/following{/other_user}","gists_url":"https://api.github.com/users/moelsayed/gists{/gist_id}","starred_url":"https://api.github.com/users/moelsayed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moelsayed/subscriptions","organizations_url":"https://api.github.com/users/moelsayed/orgs","repos_url":"https://api.github.com/users/moelsayed/repos","events_url":"https://api.github.com/users/moelsayed/events{/privacy}","received_events_url":"https://api.github.com/users/moelsayed/received_events","type":"User","site_admin":false},"body":"https://github.com/rancher/rancher/issues/12873","created_at":"2018-04-20T04:14:54Z","updated_at":"2018-04-20T17:14:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e4b2b01c73551dab46a382f83c807354943a7f6e","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/rancher/rke/pulls/526/commits","review_comments_url":"https://api.github.com/repos/rancher/rke/pulls/526/comments","review_comment_url":"https://api.github.com/repos/rancher/rke/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rancher/rke/issues/526/comments","statuses_url":"https://api.github.com/repos/rancher/rke/statuses/6fc7f7d8a15a88b7ca5d39e1bd023c3d36ff6ba4","head":{"label":"moelsayed:backup_certs","ref":"backup_certs","sha":"6fc7f7d8a15a88b7ca5d39e1bd023c3d36ff6ba4","user":{"login":"moelsayed","id":4588065,"avatar_url":"https://avatars1.githubusercontent.com/u/4588065?v=4","gravatar_id":"","url":"https://api.github.com/users/moelsayed","html_url":"https://github.com/moelsayed","followers_url":"https://api.github.com/users/moelsayed/followers","following_url":"https://api.github.com/users/moelsayed/following{/other_user}","gists_url":"https://api.github.com/users/moelsayed/gists{/gist_id}","starred_url":"https://api.github.com/users/moelsayed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moelsayed/subscriptions","organizations_url":"https://api.github.com/users/moelsayed/orgs","repos_url":"https://api.github.com/users/moelsayed/repos","events_url":"https://api.github.com/users/moelsayed/events{/privacy}","received_events_url":"https://api.github.com/users/moelsayed/received_events","type":"User","site_admin":false},"repo":{"id":108579813,"name":"rke","full_name":"moelsayed/rke","owner":{"login":"moelsayed","id":4588065,"avatar_url":"https://avatars1.githubusercontent.com/u/4588065?v=4","gravatar_id":"","url":"https://api.github.com/users/moelsayed","html_url":"https://github.com/moelsayed","followers_url":"https://api.github.com/users/moelsayed/followers","following_url":"https://api.github.com/users/moelsayed/following{/other_user}","gists_url":"https://api.github.com/users/moelsayed/gists{/gist_id}","starred_url":"https://api.github.com/users/moelsayed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moelsayed/subscriptions","organizations_url":"https://api.github.com/users/moelsayed/orgs","repos_url":"https://api.github.com/users/moelsayed/repos","events_url":"https://api.github.com/users/moelsayed/events{/privacy}","received_events_url":"https://api.github.com/users/moelsayed/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/moelsayed/rke","description":null,"fork":true,"url":"https://api.github.com/repos/moelsayed/rke","forks_url":"https://api.github.com/repos/moelsayed/rke/forks","keys_url":"https://api.github.com/repos/moelsayed/rke/keys{/key_id}","collaborators_url":"https://api.github.com/repos/moelsayed/rke/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/moelsayed/rke/teams","hooks_url":"https://api.github.com/repos/moelsayed/rke/hooks","issue_events_url":"https://api.github.com/repos/moelsayed/rke/issues/events{/number}","events_url":"https://api.github.com/repos/moelsayed/rke/events","assignees_url":"https://api.github.com/repos/moelsayed/rke/assignees{/user}","branches_url":"https://api.github.com/repos/moelsayed/rke/branches{/branch}","tags_url":"https://api.github.com/repos/moelsayed/rke/tags","blobs_url":"https://api.github.com/repos/moelsayed/rke/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/moelsayed/rke/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/moelsayed/rke/git/refs{/sha}","trees_url":"https://api.github.com/repos/moelsayed/rke/git/trees{/sha}","statuses_url":"https://api.github.com/repos/moelsayed/rke/statuses/{sha}","languages_url":"https://api.github.com/repos/moelsayed/rke/languages","stargazers_url":"https://api.github.com/repos/moelsayed/rke/stargazers","contributors_url":"https://api.github.com/repos/moelsayed/rke/contributors","subscribers_url":"https://api.github.com/repos/moelsayed/rke/subscribers","subscription_url":"https://api.github.com/repos/moelsayed/rke/subscription","commits_url":"https://api.github.com/repos/moelsayed/rke/commits{/sha}","git_commits_url":"https://api.github.com/repos/moelsayed/rke/git/commits{/sha}","comments_url":"https://api.github.com/repos/moelsayed/rke/comments{/number}","issue_comment_url":"https://api.github.com/repos/moelsayed/rke/issues/comments{/number}","contents_url":"https://api.github.com/repos/moelsayed/rke/contents/{+path}","compare_url":"https://api.github.com/repos/moelsayed/rke/compare/{base}...{head}","merges_url":"https://api.github.com/repos/moelsayed/rke/merges","archive_url":"https://api.github.com/repos/moelsayed/rke/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/moelsayed/rke/downloads","issues_url":"https://api.github.com/repos/moelsayed/rke/issues{/number}","pulls_url":"https://api.github.com/repos/moelsayed/rke/pulls{/number}","milestones_url":"https://api.github.com/repos/moelsayed/rke/milestones{/number}","notifications_url":"https://api.github.com/repos/moelsayed/rke/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/moelsayed/rke/labels{/name}","releases_url":"https://api.github.com/repos/moelsayed/rke/releases{/id}","deployments_url":"https://api.github.com/repos/moelsayed/rke/deployments","created_at":"2017-10-27T18:17:26Z","updated_at":"2017-11-08T00:09:18Z","pushed_at":"2018-04-20T04:08:52Z","git_url":"git://github.com/moelsayed/rke.git","ssh_url":"git@github.com:moelsayed/rke.git","clone_url":"https://github.com/moelsayed/rke.git","svn_url":"https://github.com/moelsayed/rke","homepage":null,"size":6178,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"rancher:master","ref":"master","sha":"71bafd1f087e388d1b9b42a21f4d7ae41fc0097d","user":{"login":"rancher","id":9343010,"avatar_url":"https://avatars3.githubusercontent.com/u/9343010?v=4","gravatar_id":"","url":"https://api.github.com/users/rancher","html_url":"https://github.com/rancher","followers_url":"https://api.github.com/users/rancher/followers","following_url":"https://api.github.com/users/rancher/following{/other_user}","gists_url":"https://api.github.com/users/rancher/gists{/gist_id}","starred_url":"https://api.github.com/users/rancher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rancher/subscriptions","organizations_url":"https://api.github.com/users/rancher/orgs","repos_url":"https://api.github.com/users/rancher/repos","events_url":"https://api.github.com/users/rancher/events{/privacy}","received_events_url":"https://api.github.com/users/rancher/received_events","type":"Organization","site_admin":false},"repo":{"id":108337180,"name":"rke","full_name":"rancher/rke","owner":{"login":"rancher","id":9343010,"avatar_url":"https://avatars3.githubusercontent.com/u/9343010?v=4","gravatar_id":"","url":"https://api.github.com/users/rancher","html_url":"https://github.com/rancher","followers_url":"https://api.github.com/users/rancher/followers","following_url":"https://api.github.com/users/rancher/following{/other_user}","gists_url":"https://api.github.com/users/rancher/gists{/gist_id}","starred_url":"https://api.github.com/users/rancher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rancher/subscriptions","organizations_url":"https://api.github.com/users/rancher/orgs","repos_url":"https://api.github.com/users/rancher/repos","events_url":"https://api.github.com/users/rancher/events{/privacy}","received_events_url":"https://api.github.com/users/rancher/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rancher/rke","description":"Rancher Kubernetes Engine, an extremely simple, lightning fast Kubernetes installer that works everywhere.","fork":false,"url":"https://api.github.com/repos/rancher/rke","forks_url":"https://api.github.com/repos/rancher/rke/forks","keys_url":"https://api.github.com/repos/rancher/rke/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rancher/rke/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rancher/rke/teams","hooks_url":"https://api.github.com/repos/rancher/rke/hooks","issue_events_url":"https://api.github.com/repos/rancher/rke/issues/events{/number}","events_url":"https://api.github.com/repos/rancher/rke/events","assignees_url":"https://api.github.com/repos/rancher/rke/assignees{/user}","branches_url":"https://api.github.com/repos/rancher/rke/branches{/branch}","tags_url":"https://api.github.com/repos/rancher/rke/tags","blobs_url":"https://api.github.com/repos/rancher/rke/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rancher/rke/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rancher/rke/git/refs{/sha}","trees_url":"https://api.github.com/repos/rancher/rke/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rancher/rke/statuses/{sha}","languages_url":"https://api.github.com/repos/rancher/rke/languages","stargazers_url":"https://api.github.com/repos/rancher/rke/stargazers","contributors_url":"https://api.github.com/repos/rancher/rke/contributors","subscribers_url":"https://api.github.com/repos/rancher/rke/subscribers","subscription_url":"https://api.github.com/repos/rancher/rke/subscription","commits_url":"https://api.github.com/repos/rancher/rke/commits{/sha}","git_commits_url":"https://api.github.com/repos/rancher/rke/git/commits{/sha}","comments_url":"https://api.github.com/repos/rancher/rke/comments{/number}","issue_comment_url":"https://api.github.com/repos/rancher/rke/issues/comments{/number}","contents_url":"https://api.github.com/repos/rancher/rke/contents/{+path}","compare_url":"https://api.github.com/repos/rancher/rke/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rancher/rke/merges","archive_url":"https://api.github.com/repos/rancher/rke/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rancher/rke/downloads","issues_url":"https://api.github.com/repos/rancher/rke/issues{/number}","pulls_url":"https://api.github.com/repos/rancher/rke/pulls{/number}","milestones_url":"https://api.github.com/repos/rancher/rke/milestones{/number}","notifications_url":"https://api.github.com/repos/rancher/rke/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rancher/rke/labels{/name}","releases_url":"https://api.github.com/repos/rancher/rke/releases{/id}","deployments_url":"https://api.github.com/repos/rancher/rke/deployments","created_at":"2017-10-25T23:25:53Z","updated_at":"2018-04-20T16:40:31Z","pushed_at":"2018-04-20T04:14:55Z","git_url":"git://github.com/rancher/rke.git","ssh_url":"git@github.com:rancher/rke.git","clone_url":"https://github.com/rancher/rke.git","svn_url":"https://github.com/rancher/rke","homepage":"","size":6153,"stargazers_count":462,"watchers_count":462,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":102,"mirror_url":null,"archived":false,"open_issues_count":73,"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":102,"open_issues":73,"watchers":462,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rancher/rke/pulls/526"},"html":{"href":"https://github.com/rancher/rke/pull/526"},"issue":{"href":"https://api.github.com/repos/rancher/rke/issues/526"},"comments":{"href":"https://api.github.com/repos/rancher/rke/issues/526/comments"},"review_comments":{"href":"https://api.github.com/repos/rancher/rke/pulls/526/comments"},"review_comment":{"href":"https://api.github.com/repos/rancher/rke/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rancher/rke/pulls/526/commits"},"statuses":{"href":"https://api.github.com/repos/rancher/rke/statuses/6fc7f7d8a15a88b7ca5d39e1bd023c3d36ff6ba4"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"moelsayed"}}