{"action":"created","comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/37160537","id":37160537,"diff_hunk":"@@ -450,7 +450,61 @@ function kube-down {\n \n # Update a kubernetes cluster with latest source\n function kube-push {\n-  echo \"not implemented\"\n+  #stop all the kube's process & etcd \n+  KUBE_ROOT=$(dirname \"${BASH_SOURCE}\")/../..\n+  source \"${KUBE_ROOT}/cluster/ubuntu/${KUBE_CONFIG_FILE-\"config-default.sh\"}\"\n+\n+  for i in ${nodes}; do\n+    {\n+      echo \"Cleaning on node ${i#*@}\"\n+      ssh -t $i 'sudo -p \"[sudo] stop the all process: \" service etcd stop'\n+      ssh -t $i 'rm -f /opt/bin/kube* /etc/init/kube* /etc/init.d/kube* /etc/default/kube*; rm -rf ~/kube'\n+    }\n+  done\n+  wait\n+\n+  # The latest version tag of kubernetes can be got by gsutil, or set in config-default.sh \n+  K8S_VERSION=$(gsutil cat gs://kubernetes-release/release/latest.txt)\n+  echo \"Using latest stable version: ${KUBE_VERSION}\" >&2\n+\n+  # Run build.sh to get the latest release\n+  source \"${KUBE_ROOT}/cluster/ubuntu/build.sh\"\n+ \n+  #Update all nodes with the latest release\n+  if [ ! -f \"ubuntu/binaries/master/kube-apiserver\" ]; then\n+    echo \"The latest release of kubernetes has not been got normally,plz check first\"\n+    exit 1\n+  fi\n+\n+  setClusterInfo\n+  ii=0\n+\n+  for i in ${nodes}\n+  do\n+    {\n+      if [ \"${roles[${ii}]}\" == \"a\" ]; then\n+        provision-master\n+      elif [ \"${roles[${ii}]}\" == \"i\" ]; then\n+        provision-minion $i\n+      elif [ \"${roles[${ii}]}\" == \"ai\" ]; then\n+        provision-masterandminion\n+      else\n+        echo \"unsupported role for ${i}. please check\"\n+        exit 1\n+      fi\n+    }\n+    ((ii=ii+1))\n+  done\n+  wait","path":"cluster/ubuntu/util.sh","position":50,"original_position":50,"commit_id":"25bc7beb534ce10ad820a713b14c160b2a63f06c","original_commit_id":"25bc7beb534ce10ad820a713b14c160b2a63f06c","user":{"login":"mikedanese","id":1787169,"avatar_url":"https://avatars.githubusercontent.com/u/1787169?v=3","gravatar_id":"","url":"https://api.github.com/users/mikedanese","html_url":"https://github.com/mikedanese","followers_url":"https://api.github.com/users/mikedanese/followers","following_url":"https://api.github.com/users/mikedanese/following{/other_user}","gists_url":"https://api.github.com/users/mikedanese/gists{/gist_id}","starred_url":"https://api.github.com/users/mikedanese/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikedanese/subscriptions","organizations_url":"https://api.github.com/users/mikedanese/orgs","repos_url":"https://api.github.com/users/mikedanese/repos","events_url":"https://api.github.com/users/mikedanese/events{/privacy}","received_events_url":"https://api.github.com/users/mikedanese/received_events","type":"User","site_admin":false},"body":"wait doesn't do anything.","created_at":"2015-08-17T06:10:41Z","updated_at":"2015-08-17T06:10:41Z","html_url":"https://github.com/kubernetes/kubernetes/pull/12710#discussion_r37160537","pull_request_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/12710","_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/37160537"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/12710#discussion_r37160537"},"pull_request":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/12710"}}},"pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/12710","id":42428075,"html_url":"https://github.com/kubernetes/kubernetes/pull/12710","diff_url":"https://github.com/kubernetes/kubernetes/pull/12710.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/12710.patch","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/12710","number":12710,"state":"open","locked":false,"title":"Add ubuntu kube-push for upgrading of k8s cluster","user":{"login":"huangyuqi","id":13324377,"avatar_url":"https://avatars.githubusercontent.com/u/13324377?v=3","gravatar_id":"","url":"https://api.github.com/users/huangyuqi","html_url":"https://github.com/huangyuqi","followers_url":"https://api.github.com/users/huangyuqi/followers","following_url":"https://api.github.com/users/huangyuqi/following{/other_user}","gists_url":"https://api.github.com/users/huangyuqi/gists{/gist_id}","starred_url":"https://api.github.com/users/huangyuqi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/huangyuqi/subscriptions","organizations_url":"https://api.github.com/users/huangyuqi/orgs","repos_url":"https://api.github.com/users/huangyuqi/repos","events_url":"https://api.github.com/users/huangyuqi/events{/privacy}","received_events_url":"https://api.github.com/users/huangyuqi/received_events","type":"User","site_admin":false},"body":"Complete the kube-push in the shell \"ubuntu/util.sh\". It can be used to upgrade the k8s cluster to latest version.","created_at":"2015-08-14T06:41:45Z","updated_at":"2015-08-17T06:10:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"99b0f44b1217dcb011be3aea7320c4041767ff3d","assignee":{"login":"mikedanese","id":1787169,"avatar_url":"https://avatars.githubusercontent.com/u/1787169?v=3","gravatar_id":"","url":"https://api.github.com/users/mikedanese","html_url":"https://github.com/mikedanese","followers_url":"https://api.github.com/users/mikedanese/followers","following_url":"https://api.github.com/users/mikedanese/following{/other_user}","gists_url":"https://api.github.com/users/mikedanese/gists{/gist_id}","starred_url":"https://api.github.com/users/mikedanese/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikedanese/subscriptions","organizations_url":"https://api.github.com/users/mikedanese/orgs","repos_url":"https://api.github.com/users/mikedanese/repos","events_url":"https://api.github.com/users/mikedanese/events{/privacy}","received_events_url":"https://api.github.com/users/mikedanese/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/12710/commits","review_comments_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/12710/comments","review_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/12710/comments","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/25bc7beb534ce10ad820a713b14c160b2a63f06c","head":{"label":"Huawei-PaaS:UbuntuKubePush-Upgrade","ref":"UbuntuKubePush-Upgrade","sha":"25bc7beb534ce10ad820a713b14c160b2a63f06c","user":{"login":"Huawei-PaaS","id":6876878,"avatar_url":"https://avatars.githubusercontent.com/u/6876878?v=3","gravatar_id":"","url":"https://api.github.com/users/Huawei-PaaS","html_url":"https://github.com/Huawei-PaaS","followers_url":"https://api.github.com/users/Huawei-PaaS/followers","following_url":"https://api.github.com/users/Huawei-PaaS/following{/other_user}","gists_url":"https://api.github.com/users/Huawei-PaaS/gists{/gist_id}","starred_url":"https://api.github.com/users/Huawei-PaaS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Huawei-PaaS/subscriptions","organizations_url":"https://api.github.com/users/Huawei-PaaS/orgs","repos_url":"https://api.github.com/users/Huawei-PaaS/repos","events_url":"https://api.github.com/users/Huawei-PaaS/events{/privacy}","received_events_url":"https://api.github.com/users/Huawei-PaaS/received_events","type":"Organization","site_admin":false},"repo":{"id":40632995,"name":"kubernetes","full_name":"Huawei-PaaS/kubernetes","owner":{"login":"Huawei-PaaS","id":6876878,"avatar_url":"https://avatars.githubusercontent.com/u/6876878?v=3","gravatar_id":"","url":"https://api.github.com/users/Huawei-PaaS","html_url":"https://github.com/Huawei-PaaS","followers_url":"https://api.github.com/users/Huawei-PaaS/followers","following_url":"https://api.github.com/users/Huawei-PaaS/following{/other_user}","gists_url":"https://api.github.com/users/Huawei-PaaS/gists{/gist_id}","starred_url":"https://api.github.com/users/Huawei-PaaS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Huawei-PaaS/subscriptions","organizations_url":"https://api.github.com/users/Huawei-PaaS/orgs","repos_url":"https://api.github.com/users/Huawei-PaaS/repos","events_url":"https://api.github.com/users/Huawei-PaaS/events{/privacy}","received_events_url":"https://api.github.com/users/Huawei-PaaS/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Huawei-PaaS/kubernetes","description":"Container Cluster Manager from Google","fork":true,"url":"https://api.github.com/repos/Huawei-PaaS/kubernetes","forks_url":"https://api.github.com/repos/Huawei-PaaS/kubernetes/forks","keys_url":"https://api.github.com/repos/Huawei-PaaS/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Huawei-PaaS/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Huawei-PaaS/kubernetes/teams","hooks_url":"https://api.github.com/repos/Huawei-PaaS/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/Huawei-PaaS/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/Huawei-PaaS/kubernetes/events","assignees_url":"https://api.github.com/repos/Huawei-PaaS/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/Huawei-PaaS/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/Huawei-PaaS/kubernetes/tags","blobs_url":"https://api.github.com/repos/Huawei-PaaS/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Huawei-PaaS/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Huawei-PaaS/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/Huawei-PaaS/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Huawei-PaaS/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/Huawei-PaaS/kubernetes/languages","stargazers_url":"https://api.github.com/repos/Huawei-PaaS/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/Huawei-PaaS/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/Huawei-PaaS/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/Huawei-PaaS/kubernetes/subscription","commits_url":"https://api.github.com/repos/Huawei-PaaS/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/Huawei-PaaS/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/Huawei-PaaS/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/Huawei-PaaS/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/Huawei-PaaS/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/Huawei-PaaS/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Huawei-PaaS/kubernetes/merges","archive_url":"https://api.github.com/repos/Huawei-PaaS/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Huawei-PaaS/kubernetes/downloads","issues_url":"https://api.github.com/repos/Huawei-PaaS/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/Huawei-PaaS/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/Huawei-PaaS/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/Huawei-PaaS/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Huawei-PaaS/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/Huawei-PaaS/kubernetes/releases{/id}","created_at":"2015-08-13T01:37:46Z","updated_at":"2015-08-13T01:37:53Z","pushed_at":"2015-08-17T04:05:20Z","git_url":"git://github.com/Huawei-PaaS/kubernetes.git","ssh_url":"git@github.com:Huawei-PaaS/kubernetes.git","clone_url":"https://github.com/Huawei-PaaS/kubernetes.git","svn_url":"https://github.com/Huawei-PaaS/kubernetes","homepage":"http://kubernetes.io","size":101518,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"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":"563e6075cad664adc3e944e6ceffcc8d8bcc8232","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":"Container Cluster Manager from Google","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}","created_at":"2014-06-06T22:56:04Z","updated_at":"2015-08-17T05:49:59Z","pushed_at":"2015-08-17T04:12:01Z","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":350660,"stargazers_count":9727,"watchers_count":9727,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2341,"mirror_url":null,"open_issues_count":1776,"forks":2341,"open_issues":1776,"watchers":9727,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/12710"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/12710"},"issue":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/12710"},"comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/12710/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/12710/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/12710/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes/kubernetes/statuses/25bc7beb534ce10ad820a713b14c160b2a63f06c"}}}}