)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":28522,"name":"Hervé Beraud","email":"herveberaud.pro@gmail.com","username":"hberaud"},"change_message_id":"9c027b85ce390a7595a79cee5616732e175c196f","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Improve Socket for oslo.metrics"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This commit includes 2 improvents for oslo.metrcis UDP socket"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"- When starting oslo.metrics unlink the socket first before binding"},{"line_number":12,"context_line":"- Change the mode for file so that other OpenStack process running in"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"1f621f24_1cd6f950","line":9,"range":{"start_line":9,"start_character":23,"end_line":9,"end_character":33},"updated":"2020-10-28 10:24:52.000000000","message":"improvements","commit_id":"518581be7841c0fb841b1fc18f3ffa755c9adc61"},{"author":{"_account_id":28522,"name":"Hervé Beraud","email":"herveberaud.pro@gmail.com","username":"hberaud"},"change_message_id":"9c027b85ce390a7595a79cee5616732e175c196f","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Improve Socket for oslo.metrics"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This commit includes 2 improvents for oslo.metrcis UDP socket"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"- When starting oslo.metrics unlink the socket first before binding"},{"line_number":12,"context_line":"- Change the mode for file so that other OpenStack process running in"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"1f621f24_5cd07151","line":9,"range":{"start_line":9,"start_character":43,"end_line":9,"end_character":50},"updated":"2020-10-28 10:24:52.000000000","message":"metrics","commit_id":"518581be7841c0fb841b1fc18f3ffa755c9adc61"},{"author":{"_account_id":28522,"name":"Hervé Beraud","email":"herveberaud.pro@gmail.com","username":"hberaud"},"change_message_id":"9c027b85ce390a7595a79cee5616732e175c196f","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This commit includes 2 improvents for oslo.metrcis UDP socket"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"- When starting oslo.metrics unlink the socket first before binding"},{"line_number":12,"context_line":"- Change the mode for file so that other OpenStack process running in"},{"line_number":13,"context_line":"  other user can access and send metrics e.g. nova, neutron"},{"line_number":14,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"1f621f24_1ca559b6","line":11,"range":{"start_line":11,"start_character":2,"end_line":11,"end_character":67},"updated":"2020-10-28 10:24:52.000000000","message":"I\u0027m not sure to see why you want to do this, please can you bring more details here.","commit_id":"518581be7841c0fb841b1fc18f3ffa755c9adc61"},{"author":{"_account_id":32523,"name":"Ching Kuo","display_name":"Gene Kuo","email":"igene@igene.tw","username":"genekuo"},"change_message_id":"8d9a9807f1b9db25a0b4518eff4ca19052a2b38c","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This commit includes 2 improvents for oslo.metrcis UDP socket"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"- When starting oslo.metrics unlink the socket first before binding"},{"line_number":12,"context_line":"- Change the mode for file so that other OpenStack process running in"},{"line_number":13,"context_line":"  other user can access and send metrics e.g. nova, neutron"},{"line_number":14,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"1f621f24_a2908050","line":11,"range":{"start_line":11,"start_character":2,"end_line":11,"end_character":67},"in_reply_to":"1f621f24_1ca559b6","updated":"2020-10-28 12:25:49.000000000","message":"Just to make sure that socket is not in use. Or should we just raise an error if any file/dir exists at the same path?","commit_id":"518581be7841c0fb841b1fc18f3ffa755c9adc61"},{"author":{"_account_id":32523,"name":"Ching Kuo","display_name":"Gene Kuo","email":"igene@igene.tw","username":"genekuo"},"change_message_id":"84c365011d7ae40b357470c57a94c94d422a430e","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This commit includes 2 improvents for oslo.metrcis UDP socket"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"- When starting oslo.metrics unlink the socket first before binding"},{"line_number":12,"context_line":"- Change the mode for file so that other OpenStack process running in"},{"line_number":13,"context_line":"  other user can access and send metrics e.g. nova, neutron"},{"line_number":14,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"1f621f24_024fb4bd","line":11,"range":{"start_line":11,"start_character":2,"end_line":11,"end_character":67},"in_reply_to":"1f621f24_a2908050","updated":"2020-10-28 12:35:29.000000000","message":"It happens sometimes that our nodes are not shutdown properly and the socket file still exist after reboot. If we don\u0027t unlink the socket before starting the process it will cause binding error.","commit_id":"518581be7841c0fb841b1fc18f3ffa755c9adc61"},{"author":{"_account_id":28522,"name":"Hervé Beraud","email":"herveberaud.pro@gmail.com","username":"hberaud"},"change_message_id":"9c027b85ce390a7595a79cee5616732e175c196f","unresolved":false,"context_lines":[{"line_number":9,"context_line":"This commit includes 2 improvents for oslo.metrcis UDP socket"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"- When starting oslo.metrics unlink the socket first before binding"},{"line_number":12,"context_line":"- Change the mode for file so that other OpenStack process running in"},{"line_number":13,"context_line":"  other user can access and send metrics e.g. nova, neutron"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: I27672f03d282acf1e9cb669998899a032fe4202a"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"1f621f24_bc7c2521","line":13,"range":{"start_line":12,"start_character":0,"end_line":13,"end_character":59},"updated":"2020-10-28 10:24:52.000000000","message":"Are we sure we want to do this?\n\nMaybe we could start by initiating a related discussion before, thoughts?","commit_id":"518581be7841c0fb841b1fc18f3ffa755c9adc61"},{"author":{"_account_id":32523,"name":"Ching Kuo","display_name":"Gene Kuo","email":"igene@igene.tw","username":"genekuo"},"change_message_id":"8d9a9807f1b9db25a0b4518eff4ca19052a2b38c","unresolved":false,"context_lines":[{"line_number":9,"context_line":"This commit includes 2 improvents for oslo.metrcis UDP socket"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"- When starting oslo.metrics unlink the socket first before binding"},{"line_number":12,"context_line":"- Change the mode for file so that other OpenStack process running in"},{"line_number":13,"context_line":"  other user can access and send metrics e.g. nova, neutron"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: I27672f03d282acf1e9cb669998899a032fe4202a"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"1f621f24_2293d051","line":13,"range":{"start_line":12,"start_character":0,"end_line":13,"end_character":59},"in_reply_to":"1f621f24_bc7c2521","updated":"2020-10-28 12:25:49.000000000","message":"IIUC, usually we run other services with other users with the same name e.g. nova services with nova user, neutron services with neutron server. So in order for those process to send metrics we will have to change the permission for socket file.","commit_id":"518581be7841c0fb841b1fc18f3ffa755c9adc61"}],"oslo_metrics/__main__.py":[{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"6a670e6d1b72d2e06ecb414b574b3c6feb1a2ac1","unresolved":false,"context_lines":[{"line_number":85,"context_line":"    cfg.CONF(sys.argv[1:])"},{"line_number":86,"context_line":"    m \u003d MetricsListener(cfg.CONF.oslo_metrics.metrics_socket_file)"},{"line_number":87,"context_line":"    try:"},{"line_number":88,"context_line":"        os.chmod(socket_path, stat.S_IRWXU | stat.S_IRWXO)"},{"line_number":89,"context_line":"    except OSError:"},{"line_number":90,"context_line":"        LOG.error(\"Changing the mode of the file failed.... continuing\")"},{"line_number":91,"context_line":"    mt \u003d threading.Thread(target\u003dm.serve)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f65232a_752b6dea","line":88,"updated":"2020-10-28 04:08:02.000000000","message":"pep8: F821 undefined name \u0027socket_path\u0027","commit_id":"8cd26497e3fdfa1b4520bd5bbfe9b6d500a646b2"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"6a670e6d1b72d2e06ecb414b574b3c6feb1a2ac1","unresolved":false,"context_lines":[{"line_number":85,"context_line":"    cfg.CONF(sys.argv[1:])"},{"line_number":86,"context_line":"    m \u003d MetricsListener(cfg.CONF.oslo_metrics.metrics_socket_file)"},{"line_number":87,"context_line":"    try:"},{"line_number":88,"context_line":"        os.chmod(socket_path, stat.S_IRWXU | stat.S_IRWXO)"},{"line_number":89,"context_line":"    except OSError:"},{"line_number":90,"context_line":"        LOG.error(\"Changing the mode of the file failed.... continuing\")"},{"line_number":91,"context_line":"    mt \u003d threading.Thread(target\u003dm.serve)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f65232a_552e31fa","line":88,"updated":"2020-10-28 04:08:02.000000000","message":"pep8: F821 undefined name \u0027stat\u0027","commit_id":"8cd26497e3fdfa1b4520bd5bbfe9b6d500a646b2"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"6a670e6d1b72d2e06ecb414b574b3c6feb1a2ac1","unresolved":false,"context_lines":[{"line_number":85,"context_line":"    cfg.CONF(sys.argv[1:])"},{"line_number":86,"context_line":"    m \u003d MetricsListener(cfg.CONF.oslo_metrics.metrics_socket_file)"},{"line_number":87,"context_line":"    try:"},{"line_number":88,"context_line":"        os.chmod(socket_path, stat.S_IRWXU | stat.S_IRWXO)"},{"line_number":89,"context_line":"    except OSError:"},{"line_number":90,"context_line":"        LOG.error(\"Changing the mode of the file failed.... continuing\")"},{"line_number":91,"context_line":"    mt \u003d threading.Thread(target\u003dm.serve)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f65232a_b5350549","line":88,"updated":"2020-10-28 04:08:02.000000000","message":"pep8: F821 undefined name \u0027stat\u0027","commit_id":"8cd26497e3fdfa1b4520bd5bbfe9b6d500a646b2"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"4e0ab3a34858a743142ccbfbaf2d2d36fa153d86","unresolved":false,"context_lines":[{"line_number":86,"context_line":"    cfg.CONF(sys.argv[1:])"},{"line_number":87,"context_line":"    m \u003d MetricsListener(cfg.CONF.oslo_metrics.metrics_socket_file)"},{"line_number":88,"context_line":"    try:"},{"line_number":89,"context_line":"        os.chmod(socket_path, stat.S_IRWXU | stat.S_IRWXO)"},{"line_number":90,"context_line":"    except OSError:"},{"line_number":91,"context_line":"        LOG.error(\"Changing the mode of the file failed.... continuing\")"},{"line_number":92,"context_line":"    mt \u003d threading.Thread(target\u003dm.serve)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1f621f24_f3c41043","line":89,"updated":"2020-10-28 06:11:52.000000000","message":"pep8: F821 undefined name \u0027socket_path\u0027","commit_id":"d66b60f1a7088b4908b7cf4f3e7e01bde8f19d7f"},{"author":{"_account_id":28522,"name":"Hervé Beraud","email":"herveberaud.pro@gmail.com","username":"hberaud"},"change_message_id":"9c027b85ce390a7595a79cee5616732e175c196f","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        try:"},{"line_number":60,"context_line":"            os.unlink(socket_path)"},{"line_number":61,"context_line":"        except OSError:"},{"line_number":62,"context_line":"            if os.path.exists(socket_path):"},{"line_number":63,"context_line":"                raise"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    def serve(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f621f24_1cc0b950","line":62,"range":{"start_line":62,"start_character":12,"end_line":62,"end_character":43},"updated":"2020-10-28 10:24:52.000000000","message":"os.unlink remove the given path, so if we meet this condition either we don\u0027t have the right file mode and the deletion failed or path is a dir and not a file.\n\nMaybe you need to move our chmod before initiate MetricsListener bellow.","commit_id":"518581be7841c0fb841b1fc18f3ffa755c9adc61"},{"author":{"_account_id":32523,"name":"Ching Kuo","display_name":"Gene Kuo","email":"igene@igene.tw","username":"genekuo"},"change_message_id":"84c365011d7ae40b357470c57a94c94d422a430e","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        try:"},{"line_number":60,"context_line":"            os.unlink(socket_path)"},{"line_number":61,"context_line":"        except OSError:"},{"line_number":62,"context_line":"            if os.path.exists(socket_path):"},{"line_number":63,"context_line":"                raise"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    def serve(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f621f24_227d90e7","line":62,"range":{"start_line":62,"start_character":12,"end_line":62,"end_character":43},"in_reply_to":"1f621f24_1cc0b950","updated":"2020-10-28 12:35:29.000000000","message":"If we don\u0027t have the right file mode or it\u0027s a dir that means there maybe other process using that socket/dir. In this case, we should raise an exception instead of changing the file mode in my opinion.","commit_id":"518581be7841c0fb841b1fc18f3ffa755c9adc61"},{"author":{"_account_id":28522,"name":"Hervé Beraud","email":"herveberaud.pro@gmail.com","username":"hberaud"},"change_message_id":"299cc0a69c0ad4128fe684a89273d01b824aeea2","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        try:"},{"line_number":60,"context_line":"            os.unlink(socket_path)"},{"line_number":61,"context_line":"        except OSError:"},{"line_number":62,"context_line":"            if os.path.exists(socket_path):"},{"line_number":63,"context_line":"                raise"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    def serve(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f621f24_4ddc3d18","line":62,"range":{"start_line":62,"start_character":12,"end_line":62,"end_character":43},"in_reply_to":"1f621f24_227d90e7","updated":"2020-10-28 15:51:07.000000000","message":"You\u0027re right, we shouldn\u0027t remove the socket if she is used by another process.","commit_id":"518581be7841c0fb841b1fc18f3ffa755c9adc61"}]}
