)]}'
{"monasca_setup/detection/plugins/postfix.py":[{"author":{"_account_id":16168,"name":"Tomasz Trębski","email":"kornicameister@gmail.com","username":"trebskit"},"change_message_id":"419d8c6a69c6f06eb90b63a41f18b5798ca795f9","unresolved":false,"context_lines":[{"line_number":20,"context_line":"        \"\"\""},{"line_number":21,"context_line":"        # Detect Agent\u0027s OS username by getting the group owner of confg file"},{"line_number":22,"context_line":"        try:"},{"line_number":23,"context_line":"            gid \u003d os.stat(\u0027/etc/monasca/agent/agent.yaml\u0027).st_gid"},{"line_number":24,"context_line":"            agent_user \u003d grp.getgrgid(gid)[0]"},{"line_number":25,"context_line":"        except OSError:"},{"line_number":26,"context_line":"            agent_user \u003d None"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a18252c_77efc3b0","line":23,"updated":"2016-04-12 06:30:05.000000000","message":"I am not sure how hard that could be, but IMHO more reliable would be to retrieve the owner/group of the monasca-agent process. \n\nBasically resources are readable also with 777 even if root/root is owner, right ? So this code will tell you actually own the resource","commit_id":"25c834910661faa07b307b95b38f411e29e1c853"},{"author":{"_account_id":12443,"name":"David Schroeder","email":"openstack@a7n.net","username":"dschroeder"},"change_message_id":"8471e526c51f8f581208c05e8b8971cec3660780","unresolved":false,"context_lines":[{"line_number":20,"context_line":"        \"\"\""},{"line_number":21,"context_line":"        # Detect Agent\u0027s OS username by getting the group owner of confg file"},{"line_number":22,"context_line":"        try:"},{"line_number":23,"context_line":"            gid \u003d os.stat(\u0027/etc/monasca/agent/agent.yaml\u0027).st_gid"},{"line_number":24,"context_line":"            agent_user \u003d grp.getgrgid(gid)[0]"},{"line_number":25,"context_line":"        except OSError:"},{"line_number":26,"context_line":"            agent_user \u003d None"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a18252c_7addb613","line":23,"in_reply_to":"5a18252c_77efc3b0","updated":"2016-04-12 23:43:34.000000000","message":"That\u0027s a good thought, indeed that would probably be the most accurate method, but one would have to assume the monasca-agent processes are running at the time, which may or may not be the case.  A running Agent is not required for monasca-setup to run, but an agent.yaml file is.","commit_id":"25c834910661faa07b307b95b38f411e29e1c853"}]}
