)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"917c089b4f1aa785f217762e484c0e07be3c9fe3","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Rafael Weingärtner \u003crafael@apache.org\u003e"},{"line_number":5,"context_line":"CommitDate: 2020-09-14 15:54:00 -0300"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Convert LOG message when iptables metering chain is not found from ERROR to WARNING"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When routers are migrated from one Neutron agent to the other, the metering IPtables"},{"line_number":10,"context_line":"rules are removed, which can cause some exceptions that can be ignored. The metering"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"9f560f44_58dea710","line":7,"range":{"start_line":7,"start_character":0,"end_line":7,"end_character":83},"updated":"2020-09-15 01:57:41.000000000","message":"This is a bit long, [1] has some rules and good examples. So how about \"Set metering iptables chain not found LOG level to WARNING\".\n\nhttps://wiki.openstack.org/wiki/GitCommitMessages","commit_id":"fecfab3d56155ecc2d4578f8c432b51508aa7a4d"},{"author":{"_account_id":28356,"name":"Rafael Weingartner","email":"rafael@apache.org","username":"rafaelweingartner"},"change_message_id":"3860d7e4c81bdfb503e4376ff0c5fe6e83d69b18","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Rafael Weingärtner \u003crafael@apache.org\u003e"},{"line_number":5,"context_line":"CommitDate: 2020-09-14 15:54:00 -0300"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Convert LOG message when iptables metering chain is not found from ERROR to WARNING"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When routers are migrated from one Neutron agent to the other, the metering IPtables"},{"line_number":10,"context_line":"rules are removed, which can cause some exceptions that can be ignored. The metering"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"9f560f44_4b8c0ed7","line":7,"range":{"start_line":7,"start_character":0,"end_line":7,"end_character":83},"in_reply_to":"9f560f44_58dea710","updated":"2020-09-15 10:40:17.000000000","message":"Done","commit_id":"fecfab3d56155ecc2d4578f8c432b51508aa7a4d"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"6469df949ab7b4b09ce9c9ac010c216226d3384c","unresolved":false,"context_lines":[{"line_number":11,"context_line":"agent already handled this situation. However, it logs the message as an ERROR, which"},{"line_number":12,"context_line":"can triggers alarms. Therefore, we propose here to change the LOG message from error"},{"line_number":13,"context_line":"to warning."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: I1805a07cef7fc7d7b041e582a4d79fb1a805df71"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"fffc6b78_8759f4ff","line":14,"updated":"2020-11-19 08:11:21.000000000","message":"nit: if there is bug related to that issue, You should link to it here. If there is no any, You should probably report one and link it here too - that usually helps with e.g. tracking of the backports to stable branches.","commit_id":"7e206baa5e28d19377760c6d0c43ffefa938152d"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"87764cfa68a5b69b690d474dbabbac3552f7692e","unresolved":false,"context_lines":[{"line_number":12,"context_line":"can triggers alarms. Therefore, we propose here to change the LOG message from error"},{"line_number":13,"context_line":"to warning."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"BUG: https://bugs.launchpad.net/neutron/+bug/1904874"},{"line_number":16,"context_line":"Change-Id: I1805a07cef7fc7d7b041e582a4d79fb1a805df71"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"fffc6b78_af516e65","line":15,"range":{"start_line":15,"start_character":0,"end_line":15,"end_character":52},"updated":"2020-11-19 11:58:22.000000000","message":"This can be wrote as:\nCloses-Bug: #1904874\n\nSee the guide here: https://wiki.openstack.org/wiki/GitCommitMessages","commit_id":"62d28aca954bb5de19a367fe65397e359e15f646"}],"neutron/agent/linux/iptables_manager.py":[{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"917c089b4f1aa785f217762e484c0e07be3c9fe3","unresolved":false,"context_lines":[{"line_number":793,"context_line":""},{"line_number":794,"context_line":"        return acc"},{"line_number":795,"context_line":""},{"line_number":796,"context_line":"    def _execute_iptables_command(self, iptables_command):"},{"line_number":797,"context_line":"        \"\"\"Execute iptables command in the linux host."},{"line_number":798,"context_line":""},{"line_number":799,"context_line":"        Execute the iptables command. When routers migrate from a host,an"}],"source_content_type":"text/x-python","patch_set":3,"id":"9f560f44_d89bd761","line":796,"range":{"start_line":796,"start_character":8,"end_line":796,"end_character":33},"updated":"2020-09-15 01:57:41.000000000","message":"This should be called as a helper function which does not execute the iptables command actually, but change an optional param value accordingly.","commit_id":"fecfab3d56155ecc2d4578f8c432b51508aa7a4d"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"ed40514adfb10eace4a9a15ce08d4d295b04fd33","unresolved":false,"context_lines":[{"line_number":793,"context_line":""},{"line_number":794,"context_line":"        return acc"},{"line_number":795,"context_line":""},{"line_number":796,"context_line":"    def _execute_iptables_command(self, iptables_command):"},{"line_number":797,"context_line":"        \"\"\"Execute iptables command in the linux host."},{"line_number":798,"context_line":""},{"line_number":799,"context_line":"        Execute the iptables command. When routers migrate from a host,an"}],"source_content_type":"text/x-python","patch_set":3,"id":"9f560f44_52283196","line":796,"range":{"start_line":796,"start_character":8,"end_line":796,"end_character":33},"in_reply_to":"9f560f44_2b5c3a4b","updated":"2020-09-16 03:07:31.000000000","message":"Doc strings or comments are always welcomed. My thought is this function does not run the real command, so it can be called like \"_execute_log_level_helper\". But after some reflections, IMO these comments and the change can be set to Line 778 directly, something like this:\n\"\"\"\n# When routers migrate from a host,an\n# exception might happen here, and we do not care about it. Therefore,\n#  we do not need to log this error in production environments. Only when\n# debug mode is enabled is that we need to log the error. This is used to\n# avoid generating alarms that will be ignored by  operators.\ncurrent_table \u003d self.execute(args, run_as_root\u003dTrue,\n                                              log_fail_as_error\u003dcfg.CONF.debug)\n\"\"\"","commit_id":"fecfab3d56155ecc2d4578f8c432b51508aa7a4d"},{"author":{"_account_id":28356,"name":"Rafael Weingartner","email":"rafael@apache.org","username":"rafaelweingartner"},"change_message_id":"f7c1b5fe04eb43e2ecfcd86437cdfd6d5223b340","unresolved":false,"context_lines":[{"line_number":793,"context_line":""},{"line_number":794,"context_line":"        return acc"},{"line_number":795,"context_line":""},{"line_number":796,"context_line":"    def _execute_iptables_command(self, iptables_command):"},{"line_number":797,"context_line":"        \"\"\"Execute iptables command in the linux host."},{"line_number":798,"context_line":""},{"line_number":799,"context_line":"        Execute the iptables command. When routers migrate from a host,an"}],"source_content_type":"text/x-python","patch_set":3,"id":"9f560f44_aec20185","line":796,"range":{"start_line":796,"start_character":8,"end_line":796,"end_character":33},"in_reply_to":"9f560f44_52283196","updated":"2020-09-16 11:52:52.000000000","message":"I see. I will do that.","commit_id":"fecfab3d56155ecc2d4578f8c432b51508aa7a4d"},{"author":{"_account_id":28356,"name":"Rafael Weingartner","email":"rafael@apache.org","username":"rafaelweingartner"},"change_message_id":"3860d7e4c81bdfb503e4376ff0c5fe6e83d69b18","unresolved":false,"context_lines":[{"line_number":793,"context_line":""},{"line_number":794,"context_line":"        return acc"},{"line_number":795,"context_line":""},{"line_number":796,"context_line":"    def _execute_iptables_command(self, iptables_command):"},{"line_number":797,"context_line":"        \"\"\"Execute iptables command in the linux host."},{"line_number":798,"context_line":""},{"line_number":799,"context_line":"        Execute the iptables command. When routers migrate from a host,an"}],"source_content_type":"text/x-python","patch_set":3,"id":"9f560f44_2b5c3a4b","line":796,"range":{"start_line":796,"start_character":8,"end_line":796,"end_character":33},"in_reply_to":"9f560f44_d89bd761","updated":"2020-09-15 10:40:17.000000000","message":"I do not understand what you mean. Are you saying that this function should only return the value of `cfg.CONF.debug`, and then I just set it in the `self.execute` in the middle of that huge method there?\n\nI extracted the method to allow me to document this detail. Also, I extracted this code to try to reduce the size of the initial method. It is a bit too much already to me.\n\nDo you prefer to do the other way around?","commit_id":"fecfab3d56155ecc2d4578f8c432b51508aa7a4d"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"917c089b4f1aa785f217762e484c0e07be3c9fe3","unresolved":false,"context_lines":[{"line_number":802,"context_line":"        debug mode is enabled is that we need to log the error. This is used to"},{"line_number":803,"context_line":"        avoid generating alarms that will be ignored by  operators."},{"line_number":804,"context_line":"        \"\"\""},{"line_number":805,"context_line":"        should_log_error \u003d bool(cfg.CONF.debug)"},{"line_number":806,"context_line":"        return self.execute(iptables_command, run_as_root\u003dTrue,"},{"line_number":807,"context_line":"                            log_fail_as_error\u003dshould_log_error)"},{"line_number":808,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9f560f44_38a9337c","line":805,"range":{"start_line":805,"start_character":26,"end_line":805,"end_character":32},"updated":"2020-09-15 01:57:41.000000000","message":"It should be a boolean value already.\n\nhttps://github.com/openstack/oslo.log/blob/master/oslo_log/_options.py#L36","commit_id":"fecfab3d56155ecc2d4578f8c432b51508aa7a4d"},{"author":{"_account_id":28356,"name":"Rafael Weingartner","email":"rafael@apache.org","username":"rafaelweingartner"},"change_message_id":"3860d7e4c81bdfb503e4376ff0c5fe6e83d69b18","unresolved":false,"context_lines":[{"line_number":802,"context_line":"        debug mode is enabled is that we need to log the error. This is used to"},{"line_number":803,"context_line":"        avoid generating alarms that will be ignored by  operators."},{"line_number":804,"context_line":"        \"\"\""},{"line_number":805,"context_line":"        should_log_error \u003d bool(cfg.CONF.debug)"},{"line_number":806,"context_line":"        return self.execute(iptables_command, run_as_root\u003dTrue,"},{"line_number":807,"context_line":"                            log_fail_as_error\u003dshould_log_error)"},{"line_number":808,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9f560f44_8b32a60e","line":805,"range":{"start_line":805,"start_character":26,"end_line":805,"end_character":32},"in_reply_to":"9f560f44_38a9337c","updated":"2020-09-15 10:40:17.000000000","message":"Done","commit_id":"fecfab3d56155ecc2d4578f8c432b51508aa7a4d"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"917c089b4f1aa785f217762e484c0e07be3c9fe3","unresolved":false,"context_lines":[{"line_number":804,"context_line":"        \"\"\""},{"line_number":805,"context_line":"        should_log_error \u003d bool(cfg.CONF.debug)"},{"line_number":806,"context_line":"        return self.execute(iptables_command, run_as_root\u003dTrue,"},{"line_number":807,"context_line":"                            log_fail_as_error\u003dshould_log_error)"},{"line_number":808,"context_line":""},{"line_number":809,"context_line":""},{"line_number":810,"context_line":"def _generate_path_between_rules(old_rules, new_rules):"}],"source_content_type":"text/x-python","patch_set":3,"id":"9f560f44_78d9eb26","line":807,"range":{"start_line":807,"start_character":27,"end_line":807,"end_character":63},"updated":"2020-09-15 01:57:41.000000000","message":"Besides, IMO, if the failure rate is not so much offen, we can directly set this to False.","commit_id":"fecfab3d56155ecc2d4578f8c432b51508aa7a4d"},{"author":{"_account_id":28356,"name":"Rafael Weingartner","email":"rafael@apache.org","username":"rafaelweingartner"},"change_message_id":"3860d7e4c81bdfb503e4376ff0c5fe6e83d69b18","unresolved":false,"context_lines":[{"line_number":804,"context_line":"        \"\"\""},{"line_number":805,"context_line":"        should_log_error \u003d bool(cfg.CONF.debug)"},{"line_number":806,"context_line":"        return self.execute(iptables_command, run_as_root\u003dTrue,"},{"line_number":807,"context_line":"                            log_fail_as_error\u003dshould_log_error)"},{"line_number":808,"context_line":""},{"line_number":809,"context_line":""},{"line_number":810,"context_line":"def _generate_path_between_rules(old_rules, new_rules):"}],"source_content_type":"text/x-python","patch_set":3,"id":"9f560f44_ab168a57","line":807,"range":{"start_line":807,"start_character":27,"end_line":807,"end_character":63},"in_reply_to":"9f560f44_78d9eb26","updated":"2020-09-15 10:40:17.000000000","message":"I thought about that, but then we hide a message that might be useful in some cases, and this will force people to change code in run-time when troubleshooting. Therefore, at least in debug level, we log the message.","commit_id":"fecfab3d56155ecc2d4578f8c432b51508aa7a4d"}]}
