{"action":"created","comment":{"url":"https://api.github.com/repos/Mirantis/k8s-AppController/pulls/comments/87012369","pull_request_review_id":7641370,"id":87012369,"diff_hunk":"@@ -0,0 +1,29 @@\n+# AppController Mysql Multi Slave research\n+\n+This research is meant to provide a guidance on how to achieve ability of AppController-deployed Mysql Multi Slave cluster to cope with losing the master node by promoting one of slave nodes to master.\n+This is an example which will allow us to use AC for complicated lcm cases.\n+\n+MySQL Masters should not be restarted. If the master node crashes, the pod eligible for promotion is transformed into master. Each pod eligible for promotion should have an executable which will perform it's promotion.\n+\n+AC will need additional process traversing the deployment graph and checking the state of vertices. If the vertex is not ready and has deployed children, we need to take action, which will be defined in an annotation in the pod. We need a DSL for defining these actions, which will allow AC to read specification of these action and run them. This could be the implementation of `failurePolicy` from failure-handling research.\n+\n+Suggested annotation format:\n+```\n+{\n+  \"onFail\": [\n+    {\"type\": \"exec\", \"cmd\": \"promote_to_master.sh\", \"oneOf\": [\"slave1, slave2, slave3\"]}, # promote one of slaves to master\n+    {\"type\": \"create\", \"template\": \"slave pod template\"} # create new slave pod which will replicate new master\n+  ]","path":"docs/research/lcm.md","position":null,"original_position":16,"commit_id":"30c5970922a689e384995fff6ddb8efe560eec32","original_commit_id":"9d18d105a182a921a7094c4bd244d3ee681f0441","user":{"login":"pigmej","id":496754,"avatar_url":"https://avatars.githubusercontent.com/u/496754?v=3","gravatar_id":"","url":"https://api.github.com/users/pigmej","html_url":"https://github.com/pigmej","followers_url":"https://api.github.com/users/pigmej/followers","following_url":"https://api.github.com/users/pigmej/following{/other_user}","gists_url":"https://api.github.com/users/pigmej/gists{/gist_id}","starred_url":"https://api.github.com/users/pigmej/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pigmej/subscriptions","organizations_url":"https://api.github.com/users/pigmej/orgs","repos_url":"https://api.github.com/users/pigmej/repos","events_url":"https://api.github.com/users/pigmej/events{/privacy}","received_events_url":"https://api.github.com/users/pigmej/received_events","type":"User","site_admin":false},"body":"@dshulyak answering your question, nothing very bad will happen, because user will be redirected to \"new\" master (user should connect to mysql_matser service), and even if old master will be online, noone will be able to connect to it (obviously not immediately), and slaves will talk to new master, so nothing wrong in long term.","created_at":"2016-11-08T15:30:59Z","updated_at":"2016-11-08T15:31:00Z","html_url":"https://github.com/Mirantis/k8s-AppController/pull/101#discussion_r87012369","pull_request_url":"https://api.github.com/repos/Mirantis/k8s-AppController/pulls/101","_links":{"self":{"href":"https://api.github.com/repos/Mirantis/k8s-AppController/pulls/comments/87012369"},"html":{"href":"https://github.com/Mirantis/k8s-AppController/pull/101#discussion_r87012369"},"pull_request":{"href":"https://api.github.com/repos/Mirantis/k8s-AppController/pulls/101"}}},"pull_request":{"url":"https://api.github.com/repos/Mirantis/k8s-AppController/pulls/101","id":92552277,"html_url":"https://github.com/Mirantis/k8s-AppController/pull/101","diff_url":"https://github.com/Mirantis/k8s-AppController/pull/101.diff","patch_url":"https://github.com/Mirantis/k8s-AppController/pull/101.patch","issue_url":"https://api.github.com/repos/Mirantis/k8s-AppController/issues/101","number":101,"state":"open","locked":false,"title":"lcm research","user":{"login":"nebril","id":1417888,"avatar_url":"https://avatars.githubusercontent.com/u/1417888?v=3","gravatar_id":"","url":"https://api.github.com/users/nebril","html_url":"https://github.com/nebril","followers_url":"https://api.github.com/users/nebril/followers","following_url":"https://api.github.com/users/nebril/following{/other_user}","gists_url":"https://api.github.com/users/nebril/gists{/gist_id}","starred_url":"https://api.github.com/users/nebril/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nebril/subscriptions","organizations_url":"https://api.github.com/users/nebril/orgs","repos_url":"https://api.github.com/users/nebril/repos","events_url":"https://api.github.com/users/nebril/events{/privacy}","received_events_url":"https://api.github.com/users/nebril/received_events","type":"User","site_admin":false},"body":"\n\n<!-- Reviewable:start -->\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/mirantis/k8s-appcontroller/101)\n<!-- Reviewable:end -->\n","created_at":"2016-11-07T09:55:18Z","updated_at":"2016-11-08T15:31:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dcc1739034077384fa193059a401b1d21c76cdc3","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Mirantis/k8s-AppController/pulls/101/commits","review_comments_url":"https://api.github.com/repos/Mirantis/k8s-AppController/pulls/101/comments","review_comment_url":"https://api.github.com/repos/Mirantis/k8s-AppController/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Mirantis/k8s-AppController/issues/101/comments","statuses_url":"https://api.github.com/repos/Mirantis/k8s-AppController/statuses/30c5970922a689e384995fff6ddb8efe560eec32","head":{"label":"Mirantis:live-example-research","ref":"live-example-research","sha":"30c5970922a689e384995fff6ddb8efe560eec32","user":{"login":"Mirantis","id":609319,"avatar_url":"https://avatars.githubusercontent.com/u/609319?v=3","gravatar_id":"","url":"https://api.github.com/users/Mirantis","html_url":"https://github.com/Mirantis","followers_url":"https://api.github.com/users/Mirantis/followers","following_url":"https://api.github.com/users/Mirantis/following{/other_user}","gists_url":"https://api.github.com/users/Mirantis/gists{/gist_id}","starred_url":"https://api.github.com/users/Mirantis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mirantis/subscriptions","organizations_url":"https://api.github.com/users/Mirantis/orgs","repos_url":"https://api.github.com/users/Mirantis/repos","events_url":"https://api.github.com/users/Mirantis/events{/privacy}","received_events_url":"https://api.github.com/users/Mirantis/received_events","type":"Organization","site_admin":false},"repo":{"id":64461564,"name":"k8s-AppController","full_name":"Mirantis/k8s-AppController","owner":{"login":"Mirantis","id":609319,"avatar_url":"https://avatars.githubusercontent.com/u/609319?v=3","gravatar_id":"","url":"https://api.github.com/users/Mirantis","html_url":"https://github.com/Mirantis","followers_url":"https://api.github.com/users/Mirantis/followers","following_url":"https://api.github.com/users/Mirantis/following{/other_user}","gists_url":"https://api.github.com/users/Mirantis/gists{/gist_id}","starred_url":"https://api.github.com/users/Mirantis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mirantis/subscriptions","organizations_url":"https://api.github.com/users/Mirantis/orgs","repos_url":"https://api.github.com/users/Mirantis/repos","events_url":"https://api.github.com/users/Mirantis/events{/privacy}","received_events_url":"https://api.github.com/users/Mirantis/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Mirantis/k8s-AppController","description":"AppController is a pod that you can spawn in your Kubernetes cluster which will take care of your complex deployments for you.","fork":false,"url":"https://api.github.com/repos/Mirantis/k8s-AppController","forks_url":"https://api.github.com/repos/Mirantis/k8s-AppController/forks","keys_url":"https://api.github.com/repos/Mirantis/k8s-AppController/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Mirantis/k8s-AppController/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Mirantis/k8s-AppController/teams","hooks_url":"https://api.github.com/repos/Mirantis/k8s-AppController/hooks","issue_events_url":"https://api.github.com/repos/Mirantis/k8s-AppController/issues/events{/number}","events_url":"https://api.github.com/repos/Mirantis/k8s-AppController/events","assignees_url":"https://api.github.com/repos/Mirantis/k8s-AppController/assignees{/user}","branches_url":"https://api.github.com/repos/Mirantis/k8s-AppController/branches{/branch}","tags_url":"https://api.github.com/repos/Mirantis/k8s-AppController/tags","blobs_url":"https://api.github.com/repos/Mirantis/k8s-AppController/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Mirantis/k8s-AppController/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Mirantis/k8s-AppController/git/refs{/sha}","trees_url":"https://api.github.com/repos/Mirantis/k8s-AppController/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Mirantis/k8s-AppController/statuses/{sha}","languages_url":"https://api.github.com/repos/Mirantis/k8s-AppController/languages","stargazers_url":"https://api.github.com/repos/Mirantis/k8s-AppController/stargazers","contributors_url":"https://api.github.com/repos/Mirantis/k8s-AppController/contributors","subscribers_url":"https://api.github.com/repos/Mirantis/k8s-AppController/subscribers","subscription_url":"https://api.github.com/repos/Mirantis/k8s-AppController/subscription","commits_url":"https://api.github.com/repos/Mirantis/k8s-AppController/commits{/sha}","git_commits_url":"https://api.github.com/repos/Mirantis/k8s-AppController/git/commits{/sha}","comments_url":"https://api.github.com/repos/Mirantis/k8s-AppController/comments{/number}","issue_comment_url":"https://api.github.com/repos/Mirantis/k8s-AppController/issues/comments{/number}","contents_url":"https://api.github.com/repos/Mirantis/k8s-AppController/contents/{+path}","compare_url":"https://api.github.com/repos/Mirantis/k8s-AppController/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Mirantis/k8s-AppController/merges","archive_url":"https://api.github.com/repos/Mirantis/k8s-AppController/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Mirantis/k8s-AppController/downloads","issues_url":"https://api.github.com/repos/Mirantis/k8s-AppController/issues{/number}","pulls_url":"https://api.github.com/repos/Mirantis/k8s-AppController/pulls{/number}","milestones_url":"https://api.github.com/repos/Mirantis/k8s-AppController/milestones{/number}","notifications_url":"https://api.github.com/repos/Mirantis/k8s-AppController/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Mirantis/k8s-AppController/labels{/name}","releases_url":"https://api.github.com/repos/Mirantis/k8s-AppController/releases{/id}","deployments_url":"https://api.github.com/repos/Mirantis/k8s-AppController/deployments","created_at":"2016-07-29T07:47:46Z","updated_at":"2016-11-03T09:38:13Z","pushed_at":"2016-11-08T13:42:50Z","git_url":"git://github.com/Mirantis/k8s-AppController.git","ssh_url":"git@github.com:Mirantis/k8s-AppController.git","clone_url":"https://github.com/Mirantis/k8s-AppController.git","svn_url":"https://github.com/Mirantis/k8s-AppController","homepage":"","size":10401,"stargazers_count":19,"watchers_count":19,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":9,"forks":6,"open_issues":9,"watchers":19,"default_branch":"master"}},"base":{"label":"Mirantis:master","ref":"master","sha":"0a72fdc34c36af5fbca8518e87aa2f6d73209e1f","user":{"login":"Mirantis","id":609319,"avatar_url":"https://avatars.githubusercontent.com/u/609319?v=3","gravatar_id":"","url":"https://api.github.com/users/Mirantis","html_url":"https://github.com/Mirantis","followers_url":"https://api.github.com/users/Mirantis/followers","following_url":"https://api.github.com/users/Mirantis/following{/other_user}","gists_url":"https://api.github.com/users/Mirantis/gists{/gist_id}","starred_url":"https://api.github.com/users/Mirantis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mirantis/subscriptions","organizations_url":"https://api.github.com/users/Mirantis/orgs","repos_url":"https://api.github.com/users/Mirantis/repos","events_url":"https://api.github.com/users/Mirantis/events{/privacy}","received_events_url":"https://api.github.com/users/Mirantis/received_events","type":"Organization","site_admin":false},"repo":{"id":64461564,"name":"k8s-AppController","full_name":"Mirantis/k8s-AppController","owner":{"login":"Mirantis","id":609319,"avatar_url":"https://avatars.githubusercontent.com/u/609319?v=3","gravatar_id":"","url":"https://api.github.com/users/Mirantis","html_url":"https://github.com/Mirantis","followers_url":"https://api.github.com/users/Mirantis/followers","following_url":"https://api.github.com/users/Mirantis/following{/other_user}","gists_url":"https://api.github.com/users/Mirantis/gists{/gist_id}","starred_url":"https://api.github.com/users/Mirantis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mirantis/subscriptions","organizations_url":"https://api.github.com/users/Mirantis/orgs","repos_url":"https://api.github.com/users/Mirantis/repos","events_url":"https://api.github.com/users/Mirantis/events{/privacy}","received_events_url":"https://api.github.com/users/Mirantis/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Mirantis/k8s-AppController","description":"AppController is a pod that you can spawn in your Kubernetes cluster which will take care of your complex deployments for you.","fork":false,"url":"https://api.github.com/repos/Mirantis/k8s-AppController","forks_url":"https://api.github.com/repos/Mirantis/k8s-AppController/forks","keys_url":"https://api.github.com/repos/Mirantis/k8s-AppController/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Mirantis/k8s-AppController/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Mirantis/k8s-AppController/teams","hooks_url":"https://api.github.com/repos/Mirantis/k8s-AppController/hooks","issue_events_url":"https://api.github.com/repos/Mirantis/k8s-AppController/issues/events{/number}","events_url":"https://api.github.com/repos/Mirantis/k8s-AppController/events","assignees_url":"https://api.github.com/repos/Mirantis/k8s-AppController/assignees{/user}","branches_url":"https://api.github.com/repos/Mirantis/k8s-AppController/branches{/branch}","tags_url":"https://api.github.com/repos/Mirantis/k8s-AppController/tags","blobs_url":"https://api.github.com/repos/Mirantis/k8s-AppController/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Mirantis/k8s-AppController/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Mirantis/k8s-AppController/git/refs{/sha}","trees_url":"https://api.github.com/repos/Mirantis/k8s-AppController/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Mirantis/k8s-AppController/statuses/{sha}","languages_url":"https://api.github.com/repos/Mirantis/k8s-AppController/languages","stargazers_url":"https://api.github.com/repos/Mirantis/k8s-AppController/stargazers","contributors_url":"https://api.github.com/repos/Mirantis/k8s-AppController/contributors","subscribers_url":"https://api.github.com/repos/Mirantis/k8s-AppController/subscribers","subscription_url":"https://api.github.com/repos/Mirantis/k8s-AppController/subscription","commits_url":"https://api.github.com/repos/Mirantis/k8s-AppController/commits{/sha}","git_commits_url":"https://api.github.com/repos/Mirantis/k8s-AppController/git/commits{/sha}","comments_url":"https://api.github.com/repos/Mirantis/k8s-AppController/comments{/number}","issue_comment_url":"https://api.github.com/repos/Mirantis/k8s-AppController/issues/comments{/number}","contents_url":"https://api.github.com/repos/Mirantis/k8s-AppController/contents/{+path}","compare_url":"https://api.github.com/repos/Mirantis/k8s-AppController/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Mirantis/k8s-AppController/merges","archive_url":"https://api.github.com/repos/Mirantis/k8s-AppController/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Mirantis/k8s-AppController/downloads","issues_url":"https://api.github.com/repos/Mirantis/k8s-AppController/issues{/number}","pulls_url":"https://api.github.com/repos/Mirantis/k8s-AppController/pulls{/number}","milestones_url":"https://api.github.com/repos/Mirantis/k8s-AppController/milestones{/number}","notifications_url":"https://api.github.com/repos/Mirantis/k8s-AppController/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Mirantis/k8s-AppController/labels{/name}","releases_url":"https://api.github.com/repos/Mirantis/k8s-AppController/releases{/id}","deployments_url":"https://api.github.com/repos/Mirantis/k8s-AppController/deployments","created_at":"2016-07-29T07:47:46Z","updated_at":"2016-11-03T09:38:13Z","pushed_at":"2016-11-08T13:42:50Z","git_url":"git://github.com/Mirantis/k8s-AppController.git","ssh_url":"git@github.com:Mirantis/k8s-AppController.git","clone_url":"https://github.com/Mirantis/k8s-AppController.git","svn_url":"https://github.com/Mirantis/k8s-AppController","homepage":"","size":10401,"stargazers_count":19,"watchers_count":19,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":9,"forks":6,"open_issues":9,"watchers":19,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Mirantis/k8s-AppController/pulls/101"},"html":{"href":"https://github.com/Mirantis/k8s-AppController/pull/101"},"issue":{"href":"https://api.github.com/repos/Mirantis/k8s-AppController/issues/101"},"comments":{"href":"https://api.github.com/repos/Mirantis/k8s-AppController/issues/101/comments"},"review_comments":{"href":"https://api.github.com/repos/Mirantis/k8s-AppController/pulls/101/comments"},"review_comment":{"href":"https://api.github.com/repos/Mirantis/k8s-AppController/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Mirantis/k8s-AppController/pulls/101/commits"},"statuses":{"href":"https://api.github.com/repos/Mirantis/k8s-AppController/statuses/30c5970922a689e384995fff6ddb8efe560eec32"}}}}
{"actor":{"display_login":"pigmej"}}