)]}'
{"neutron/agent/ovn/metadata/agent.py":[{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"974412ca7f80c31cd620164cb643efafd17d4e89","unresolved":false,"context_lines":[{"line_number":90,"context_line":""},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"class PortBindingChassisCreatedEvent(PortBindingChassisEvent):"},{"line_number":93,"context_line":"    LOG_MSG \u003d \"Port %s in datapath %s bound to our chassis\""},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    def match_fn(self, event, row, old):"},{"line_number":96,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"1fa4df85_4429d587","line":93,"range":{"start_line":93,"start_character":47,"end_line":93,"end_character":58},"updated":"2020-03-20 13:56:56.000000000","message":"May worth logging the actual chassis name","commit_id":"06fde66b0b05dc987a4280275813f0cf4bf54c88"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"a8c1e3d2cd641acf78f6a4b543086e65b19ece53","unresolved":false,"context_lines":[{"line_number":90,"context_line":""},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"class PortBindingChassisCreatedEvent(PortBindingChassisEvent):"},{"line_number":93,"context_line":"    LOG_MSG \u003d \"Port %s in datapath %s bound to our chassis\""},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    def match_fn(self, event, row, old):"},{"line_number":96,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"df33271e_011b2a1b","line":93,"range":{"start_line":93,"start_character":47,"end_line":93,"end_character":58},"in_reply_to":"1fa4df85_4429d587","updated":"2020-03-20 14:52:59.000000000","message":"You mean to figure out what\u0027s the current chassis or to see if the condition was correct? The first is logged on L171","commit_id":"06fde66b0b05dc987a4280275813f0cf4bf54c88"},{"author":{"_account_id":23804,"name":"Daniel Alvarez","email":"dalvarez@redhat.com","username":"dalvarez"},"change_message_id":"48aba8097658ebf90983b9d51fe09ca06ff0d882","unresolved":false,"context_lines":[{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    def match_fn(self, event, row, old):"},{"line_number":96,"context_line":"        try:"},{"line_number":97,"context_line":"            return (row.chassis[0].name \u003d\u003d self.agent.chassis and"},{"line_number":98,"context_line":"                    not old.chassis)"},{"line_number":99,"context_line":"        except (IndexError, AttributeError):"},{"line_number":100,"context_line":"            return False"},{"line_number":101,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1fa4df85_24f5b9ed","line":98,"range":{"start_line":97,"start_character":12,"end_line":98,"end_character":36},"updated":"2020-03-20 13:58:40.000000000","message":"I wonder if there\u0027d be a way from the IDL to set a condition on the ovsdb-server side to match on the chassis name. This way we would avoid receiving notifications from the server for ports bound to different hypervisors.\n\nHowever, apparently conditional monitoring puts extra load on ovsdb-server so hard to tell what\u0027s best. At least, this change is only doing it better than it was so the conditional monitoring would be a follow up investigation.","commit_id":"06fde66b0b05dc987a4280275813f0cf4bf54c88"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"d6bf251f7153674cc166802a19787718d87c05d7","unresolved":false,"context_lines":[{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    def match_fn(self, event, row, old):"},{"line_number":96,"context_line":"        try:"},{"line_number":97,"context_line":"            return (row.chassis[0].name \u003d\u003d self.agent.chassis and"},{"line_number":98,"context_line":"                    not old.chassis)"},{"line_number":99,"context_line":"        except (IndexError, AttributeError):"},{"line_number":100,"context_line":"            return False"},{"line_number":101,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"df33271e_e1bba60b","line":98,"range":{"start_line":97,"start_character":12,"end_line":98,"end_character":36},"in_reply_to":"1fa4df85_24f5b9ed","updated":"2020-03-20 14:50:13.000000000","message":"Yeah, we can absolutely do it and it seems like just doing a quick check on a name column before sending out the update shouldn\u0027t be too bad--surely not much worse than actually generating network packets and sending them out...","commit_id":"06fde66b0b05dc987a4280275813f0cf4bf54c88"},{"author":{"_account_id":23804,"name":"Daniel Alvarez","email":"dalvarez@redhat.com","username":"dalvarez"},"change_message_id":"48aba8097658ebf90983b9d51fe09ca06ff0d882","unresolved":false,"context_lines":[{"line_number":105,"context_line":""},{"line_number":106,"context_line":"    def match_fn(self, event, row, old):"},{"line_number":107,"context_line":"        try:"},{"line_number":108,"context_line":"            return (old.chassis[0].name \u003d\u003d self.agent.chassis and"},{"line_number":109,"context_line":"                    not row.chassis)"},{"line_number":110,"context_line":"        except (IndexError, AttributeError):"},{"line_number":111,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":1,"id":"1fa4df85_44855559","line":108,"range":{"start_line":108,"start_character":43,"end_line":108,"end_character":61},"updated":"2020-03-20 13:58:40.000000000","message":"This is safe to use here because it\u0027s read before connecting to SB DB [0].\n\n[0] https://github.com/openstack/neutron/blob/c9ddbfc7da5189d1f2c1e5bb64cac633fecb34c1/neutron/agent/ovn/metadata/agent.py#L171","commit_id":"06fde66b0b05dc987a4280275813f0cf4bf54c88"}],"neutron/tests/functional/agent/ovn/metadata/test_metadata_agent.py":[{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"974412ca7f80c31cd620164cb643efafd17d4e89","unresolved":false,"context_lines":[{"line_number":182,"context_line":"        def pb_created():"},{"line_number":183,"context_line":"            if m_pb_created.call_count \u003c 1:"},{"line_number":184,"context_line":"                return False"},{"line_number":185,"context_line":"            args \u003d m_pb_created.call_args[0]"},{"line_number":186,"context_line":"            self.assertEqual(\u0027update\u0027, args[0])"},{"line_number":187,"context_line":"            self.assertEqual(self.chassis_name, args[1].chassis[0].name)"},{"line_number":188,"context_line":"            self.assertFalse(args[2].chassis)"},{"line_number":189,"context_line":"            return True"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"        n_utils.wait_until_true("}],"source_content_type":"text/x-python","patch_set":1,"id":"1fa4df85_84b58d34","line":188,"range":{"start_line":185,"start_character":0,"end_line":188,"end_character":45},"updated":"2020-03-20 13:56:56.000000000","message":"Nit:\n\nexpected_calls \u003d [mock.call(\u0027update\u0027, self.chassis_name, False), ]\nm_pb_created.assert_has_calls(expected_calls)","commit_id":"06fde66b0b05dc987a4280275813f0cf4bf54c88"},{"author":{"_account_id":24791,"name":"Maciej Jozefczyk","email":"jeicam.pl@gmail.com","username":"maciej.jozefczyk"},"change_message_id":"12dd7fb2c7cd92b90f4854276d7ea663b8b351e7","unresolved":false,"context_lines":[{"line_number":182,"context_line":"        def pb_created():"},{"line_number":183,"context_line":"            if m_pb_created.call_count \u003c 1:"},{"line_number":184,"context_line":"                return False"},{"line_number":185,"context_line":"            args \u003d m_pb_created.call_args[0]"},{"line_number":186,"context_line":"            self.assertEqual(\u0027update\u0027, args[0])"},{"line_number":187,"context_line":"            self.assertEqual(self.chassis_name, args[1].chassis[0].name)"},{"line_number":188,"context_line":"            self.assertFalse(args[2].chassis)"},{"line_number":189,"context_line":"            return True"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"        n_utils.wait_until_true("}],"source_content_type":"text/x-python","patch_set":1,"id":"1fa4df85_64d8917a","line":188,"range":{"start_line":185,"start_character":0,"end_line":188,"end_character":45},"in_reply_to":"1fa4df85_84b58d34","updated":"2020-03-20 14:00:24.000000000","message":"++","commit_id":"06fde66b0b05dc987a4280275813f0cf4bf54c88"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"a8c1e3d2cd641acf78f6a4b543086e65b19ece53","unresolved":false,"context_lines":[{"line_number":182,"context_line":"        def pb_created():"},{"line_number":183,"context_line":"            if m_pb_created.call_count \u003c 1:"},{"line_number":184,"context_line":"                return False"},{"line_number":185,"context_line":"            args \u003d m_pb_created.call_args[0]"},{"line_number":186,"context_line":"            self.assertEqual(\u0027update\u0027, args[0])"},{"line_number":187,"context_line":"            self.assertEqual(self.chassis_name, args[1].chassis[0].name)"},{"line_number":188,"context_line":"            self.assertFalse(args[2].chassis)"},{"line_number":189,"context_line":"            return True"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"        n_utils.wait_until_true("}],"source_content_type":"text/x-python","patch_set":1,"id":"df33271e_21bc6eba","line":188,"range":{"start_line":185,"start_character":0,"end_line":188,"end_character":45},"in_reply_to":"1fa4df85_84b58d34","updated":"2020-03-20 14:52:59.000000000","message":"That\u0027s not the same because we don\u0027t pass to run self.chassis_name and False, but rows from OVSDB and those values are attributes of such objects. If I wanted to check the parameters, I\u0027d need to construct the row objects and compare those.","commit_id":"06fde66b0b05dc987a4280275813f0cf4bf54c88"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"d6bf251f7153674cc166802a19787718d87c05d7","unresolved":false,"context_lines":[{"line_number":188,"context_line":"            self.assertFalse(args[2].chassis)"},{"line_number":189,"context_line":"            return True"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"        n_utils.wait_until_true("},{"line_number":192,"context_line":"            pb_created,"},{"line_number":193,"context_line":"            timeout\u003d10,"},{"line_number":194,"context_line":"            exception\u003dException("}],"source_content_type":"text/x-python","patch_set":1,"id":"df33271e_c1ce6282","line":191,"updated":"2020-03-20 14:50:13.000000000","message":"nit: normally for ovsdb event \"did it happen\" stuff I like to use ovsdbapp.backend.ovs_idl.event.WaitEvent instead of wait_until_true().","commit_id":"06fde66b0b05dc987a4280275813f0cf4bf54c88"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"c3fad0b06613d3b6ccd5b264638923fbf6083eae","unresolved":false,"context_lines":[{"line_number":188,"context_line":"            self.assertFalse(args[2].chassis)"},{"line_number":189,"context_line":"            return True"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"        n_utils.wait_until_true("},{"line_number":192,"context_line":"            pb_created,"},{"line_number":193,"context_line":"            timeout\u003d10,"},{"line_number":194,"context_line":"            exception\u003dException("}],"source_content_type":"text/x-python","patch_set":1,"id":"df33271e_41dc1218","line":191,"in_reply_to":"df33271e_c1ce6282","updated":"2020-03-20 14:54:16.000000000","message":"But the event is what we\u0027re checking here. So wait_until_true waits until the event happened.","commit_id":"06fde66b0b05dc987a4280275813f0cf4bf54c88"}]}
