)]}'
{"neutron/db/l3_dvr_db.py":[{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"1259ca605be383750f0777cc5858a7a2f057b7dc","unresolved":false,"context_lines":[{"line_number":362,"context_line":""},{"line_number":363,"context_line":"    def _delete_fip_agent_port(self, context, network_id, host_id):"},{"line_number":364,"context_line":"        l3_agent_db \u003d self._get_agent_by_type_and_host("},{"line_number":365,"context_line":"            context, const.AGENT_TYPE_L3, host_id)"},{"line_number":366,"context_line":"        try:"},{"line_number":367,"context_line":"            l3_obj.DvrFipGatewayPortAgentBinding("},{"line_number":368,"context_line":"                context, network_id\u003dnetwork_id,"}],"source_content_type":"text/x-python","patch_set":1,"id":"1fa4df85_a92f0c86","line":365,"updated":"2020-03-06 19:55:02.000000000","message":"This should be under a try/except as is done in create_fip_agent_gw_port_if_not_exists(), actually causing a functional test failure.","commit_id":"70cf2c503ce7d1ccbd1fa8f0be7c651d8aadb493"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"4a7b943bdb9a69cac5a9cdc47d92c65a52a50110","unresolved":false,"context_lines":[{"line_number":362,"context_line":""},{"line_number":363,"context_line":"    def _delete_fip_agent_port(self, context, network_id, host_id):"},{"line_number":364,"context_line":"        l3_agent_db \u003d self._get_agent_by_type_and_host("},{"line_number":365,"context_line":"            context, const.AGENT_TYPE_L3, host_id)"},{"line_number":366,"context_line":"        try:"},{"line_number":367,"context_line":"            l3_obj.DvrFipGatewayPortAgentBinding("},{"line_number":368,"context_line":"                context, network_id\u003dnetwork_id,"}],"source_content_type":"text/x-python","patch_set":1,"id":"1fa4df85_47b2fc4a","line":365,"in_reply_to":"1fa4df85_a92f0c86","updated":"2020-03-07 18:15:31.000000000","message":"Done","commit_id":"70cf2c503ce7d1ccbd1fa8f0be7c651d8aadb493"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"a8a3b045627f84ab5688ff7579294d5a4108f72f","unresolved":false,"context_lines":[{"line_number":368,"context_line":"            LOG.warning(\"%(ag)s agent not found for the given host: %(host)s\","},{"line_number":369,"context_line":"                        {\u0027ag\u0027: const.AGENT_TYPE_L3,"},{"line_number":370,"context_line":"                         \u0027host\u0027: host_id})"},{"line_number":371,"context_line":"            return"},{"line_number":372,"context_line":"        try:"},{"line_number":373,"context_line":"            l3_obj.DvrFipGatewayPortAgentBinding("},{"line_number":374,"context_line":"                context, network_id\u003dnetwork_id,"}],"source_content_type":"text/x-python","patch_set":3,"id":"1fa4df85_5d77fb09","line":371,"range":{"start_line":371,"start_character":0,"end_line":371,"end_character":18},"updated":"2020-03-11 13:51:19.000000000","message":"There are some same code in this file indicates that this l3_agent_db could be a None or empty dict. So line 375 \u0027l3_agent_db[\u0027id\u0027]\u0027 may get failed.","commit_id":"2baeae75199405d46927c073daf772b2a4144294"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"be272b19ef1c59fb8140f34592620824906bdf2d","unresolved":false,"context_lines":[{"line_number":368,"context_line":"            LOG.warning(\"%(ag)s agent not found for the given host: %(host)s\","},{"line_number":369,"context_line":"                        {\u0027ag\u0027: const.AGENT_TYPE_L3,"},{"line_number":370,"context_line":"                         \u0027host\u0027: host_id})"},{"line_number":371,"context_line":"            return"},{"line_number":372,"context_line":"        try:"},{"line_number":373,"context_line":"            l3_obj.DvrFipGatewayPortAgentBinding("},{"line_number":374,"context_line":"                context, network_id\u003dnetwork_id,"}],"source_content_type":"text/x-python","patch_set":3,"id":"1fa4df85_e9ed7ab7","line":371,"range":{"start_line":371,"start_character":0,"end_line":371,"end_character":18},"in_reply_to":"1fa4df85_38cfadb1","updated":"2020-03-17 12:59:23.000000000","message":"Exactly as Rodolfo said, _get_agent_by_type_and_host() can\u0027t return None or {}, see https://github.com/openstack/neutron/blob/master/neutron/db/agents_db.py#L329","commit_id":"2baeae75199405d46927c073daf772b2a4144294"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"f4fa3c2b218b5d63e73282a18037eeedb6f6da1b","unresolved":false,"context_lines":[{"line_number":368,"context_line":"            LOG.warning(\"%(ag)s agent not found for the given host: %(host)s\","},{"line_number":369,"context_line":"                        {\u0027ag\u0027: const.AGENT_TYPE_L3,"},{"line_number":370,"context_line":"                         \u0027host\u0027: host_id})"},{"line_number":371,"context_line":"            return"},{"line_number":372,"context_line":"        try:"},{"line_number":373,"context_line":"            l3_obj.DvrFipGatewayPortAgentBinding("},{"line_number":374,"context_line":"                context, network_id\u003dnetwork_id,"}],"source_content_type":"text/x-python","patch_set":3,"id":"1fa4df85_38cfadb1","line":371,"range":{"start_line":371,"start_character":0,"end_line":371,"end_character":18},"in_reply_to":"1fa4df85_5d77fb09","updated":"2020-03-11 14:12:03.000000000","message":"But _get_agent_by_type_and_host will return an OVO or fail. The case of having None or {} is not possible.","commit_id":"2baeae75199405d46927c073daf772b2a4144294"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"a8a3b045627f84ab5688ff7579294d5a4108f72f","unresolved":false,"context_lines":[{"line_number":1031,"context_line":"            LOG.warning(\"%(ag)s agent not found for the given host: %(host)s\","},{"line_number":1032,"context_line":"                        {\u0027ag\u0027: const.AGENT_TYPE_L3,"},{"line_number":1033,"context_line":"                         \u0027host\u0027: host})"},{"line_number":1034,"context_line":"            return"},{"line_number":1035,"context_line":"        if not l3_agent_db:"},{"line_number":1036,"context_line":"            return"},{"line_number":1037,"context_line":""},{"line_number":1038,"context_line":"        l3_agent_mode \u003d self._get_agent_mode(l3_agent_db)"},{"line_number":1039,"context_line":"        if l3_agent_mode \u003d\u003d const.L3_AGENT_MODE_DVR_NO_EXTERNAL:"}],"source_content_type":"text/x-python","patch_set":3,"id":"1fa4df85_5d293bf0","line":1036,"range":{"start_line":1034,"start_character":0,"end_line":1036,"end_character":18},"updated":"2020-03-11 13:51:19.000000000","message":"mark","commit_id":"2baeae75199405d46927c073daf772b2a4144294"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"be272b19ef1c59fb8140f34592620824906bdf2d","unresolved":false,"context_lines":[{"line_number":1031,"context_line":"            LOG.warning(\"%(ag)s agent not found for the given host: %(host)s\","},{"line_number":1032,"context_line":"                        {\u0027ag\u0027: const.AGENT_TYPE_L3,"},{"line_number":1033,"context_line":"                         \u0027host\u0027: host})"},{"line_number":1034,"context_line":"            return"},{"line_number":1035,"context_line":"        if not l3_agent_db:"},{"line_number":1036,"context_line":"            return"},{"line_number":1037,"context_line":""},{"line_number":1038,"context_line":"        l3_agent_mode \u003d self._get_agent_mode(l3_agent_db)"},{"line_number":1039,"context_line":"        if l3_agent_mode \u003d\u003d const.L3_AGENT_MODE_DVR_NO_EXTERNAL:"}],"source_content_type":"text/x-python","patch_set":3,"id":"1fa4df85_093ed628","line":1036,"range":{"start_line":1034,"start_character":0,"end_line":1036,"end_character":18},"in_reply_to":"1fa4df85_5d293bf0","updated":"2020-03-17 12:59:23.000000000","message":"I think that this should be removed as is not needed. I proposed another patch to fix it https://review.opendev.org/713432","commit_id":"2baeae75199405d46927c073daf772b2a4144294"}]}
