)]}'
{"monasca_setup/detection/plugins/mysql.py":[{"author":{"_account_id":12133,"name":"Cindy O\u0027Neill","email":"cindy.o-neill@hpe.com","username":"oneilcin"},"change_message_id":"9f777c60a323a3b43779c7097dedb3f5f755eaa8","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        if not self.available:"},{"line_number":46,"context_line":"            log.error((\u0027MySQL configuration is not detected. \u0027"},{"line_number":47,"context_line":"                       \u0027Plugin for MySQL will not be configured.\u0027))"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    def _get_config(self):"},{"line_number":50,"context_line":"        \"\"\"Set the configuration to be used for connecting to mysql"},{"line_number":51,"context_line":"        :return:"}],"source_content_type":"text/x-python","patch_set":1,"id":"9abb7d3a_efdb98eb","line":48,"updated":"2016-06-03 17:03:24.000000000","message":"The _get_config method called within build_config will throw an exception if no arguments are given and the default config does not exist.  The mysql.yaml is not created in this case.  Is the reason for this change that you would like to change the error message? \nThe existing message looks like this: \nERROR: Error configuring the mysql check plugin. [Errno 2] No such file or directory: \u0027/root/.my.cnf\u0027","commit_id":"7a0d39cca7179e802c3f39a618287ae2866a8e5a"},{"author":{"_account_id":20033,"name":"Artur Basiak","email":"artur.basiak@ts.fujitsu.com","username":"abasiak"},"change_message_id":"c83ad241b47a612c55a536993007afeec5b447c5","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        if not self.available:"},{"line_number":46,"context_line":"            log.error((\u0027MySQL configuration is not detected. \u0027"},{"line_number":47,"context_line":"                       \u0027Plugin for MySQL will not be configured.\u0027))"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    def _get_config(self):"},{"line_number":50,"context_line":"        \"\"\"Set the configuration to be used for connecting to mysql"},{"line_number":51,"context_line":"        :return:"}],"source_content_type":"text/x-python","patch_set":1,"id":"7aa08908_aab986cd","line":48,"in_reply_to":"7aa08908_27e5f336","updated":"2016-06-07 06:06:38.000000000","message":"Without this change when I am trying to reconfigure check for the agent without configuration file for mysql (/root/.my.cnf) I am receiving error:\n\nERROR: Error configuring the mysql check plugin. [Errno 2] No such file or directory: \u0027/root/.my.cnf\u0027\nTraceback (most recent call last):\n  File \"/opt/monasca-agent/lib/python2.7/site-packages/monasca_setup/detection/plugins/mysql.py\", line 116, in build_config\n    self._get_config()\n  File \"/opt/monasca-agent/lib/python2.7/site-packages/monasca_setup/detection/plugins/mysql.py\", line 50, in _get_config\n    self._read_config(mysql_conf)\n  File \"/opt/monasca-agent/lib/python2.7/site-packages/monasca_setup/detection/plugins/mysql.py\", line 83, in _read_config\n    with open(mysql_conf, \"r\") as confFile:\nIOError: [Errno 2] No such file or directory: \u0027/root/.my.cnf\u0027\nTraceback (most recent call last):\n  File \"/opt/monasca-agent/bin/monasca-setup\", line 11, in \u003cmodule\u003e\n    sys.exit(main())\n  File \"/opt/monasca-agent/lib/python2.7/site-packages/monasca_setup/main.py\", line 74, in main\n    skip_failed\u003d(args.detection_plugins is None))\n  File \"/opt/monasca-agent/lib/python2.7/site-packages/monasca_setup/main.py\", line 238, in plugin_detection\n    new_config \u003d detect.build_config_with_name()\n  File \"/opt/monasca-agent/lib/python2.7/site-packages/monasca_setup/detection/plugin.py\", line 52, in build_config_with_name\n    conf \u003d self.build_config()\n  File \"/opt/monasca-agent/lib/python2.7/site-packages/monasca_setup/detection/plugins/mysql.py\", line 140, in build_config\n    raise Exception(exception_msg)\nException: Error configuring the mysql check plugin. [Errno 2] No such file or directory: \u0027/root/.my.cnf\u0027\n\nAnd I don\u0027t think it is a good idea to show user full trace of the error, only message. That is why this change is for, to validate if every necessery piece of process exist before creating config file for it in conf.d/.\nI also investigate other checks (for example apache). There if error is catched it is not risen but only logged. \nMaybe in check for mysql should be done the same. What do you think??","commit_id":"7a0d39cca7179e802c3f39a618287ae2866a8e5a"},{"author":{"_account_id":12133,"name":"Cindy O\u0027Neill","email":"cindy.o-neill@hpe.com","username":"oneilcin"},"change_message_id":"368daa1c126eb39630687fc680298a9b90e020b9","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        if not self.available:"},{"line_number":46,"context_line":"            log.error((\u0027MySQL configuration is not detected. \u0027"},{"line_number":47,"context_line":"                       \u0027Plugin for MySQL will not be configured.\u0027))"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    def _get_config(self):"},{"line_number":50,"context_line":"        \"\"\"Set the configuration to be used for connecting to mysql"},{"line_number":51,"context_line":"        :return:"}],"source_content_type":"text/x-python","patch_set":1,"id":"7aa08908_27e5f336","line":48,"in_reply_to":"7aa08908_64e72313","updated":"2016-06-06 14:29:22.000000000","message":"Sorry I do not see the need for this change.  To me the error message is good.  I\u0027m trying to understand the purpose of this change - what is it?  The code already doesn\u0027t configure the check if no args and no default conf is given.","commit_id":"7a0d39cca7179e802c3f39a618287ae2866a8e5a"},{"author":{"_account_id":12133,"name":"Cindy O\u0027Neill","email":"cindy.o-neill@hpe.com","username":"oneilcin"},"change_message_id":"0bbc9f9cea11843074dc4dbf21bb595ed5b92af0","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        if not self.available:"},{"line_number":46,"context_line":"            log.error((\u0027MySQL configuration is not detected. \u0027"},{"line_number":47,"context_line":"                       \u0027Plugin for MySQL will not be configured.\u0027))"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    def _get_config(self):"},{"line_number":50,"context_line":"        \"\"\"Set the configuration to be used for connecting to mysql"},{"line_number":51,"context_line":"        :return:"}],"source_content_type":"text/x-python","patch_set":1,"id":"7aa08908_410704ca","line":48,"in_reply_to":"7aa08908_aab986cd","updated":"2016-06-07 15:06:56.000000000","message":"Ok that makes sense, and I see that you are giving clear error reasons.  In the apache detection plugin that doesn\u0027t raise an exception, we think that  it should be changed to raise an exception. If all detection plugins consistently raise an exception we will notice problems during installation. \nSorry so late to reply to your message:)","commit_id":"7a0d39cca7179e802c3f39a618287ae2866a8e5a"},{"author":{"_account_id":16168,"name":"Tomasz Trębski","email":"kornicameister@gmail.com","username":"trebskit"},"change_message_id":"0c49528cd6286082d59d1a682e1728a825dfd808","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        if not self.available:"},{"line_number":46,"context_line":"            log.error((\u0027MySQL configuration is not detected. \u0027"},{"line_number":47,"context_line":"                       \u0027Plugin for MySQL will not be configured.\u0027))"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    def _get_config(self):"},{"line_number":50,"context_line":"        \"\"\"Set the configuration to be used for connecting to mysql"},{"line_number":51,"context_line":"        :return:"}],"source_content_type":"text/x-python","patch_set":1,"id":"7aa08908_64e72313","line":48,"in_reply_to":"9abb7d3a_efdb98eb","updated":"2016-06-04 20:40:16.000000000","message":"It seems more appropriate to suppress detection at this point unless it is called after _get_config. This change from Artur is another where he tries to \"fix\" detecting. Perhaps it would be better to remove error message you mentioned from _get_config ?","commit_id":"7a0d39cca7179e802c3f39a618287ae2866a8e5a"},{"author":{"_account_id":15027,"name":"Michael Hoppal","email":"michael.jam.hoppal@hpe.com","username":"michael-hoppal"},"change_message_id":"d584f7996aa99ba672c47de1160df824ce76c38d","unresolved":false,"context_lines":[{"line_number":46,"context_line":"                          has_dependencies)"},{"line_number":47,"context_line":"        if not self.available:"},{"line_number":48,"context_line":"            log.error((\u0027MySQL configuration is not detected. \u0027"},{"line_number":49,"context_line":"                       \u0027Plugin for MySQL will not be configured.\u0027))"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    def _get_config(self):"},{"line_number":52,"context_line":"        \"\"\"Set the configuration to be used for connecting to mysql"}],"source_content_type":"text/x-python","patch_set":2,"id":"7aa08908_271e93ba","line":49,"range":{"start_line":49,"start_character":35,"end_line":49,"end_character":40},"updated":"2016-06-06 14:37:03.000000000","message":"i am okay with this change as it is catching errors at an earlier stage. \n\nMy concern is -\n\nIs this log message is very generic for this. Why did it fail? if i was a user and run into this i would not know. Is it missing dependencies, conf file/args? \n\nI am not sure if what we had before is better.","commit_id":"b92dcb230b5ccc2b1127e35cd2656e21f7423796"},{"author":{"_account_id":16168,"name":"Tomasz Trębski","email":"kornicameister@gmail.com","username":"trebskit"},"change_message_id":"ea90d522f5e291377db1237ae640dab59a7ca712","unresolved":false,"context_lines":[{"line_number":46,"context_line":"                          has_dependencies)"},{"line_number":47,"context_line":"        if not self.available:"},{"line_number":48,"context_line":"            log.error((\u0027MySQL configuration is not detected. \u0027"},{"line_number":49,"context_line":"                       \u0027Plugin for MySQL will not be configured.\u0027))"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    def _get_config(self):"},{"line_number":52,"context_line":"        \"\"\"Set the configuration to be used for connecting to mysql"}],"source_content_type":"text/x-python","patch_set":2,"id":"7aa08908_4180d946","line":49,"range":{"start_line":49,"start_character":35,"end_line":49,"end_character":40},"in_reply_to":"7aa08908_271e93ba","updated":"2016-06-06 20:11:31.000000000","message":"So something like\n\n if not self.available:\n   if not process_exits:\n     # process does not exits\n   elif not has_args_or_config_file:\n     # process exists but couldn\u0027t find configuration\n   else:\n     # process exists and configuration is present but pymysql is not installed \n\n?","commit_id":"b92dcb230b5ccc2b1127e35cd2656e21f7423796"},{"author":{"_account_id":15027,"name":"Michael Hoppal","email":"michael.jam.hoppal@hpe.com","username":"michael-hoppal"},"change_message_id":"22ed00d438981798206f90b5ef0affa5003b1dac","unresolved":false,"context_lines":[{"line_number":47,"context_line":"                log.warning(\u0027MySQL process does not exist.\u0027)"},{"line_number":48,"context_line":"            elif not has_args_or_config_file:"},{"line_number":49,"context_line":"                log.error((\u0027MySQL process exists but \u0027"},{"line_number":50,"context_line":"                           \u0027configuration was not found.\u0027))"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    def _get_config(self):"},{"line_number":53,"context_line":"        \"\"\"Set the configuration to be used for connecting to mysql"}],"source_content_type":"text/x-python","patch_set":3,"id":"7aa08908_e4f3a19c","line":50,"range":{"start_line":50,"start_character":28,"end_line":50,"end_character":41},"updated":"2016-06-07 14:51:59.000000000","message":"should we say \"configuration file was not found and no arguments were given.\"","commit_id":"310d134b39a2021f2dbc244670906e6f5a2a5b9d"},{"author":{"_account_id":20033,"name":"Artur Basiak","email":"artur.basiak@ts.fujitsu.com","username":"abasiak"},"change_message_id":"0d4a198515a51f910dbe7d60600c22d703292eda","unresolved":false,"context_lines":[{"line_number":47,"context_line":"                log.warning(\u0027MySQL process does not exist.\u0027)"},{"line_number":48,"context_line":"            elif not has_args_or_config_file:"},{"line_number":49,"context_line":"                log.error((\u0027MySQL process exists but \u0027"},{"line_number":50,"context_line":"                           \u0027configuration was not found.\u0027))"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    def _get_config(self):"},{"line_number":53,"context_line":"        \"\"\"Set the configuration to be used for connecting to mysql"}],"source_content_type":"text/x-python","patch_set":3,"id":"7aa08908_f6de940f","line":50,"range":{"start_line":50,"start_character":28,"end_line":50,"end_character":41},"in_reply_to":"7aa08908_e4f3a19c","updated":"2016-06-08 04:51:39.000000000","message":"Done","commit_id":"310d134b39a2021f2dbc244670906e6f5a2a5b9d"},{"author":{"_account_id":15027,"name":"Michael Hoppal","email":"michael.jam.hoppal@hpe.com","username":"michael-hoppal"},"change_message_id":"9810ea91214a3bcfdb2953e5d3120893e0a74748","unresolved":false,"context_lines":[{"line_number":44,"context_line":"        self.available \u003d process_exist and has_args_or_config_file"},{"line_number":45,"context_line":"        if not self.available:"},{"line_number":46,"context_line":"            if not process_exist:"},{"line_number":47,"context_line":"                log.warning(\u0027MySQL process does not exist.\u0027)"},{"line_number":48,"context_line":"            elif not has_args_or_config_file:"},{"line_number":49,"context_line":"                log.error((\u0027MySQL process exists but \u0027"},{"line_number":50,"context_line":"                           \u0027configuration file was not found and \u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"7aa08908_a3e00c2a","line":47,"range":{"start_line":47,"start_character":20,"end_line":47,"end_character":27},"updated":"2016-06-08 20:02:34.000000000","message":"should this be error?","commit_id":"6047b314d679ea92b69a34382d7e4931a1cf41fc"},{"author":{"_account_id":20033,"name":"Artur Basiak","email":"artur.basiak@ts.fujitsu.com","username":"abasiak"},"change_message_id":"8f560296b26c5596d189c67a00ca8fca6b394f42","unresolved":false,"context_lines":[{"line_number":44,"context_line":"        self.available \u003d process_exist and has_args_or_config_file"},{"line_number":45,"context_line":"        if not self.available:"},{"line_number":46,"context_line":"            if not process_exist:"},{"line_number":47,"context_line":"                log.warning(\u0027MySQL process does not exist.\u0027)"},{"line_number":48,"context_line":"            elif not has_args_or_config_file:"},{"line_number":49,"context_line":"                log.error((\u0027MySQL process exists but \u0027"},{"line_number":50,"context_line":"                           \u0027configuration file was not found and \u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"7aa08908_f9b46e82","line":47,"range":{"start_line":47,"start_character":20,"end_line":47,"end_character":27},"in_reply_to":"7aa08908_a3e00c2a","updated":"2016-06-09 09:26:10.000000000","message":"Done","commit_id":"6047b314d679ea92b69a34382d7e4931a1cf41fc"}]}
