{"action":"created","comment":{"url":"https://api.github.com/repos/ClusterLabs/resource-agents/pulls/comments/53638113","id":53638113,"diff_hunk":"@@ -411,9 +411,9 @@ get_read_only() {\n     local read_only_state\n \n     read_only_state=`$MYSQL $MYSQL_OPTIONS_REPL \\\n-        -e \"SHOW VARIABLES\" | grep read_only | awk '{print $2}'`\n+        -ss -e \"SHOW GLOBAL VARIABLES LIKE 'read_only'\"\n \n-    if [ \"$read_only_state\" = \"ON\" ]; then\n+    if [ $read_only_state =~ '*ON' ]; then","path":"heartbeat/mysql","position":8,"original_position":8,"commit_id":"7f40381d6ed7ff7ed48e99fede02b34c495d4dba","original_commit_id":"7f40381d6ed7ff7ed48e99fede02b34c495d4dba","user":{"login":"dmuhamedagic","id":638318,"avatar_url":"https://avatars.githubusercontent.com/u/638318?v=3","gravatar_id":"","url":"https://api.github.com/users/dmuhamedagic","html_url":"https://github.com/dmuhamedagic","followers_url":"https://api.github.com/users/dmuhamedagic/followers","following_url":"https://api.github.com/users/dmuhamedagic/following{/other_user}","gists_url":"https://api.github.com/users/dmuhamedagic/gists{/gist_id}","starred_url":"https://api.github.com/users/dmuhamedagic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmuhamedagic/subscriptions","organizations_url":"https://api.github.com/users/dmuhamedagic/orgs","repos_url":"https://api.github.com/users/dmuhamedagic/repos","events_url":"https://api.github.com/users/dmuhamedagic/events{/privacy}","received_events_url":"https://api.github.com/users/dmuhamedagic/received_events","type":"User","site_admin":false},"body":"On Mon, Feb 22, 2016 at 07:14:15AM -0800, Kristoffer Grönlund wrote:\n> >  \n> > -    if [ \"$read_only_state\" = \"ON\" ]; then\n> > +    if [ $read_only_state =~ '*ON' ]; then\n> \n> `=~` is not in POSIX test either\n\nRight, so it shouldn't be used. Just wanted to warn about\nintroducing stuff which aren't available in /bin/sh.\n","created_at":"2016-02-22T15:16:34Z","updated_at":"2016-02-22T15:16:34Z","html_url":"https://github.com/ClusterLabs/resource-agents/pull/406#discussion_r53638113","pull_request_url":"https://api.github.com/repos/ClusterLabs/resource-agents/pulls/406","_links":{"self":{"href":"https://api.github.com/repos/ClusterLabs/resource-agents/pulls/comments/53638113"},"html":{"href":"https://github.com/ClusterLabs/resource-agents/pull/406#discussion_r53638113"},"pull_request":{"href":"https://api.github.com/repos/ClusterLabs/resource-agents/pulls/406"}}},"pull_request":{"url":"https://api.github.com/repos/ClusterLabs/resource-agents/pulls/406","id":14328889,"html_url":"https://github.com/ClusterLabs/resource-agents/pull/406","diff_url":"https://github.com/ClusterLabs/resource-agents/pull/406.diff","patch_url":"https://github.com/ClusterLabs/resource-agents/pull/406.patch","issue_url":"https://api.github.com/repos/ClusterLabs/resource-agents/issues/406","number":406,"state":"open","locked":false,"title":"mysql: Pull out the correct variable when setting read-only mode","user":{"login":"symonds","id":3440084,"avatar_url":"https://avatars.githubusercontent.com/u/3440084?v=3","gravatar_id":"","url":"https://api.github.com/users/symonds","html_url":"https://github.com/symonds","followers_url":"https://api.github.com/users/symonds/followers","following_url":"https://api.github.com/users/symonds/following{/other_user}","gists_url":"https://api.github.com/users/symonds/gists{/gist_id}","starred_url":"https://api.github.com/users/symonds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/symonds/subscriptions","organizations_url":"https://api.github.com/users/symonds/orgs","repos_url":"https://api.github.com/users/symonds/repos","events_url":"https://api.github.com/users/symonds/events{/privacy}","received_events_url":"https://api.github.com/users/symonds/received_events","type":"User","site_admin":false},"body":"MariaDB10 has 3 variables that include read_only. Pull out the correct variable instead of grep'ing for it.","created_at":"2014-04-03T12:37:18Z","updated_at":"2016-02-22T15:16:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b2320f1569ab36f0bd2fb9b810b7d62fd515b810","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ClusterLabs/resource-agents/pulls/406/commits","review_comments_url":"https://api.github.com/repos/ClusterLabs/resource-agents/pulls/406/comments","review_comment_url":"https://api.github.com/repos/ClusterLabs/resource-agents/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ClusterLabs/resource-agents/issues/406/comments","statuses_url":"https://api.github.com/repos/ClusterLabs/resource-agents/statuses/7f40381d6ed7ff7ed48e99fede02b34c495d4dba","head":{"label":"symonds:master","ref":"master","sha":"7f40381d6ed7ff7ed48e99fede02b34c495d4dba","user":{"login":"symonds","id":3440084,"avatar_url":"https://avatars.githubusercontent.com/u/3440084?v=3","gravatar_id":"","url":"https://api.github.com/users/symonds","html_url":"https://github.com/symonds","followers_url":"https://api.github.com/users/symonds/followers","following_url":"https://api.github.com/users/symonds/following{/other_user}","gists_url":"https://api.github.com/users/symonds/gists{/gist_id}","starred_url":"https://api.github.com/users/symonds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/symonds/subscriptions","organizations_url":"https://api.github.com/users/symonds/orgs","repos_url":"https://api.github.com/users/symonds/repos","events_url":"https://api.github.com/users/symonds/events{/privacy}","received_events_url":"https://api.github.com/users/symonds/received_events","type":"User","site_admin":false},"repo":{"id":18402287,"name":"resource-agents","full_name":"symonds/resource-agents","owner":{"login":"symonds","id":3440084,"avatar_url":"https://avatars.githubusercontent.com/u/3440084?v=3","gravatar_id":"","url":"https://api.github.com/users/symonds","html_url":"https://github.com/symonds","followers_url":"https://api.github.com/users/symonds/followers","following_url":"https://api.github.com/users/symonds/following{/other_user}","gists_url":"https://api.github.com/users/symonds/gists{/gist_id}","starred_url":"https://api.github.com/users/symonds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/symonds/subscriptions","organizations_url":"https://api.github.com/users/symonds/orgs","repos_url":"https://api.github.com/users/symonds/repos","events_url":"https://api.github.com/users/symonds/events{/privacy}","received_events_url":"https://api.github.com/users/symonds/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/symonds/resource-agents","description":"Combined repository of OCF agents from the RHCS and Linux-HA projects","fork":true,"url":"https://api.github.com/repos/symonds/resource-agents","forks_url":"https://api.github.com/repos/symonds/resource-agents/forks","keys_url":"https://api.github.com/repos/symonds/resource-agents/keys{/key_id}","collaborators_url":"https://api.github.com/repos/symonds/resource-agents/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/symonds/resource-agents/teams","hooks_url":"https://api.github.com/repos/symonds/resource-agents/hooks","issue_events_url":"https://api.github.com/repos/symonds/resource-agents/issues/events{/number}","events_url":"https://api.github.com/repos/symonds/resource-agents/events","assignees_url":"https://api.github.com/repos/symonds/resource-agents/assignees{/user}","branches_url":"https://api.github.com/repos/symonds/resource-agents/branches{/branch}","tags_url":"https://api.github.com/repos/symonds/resource-agents/tags","blobs_url":"https://api.github.com/repos/symonds/resource-agents/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/symonds/resource-agents/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/symonds/resource-agents/git/refs{/sha}","trees_url":"https://api.github.com/repos/symonds/resource-agents/git/trees{/sha}","statuses_url":"https://api.github.com/repos/symonds/resource-agents/statuses/{sha}","languages_url":"https://api.github.com/repos/symonds/resource-agents/languages","stargazers_url":"https://api.github.com/repos/symonds/resource-agents/stargazers","contributors_url":"https://api.github.com/repos/symonds/resource-agents/contributors","subscribers_url":"https://api.github.com/repos/symonds/resource-agents/subscribers","subscription_url":"https://api.github.com/repos/symonds/resource-agents/subscription","commits_url":"https://api.github.com/repos/symonds/resource-agents/commits{/sha}","git_commits_url":"https://api.github.com/repos/symonds/resource-agents/git/commits{/sha}","comments_url":"https://api.github.com/repos/symonds/resource-agents/comments{/number}","issue_comment_url":"https://api.github.com/repos/symonds/resource-agents/issues/comments{/number}","contents_url":"https://api.github.com/repos/symonds/resource-agents/contents/{+path}","compare_url":"https://api.github.com/repos/symonds/resource-agents/compare/{base}...{head}","merges_url":"https://api.github.com/repos/symonds/resource-agents/merges","archive_url":"https://api.github.com/repos/symonds/resource-agents/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/symonds/resource-agents/downloads","issues_url":"https://api.github.com/repos/symonds/resource-agents/issues{/number}","pulls_url":"https://api.github.com/repos/symonds/resource-agents/pulls{/number}","milestones_url":"https://api.github.com/repos/symonds/resource-agents/milestones{/number}","notifications_url":"https://api.github.com/repos/symonds/resource-agents/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/symonds/resource-agents/labels{/name}","releases_url":"https://api.github.com/repos/symonds/resource-agents/releases{/id}","deployments_url":"https://api.github.com/repos/symonds/resource-agents/deployments","created_at":"2014-04-03T12:31:45Z","updated_at":"2015-05-05T15:37:43Z","pushed_at":"2015-04-21T14:46:46Z","git_url":"git://github.com/symonds/resource-agents.git","ssh_url":"git@github.com:symonds/resource-agents.git","clone_url":"https://github.com/symonds/resource-agents.git","svn_url":"https://github.com/symonds/resource-agents","homepage":"","size":31654,"stargazers_count":1,"watchers_count":1,"language":"Shell","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":1,"default_branch":"master"}},"base":{"label":"ClusterLabs:master","ref":"master","sha":"011b0514090e29f626349a81cd0d12408f3732b4","user":{"login":"ClusterLabs","id":574912,"avatar_url":"https://avatars.githubusercontent.com/u/574912?v=3","gravatar_id":"","url":"https://api.github.com/users/ClusterLabs","html_url":"https://github.com/ClusterLabs","followers_url":"https://api.github.com/users/ClusterLabs/followers","following_url":"https://api.github.com/users/ClusterLabs/following{/other_user}","gists_url":"https://api.github.com/users/ClusterLabs/gists{/gist_id}","starred_url":"https://api.github.com/users/ClusterLabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ClusterLabs/subscriptions","organizations_url":"https://api.github.com/users/ClusterLabs/orgs","repos_url":"https://api.github.com/users/ClusterLabs/repos","events_url":"https://api.github.com/users/ClusterLabs/events{/privacy}","received_events_url":"https://api.github.com/users/ClusterLabs/received_events","type":"Organization","site_admin":false},"repo":{"id":1316191,"name":"resource-agents","full_name":"ClusterLabs/resource-agents","owner":{"login":"ClusterLabs","id":574912,"avatar_url":"https://avatars.githubusercontent.com/u/574912?v=3","gravatar_id":"","url":"https://api.github.com/users/ClusterLabs","html_url":"https://github.com/ClusterLabs","followers_url":"https://api.github.com/users/ClusterLabs/followers","following_url":"https://api.github.com/users/ClusterLabs/following{/other_user}","gists_url":"https://api.github.com/users/ClusterLabs/gists{/gist_id}","starred_url":"https://api.github.com/users/ClusterLabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ClusterLabs/subscriptions","organizations_url":"https://api.github.com/users/ClusterLabs/orgs","repos_url":"https://api.github.com/users/ClusterLabs/repos","events_url":"https://api.github.com/users/ClusterLabs/events{/privacy}","received_events_url":"https://api.github.com/users/ClusterLabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ClusterLabs/resource-agents","description":"Combined repository of OCF agents from the RHCS and Linux-HA projects","fork":false,"url":"https://api.github.com/repos/ClusterLabs/resource-agents","forks_url":"https://api.github.com/repos/ClusterLabs/resource-agents/forks","keys_url":"https://api.github.com/repos/ClusterLabs/resource-agents/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ClusterLabs/resource-agents/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ClusterLabs/resource-agents/teams","hooks_url":"https://api.github.com/repos/ClusterLabs/resource-agents/hooks","issue_events_url":"https://api.github.com/repos/ClusterLabs/resource-agents/issues/events{/number}","events_url":"https://api.github.com/repos/ClusterLabs/resource-agents/events","assignees_url":"https://api.github.com/repos/ClusterLabs/resource-agents/assignees{/user}","branches_url":"https://api.github.com/repos/ClusterLabs/resource-agents/branches{/branch}","tags_url":"https://api.github.com/repos/ClusterLabs/resource-agents/tags","blobs_url":"https://api.github.com/repos/ClusterLabs/resource-agents/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ClusterLabs/resource-agents/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ClusterLabs/resource-agents/git/refs{/sha}","trees_url":"https://api.github.com/repos/ClusterLabs/resource-agents/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ClusterLabs/resource-agents/statuses/{sha}","languages_url":"https://api.github.com/repos/ClusterLabs/resource-agents/languages","stargazers_url":"https://api.github.com/repos/ClusterLabs/resource-agents/stargazers","contributors_url":"https://api.github.com/repos/ClusterLabs/resource-agents/contributors","subscribers_url":"https://api.github.com/repos/ClusterLabs/resource-agents/subscribers","subscription_url":"https://api.github.com/repos/ClusterLabs/resource-agents/subscription","commits_url":"https://api.github.com/repos/ClusterLabs/resource-agents/commits{/sha}","git_commits_url":"https://api.github.com/repos/ClusterLabs/resource-agents/git/commits{/sha}","comments_url":"https://api.github.com/repos/ClusterLabs/resource-agents/comments{/number}","issue_comment_url":"https://api.github.com/repos/ClusterLabs/resource-agents/issues/comments{/number}","contents_url":"https://api.github.com/repos/ClusterLabs/resource-agents/contents/{+path}","compare_url":"https://api.github.com/repos/ClusterLabs/resource-agents/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ClusterLabs/resource-agents/merges","archive_url":"https://api.github.com/repos/ClusterLabs/resource-agents/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ClusterLabs/resource-agents/downloads","issues_url":"https://api.github.com/repos/ClusterLabs/resource-agents/issues{/number}","pulls_url":"https://api.github.com/repos/ClusterLabs/resource-agents/pulls{/number}","milestones_url":"https://api.github.com/repos/ClusterLabs/resource-agents/milestones{/number}","notifications_url":"https://api.github.com/repos/ClusterLabs/resource-agents/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ClusterLabs/resource-agents/labels{/name}","releases_url":"https://api.github.com/repos/ClusterLabs/resource-agents/releases{/id}","deployments_url":"https://api.github.com/repos/ClusterLabs/resource-agents/deployments","created_at":"2011-02-01T13:43:18Z","updated_at":"2016-02-13T21:51:42Z","pushed_at":"2016-02-22T14:29:30Z","git_url":"git://github.com/ClusterLabs/resource-agents.git","ssh_url":"git@github.com:ClusterLabs/resource-agents.git","clone_url":"https://github.com/ClusterLabs/resource-agents.git","svn_url":"https://github.com/ClusterLabs/resource-agents","homepage":"","size":33193,"stargazers_count":273,"watchers_count":273,"language":"Shell","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":286,"mirror_url":null,"open_issues_count":66,"forks":286,"open_issues":66,"watchers":273,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ClusterLabs/resource-agents/pulls/406"},"html":{"href":"https://github.com/ClusterLabs/resource-agents/pull/406"},"issue":{"href":"https://api.github.com/repos/ClusterLabs/resource-agents/issues/406"},"comments":{"href":"https://api.github.com/repos/ClusterLabs/resource-agents/issues/406/comments"},"review_comments":{"href":"https://api.github.com/repos/ClusterLabs/resource-agents/pulls/406/comments"},"review_comment":{"href":"https://api.github.com/repos/ClusterLabs/resource-agents/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ClusterLabs/resource-agents/pulls/406/commits"},"statuses":{"href":"https://api.github.com/repos/ClusterLabs/resource-agents/statuses/7f40381d6ed7ff7ed48e99fede02b34c495d4dba"}}}}