{"action":"created","comment":{"url":"https://api.github.com/repos/coreos/etcd/pulls/comments/39903231","id":39903231,"diff_hunk":"@@ -34,4 +34,65 @@ etcd -proxy on -listen-client-urls http://127.0.0.1:8080 -discovery https://disc\n #### Fallback to proxy mode with discovery service\n If you bootstrap a etcd cluster using [discovery service][discovery-service] with more than the expected number of etcd members, the extra etcd processes will fall back to being `readwrite` proxies by default. They will forward the requests to the cluster as described above. For example, if you create a discovery url with `size=5`, and start ten etcd processes using that same discovery url, the result will be a cluster with five etcd members and five proxies. Note that this behaviour can be disabled with the `proxy-fallback` flag.\n \n+### Promote a proxy to a member of etcd cluster\n+\n+A Proxy is not part of the core etcd cluster. A proxy will not promote itself to an etcd member automtically in any case.\n+\n+If you want to promote a proxy to an etcd member, there are four steps you need to follow:\n+\n+- add the proxy node as an etcd member into the existing cluster\n+- stop the etcd process or service\n+- remove the existing proxy data directory\n+- restart the etcd process with member configuration\n+\n+\n+#### Example\n+\n+We assume you have a one member etcd cluster with one proxy. The cluster information is listed below:\n+\n+|Name|Address|\n+|------|---------|\n+|infra0|10.0.1.10|\n+|proxy0|10.0.1.11|\n+\n+This example walks you through a case that you promote one proxy to an etcd member. The cluster will become a two member cluster after finishing the four steps.\n+\n+### Add a new member into the existing cluster\n+\n+``` bash\n+$ etcdctl -endpoint http://10.0.1.10:2379 member add infra1 http://10.0.1.11:2380\n+added member 9bf1b35fc7761a23 to cluster\n+\n+ETCD_NAME=\"infra1\"\n+ETCD_INITIAL_CLUSTER=\"infra0=http://10.0.1.10:2380,infra1=http://10.0.1.11:2380\"\n+ETCD_INITIAL_CLUSTER_STATE=existing\n+```\n+\n+### Stop the proxy\n+\n+``` bash\n+kill %proxy_pid%\n+```\n+\n+or (if you are running etcd proxy as etcd service under systemd)\n+\n+``` bash\n+systemctl stop etcd2\n+```\n+\n+### Remove the existing data dir\n+\n+```\n+rm -rf %data_dir%/proxy\n+```\n+\n+### Start the etcd as a member\n+\n+```\n+$ export ETCD_NAME=\"infra1\"\n+$ export ETCD_INITIAL_CLUSTER=\"infra0=http://10.0.1.10:2380,infra1=http://10.0.1.11:2380\"\n+$ export ETCD_INITIAL_CLUSTER_STATE=existing\n+$ etcd -listen-client-urls http://10.0.1.11:2379 -advertise-client-urls http://10.0.1.11:2379  -listen-peer-urls http://10.0.1.11:2380 -initial-advertise-peer-urls http://10.0.1.11:2380 -data-dir %data_dir%\n+```\n+","path":"Documentation/proxy.md","position":64,"original_position":64,"commit_id":"11244558e9097c888f6c7744f6791c6edb28625d","original_commit_id":"11244558e9097c888f6c7744f6791c6edb28625d","user":{"login":"robszumski","id":755540,"avatar_url":"https://avatars.githubusercontent.com/u/755540?v=3","gravatar_id":"","url":"https://api.github.com/users/robszumski","html_url":"https://github.com/robszumski","followers_url":"https://api.github.com/users/robszumski/followers","following_url":"https://api.github.com/users/robszumski/following{/other_user}","gists_url":"https://api.github.com/users/robszumski/gists{/gist_id}","starred_url":"https://api.github.com/users/robszumski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robszumski/subscriptions","organizations_url":"https://api.github.com/users/robszumski/orgs","repos_url":"https://api.github.com/users/robszumski/repos","events_url":"https://api.github.com/users/robszumski/events{/privacy}","received_events_url":"https://api.github.com/users/robszumski/received_events","type":"User","site_admin":false},"body":"Add some common troubleshooting steps? I'm thinking:\r\n\r\n1. initial cluster string is set incorrectly\r\n2. data dir was not wiped\r\n3. initial cluster state not \"existing\"","created_at":"2015-09-18T21:30:33Z","updated_at":"2015-09-18T21:30:33Z","html_url":"https://github.com/coreos/etcd/pull/3555#discussion_r39903231","pull_request_url":"https://api.github.com/repos/coreos/etcd/pulls/3555","_links":{"self":{"href":"https://api.github.com/repos/coreos/etcd/pulls/comments/39903231"},"html":{"href":"https://github.com/coreos/etcd/pull/3555#discussion_r39903231"},"pull_request":{"href":"https://api.github.com/repos/coreos/etcd/pulls/3555"}}},"pull_request":{"url":"https://api.github.com/repos/coreos/etcd/pulls/3555","id":45453909,"html_url":"https://github.com/coreos/etcd/pull/3555","diff_url":"https://github.com/coreos/etcd/pull/3555.diff","patch_url":"https://github.com/coreos/etcd/pull/3555.patch","issue_url":"https://api.github.com/repos/coreos/etcd/issues/3555","number":3555,"state":"open","locked":false,"title":"doc: add proxy promotion doc","user":{"login":"xiang90","id":4479947,"avatar_url":"https://avatars.githubusercontent.com/u/4479947?v=3","gravatar_id":"","url":"https://api.github.com/users/xiang90","html_url":"https://github.com/xiang90","followers_url":"https://api.github.com/users/xiang90/followers","following_url":"https://api.github.com/users/xiang90/following{/other_user}","gists_url":"https://api.github.com/users/xiang90/gists{/gist_id}","starred_url":"https://api.github.com/users/xiang90/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xiang90/subscriptions","organizations_url":"https://api.github.com/users/xiang90/orgs","repos_url":"https://api.github.com/users/xiang90/repos","events_url":"https://api.github.com/users/xiang90/events{/privacy}","received_events_url":"https://api.github.com/users/xiang90/received_events","type":"User","site_admin":false},"body":"Fix #3499","created_at":"2015-09-18T21:18:47Z","updated_at":"2015-09-18T21:30:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f728c59a3cc935d221385d8c1b3549b2927d4882","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/coreos/etcd/pulls/3555/commits","review_comments_url":"https://api.github.com/repos/coreos/etcd/pulls/3555/comments","review_comment_url":"https://api.github.com/repos/coreos/etcd/pulls/comments{/number}","comments_url":"https://api.github.com/repos/coreos/etcd/issues/3555/comments","statuses_url":"https://api.github.com/repos/coreos/etcd/statuses/11244558e9097c888f6c7744f6791c6edb28625d","head":{"label":"xiang90:proxy_doc","ref":"proxy_doc","sha":"11244558e9097c888f6c7744f6791c6edb28625d","user":{"login":"xiang90","id":4479947,"avatar_url":"https://avatars.githubusercontent.com/u/4479947?v=3","gravatar_id":"","url":"https://api.github.com/users/xiang90","html_url":"https://github.com/xiang90","followers_url":"https://api.github.com/users/xiang90/followers","following_url":"https://api.github.com/users/xiang90/following{/other_user}","gists_url":"https://api.github.com/users/xiang90/gists{/gist_id}","starred_url":"https://api.github.com/users/xiang90/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xiang90/subscriptions","organizations_url":"https://api.github.com/users/xiang90/orgs","repos_url":"https://api.github.com/users/xiang90/repos","events_url":"https://api.github.com/users/xiang90/events{/privacy}","received_events_url":"https://api.github.com/users/xiang90/received_events","type":"User","site_admin":false},"repo":{"id":11245678,"name":"etcd","full_name":"xiang90/etcd","owner":{"login":"xiang90","id":4479947,"avatar_url":"https://avatars.githubusercontent.com/u/4479947?v=3","gravatar_id":"","url":"https://api.github.com/users/xiang90","html_url":"https://github.com/xiang90","followers_url":"https://api.github.com/users/xiang90/followers","following_url":"https://api.github.com/users/xiang90/following{/other_user}","gists_url":"https://api.github.com/users/xiang90/gists{/gist_id}","starred_url":"https://api.github.com/users/xiang90/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xiang90/subscriptions","organizations_url":"https://api.github.com/users/xiang90/orgs","repos_url":"https://api.github.com/users/xiang90/repos","events_url":"https://api.github.com/users/xiang90/events{/privacy}","received_events_url":"https://api.github.com/users/xiang90/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/xiang90/etcd","description":null,"fork":true,"url":"https://api.github.com/repos/xiang90/etcd","forks_url":"https://api.github.com/repos/xiang90/etcd/forks","keys_url":"https://api.github.com/repos/xiang90/etcd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/xiang90/etcd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/xiang90/etcd/teams","hooks_url":"https://api.github.com/repos/xiang90/etcd/hooks","issue_events_url":"https://api.github.com/repos/xiang90/etcd/issues/events{/number}","events_url":"https://api.github.com/repos/xiang90/etcd/events","assignees_url":"https://api.github.com/repos/xiang90/etcd/assignees{/user}","branches_url":"https://api.github.com/repos/xiang90/etcd/branches{/branch}","tags_url":"https://api.github.com/repos/xiang90/etcd/tags","blobs_url":"https://api.github.com/repos/xiang90/etcd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/xiang90/etcd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/xiang90/etcd/git/refs{/sha}","trees_url":"https://api.github.com/repos/xiang90/etcd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/xiang90/etcd/statuses/{sha}","languages_url":"https://api.github.com/repos/xiang90/etcd/languages","stargazers_url":"https://api.github.com/repos/xiang90/etcd/stargazers","contributors_url":"https://api.github.com/repos/xiang90/etcd/contributors","subscribers_url":"https://api.github.com/repos/xiang90/etcd/subscribers","subscription_url":"https://api.github.com/repos/xiang90/etcd/subscription","commits_url":"https://api.github.com/repos/xiang90/etcd/commits{/sha}","git_commits_url":"https://api.github.com/repos/xiang90/etcd/git/commits{/sha}","comments_url":"https://api.github.com/repos/xiang90/etcd/comments{/number}","issue_comment_url":"https://api.github.com/repos/xiang90/etcd/issues/comments{/number}","contents_url":"https://api.github.com/repos/xiang90/etcd/contents/{+path}","compare_url":"https://api.github.com/repos/xiang90/etcd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/xiang90/etcd/merges","archive_url":"https://api.github.com/repos/xiang90/etcd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/xiang90/etcd/downloads","issues_url":"https://api.github.com/repos/xiang90/etcd/issues{/number}","pulls_url":"https://api.github.com/repos/xiang90/etcd/pulls{/number}","milestones_url":"https://api.github.com/repos/xiang90/etcd/milestones{/number}","notifications_url":"https://api.github.com/repos/xiang90/etcd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/xiang90/etcd/labels{/name}","releases_url":"https://api.github.com/repos/xiang90/etcd/releases{/id}","created_at":"2013-07-08T04:17:14Z","updated_at":"2015-06-09T18:06:32Z","pushed_at":"2015-09-18T21:18:16Z","git_url":"git://github.com/xiang90/etcd.git","ssh_url":"git@github.com:xiang90/etcd.git","clone_url":"https://github.com/xiang90/etcd.git","svn_url":"https://github.com/xiang90/etcd","homepage":null,"size":21689,"stargazers_count":3,"watchers_count":3,"language":"Go","has_issues":false,"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":3,"default_branch":"master"}},"base":{"label":"coreos:master","ref":"master","sha":"06180be154083d0c15378e4703def03afac21bdc","user":{"login":"coreos","id":3730757,"avatar_url":"https://avatars.githubusercontent.com/u/3730757?v=3","gravatar_id":"","url":"https://api.github.com/users/coreos","html_url":"https://github.com/coreos","followers_url":"https://api.github.com/users/coreos/followers","following_url":"https://api.github.com/users/coreos/following{/other_user}","gists_url":"https://api.github.com/users/coreos/gists{/gist_id}","starred_url":"https://api.github.com/users/coreos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coreos/subscriptions","organizations_url":"https://api.github.com/users/coreos/orgs","repos_url":"https://api.github.com/users/coreos/repos","events_url":"https://api.github.com/users/coreos/events{/privacy}","received_events_url":"https://api.github.com/users/coreos/received_events","type":"Organization","site_admin":false},"repo":{"id":11225014,"name":"etcd","full_name":"coreos/etcd","owner":{"login":"coreos","id":3730757,"avatar_url":"https://avatars.githubusercontent.com/u/3730757?v=3","gravatar_id":"","url":"https://api.github.com/users/coreos","html_url":"https://github.com/coreos","followers_url":"https://api.github.com/users/coreos/followers","following_url":"https://api.github.com/users/coreos/following{/other_user}","gists_url":"https://api.github.com/users/coreos/gists{/gist_id}","starred_url":"https://api.github.com/users/coreos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coreos/subscriptions","organizations_url":"https://api.github.com/users/coreos/orgs","repos_url":"https://api.github.com/users/coreos/repos","events_url":"https://api.github.com/users/coreos/events{/privacy}","received_events_url":"https://api.github.com/users/coreos/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/coreos/etcd","description":"A distributed consistent key-value store for shared configuration and service discovery","fork":false,"url":"https://api.github.com/repos/coreos/etcd","forks_url":"https://api.github.com/repos/coreos/etcd/forks","keys_url":"https://api.github.com/repos/coreos/etcd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/coreos/etcd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/coreos/etcd/teams","hooks_url":"https://api.github.com/repos/coreos/etcd/hooks","issue_events_url":"https://api.github.com/repos/coreos/etcd/issues/events{/number}","events_url":"https://api.github.com/repos/coreos/etcd/events","assignees_url":"https://api.github.com/repos/coreos/etcd/assignees{/user}","branches_url":"https://api.github.com/repos/coreos/etcd/branches{/branch}","tags_url":"https://api.github.com/repos/coreos/etcd/tags","blobs_url":"https://api.github.com/repos/coreos/etcd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/coreos/etcd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/coreos/etcd/git/refs{/sha}","trees_url":"https://api.github.com/repos/coreos/etcd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/coreos/etcd/statuses/{sha}","languages_url":"https://api.github.com/repos/coreos/etcd/languages","stargazers_url":"https://api.github.com/repos/coreos/etcd/stargazers","contributors_url":"https://api.github.com/repos/coreos/etcd/contributors","subscribers_url":"https://api.github.com/repos/coreos/etcd/subscribers","subscription_url":"https://api.github.com/repos/coreos/etcd/subscription","commits_url":"https://api.github.com/repos/coreos/etcd/commits{/sha}","git_commits_url":"https://api.github.com/repos/coreos/etcd/git/commits{/sha}","comments_url":"https://api.github.com/repos/coreos/etcd/comments{/number}","issue_comment_url":"https://api.github.com/repos/coreos/etcd/issues/comments{/number}","contents_url":"https://api.github.com/repos/coreos/etcd/contents/{+path}","compare_url":"https://api.github.com/repos/coreos/etcd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/coreos/etcd/merges","archive_url":"https://api.github.com/repos/coreos/etcd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/coreos/etcd/downloads","issues_url":"https://api.github.com/repos/coreos/etcd/issues{/number}","pulls_url":"https://api.github.com/repos/coreos/etcd/pulls{/number}","milestones_url":"https://api.github.com/repos/coreos/etcd/milestones{/number}","notifications_url":"https://api.github.com/repos/coreos/etcd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/coreos/etcd/labels{/name}","releases_url":"https://api.github.com/repos/coreos/etcd/releases{/id}","created_at":"2013-07-06T21:57:21Z","updated_at":"2015-09-18T19:11:05Z","pushed_at":"2015-09-18T21:18:48Z","git_url":"git://github.com/coreos/etcd.git","ssh_url":"git@github.com:coreos/etcd.git","clone_url":"https://github.com/coreos/etcd.git","svn_url":"https://github.com/coreos/etcd","homepage":"","size":36072,"stargazers_count":7526,"watchers_count":7526,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1101,"mirror_url":null,"open_issues_count":110,"forks":1101,"open_issues":110,"watchers":7526,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/coreos/etcd/pulls/3555"},"html":{"href":"https://github.com/coreos/etcd/pull/3555"},"issue":{"href":"https://api.github.com/repos/coreos/etcd/issues/3555"},"comments":{"href":"https://api.github.com/repos/coreos/etcd/issues/3555/comments"},"review_comments":{"href":"https://api.github.com/repos/coreos/etcd/pulls/3555/comments"},"review_comment":{"href":"https://api.github.com/repos/coreos/etcd/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/coreos/etcd/pulls/3555/commits"},"statuses":{"href":"https://api.github.com/repos/coreos/etcd/statuses/11244558e9097c888f6c7744f6791c6edb28625d"}}}}