{"action":"closed","number":2256,"pull_request":{"url":"https://api.github.com/repos/kubernetes-incubator/kubespray/pulls/2256","id":167283363,"html_url":"https://github.com/kubernetes-incubator/kubespray/pull/2256","diff_url":"https://github.com/kubernetes-incubator/kubespray/pull/2256.diff","patch_url":"https://github.com/kubernetes-incubator/kubespray/pull/2256.patch","issue_url":"https://api.github.com/repos/kubernetes-incubator/kubespray/issues/2256","number":2256,"state":"closed","locked":false,"title":"Fix safe upgrade","user":{"login":"mlushpenko","id":2006610,"avatar_url":"https://avatars2.githubusercontent.com/u/2006610?v=4","gravatar_id":"","url":"https://api.github.com/users/mlushpenko","html_url":"https://github.com/mlushpenko","followers_url":"https://api.github.com/users/mlushpenko/followers","following_url":"https://api.github.com/users/mlushpenko/following{/other_user}","gists_url":"https://api.github.com/users/mlushpenko/gists{/gist_id}","starred_url":"https://api.github.com/users/mlushpenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mlushpenko/subscriptions","organizations_url":"https://api.github.com/users/mlushpenko/orgs","repos_url":"https://api.github.com/users/mlushpenko/repos","events_url":"https://api.github.com/users/mlushpenko/events{/privacy}","received_events_url":"https://api.github.com/users/mlushpenko/received_events","type":"User","site_admin":false},"body":"# Problem\r\n\r\nA kubespray cluster is running for some time and you want to safely update it to the newer version using `upgrade_cluster.yml`\r\n\r\nIt will fail during `[kubernetes/kubeadm : Join to cluster if needed]` with error:\r\n\r\n```\r\n\"stdout\": \"[preflight] Running pre-flight checks.\\n[discovery] Trying to connect to API Server \\\"10.94.45.185:6443\\\"\\n[discovery] Created cluster-info discovery client, requesting info from \\\"https://10.94.45.185:6443\\\"\\n[discovery] Failed to connect to API Server \\\"10.94.45.185:6443\\\": there is no JWS signed token in the cluster-info ConfigMap. This token id \\\"abcdef\\\" is invalid for this cluster, can't connect\\n\r\n```\r\n\r\n# Expected result\r\n\r\n`kubeadm join` will succeed as `kubeadm_token_ttl` is set to 0 which means that token should never expire, but it is not present in `kubeadm token list` after cluster is provisioned (at least after it is running for some time)\r\n\r\n# Related issues\r\nhttps://github.com/kubernetes/kubeadm/issues/335\r\n\r\n # Solution \r\nCreate a new temporary token before the `kubeadm join` command\r\n\r\n# Refactoring issues\r\nNot sure what to do with `kubeadm_token` and `kubeadm_token_ttl` that are defined in `roles\\kubespray-defaults\\defaults\\main.yml`. The code I added doesn't really breake anything as much as I tested, but looks like `kubeadm_token_ttl` is not respected, so perhaps it can be removed. `kubeadm_token` is also used for master config, so can stay untouched but it's a bit weird that that token is not used then during `kubeadm join` because I override it with newly generated one. Please suggest if you have ideas how to optimize it.","created_at":"2018-02-05T23:33:14Z","updated_at":"2018-02-09T18:03:04Z","closed_at":"2018-02-09T18:03:04Z","merged_at":"2018-02-09T18:03:04Z","merge_commit_sha":"60460c025c9857e6ee465ceeca3f32e511a8d0e8","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":485769464,"url":"https://api.github.com/repos/kubernetes-incubator/kubespray/labels/cncf-cla:%20yes","name":"cncf-cla: yes","color":"ededed","default":false},{"id":676230123,"url":"https://api.github.com/repos/kubernetes-incubator/kubespray/labels/size/S","name":"size/S","color":"ededed","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/kubernetes-incubator/kubespray/pulls/2256/commits","review_comments_url":"https://api.github.com/repos/kubernetes-incubator/kubespray/pulls/2256/comments","review_comment_url":"https://api.github.com/repos/kubernetes-incubator/kubespray/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes-incubator/kubespray/issues/2256/comments","statuses_url":"https://api.github.com/repos/kubernetes-incubator/kubespray/statuses/a37c642127311d97acceb2a1fe7ab7e31b68afcb","head":{"label":"mlushpenko:fix-kubeadm-safe-upgrade","ref":"fix-kubeadm-safe-upgrade","sha":"a37c642127311d97acceb2a1fe7ab7e31b68afcb","user":{"login":"mlushpenko","id":2006610,"avatar_url":"https://avatars2.githubusercontent.com/u/2006610?v=4","gravatar_id":"","url":"https://api.github.com/users/mlushpenko","html_url":"https://github.com/mlushpenko","followers_url":"https://api.github.com/users/mlushpenko/followers","following_url":"https://api.github.com/users/mlushpenko/following{/other_user}","gists_url":"https://api.github.com/users/mlushpenko/gists{/gist_id}","starred_url":"https://api.github.com/users/mlushpenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mlushpenko/subscriptions","organizations_url":"https://api.github.com/users/mlushpenko/orgs","repos_url":"https://api.github.com/users/mlushpenko/repos","events_url":"https://api.github.com/users/mlushpenko/events{/privacy}","received_events_url":"https://api.github.com/users/mlushpenko/received_events","type":"User","site_admin":false},"repo":{"id":120323130,"name":"kubespray","full_name":"mlushpenko/kubespray","owner":{"login":"mlushpenko","id":2006610,"avatar_url":"https://avatars2.githubusercontent.com/u/2006610?v=4","gravatar_id":"","url":"https://api.github.com/users/mlushpenko","html_url":"https://github.com/mlushpenko","followers_url":"https://api.github.com/users/mlushpenko/followers","following_url":"https://api.github.com/users/mlushpenko/following{/other_user}","gists_url":"https://api.github.com/users/mlushpenko/gists{/gist_id}","starred_url":"https://api.github.com/users/mlushpenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mlushpenko/subscriptions","organizations_url":"https://api.github.com/users/mlushpenko/orgs","repos_url":"https://api.github.com/users/mlushpenko/repos","events_url":"https://api.github.com/users/mlushpenko/events{/privacy}","received_events_url":"https://api.github.com/users/mlushpenko/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mlushpenko/kubespray","description":"Setup a kubernetes cluster","fork":true,"url":"https://api.github.com/repos/mlushpenko/kubespray","forks_url":"https://api.github.com/repos/mlushpenko/kubespray/forks","keys_url":"https://api.github.com/repos/mlushpenko/kubespray/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mlushpenko/kubespray/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mlushpenko/kubespray/teams","hooks_url":"https://api.github.com/repos/mlushpenko/kubespray/hooks","issue_events_url":"https://api.github.com/repos/mlushpenko/kubespray/issues/events{/number}","events_url":"https://api.github.com/repos/mlushpenko/kubespray/events","assignees_url":"https://api.github.com/repos/mlushpenko/kubespray/assignees{/user}","branches_url":"https://api.github.com/repos/mlushpenko/kubespray/branches{/branch}","tags_url":"https://api.github.com/repos/mlushpenko/kubespray/tags","blobs_url":"https://api.github.com/repos/mlushpenko/kubespray/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mlushpenko/kubespray/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mlushpenko/kubespray/git/refs{/sha}","trees_url":"https://api.github.com/repos/mlushpenko/kubespray/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mlushpenko/kubespray/statuses/{sha}","languages_url":"https://api.github.com/repos/mlushpenko/kubespray/languages","stargazers_url":"https://api.github.com/repos/mlushpenko/kubespray/stargazers","contributors_url":"https://api.github.com/repos/mlushpenko/kubespray/contributors","subscribers_url":"https://api.github.com/repos/mlushpenko/kubespray/subscribers","subscription_url":"https://api.github.com/repos/mlushpenko/kubespray/subscription","commits_url":"https://api.github.com/repos/mlushpenko/kubespray/commits{/sha}","git_commits_url":"https://api.github.com/repos/mlushpenko/kubespray/git/commits{/sha}","comments_url":"https://api.github.com/repos/mlushpenko/kubespray/comments{/number}","issue_comment_url":"https://api.github.com/repos/mlushpenko/kubespray/issues/comments{/number}","contents_url":"https://api.github.com/repos/mlushpenko/kubespray/contents/{+path}","compare_url":"https://api.github.com/repos/mlushpenko/kubespray/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mlushpenko/kubespray/merges","archive_url":"https://api.github.com/repos/mlushpenko/kubespray/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mlushpenko/kubespray/downloads","issues_url":"https://api.github.com/repos/mlushpenko/kubespray/issues{/number}","pulls_url":"https://api.github.com/repos/mlushpenko/kubespray/pulls{/number}","milestones_url":"https://api.github.com/repos/mlushpenko/kubespray/milestones{/number}","notifications_url":"https://api.github.com/repos/mlushpenko/kubespray/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mlushpenko/kubespray/labels{/name}","releases_url":"https://api.github.com/repos/mlushpenko/kubespray/releases{/id}","deployments_url":"https://api.github.com/repos/mlushpenko/kubespray/deployments","created_at":"2018-02-05T15:28:24Z","updated_at":"2018-02-05T15:28:26Z","pushed_at":"2018-02-09T14:53:30Z","git_url":"git://github.com/mlushpenko/kubespray.git","ssh_url":"git@github.com:mlushpenko/kubespray.git","clone_url":"https://github.com/mlushpenko/kubespray.git","svn_url":"https://github.com/mlushpenko/kubespray","homepage":"","size":6958,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"kubernetes-incubator:master","ref":"master","sha":"17f9242b583a0e976be4ea0d4182f6b52212b66f","user":{"login":"kubernetes-incubator","id":20862812,"avatar_url":"https://avatars2.githubusercontent.com/u/20862812?v=4","gravatar_id":"","url":"https://api.github.com/users/kubernetes-incubator","html_url":"https://github.com/kubernetes-incubator","followers_url":"https://api.github.com/users/kubernetes-incubator/followers","following_url":"https://api.github.com/users/kubernetes-incubator/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes-incubator/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes-incubator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes-incubator/subscriptions","organizations_url":"https://api.github.com/users/kubernetes-incubator/orgs","repos_url":"https://api.github.com/users/kubernetes-incubator/repos","events_url":"https://api.github.com/users/kubernetes-incubator/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes-incubator/received_events","type":"Organization","site_admin":false},"repo":{"id":43613404,"name":"kubespray","full_name":"kubernetes-incubator/kubespray","owner":{"login":"kubernetes-incubator","id":20862812,"avatar_url":"https://avatars2.githubusercontent.com/u/20862812?v=4","gravatar_id":"","url":"https://api.github.com/users/kubernetes-incubator","html_url":"https://github.com/kubernetes-incubator","followers_url":"https://api.github.com/users/kubernetes-incubator/followers","following_url":"https://api.github.com/users/kubernetes-incubator/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes-incubator/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes-incubator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes-incubator/subscriptions","organizations_url":"https://api.github.com/users/kubernetes-incubator/orgs","repos_url":"https://api.github.com/users/kubernetes-incubator/repos","events_url":"https://api.github.com/users/kubernetes-incubator/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes-incubator/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kubernetes-incubator/kubespray","description":"Setup a kubernetes cluster","fork":false,"url":"https://api.github.com/repos/kubernetes-incubator/kubespray","forks_url":"https://api.github.com/repos/kubernetes-incubator/kubespray/forks","keys_url":"https://api.github.com/repos/kubernetes-incubator/kubespray/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kubernetes-incubator/kubespray/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kubernetes-incubator/kubespray/teams","hooks_url":"https://api.github.com/repos/kubernetes-incubator/kubespray/hooks","issue_events_url":"https://api.github.com/repos/kubernetes-incubator/kubespray/issues/events{/number}","events_url":"https://api.github.com/repos/kubernetes-incubator/kubespray/events","assignees_url":"https://api.github.com/repos/kubernetes-incubator/kubespray/assignees{/user}","branches_url":"https://api.github.com/repos/kubernetes-incubator/kubespray/branches{/branch}","tags_url":"https://api.github.com/repos/kubernetes-incubator/kubespray/tags","blobs_url":"https://api.github.com/repos/kubernetes-incubator/kubespray/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kubernetes-incubator/kubespray/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kubernetes-incubator/kubespray/git/refs{/sha}","trees_url":"https://api.github.com/repos/kubernetes-incubator/kubespray/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kubernetes-incubator/kubespray/statuses/{sha}","languages_url":"https://api.github.com/repos/kubernetes-incubator/kubespray/languages","stargazers_url":"https://api.github.com/repos/kubernetes-incubator/kubespray/stargazers","contributors_url":"https://api.github.com/repos/kubernetes-incubator/kubespray/contributors","subscribers_url":"https://api.github.com/repos/kubernetes-incubator/kubespray/subscribers","subscription_url":"https://api.github.com/repos/kubernetes-incubator/kubespray/subscription","commits_url":"https://api.github.com/repos/kubernetes-incubator/kubespray/commits{/sha}","git_commits_url":"https://api.github.com/repos/kubernetes-incubator/kubespray/git/commits{/sha}","comments_url":"https://api.github.com/repos/kubernetes-incubator/kubespray/comments{/number}","issue_comment_url":"https://api.github.com/repos/kubernetes-incubator/kubespray/issues/comments{/number}","contents_url":"https://api.github.com/repos/kubernetes-incubator/kubespray/contents/{+path}","compare_url":"https://api.github.com/repos/kubernetes-incubator/kubespray/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kubernetes-incubator/kubespray/merges","archive_url":"https://api.github.com/repos/kubernetes-incubator/kubespray/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kubernetes-incubator/kubespray/downloads","issues_url":"https://api.github.com/repos/kubernetes-incubator/kubespray/issues{/number}","pulls_url":"https://api.github.com/repos/kubernetes-incubator/kubespray/pulls{/number}","milestones_url":"https://api.github.com/repos/kubernetes-incubator/kubespray/milestones{/number}","notifications_url":"https://api.github.com/repos/kubernetes-incubator/kubespray/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kubernetes-incubator/kubespray/labels{/name}","releases_url":"https://api.github.com/repos/kubernetes-incubator/kubespray/releases{/id}","deployments_url":"https://api.github.com/repos/kubernetes-incubator/kubespray/deployments","created_at":"2015-10-03T20:18:11Z","updated_at":"2018-02-09T16:27:41Z","pushed_at":"2018-02-09T18:03:04Z","git_url":"git://github.com/kubernetes-incubator/kubespray.git","ssh_url":"git@github.com:kubernetes-incubator/kubespray.git","clone_url":"https://github.com/kubernetes-incubator/kubespray.git","svn_url":"https://github.com/kubernetes-incubator/kubespray","homepage":"","size":6956,"stargazers_count":2085,"watchers_count":2085,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":838,"mirror_url":null,"archived":false,"open_issues_count":360,"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":838,"open_issues":360,"watchers":2085,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes-incubator/kubespray/pulls/2256"},"html":{"href":"https://github.com/kubernetes-incubator/kubespray/pull/2256"},"issue":{"href":"https://api.github.com/repos/kubernetes-incubator/kubespray/issues/2256"},"comments":{"href":"https://api.github.com/repos/kubernetes-incubator/kubespray/issues/2256/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes-incubator/kubespray/pulls/2256/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes-incubator/kubespray/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes-incubator/kubespray/pulls/2256/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes-incubator/kubespray/statuses/a37c642127311d97acceb2a1fe7ab7e31b68afcb"}},"author_association":"NONE","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"ant31","id":1044332,"avatar_url":"https://avatars2.githubusercontent.com/u/1044332?v=4","gravatar_id":"","url":"https://api.github.com/users/ant31","html_url":"https://github.com/ant31","followers_url":"https://api.github.com/users/ant31/followers","following_url":"https://api.github.com/users/ant31/following{/other_user}","gists_url":"https://api.github.com/users/ant31/gists{/gist_id}","starred_url":"https://api.github.com/users/ant31/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ant31/subscriptions","organizations_url":"https://api.github.com/users/ant31/orgs","repos_url":"https://api.github.com/users/ant31/repos","events_url":"https://api.github.com/users/ant31/events{/privacy}","received_events_url":"https://api.github.com/users/ant31/received_events","type":"User","site_admin":false},"comments":18,"review_comments":1,"maintainer_can_modify":false,"commits":3,"additions":9,"deletions":11,"changed_files":6}}
{"actor":{"display_login":"ant31"}}