{"action":"created","comment":{"url":"https://api.github.com/repos/kubic-project/salt/pulls/comments/137281397","pull_request_review_id":60925745,"id":137281397,"diff_hunk":"@@ -0,0 +1,155 @@\n+# To migrate etcd storage version for Kubernestes execute following steps on Admin node:\n+# 1. docker exec -ti $(docker ps | grep salt-master | cut -d\" \" -f1) salt-run state.orchestrate orch.etcd-migrate\n+# 2. btrfs property set -ts /.snapshots/1/snapshot ro false\n+# 3. mount -o remount,rw /\n+# 4. sed -i '/etcd_version/ s/etcd2/etcd3/' /usr/share/salt/kubernetes/pillar/params.sls\n+# 5. docker exec -ti $(docker ps | grep salt-master | cut -d\" \" -f1) salt '*' saltutil.refresh_pillar\n+# 6. docker exec -ti $(docker ps | grep salt-master | cut -d\" \" -f1) salt '*' salt.highstate\n+\n+# Generic Updates\n+update_pillar:\n+  salt.function:\n+    - tgt: '*'\n+    - name: saltutil.refresh_pillar\n+\n+update_grains:\n+  salt.function:\n+    - tgt: '*'\n+    - name: saltutil.refresh_grains\n+\n+update_mine:\n+  salt.function:\n+    - tgt: '*'\n+    - name: mine.update\n+    - require:\n+       - salt: update_pillar\n+       - salt: update_grains\n+\n+update_modules:\n+  salt.function:\n+    - name: saltutil.sync_modules\n+    - tgt: '*'\n+    - kwarg:\n+        refresh: True\n+    - require:\n+      - salt: update_mine\n+\n+{%- set masters = salt.saltutil.runner('mine.get', tgt='G@roles:kube-master', fun='network.ip_addrs', tgt_type='compound') %}\n+{%- for master_id in masters.keys() %}\n+\n+{{ master_id }}-stop-services:\n+  salt.state:\n+    - tgt: {{ master_id }}\n+    - sls:\n+      - kube-apiserver.stop\n+      - kube-controller-manager.stop\n+      - kube-scheduler.stop\n+      - docker.stop\n+      - flannel.stop","path":"salt/orch/etcd-migrate.sls","position":48,"original_position":48,"commit_id":"69b824968577b43f7d8fe3c2bf2312e9c34c3a56","original_commit_id":"69b824968577b43f7d8fe3c2bf2312e9c34c3a56","user":{"login":"kiall","id":52713,"avatar_url":"https://avatars3.githubusercontent.com/u/52713?v=4","gravatar_id":"","url":"https://api.github.com/users/kiall","html_url":"https://github.com/kiall","followers_url":"https://api.github.com/users/kiall/followers","following_url":"https://api.github.com/users/kiall/following{/other_user}","gists_url":"https://api.github.com/users/kiall/gists{/gist_id}","starred_url":"https://api.github.com/users/kiall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kiall/subscriptions","organizations_url":"https://api.github.com/users/kiall/orgs","repos_url":"https://api.github.com/users/kiall/repos","events_url":"https://api.github.com/users/kiall/events{/privacy}","received_events_url":"https://api.github.com/users/kiall/received_events","type":"User","site_admin":false},"body":"Why are we stopping docker? From memory, restarting docker restarts all containers - which we shouldn't do unless absolutely necessary.","created_at":"2017-09-06T14:20:47Z","updated_at":"2017-09-06T14:33:11Z","html_url":"https://github.com/kubic-project/salt/pull/210#discussion_r137281397","pull_request_url":"https://api.github.com/repos/kubic-project/salt/pulls/210","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/kubic-project/salt/pulls/comments/137281397"},"html":{"href":"https://github.com/kubic-project/salt/pull/210#discussion_r137281397"},"pull_request":{"href":"https://api.github.com/repos/kubic-project/salt/pulls/210"}}},"pull_request":{"url":"https://api.github.com/repos/kubic-project/salt/pulls/210","id":139572668,"html_url":"https://github.com/kubic-project/salt/pull/210","diff_url":"https://github.com/kubic-project/salt/pull/210.diff","patch_url":"https://github.com/kubic-project/salt/pull/210.patch","issue_url":"https://api.github.com/repos/kubic-project/salt/issues/210","number":210,"state":"open","locked":false,"title":"Add orchestration for etcd storage 'etcd2' to 'etcd3'","user":{"login":"mjura","id":4455471,"avatar_url":"https://avatars3.githubusercontent.com/u/4455471?v=4","gravatar_id":"","url":"https://api.github.com/users/mjura","html_url":"https://github.com/mjura","followers_url":"https://api.github.com/users/mjura/followers","following_url":"https://api.github.com/users/mjura/following{/other_user}","gists_url":"https://api.github.com/users/mjura/gists{/gist_id}","starred_url":"https://api.github.com/users/mjura/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mjura/subscriptions","organizations_url":"https://api.github.com/users/mjura/orgs","repos_url":"https://api.github.com/users/mjura/repos","events_url":"https://api.github.com/users/mjura/events{/privacy}","received_events_url":"https://api.github.com/users/mjura/received_events","type":"User","site_admin":false},"body":"In Kubernetes v1.7 default storage backend for apiserver is 'etcd3'.\r\nWe need orchestrate migration between version 'etcd2' and 'etcd3'.\r\n\r\nTo migrate etcd storage version we have to execute following steps on Admin node:\r\n```\r\ndocker exec -ti $(docker ps | grep salt-master | cut -d\" \" -f1) salt-run state.orchestrate orch.etcd-migrate\r\nbtrfs property set -ts /.snapshots/1/snapshot ro false\r\nmount -o remount,rw /\r\nsed -i '/etcd_version/ s/etcd2/etcd3/' /usr/share/salt/kubernetes/pillar/params.sls\r\ndocker exec -ti $(docker ps | grep salt-master | cut -d\" \" -f1) salt '*' saltutil.refresh_pillar\r\ndocker exec -ti $(docker ps | grep salt-master | cut -d\" \" -f1) salt '*' salt.highstate\r\n```","created_at":"2017-09-06T14:10:19Z","updated_at":"2017-09-06T14:33:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"329ccade8d6075aa3a2a8fae9e0268f04e91db9b","assignee":null,"assignees":[],"requested_reviewers":[{"login":"ereslibre","id":8706,"avatar_url":"https://avatars2.githubusercontent.com/u/8706?v=4","gravatar_id":"","url":"https://api.github.com/users/ereslibre","html_url":"https://github.com/ereslibre","followers_url":"https://api.github.com/users/ereslibre/followers","following_url":"https://api.github.com/users/ereslibre/following{/other_user}","gists_url":"https://api.github.com/users/ereslibre/gists{/gist_id}","starred_url":"https://api.github.com/users/ereslibre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ereslibre/subscriptions","organizations_url":"https://api.github.com/users/ereslibre/orgs","repos_url":"https://api.github.com/users/ereslibre/repos","events_url":"https://api.github.com/users/ereslibre/events{/privacy}","received_events_url":"https://api.github.com/users/ereslibre/received_events","type":"User","site_admin":false},{"login":"inercia","id":1841612,"avatar_url":"https://avatars2.githubusercontent.com/u/1841612?v=4","gravatar_id":"","url":"https://api.github.com/users/inercia","html_url":"https://github.com/inercia","followers_url":"https://api.github.com/users/inercia/followers","following_url":"https://api.github.com/users/inercia/following{/other_user}","gists_url":"https://api.github.com/users/inercia/gists{/gist_id}","starred_url":"https://api.github.com/users/inercia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/inercia/subscriptions","organizations_url":"https://api.github.com/users/inercia/orgs","repos_url":"https://api.github.com/users/inercia/repos","events_url":"https://api.github.com/users/inercia/events{/privacy}","received_events_url":"https://api.github.com/users/inercia/received_events","type":"User","site_admin":false},{"login":"MaximilianMeister","id":5364817,"avatar_url":"https://avatars0.githubusercontent.com/u/5364817?v=4","gravatar_id":"","url":"https://api.github.com/users/MaximilianMeister","html_url":"https://github.com/MaximilianMeister","followers_url":"https://api.github.com/users/MaximilianMeister/followers","following_url":"https://api.github.com/users/MaximilianMeister/following{/other_user}","gists_url":"https://api.github.com/users/MaximilianMeister/gists{/gist_id}","starred_url":"https://api.github.com/users/MaximilianMeister/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MaximilianMeister/subscriptions","organizations_url":"https://api.github.com/users/MaximilianMeister/orgs","repos_url":"https://api.github.com/users/MaximilianMeister/repos","events_url":"https://api.github.com/users/MaximilianMeister/events{/privacy}","received_events_url":"https://api.github.com/users/MaximilianMeister/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/kubic-project/salt/pulls/210/commits","review_comments_url":"https://api.github.com/repos/kubic-project/salt/pulls/210/comments","review_comment_url":"https://api.github.com/repos/kubic-project/salt/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubic-project/salt/issues/210/comments","statuses_url":"https://api.github.com/repos/kubic-project/salt/statuses/69b824968577b43f7d8fe3c2bf2312e9c34c3a56","head":{"label":"mjura:etcd_migrate","ref":"etcd_migrate","sha":"69b824968577b43f7d8fe3c2bf2312e9c34c3a56","user":{"login":"mjura","id":4455471,"avatar_url":"https://avatars3.githubusercontent.com/u/4455471?v=4","gravatar_id":"","url":"https://api.github.com/users/mjura","html_url":"https://github.com/mjura","followers_url":"https://api.github.com/users/mjura/followers","following_url":"https://api.github.com/users/mjura/following{/other_user}","gists_url":"https://api.github.com/users/mjura/gists{/gist_id}","starred_url":"https://api.github.com/users/mjura/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mjura/subscriptions","organizations_url":"https://api.github.com/users/mjura/orgs","repos_url":"https://api.github.com/users/mjura/repos","events_url":"https://api.github.com/users/mjura/events{/privacy}","received_events_url":"https://api.github.com/users/mjura/received_events","type":"User","site_admin":false},"repo":{"id":83669206,"name":"salt","full_name":"mjura/salt","owner":{"login":"mjura","id":4455471,"avatar_url":"https://avatars3.githubusercontent.com/u/4455471?v=4","gravatar_id":"","url":"https://api.github.com/users/mjura","html_url":"https://github.com/mjura","followers_url":"https://api.github.com/users/mjura/followers","following_url":"https://api.github.com/users/mjura/following{/other_user}","gists_url":"https://api.github.com/users/mjura/gists{/gist_id}","starred_url":"https://api.github.com/users/mjura/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mjura/subscriptions","organizations_url":"https://api.github.com/users/mjura/orgs","repos_url":"https://api.github.com/users/mjura/repos","events_url":"https://api.github.com/users/mjura/events{/privacy}","received_events_url":"https://api.github.com/users/mjura/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mjura/salt","description":"A collection of salt states used to provision a kubernetes cluster","fork":true,"url":"https://api.github.com/repos/mjura/salt","forks_url":"https://api.github.com/repos/mjura/salt/forks","keys_url":"https://api.github.com/repos/mjura/salt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mjura/salt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mjura/salt/teams","hooks_url":"https://api.github.com/repos/mjura/salt/hooks","issue_events_url":"https://api.github.com/repos/mjura/salt/issues/events{/number}","events_url":"https://api.github.com/repos/mjura/salt/events","assignees_url":"https://api.github.com/repos/mjura/salt/assignees{/user}","branches_url":"https://api.github.com/repos/mjura/salt/branches{/branch}","tags_url":"https://api.github.com/repos/mjura/salt/tags","blobs_url":"https://api.github.com/repos/mjura/salt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mjura/salt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mjura/salt/git/refs{/sha}","trees_url":"https://api.github.com/repos/mjura/salt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mjura/salt/statuses/{sha}","languages_url":"https://api.github.com/repos/mjura/salt/languages","stargazers_url":"https://api.github.com/repos/mjura/salt/stargazers","contributors_url":"https://api.github.com/repos/mjura/salt/contributors","subscribers_url":"https://api.github.com/repos/mjura/salt/subscribers","subscription_url":"https://api.github.com/repos/mjura/salt/subscription","commits_url":"https://api.github.com/repos/mjura/salt/commits{/sha}","git_commits_url":"https://api.github.com/repos/mjura/salt/git/commits{/sha}","comments_url":"https://api.github.com/repos/mjura/salt/comments{/number}","issue_comment_url":"https://api.github.com/repos/mjura/salt/issues/comments{/number}","contents_url":"https://api.github.com/repos/mjura/salt/contents/{+path}","compare_url":"https://api.github.com/repos/mjura/salt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mjura/salt/merges","archive_url":"https://api.github.com/repos/mjura/salt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mjura/salt/downloads","issues_url":"https://api.github.com/repos/mjura/salt/issues{/number}","pulls_url":"https://api.github.com/repos/mjura/salt/pulls{/number}","milestones_url":"https://api.github.com/repos/mjura/salt/milestones{/number}","notifications_url":"https://api.github.com/repos/mjura/salt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mjura/salt/labels{/name}","releases_url":"https://api.github.com/repos/mjura/salt/releases{/id}","deployments_url":"https://api.github.com/repos/mjura/salt/deployments","created_at":"2017-03-02T11:13:47Z","updated_at":"2017-03-02T11:13:48Z","pushed_at":"2017-09-06T14:09:28Z","git_url":"git://github.com/mjura/salt.git","ssh_url":"git@github.com:mjura/salt.git","clone_url":"https://github.com/mjura/salt.git","svn_url":"https://github.com/mjura/salt","homepage":null,"size":437,"stargazers_count":0,"watchers_count":0,"language":"SaltStack","has_issues":false,"has_projects":true,"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":"kubic-project:master","ref":"master","sha":"c1c851cadb007f60c005522e9357f43b1daef552","user":{"login":"kubic-project","id":25507587,"avatar_url":"https://avatars2.githubusercontent.com/u/25507587?v=4","gravatar_id":"","url":"https://api.github.com/users/kubic-project","html_url":"https://github.com/kubic-project","followers_url":"https://api.github.com/users/kubic-project/followers","following_url":"https://api.github.com/users/kubic-project/following{/other_user}","gists_url":"https://api.github.com/users/kubic-project/gists{/gist_id}","starred_url":"https://api.github.com/users/kubic-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubic-project/subscriptions","organizations_url":"https://api.github.com/users/kubic-project/orgs","repos_url":"https://api.github.com/users/kubic-project/repos","events_url":"https://api.github.com/users/kubic-project/events{/privacy}","received_events_url":"https://api.github.com/users/kubic-project/received_events","type":"Organization","site_admin":false},"repo":{"id":83561000,"name":"salt","full_name":"kubic-project/salt","owner":{"login":"kubic-project","id":25507587,"avatar_url":"https://avatars2.githubusercontent.com/u/25507587?v=4","gravatar_id":"","url":"https://api.github.com/users/kubic-project","html_url":"https://github.com/kubic-project","followers_url":"https://api.github.com/users/kubic-project/followers","following_url":"https://api.github.com/users/kubic-project/following{/other_user}","gists_url":"https://api.github.com/users/kubic-project/gists{/gist_id}","starred_url":"https://api.github.com/users/kubic-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubic-project/subscriptions","organizations_url":"https://api.github.com/users/kubic-project/orgs","repos_url":"https://api.github.com/users/kubic-project/repos","events_url":"https://api.github.com/users/kubic-project/events{/privacy}","received_events_url":"https://api.github.com/users/kubic-project/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kubic-project/salt","description":"A collection of salt states used to provision a kubernetes cluster","fork":false,"url":"https://api.github.com/repos/kubic-project/salt","forks_url":"https://api.github.com/repos/kubic-project/salt/forks","keys_url":"https://api.github.com/repos/kubic-project/salt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kubic-project/salt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kubic-project/salt/teams","hooks_url":"https://api.github.com/repos/kubic-project/salt/hooks","issue_events_url":"https://api.github.com/repos/kubic-project/salt/issues/events{/number}","events_url":"https://api.github.com/repos/kubic-project/salt/events","assignees_url":"https://api.github.com/repos/kubic-project/salt/assignees{/user}","branches_url":"https://api.github.com/repos/kubic-project/salt/branches{/branch}","tags_url":"https://api.github.com/repos/kubic-project/salt/tags","blobs_url":"https://api.github.com/repos/kubic-project/salt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kubic-project/salt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kubic-project/salt/git/refs{/sha}","trees_url":"https://api.github.com/repos/kubic-project/salt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kubic-project/salt/statuses/{sha}","languages_url":"https://api.github.com/repos/kubic-project/salt/languages","stargazers_url":"https://api.github.com/repos/kubic-project/salt/stargazers","contributors_url":"https://api.github.com/repos/kubic-project/salt/contributors","subscribers_url":"https://api.github.com/repos/kubic-project/salt/subscribers","subscription_url":"https://api.github.com/repos/kubic-project/salt/subscription","commits_url":"https://api.github.com/repos/kubic-project/salt/commits{/sha}","git_commits_url":"https://api.github.com/repos/kubic-project/salt/git/commits{/sha}","comments_url":"https://api.github.com/repos/kubic-project/salt/comments{/number}","issue_comment_url":"https://api.github.com/repos/kubic-project/salt/issues/comments{/number}","contents_url":"https://api.github.com/repos/kubic-project/salt/contents/{+path}","compare_url":"https://api.github.com/repos/kubic-project/salt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kubic-project/salt/merges","archive_url":"https://api.github.com/repos/kubic-project/salt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kubic-project/salt/downloads","issues_url":"https://api.github.com/repos/kubic-project/salt/issues{/number}","pulls_url":"https://api.github.com/repos/kubic-project/salt/pulls{/number}","milestones_url":"https://api.github.com/repos/kubic-project/salt/milestones{/number}","notifications_url":"https://api.github.com/repos/kubic-project/salt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kubic-project/salt/labels{/name}","releases_url":"https://api.github.com/repos/kubic-project/salt/releases{/id}","deployments_url":"https://api.github.com/repos/kubic-project/salt/deployments","created_at":"2017-03-01T14:04:14Z","updated_at":"2017-08-29T08:28:45Z","pushed_at":"2017-09-06T14:10:20Z","git_url":"git://github.com/kubic-project/salt.git","ssh_url":"git@github.com:kubic-project/salt.git","clone_url":"https://github.com/kubic-project/salt.git","svn_url":"https://github.com/kubic-project/salt","homepage":null,"size":2037,"stargazers_count":23,"watchers_count":23,"language":"SaltStack","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":10,"mirror_url":null,"open_issues_count":9,"forks":10,"open_issues":9,"watchers":23,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubic-project/salt/pulls/210"},"html":{"href":"https://github.com/kubic-project/salt/pull/210"},"issue":{"href":"https://api.github.com/repos/kubic-project/salt/issues/210"},"comments":{"href":"https://api.github.com/repos/kubic-project/salt/issues/210/comments"},"review_comments":{"href":"https://api.github.com/repos/kubic-project/salt/pulls/210/comments"},"review_comment":{"href":"https://api.github.com/repos/kubic-project/salt/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubic-project/salt/pulls/210/commits"},"statuses":{"href":"https://api.github.com/repos/kubic-project/salt/statuses/69b824968577b43f7d8fe3c2bf2312e9c34c3a56"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"kiall"}}