{"action":"created","issue":{"url":"https://api.github.com/repos/cloudera-ps/prereq-checks/issues/57","repository_url":"https://api.github.com/repos/cloudera-ps/prereq-checks","labels_url":"https://api.github.com/repos/cloudera-ps/prereq-checks/issues/57/labels{/name}","comments_url":"https://api.github.com/repos/cloudera-ps/prereq-checks/issues/57/comments","events_url":"https://api.github.com/repos/cloudera-ps/prereq-checks/issues/57/events","html_url":"https://github.com/cloudera-ps/prereq-checks/issues/57","id":240525639,"number":57,"title":"Database check fails on the version of mysql-connector-java","user":{"login":"sjjohansen","id":7655612,"avatar_url":"https://avatars0.githubusercontent.com/u/7655612?v=3","gravatar_id":"","url":"https://api.github.com/users/sjjohansen","html_url":"https://github.com/sjjohansen","followers_url":"https://api.github.com/users/sjjohansen/followers","following_url":"https://api.github.com/users/sjjohansen/following{/other_user}","gists_url":"https://api.github.com/users/sjjohansen/gists{/gist_id}","starred_url":"https://api.github.com/users/sjjohansen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sjjohansen/subscriptions","organizations_url":"https://api.github.com/users/sjjohansen/orgs","repos_url":"https://api.github.com/users/sjjohansen/repos","events_url":"https://api.github.com/users/sjjohansen/events{/privacy}","received_events_url":"https://api.github.com/users/sjjohansen/received_events","type":"User","site_admin":false},"labels":[{"id":565065237,"url":"https://api.github.com/repos/cloudera-ps/prereq-checks/labels/bug","name":"bug","color":"ee0701","default":true},{"id":637460770,"url":"https://api.github.com/repos/cloudera-ps/prereq-checks/labels/high%20priority","name":"high priority","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":{"login":"kmizumar","id":226835,"avatar_url":"https://avatars1.githubusercontent.com/u/226835?v=3","gravatar_id":"","url":"https://api.github.com/users/kmizumar","html_url":"https://github.com/kmizumar","followers_url":"https://api.github.com/users/kmizumar/followers","following_url":"https://api.github.com/users/kmizumar/following{/other_user}","gists_url":"https://api.github.com/users/kmizumar/gists{/gist_id}","starred_url":"https://api.github.com/users/kmizumar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kmizumar/subscriptions","organizations_url":"https://api.github.com/users/kmizumar/orgs","repos_url":"https://api.github.com/users/kmizumar/repos","events_url":"https://api.github.com/users/kmizumar/events{/privacy}","received_events_url":"https://api.github.com/users/kmizumar/received_events","type":"User","site_admin":false},"assignees":[{"login":"kmizumar","id":226835,"avatar_url":"https://avatars1.githubusercontent.com/u/226835?v=3","gravatar_id":"","url":"https://api.github.com/users/kmizumar","html_url":"https://github.com/kmizumar","followers_url":"https://api.github.com/users/kmizumar/followers","following_url":"https://api.github.com/users/kmizumar/following{/other_user}","gists_url":"https://api.github.com/users/kmizumar/gists{/gist_id}","starred_url":"https://api.github.com/users/kmizumar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kmizumar/subscriptions","organizations_url":"https://api.github.com/users/kmizumar/orgs","repos_url":"https://api.github.com/users/kmizumar/repos","events_url":"https://api.github.com/users/kmizumar/events{/privacy}","received_events_url":"https://api.github.com/users/kmizumar/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2017-07-05T02:51:34Z","updated_at":"2017-07-13T16:27:12Z","closed_at":null,"body":"The function `check_database` currently fails if the first line returned from `rpm -qa` is `mysql-connector-java-*`. \r\n\r\n```\r\n FAIL  Database: Supported MySQL server installed. Actual: mysql-connector-java-5.1.25\r\n```\r\n\r\nThis seems to be because the package major version is checked as 5.1 and this doesn't match either 5.5 or 5.6.\r\n\r\nAt the same time it's probably worth adding 5.7 as a supported version of MySQL as that seems to have been true at least since CDH 5.10"},"comment":{"url":"https://api.github.com/repos/cloudera-ps/prereq-checks/issues/comments/315130503","html_url":"https://github.com/cloudera-ps/prereq-checks/issues/57#issuecomment-315130503","issue_url":"https://api.github.com/repos/cloudera-ps/prereq-checks/issues/57","id":315130503,"user":{"login":"kmizumar","id":226835,"avatar_url":"https://avatars1.githubusercontent.com/u/226835?v=3","gravatar_id":"","url":"https://api.github.com/users/kmizumar","html_url":"https://github.com/kmizumar","followers_url":"https://api.github.com/users/kmizumar/followers","following_url":"https://api.github.com/users/kmizumar/following{/other_user}","gists_url":"https://api.github.com/users/kmizumar/gists{/gist_id}","starred_url":"https://api.github.com/users/kmizumar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kmizumar/subscriptions","organizations_url":"https://api.github.com/users/kmizumar/orgs","repos_url":"https://api.github.com/users/kmizumar/repos","events_url":"https://api.github.com/users/kmizumar/events{/privacy}","received_events_url":"https://api.github.com/users/kmizumar/received_events","type":"User","site_admin":false},"created_at":"2017-07-13T16:27:12Z","updated_at":"2017-07-13T16:27:12Z","body":"Here is the current implementation of check_database function: \r\n\r\n```\r\nfunction check_database() {\r\n  local mysql=`echo \"$RPM_QA\" | egrep -v \"mysql-community-(common|libs|client)-\" | egrep -v \"mysql-(common|libs|client)-\" | grep -m1 \"^mysql-\"`\r\n  if [ \"$mysql\" ]; then\r\n    local ver=`echo $mysql | cut -d'-' -f1-4`\r\n  else\r\n    state \"Database: MySQL server not installed, skipping version check\" 2\r\n    return\r\n  fi\r\n\r\n  local major_ver=`echo $ver | cut -d'-' -f4 | cut -d'.' -f1-2`\r\n  local msg=\"Database: Supported MySQL server installed. Actual: $ver\"\r\n  if [ \"$major_ver\" = \"5.5\" ] || [ \"$major_ver\" = \"5.6\" ]; then\r\n    state \"$msg\" 0\r\n  else\r\n    state \"$msg\" 1\r\n  fi\r\n}\r\n```\r\n\r\nThis seems completely wrong and useless for me. I'll re-write this later."}}
{"actor":{"display_login":"kmizumar"}}