{"action":"created","comment":{"url":"https://api.github.com/repos/crowbar/crowbar-openstack/pulls/comments/132450924","pull_request_review_id":55532119,"id":132450924,"diff_hunk":"@@ -142,3 +142,30 @@\n crowbar_pacemaker_sync_mark \"sync-database_root_password\" do\n   revision node[:database][\"crowbar-revision\"]\n end\n+\n+include_recipe \"crowbar-pacemaker::haproxy\"\n+\n+founder = node_search_with_cache(\n+  \"pacemaker_founder:true AND pacemaker_config_environment:#{node[:pacemaker][:config][:environment]}\"\n+).first\n+founder_name = founder[:hostname]\n+\n+ha_servers = CrowbarPacemakerHelper.haproxy_servers_for_service(\n+  node, \"mysql\", \"database-server\", \"admin_port\"\n+)\n+\n+ha_servers = ha_servers.each do |n|\n+  # Let all nodes but one act as backup (standby) servers.\n+  # Backup server is only used when non-backup one is down. Thus we prevent possible deadlocks\n+  # from OpenStack services writing to the database on different nodes at once.\n+  n[\"backup\"] = n[\"name\"] != founder_name\n+end","path":"chef/cookbooks/mysql/recipes/ha_galera.rb","position":21,"original_position":21,"commit_id":"716cbc4b27641c1c02cd8716203d1996c3ffe1a6","original_commit_id":"da5c79d972c50071113735ab78bfcceff3aa192b","user":{"login":"jsuchome","id":910000,"avatar_url":"https://avatars2.githubusercontent.com/u/910000?v=4","gravatar_id":"","url":"https://api.github.com/users/jsuchome","html_url":"https://github.com/jsuchome","followers_url":"https://api.github.com/users/jsuchome/followers","following_url":"https://api.github.com/users/jsuchome/following{/other_user}","gists_url":"https://api.github.com/users/jsuchome/gists{/gist_id}","starred_url":"https://api.github.com/users/jsuchome/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsuchome/subscriptions","organizations_url":"https://api.github.com/users/jsuchome/orgs","repos_url":"https://api.github.com/users/jsuchome/repos","events_url":"https://api.github.com/users/jsuchome/events{/privacy}","received_events_url":"https://api.github.com/users/jsuchome/received_events","type":"User","site_admin":false},"body":"Good point, we do not care if it really is cluster founder.","created_at":"2017-08-10T13:24:24Z","updated_at":"2017-08-10T13:24:24Z","html_url":"https://github.com/crowbar/crowbar-openstack/pull/1123#discussion_r132450924","pull_request_url":"https://api.github.com/repos/crowbar/crowbar-openstack/pulls/1123","_links":{"self":{"href":"https://api.github.com/repos/crowbar/crowbar-openstack/pulls/comments/132450924"},"html":{"href":"https://github.com/crowbar/crowbar-openstack/pull/1123#discussion_r132450924"},"pull_request":{"href":"https://api.github.com/repos/crowbar/crowbar-openstack/pulls/1123"}}},"pull_request":{"url":"https://api.github.com/repos/crowbar/crowbar-openstack/pulls/1123","id":133943788,"html_url":"https://github.com/crowbar/crowbar-openstack/pull/1123","diff_url":"https://github.com/crowbar/crowbar-openstack/pull/1123.diff","patch_url":"https://github.com/crowbar/crowbar-openstack/pull/1123.patch","issue_url":"https://api.github.com/repos/crowbar/crowbar-openstack/issues/1123","number":1123,"state":"open","locked":false,"title":"HAProxy setup for mariadb (galera) cluster","user":{"login":"jsuchome","id":910000,"avatar_url":"https://avatars2.githubusercontent.com/u/910000?v=4","gravatar_id":"","url":"https://api.github.com/users/jsuchome","html_url":"https://github.com/jsuchome","followers_url":"https://api.github.com/users/jsuchome/followers","following_url":"https://api.github.com/users/jsuchome/following{/other_user}","gists_url":"https://api.github.com/users/jsuchome/gists{/gist_id}","starred_url":"https://api.github.com/users/jsuchome/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsuchome/subscriptions","organizations_url":"https://api.github.com/users/jsuchome/orgs","repos_url":"https://api.github.com/users/jsuchome/repos","events_url":"https://api.github.com/users/jsuchome/events{/privacy}","received_events_url":"https://api.github.com/users/jsuchome/received_events","type":"User","site_admin":false},"body":"Requires https://github.com/crowbar/crowbar-ha/pull/215","created_at":"2017-08-03T13:25:55Z","updated_at":"2017-08-10T13:24:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a44b04fb28c37e8942bf1c3bd173831da9914684","assignee":null,"assignees":[],"requested_reviewers":[{"login":"rsalevsky","id":4128547,"avatar_url":"https://avatars1.githubusercontent.com/u/4128547?v=4","gravatar_id":"","url":"https://api.github.com/users/rsalevsky","html_url":"https://github.com/rsalevsky","followers_url":"https://api.github.com/users/rsalevsky/followers","following_url":"https://api.github.com/users/rsalevsky/following{/other_user}","gists_url":"https://api.github.com/users/rsalevsky/gists{/gist_id}","starred_url":"https://api.github.com/users/rsalevsky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rsalevsky/subscriptions","organizations_url":"https://api.github.com/users/rsalevsky/orgs","repos_url":"https://api.github.com/users/rsalevsky/repos","events_url":"https://api.github.com/users/rsalevsky/events{/privacy}","received_events_url":"https://api.github.com/users/rsalevsky/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/crowbar/crowbar-openstack/pulls/1123/commits","review_comments_url":"https://api.github.com/repos/crowbar/crowbar-openstack/pulls/1123/comments","review_comment_url":"https://api.github.com/repos/crowbar/crowbar-openstack/pulls/comments{/number}","comments_url":"https://api.github.com/repos/crowbar/crowbar-openstack/issues/1123/comments","statuses_url":"https://api.github.com/repos/crowbar/crowbar-openstack/statuses/716cbc4b27641c1c02cd8716203d1996c3ffe1a6","head":{"label":"jsuchome:haproxy","ref":"haproxy","sha":"716cbc4b27641c1c02cd8716203d1996c3ffe1a6","user":{"login":"jsuchome","id":910000,"avatar_url":"https://avatars2.githubusercontent.com/u/910000?v=4","gravatar_id":"","url":"https://api.github.com/users/jsuchome","html_url":"https://github.com/jsuchome","followers_url":"https://api.github.com/users/jsuchome/followers","following_url":"https://api.github.com/users/jsuchome/following{/other_user}","gists_url":"https://api.github.com/users/jsuchome/gists{/gist_id}","starred_url":"https://api.github.com/users/jsuchome/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsuchome/subscriptions","organizations_url":"https://api.github.com/users/jsuchome/orgs","repos_url":"https://api.github.com/users/jsuchome/repos","events_url":"https://api.github.com/users/jsuchome/events{/privacy}","received_events_url":"https://api.github.com/users/jsuchome/received_events","type":"User","site_admin":false},"repo":{"id":94176129,"name":"crowbar-openstack","full_name":"jsuchome/crowbar-openstack","owner":{"login":"jsuchome","id":910000,"avatar_url":"https://avatars2.githubusercontent.com/u/910000?v=4","gravatar_id":"","url":"https://api.github.com/users/jsuchome","html_url":"https://github.com/jsuchome","followers_url":"https://api.github.com/users/jsuchome/followers","following_url":"https://api.github.com/users/jsuchome/following{/other_user}","gists_url":"https://api.github.com/users/jsuchome/gists{/gist_id}","starred_url":"https://api.github.com/users/jsuchome/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsuchome/subscriptions","organizations_url":"https://api.github.com/users/jsuchome/orgs","repos_url":"https://api.github.com/users/jsuchome/repos","events_url":"https://api.github.com/users/jsuchome/events{/privacy}","received_events_url":"https://api.github.com/users/jsuchome/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jsuchome/crowbar-openstack","description":"Openstack deployment for Crowbar","fork":true,"url":"https://api.github.com/repos/jsuchome/crowbar-openstack","forks_url":"https://api.github.com/repos/jsuchome/crowbar-openstack/forks","keys_url":"https://api.github.com/repos/jsuchome/crowbar-openstack/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jsuchome/crowbar-openstack/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jsuchome/crowbar-openstack/teams","hooks_url":"https://api.github.com/repos/jsuchome/crowbar-openstack/hooks","issue_events_url":"https://api.github.com/repos/jsuchome/crowbar-openstack/issues/events{/number}","events_url":"https://api.github.com/repos/jsuchome/crowbar-openstack/events","assignees_url":"https://api.github.com/repos/jsuchome/crowbar-openstack/assignees{/user}","branches_url":"https://api.github.com/repos/jsuchome/crowbar-openstack/branches{/branch}","tags_url":"https://api.github.com/repos/jsuchome/crowbar-openstack/tags","blobs_url":"https://api.github.com/repos/jsuchome/crowbar-openstack/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jsuchome/crowbar-openstack/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jsuchome/crowbar-openstack/git/refs{/sha}","trees_url":"https://api.github.com/repos/jsuchome/crowbar-openstack/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jsuchome/crowbar-openstack/statuses/{sha}","languages_url":"https://api.github.com/repos/jsuchome/crowbar-openstack/languages","stargazers_url":"https://api.github.com/repos/jsuchome/crowbar-openstack/stargazers","contributors_url":"https://api.github.com/repos/jsuchome/crowbar-openstack/contributors","subscribers_url":"https://api.github.com/repos/jsuchome/crowbar-openstack/subscribers","subscription_url":"https://api.github.com/repos/jsuchome/crowbar-openstack/subscription","commits_url":"https://api.github.com/repos/jsuchome/crowbar-openstack/commits{/sha}","git_commits_url":"https://api.github.com/repos/jsuchome/crowbar-openstack/git/commits{/sha}","comments_url":"https://api.github.com/repos/jsuchome/crowbar-openstack/comments{/number}","issue_comment_url":"https://api.github.com/repos/jsuchome/crowbar-openstack/issues/comments{/number}","contents_url":"https://api.github.com/repos/jsuchome/crowbar-openstack/contents/{+path}","compare_url":"https://api.github.com/repos/jsuchome/crowbar-openstack/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jsuchome/crowbar-openstack/merges","archive_url":"https://api.github.com/repos/jsuchome/crowbar-openstack/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jsuchome/crowbar-openstack/downloads","issues_url":"https://api.github.com/repos/jsuchome/crowbar-openstack/issues{/number}","pulls_url":"https://api.github.com/repos/jsuchome/crowbar-openstack/pulls{/number}","milestones_url":"https://api.github.com/repos/jsuchome/crowbar-openstack/milestones{/number}","notifications_url":"https://api.github.com/repos/jsuchome/crowbar-openstack/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jsuchome/crowbar-openstack/labels{/name}","releases_url":"https://api.github.com/repos/jsuchome/crowbar-openstack/releases{/id}","deployments_url":"https://api.github.com/repos/jsuchome/crowbar-openstack/deployments","created_at":"2017-06-13T06:13:39Z","updated_at":"2017-06-13T06:13:43Z","pushed_at":"2017-08-10T07:46:09Z","git_url":"git://github.com/jsuchome/crowbar-openstack.git","ssh_url":"git@github.com:jsuchome/crowbar-openstack.git","clone_url":"https://github.com/jsuchome/crowbar-openstack.git","svn_url":"https://github.com/jsuchome/crowbar-openstack","homepage":null,"size":19325,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"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":"crowbar:master","ref":"master","sha":"9910a38b027459d7a088a50f1f91a223a4ebe866","user":{"login":"crowbar","id":2910205,"avatar_url":"https://avatars2.githubusercontent.com/u/2910205?v=4","gravatar_id":"","url":"https://api.github.com/users/crowbar","html_url":"https://github.com/crowbar","followers_url":"https://api.github.com/users/crowbar/followers","following_url":"https://api.github.com/users/crowbar/following{/other_user}","gists_url":"https://api.github.com/users/crowbar/gists{/gist_id}","starred_url":"https://api.github.com/users/crowbar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crowbar/subscriptions","organizations_url":"https://api.github.com/users/crowbar/orgs","repos_url":"https://api.github.com/users/crowbar/repos","events_url":"https://api.github.com/users/crowbar/events{/privacy}","received_events_url":"https://api.github.com/users/crowbar/received_events","type":"Organization","site_admin":false},"repo":{"id":39006903,"name":"crowbar-openstack","full_name":"crowbar/crowbar-openstack","owner":{"login":"crowbar","id":2910205,"avatar_url":"https://avatars2.githubusercontent.com/u/2910205?v=4","gravatar_id":"","url":"https://api.github.com/users/crowbar","html_url":"https://github.com/crowbar","followers_url":"https://api.github.com/users/crowbar/followers","following_url":"https://api.github.com/users/crowbar/following{/other_user}","gists_url":"https://api.github.com/users/crowbar/gists{/gist_id}","starred_url":"https://api.github.com/users/crowbar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crowbar/subscriptions","organizations_url":"https://api.github.com/users/crowbar/orgs","repos_url":"https://api.github.com/users/crowbar/repos","events_url":"https://api.github.com/users/crowbar/events{/privacy}","received_events_url":"https://api.github.com/users/crowbar/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/crowbar/crowbar-openstack","description":"Openstack deployment for Crowbar","fork":false,"url":"https://api.github.com/repos/crowbar/crowbar-openstack","forks_url":"https://api.github.com/repos/crowbar/crowbar-openstack/forks","keys_url":"https://api.github.com/repos/crowbar/crowbar-openstack/keys{/key_id}","collaborators_url":"https://api.github.com/repos/crowbar/crowbar-openstack/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/crowbar/crowbar-openstack/teams","hooks_url":"https://api.github.com/repos/crowbar/crowbar-openstack/hooks","issue_events_url":"https://api.github.com/repos/crowbar/crowbar-openstack/issues/events{/number}","events_url":"https://api.github.com/repos/crowbar/crowbar-openstack/events","assignees_url":"https://api.github.com/repos/crowbar/crowbar-openstack/assignees{/user}","branches_url":"https://api.github.com/repos/crowbar/crowbar-openstack/branches{/branch}","tags_url":"https://api.github.com/repos/crowbar/crowbar-openstack/tags","blobs_url":"https://api.github.com/repos/crowbar/crowbar-openstack/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/crowbar/crowbar-openstack/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/crowbar/crowbar-openstack/git/refs{/sha}","trees_url":"https://api.github.com/repos/crowbar/crowbar-openstack/git/trees{/sha}","statuses_url":"https://api.github.com/repos/crowbar/crowbar-openstack/statuses/{sha}","languages_url":"https://api.github.com/repos/crowbar/crowbar-openstack/languages","stargazers_url":"https://api.github.com/repos/crowbar/crowbar-openstack/stargazers","contributors_url":"https://api.github.com/repos/crowbar/crowbar-openstack/contributors","subscribers_url":"https://api.github.com/repos/crowbar/crowbar-openstack/subscribers","subscription_url":"https://api.github.com/repos/crowbar/crowbar-openstack/subscription","commits_url":"https://api.github.com/repos/crowbar/crowbar-openstack/commits{/sha}","git_commits_url":"https://api.github.com/repos/crowbar/crowbar-openstack/git/commits{/sha}","comments_url":"https://api.github.com/repos/crowbar/crowbar-openstack/comments{/number}","issue_comment_url":"https://api.github.com/repos/crowbar/crowbar-openstack/issues/comments{/number}","contents_url":"https://api.github.com/repos/crowbar/crowbar-openstack/contents/{+path}","compare_url":"https://api.github.com/repos/crowbar/crowbar-openstack/compare/{base}...{head}","merges_url":"https://api.github.com/repos/crowbar/crowbar-openstack/merges","archive_url":"https://api.github.com/repos/crowbar/crowbar-openstack/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/crowbar/crowbar-openstack/downloads","issues_url":"https://api.github.com/repos/crowbar/crowbar-openstack/issues{/number}","pulls_url":"https://api.github.com/repos/crowbar/crowbar-openstack/pulls{/number}","milestones_url":"https://api.github.com/repos/crowbar/crowbar-openstack/milestones{/number}","notifications_url":"https://api.github.com/repos/crowbar/crowbar-openstack/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/crowbar/crowbar-openstack/labels{/name}","releases_url":"https://api.github.com/repos/crowbar/crowbar-openstack/releases{/id}","deployments_url":"https://api.github.com/repos/crowbar/crowbar-openstack/deployments","created_at":"2015-07-13T10:55:33Z","updated_at":"2017-08-02T21:11:02Z","pushed_at":"2017-08-10T12:45:31Z","git_url":"git://github.com/crowbar/crowbar-openstack.git","ssh_url":"git@github.com:crowbar/crowbar-openstack.git","clone_url":"https://github.com/crowbar/crowbar-openstack.git","svn_url":"https://github.com/crowbar/crowbar-openstack","homepage":null,"size":19335,"stargazers_count":13,"watchers_count":13,"language":"Ruby","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":63,"mirror_url":null,"open_issues_count":67,"forks":63,"open_issues":67,"watchers":13,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/crowbar/crowbar-openstack/pulls/1123"},"html":{"href":"https://github.com/crowbar/crowbar-openstack/pull/1123"},"issue":{"href":"https://api.github.com/repos/crowbar/crowbar-openstack/issues/1123"},"comments":{"href":"https://api.github.com/repos/crowbar/crowbar-openstack/issues/1123/comments"},"review_comments":{"href":"https://api.github.com/repos/crowbar/crowbar-openstack/pulls/1123/comments"},"review_comment":{"href":"https://api.github.com/repos/crowbar/crowbar-openstack/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/crowbar/crowbar-openstack/pulls/1123/commits"},"statuses":{"href":"https://api.github.com/repos/crowbar/crowbar-openstack/statuses/716cbc4b27641c1c02cd8716203d1996c3ffe1a6"}}}}
{"actor":{"display_login":"jsuchome"}}