)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":23804,"name":"Daniel Alvarez","email":"dalvarez@redhat.com","username":"dalvarez"},"change_message_id":"9d1c9f951bed6ba12125e6e6526f7c755087403f","unresolved":false,"context_lines":[{"line_number":11,"context_line":"For now we\u0027re using tuple: client IP Address and Network ID"},{"line_number":12,"context_line":"(added as header from HAProxy)."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"In case of some inconsistency in the OVN database, there is a"},{"line_number":15,"context_line":"possibility that for same tuple: ip_address and network_id there"},{"line_number":16,"context_line":"is more than one LSP defined."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"This patch adds check for existance of \u0027created_at\u0027 field in"},{"line_number":19,"context_line":"port external_ids. If all found ports have this field, then the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"1f493fa4_1190f349","line":16,"range":{"start_line":14,"start_character":0,"end_line":16,"end_character":29},"updated":"2020-04-28 14:53:31.000000000","message":"I understand the reasoning for this change.\nHowever I think that addressing the issue from the root should suffice. In my opinion, we should prevent ports to stale and that\u0027d be solved by fixing the delete_port() function in ovn_client. In that case, this patch should not be needed.\n\nMy concern is that adding yet another external id with to the object ports that is written to the NB, propagated by ovn-northd to the SB and communicated to all agents could be a bit expensive for the value that it\u0027ll bring if we fix the root issue.\n\nI\u0027m not against this change but if we\u0027re confident enough with addressing the root cause, then I think we could skip this. Question is: are we confident enough with just fixing the \u0027delete_port()\u0027 issue described in the bug? :)","commit_id":"8f05da2b7e53e97e296a4db9555320086777aa93"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"6af84ae226067d8bab31966c73a1b256176f9cf6","unresolved":false,"context_lines":[{"line_number":11,"context_line":"For now we\u0027re using tuple: client IP Address and Network ID"},{"line_number":12,"context_line":"(added as header from HAProxy)."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"In case of some inconsistency in the OVN database, there is a"},{"line_number":15,"context_line":"possibility that for same tuple: ip_address and network_id there"},{"line_number":16,"context_line":"is more than one LSP defined."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"This patch adds check for existance of \u0027created_at\u0027 field in"},{"line_number":19,"context_line":"port external_ids. If all found ports have this field, then the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"1f493fa4_22667fc2","line":16,"range":{"start_line":14,"start_character":0,"end_line":16,"end_character":29},"in_reply_to":"1f493fa4_1190f349","updated":"2020-04-28 16:01:00.000000000","message":"You detected the possible problems related the port deletion: the ACL deletion and the address update. Why don\u0027t we handle them?","commit_id":"8f05da2b7e53e97e296a4db9555320086777aa93"}],"neutron/agent/ovn/metadata/server.py":[{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"08fc0f665b72142c8e176ab778a3fd25c3be8eea","unresolved":false,"context_lines":[{"line_number":103,"context_line":"                newest_port \u003d sorted("},{"line_number":104,"context_line":"                    ports,"},{"line_number":105,"context_line":"                    key\u003dlambda x: timeutils.parse_isotime("},{"line_number":106,"context_line":"                        x.external_ids.get(\u0027created_at\u0027)),"},{"line_number":107,"context_line":"                    reverse\u003dTrue)[0]"},{"line_number":108,"context_line":"                external_ids \u003d newest_port.external_ids"},{"line_number":109,"context_line":"                LOG.warning("}],"source_content_type":"text/x-python","patch_set":3,"id":"1f493fa4_cd645025","line":106,"range":{"start_line":106,"start_character":24,"end_line":106,"end_character":58},"updated":"2020-04-27 12:55:14.000000000","message":"If this returns None it will raise an exception I believe. Should we account for it ? Specially for someone updating this code where ports already exist in the system without this key","commit_id":"b39a0920dcc23a23d0c72715b5b62017d5d5dc7b"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"90d17c94d30f51d89fac664d7d7da59c41ca4c95","unresolved":false,"context_lines":[{"line_number":103,"context_line":"                newest_port \u003d sorted("},{"line_number":104,"context_line":"                    ports,"},{"line_number":105,"context_line":"                    key\u003dlambda x: timeutils.parse_isotime("},{"line_number":106,"context_line":"                        x.external_ids.get(\u0027created_at\u0027)),"},{"line_number":107,"context_line":"                    reverse\u003dTrue)[0]"},{"line_number":108,"context_line":"                external_ids \u003d newest_port.external_ids"},{"line_number":109,"context_line":"                LOG.warning("}],"source_content_type":"text/x-python","patch_set":3,"id":"1f493fa4_88eb56da","line":106,"range":{"start_line":106,"start_character":24,"end_line":106,"end_character":58},"in_reply_to":"1f493fa4_cd645025","updated":"2020-04-27 12:59:00.000000000","message":"That is why I added exception handling for ValueError.\n\nExample:\n\n\u003e\u003e\u003e timeutils.parse_isotime(None)\nTraceback (most recent call last):\n  File \"/usr/local/lib/python3.6/dist-packages/oslo_utils/timeutils.py\", line 70, in parse_isotime\n    return iso8601.parse_date(timestr)\n  File \"/usr/local/lib/python3.6/dist-packages/iso8601/iso8601.py\", line 192, in parse_date\n    raise ParseError(\"Expecting a string %r\" % datestring)\niso8601.iso8601.ParseError: Expecting a string None\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n  File \"\u003cstdin\u003e\", line 1, in \u003cmodule\u003e\n  File \"/usr/local/lib/python3.6/dist-packages/oslo_utils/timeutils.py\", line 72, in parse_isotime\n    raise ValueError(six.text_type(e))\nValueError: Expecting a string None\n\u003e\u003e\u003e timeutils.parse_isotime(\u0027bhe\u0027)\nTraceback (most recent call last):\n  File \"/usr/local/lib/python3.6/dist-packages/oslo_utils/timeutils.py\", line 70, in parse_isotime\n    return iso8601.parse_date(timestr)\n  File \"/usr/local/lib/python3.6/dist-packages/iso8601/iso8601.py\", line 195, in parse_date\n    raise ParseError(\"Unable to parse date string %r\" % datestring)\niso8601.iso8601.ParseError: Unable to parse date string \u0027bhe\u0027\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n  File \"\u003cstdin\u003e\", line 1, in \u003cmodule\u003e\n  File \"/usr/local/lib/python3.6/dist-packages/oslo_utils/timeutils.py\", line 72, in parse_isotime\n    raise ValueError(six.text_type(e))\nValueError: Unable to parse date string \u0027bhe\u0027\n\u003e\u003e\u003e timeutils.parse_isotime(str(timeutils.utcnow()))\ndatetime.datetime(2020, 4, 27, 12, 57, 38, 640115, tzinfo\u003ddatetime.timezone.utc)\n\u003e\u003e\u003e","commit_id":"b39a0920dcc23a23d0c72715b5b62017d5d5dc7b"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"08fc0f665b72142c8e176ab778a3fd25c3be8eea","unresolved":false,"context_lines":[{"line_number":109,"context_line":"                LOG.warning("},{"line_number":110,"context_line":"                    \"Logical_Switch_Port %(lsp)s is the newest \""},{"line_number":111,"context_line":"                    \"port created in OVN database with IP %(ip)s \""},{"line_number":112,"context_line":"                    \"in network %(new)s and the its status \""},{"line_number":113,"context_line":"                    \"is UP. Using it to serve Metadata response.\","},{"line_number":114,"context_line":"                    {\u0027net\u0027: network_id,"},{"line_number":115,"context_line":"                     \u0027ip\u0027: remote_address,"}],"source_content_type":"text/x-python","patch_set":3,"id":"1f493fa4_2d87b4b7","line":112,"range":{"start_line":112,"start_character":34,"end_line":112,"end_character":37},"updated":"2020-04-27 12:55:14.000000000","message":"net, to patch the key in the dict","commit_id":"b39a0920dcc23a23d0c72715b5b62017d5d5dc7b"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"08fc0f665b72142c8e176ab778a3fd25c3be8eea","unresolved":false,"context_lines":[{"line_number":109,"context_line":"                LOG.warning("},{"line_number":110,"context_line":"                    \"Logical_Switch_Port %(lsp)s is the newest \""},{"line_number":111,"context_line":"                    \"port created in OVN database with IP %(ip)s \""},{"line_number":112,"context_line":"                    \"in network %(new)s and the its status \""},{"line_number":113,"context_line":"                    \"is UP. Using it to serve Metadata response.\","},{"line_number":114,"context_line":"                    {\u0027net\u0027: network_id,"},{"line_number":115,"context_line":"                     \u0027ip\u0027: remote_address,"}],"source_content_type":"text/x-python","patch_set":3,"id":"1f493fa4_8d9088ef","line":112,"range":{"start_line":112,"start_character":21,"end_line":112,"end_character":23},"updated":"2020-04-27 12:55:14.000000000","message":"on","commit_id":"b39a0920dcc23a23d0c72715b5b62017d5d5dc7b"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"90d17c94d30f51d89fac664d7d7da59c41ca4c95","unresolved":false,"context_lines":[{"line_number":109,"context_line":"                LOG.warning("},{"line_number":110,"context_line":"                    \"Logical_Switch_Port %(lsp)s is the newest \""},{"line_number":111,"context_line":"                    \"port created in OVN database with IP %(ip)s \""},{"line_number":112,"context_line":"                    \"in network %(new)s and the its status \""},{"line_number":113,"context_line":"                    \"is UP. Using it to serve Metadata response.\","},{"line_number":114,"context_line":"                    {\u0027net\u0027: network_id,"},{"line_number":115,"context_line":"                     \u0027ip\u0027: remote_address,"}],"source_content_type":"text/x-python","patch_set":3,"id":"1f493fa4_28a9628f","line":112,"range":{"start_line":112,"start_character":34,"end_line":112,"end_character":37},"in_reply_to":"1f493fa4_2d87b4b7","updated":"2020-04-27 12:59:00.000000000","message":"Done","commit_id":"b39a0920dcc23a23d0c72715b5b62017d5d5dc7b"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"90d17c94d30f51d89fac664d7d7da59c41ca4c95","unresolved":false,"context_lines":[{"line_number":109,"context_line":"                LOG.warning("},{"line_number":110,"context_line":"                    \"Logical_Switch_Port %(lsp)s is the newest \""},{"line_number":111,"context_line":"                    \"port created in OVN database with IP %(ip)s \""},{"line_number":112,"context_line":"                    \"in network %(new)s and the its status \""},{"line_number":113,"context_line":"                    \"is UP. Using it to serve Metadata response.\","},{"line_number":114,"context_line":"                    {\u0027net\u0027: network_id,"},{"line_number":115,"context_line":"                     \u0027ip\u0027: remote_address,"}],"source_content_type":"text/x-python","patch_set":3,"id":"1f493fa4_08ae2697","line":112,"range":{"start_line":112,"start_character":21,"end_line":112,"end_character":23},"in_reply_to":"1f493fa4_8d9088ef","updated":"2020-04-27 12:59:00.000000000","message":"Done","commit_id":"b39a0920dcc23a23d0c72715b5b62017d5d5dc7b"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"e7c308967635fe8bf105e4a39ddcf86df24f5b1c","unresolved":false,"context_lines":[{"line_number":102,"context_line":"            try:"},{"line_number":103,"context_line":"                newest_port \u003d sorted("},{"line_number":104,"context_line":"                    ports,"},{"line_number":105,"context_line":"                    key\u003dlambda x: timeutils.parse_isotime("},{"line_number":106,"context_line":"                        x.external_ids.get(\u0027created_at\u0027)),"},{"line_number":107,"context_line":"                    reverse\u003dTrue)[0]"},{"line_number":108,"context_line":"                external_ids \u003d newest_port.external_ids"},{"line_number":109,"context_line":"                LOG.warning("}],"source_content_type":"text/x-python","patch_set":4,"id":"1f493fa4_08b586cd","line":106,"range":{"start_line":105,"start_character":34,"end_line":106,"end_character":57},"updated":"2020-04-27 13:01:41.000000000","message":"This will raise ValueError if \"get\" will return None or some string that can\u0027t be parsed.","commit_id":"207248f9de195d5e632c1e9b004b8887ae946f92"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"6c644f18cc0db6c26eec23b8e77ab008b3f708d8","unresolved":false,"context_lines":[{"line_number":109,"context_line":"                LOG.warning("},{"line_number":110,"context_line":"                    \"Logical_Switch_Port %(lsp)s is the newest \""},{"line_number":111,"context_line":"                    \"port created in OVN database with IP %(ip)s \""},{"line_number":112,"context_line":"                    \"on network %(net)s and the its status \""},{"line_number":113,"context_line":"                    \"is UP. Using it to serve Metadata response.\","},{"line_number":114,"context_line":"                    {\u0027net\u0027: network_id,"},{"line_number":115,"context_line":"                     \u0027ip\u0027: remote_address,"},{"line_number":116,"context_line":"                     \u0027lsp\u0027: newest_port.uuid})"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f493fa4_fe3d70dd","line":113,"range":{"start_line":112,"start_character":51,"end_line":113,"end_character":26},"updated":"2020-04-27 14:09:45.000000000","message":"I don\u0027t know the status. I should remove it.","commit_id":"207248f9de195d5e632c1e9b004b8887ae946f92"}],"neutron/tests/unit/agent/ovn/metadata/test_server.py":[{"author":{"_account_id":11952,"name":"Flavio Fernandes","email":"flavio@flaviof.com","username":"ffernand"},"change_message_id":"0c7be020c264e7fad8499573f3906a572c0619a9","unresolved":false,"context_lines":[{"line_number":188,"context_line":"        expected \u003d (\u0027device_id_later_created\u0027, \u0027project_id_later\u0027)"},{"line_number":189,"context_line":"        observed \u003d self._get_instance_and_project_id_helper(headers, ports,"},{"line_number":190,"context_line":"                                                            network\u003d\u0027the_id\u0027)"},{"line_number":191,"context_line":"        self.assertEqual(expected, observed)"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"    def _proxy_request_test_helper(self, response_code\u003d200, method\u003d\u0027GET\u0027):"},{"line_number":194,"context_line":"        hdrs \u003d {\u0027X-Forwarded-For\u0027: \u00278.8.8.8\u0027}"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f493fa4_83721948","line":191,"range":{"start_line":191,"start_character":8,"end_line":191,"end_character":12},"updated":"2020-04-27 13:26:28.000000000","message":"nit: should this test also look for the warning log, to ensure that it happened?","commit_id":"207248f9de195d5e632c1e9b004b8887ae946f92"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"465090777f63ff2a93b2680873cd5d229069c9b2","unresolved":false,"context_lines":[{"line_number":188,"context_line":"        expected \u003d (\u0027device_id_later_created\u0027, \u0027project_id_later\u0027)"},{"line_number":189,"context_line":"        observed \u003d self._get_instance_and_project_id_helper(headers, ports,"},{"line_number":190,"context_line":"                                                            network\u003d\u0027the_id\u0027)"},{"line_number":191,"context_line":"        self.assertEqual(expected, observed)"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"    def _proxy_request_test_helper(self, response_code\u003d200, method\u003d\u0027GET\u0027):"},{"line_number":194,"context_line":"        hdrs \u003d {\u0027X-Forwarded-For\u0027: \u00278.8.8.8\u0027}"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f493fa4_fb9ba66f","line":191,"range":{"start_line":191,"start_character":8,"end_line":191,"end_character":12},"in_reply_to":"1f493fa4_83721948","updated":"2020-04-28 13:57:36.000000000","message":"Done","commit_id":"207248f9de195d5e632c1e9b004b8887ae946f92"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"31a592e3a8831a4c62bffdc0b0b3f93351aeb475","unresolved":false,"context_lines":[{"line_number":188,"context_line":"        expected \u003d (\u0027device_id_later_created\u0027, \u0027project_id_later\u0027)"},{"line_number":189,"context_line":"        observed \u003d self._get_instance_and_project_id_helper(headers, ports,"},{"line_number":190,"context_line":"                                                            network\u003d\u0027the_id\u0027)"},{"line_number":191,"context_line":"        self.assertEqual(expected, observed)"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"    def _proxy_request_test_helper(self, response_code\u003d200, method\u003d\u0027GET\u0027):"},{"line_number":194,"context_line":"        hdrs \u003d {\u0027X-Forwarded-For\u0027: \u00278.8.8.8\u0027}"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f493fa4_fe48d087","line":191,"range":{"start_line":191,"start_character":8,"end_line":191,"end_character":12},"in_reply_to":"1f493fa4_83721948","updated":"2020-04-27 14:08:50.000000000","message":"I can add this warning log checker here! Thanks","commit_id":"207248f9de195d5e632c1e9b004b8887ae946f92"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"6af84ae226067d8bab31966c73a1b256176f9cf6","unresolved":false,"context_lines":[{"line_number":187,"context_line":"                          \u0027neutron:project_id\u0027: \u0027project_id\u0027})"},{"line_number":188,"context_line":"        ports \u003d [[ovn_port, ovn_port_2]]"},{"line_number":189,"context_line":"        ovn_port_2.external_ids[\u0027created_at\u0027] \u003d str(timeutils.utcnow())"},{"line_number":190,"context_line":"        time.sleep(1)"},{"line_number":191,"context_line":"        ovn_port.external_ids[\u0027created_at\u0027] \u003d str(timeutils.utcnow())"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"        expected \u003d (\u0027device_id_later_created\u0027, \u0027project_id_later\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"1f493fa4_a75d8148","line":190,"updated":"2020-04-28 16:01:00.000000000","message":"I\u0027m not a fan of adding sleeps on tests. timeutils.utcnow() max resolution is in us, L189 and L191 are going always to be different","commit_id":"8f05da2b7e53e97e296a4db9555320086777aa93"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"bb639d92c2ada906571c0a00adf4b490c839a886","unresolved":false,"context_lines":[{"line_number":187,"context_line":"                          \u0027neutron:project_id\u0027: \u0027project_id\u0027})"},{"line_number":188,"context_line":"        ports \u003d [[ovn_port, ovn_port_2]]"},{"line_number":189,"context_line":"        ovn_port_2.external_ids[\u0027created_at\u0027] \u003d str(timeutils.utcnow())"},{"line_number":190,"context_line":"        time.sleep(1)"},{"line_number":191,"context_line":"        ovn_port.external_ids[\u0027created_at\u0027] \u003d str(timeutils.utcnow())"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"        expected \u003d (\u0027device_id_later_created\u0027, \u0027project_id_later\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"1f493fa4_72583e87","line":190,"in_reply_to":"1f493fa4_a75d8148","updated":"2020-05-06 09:04:58.000000000","message":"Yes, that is not needed.","commit_id":"8f05da2b7e53e97e296a4db9555320086777aa93"}]}
