)]}'
{"neutron/agent/ovn/metadata/server.py":[{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"833999c72869b41f57fcb995a6d4fd715137064d","unresolved":true,"context_lines":[{"line_number":80,"context_line":"        remote_address \u003d req.headers.get(\u0027X-Forwarded-For\u0027)"},{"line_number":81,"context_line":"        network_id \u003d req.headers.get(\u0027X-OVN-Network-ID\u0027)"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"        ports \u003d [port for port in self.sb_idl.get_network_port_bindings_by_ip("},{"line_number":84,"context_line":"            network_id, remote_address) if port.chassis]"},{"line_number":85,"context_line":"        num_ports \u003d len(ports)"},{"line_number":86,"context_line":"        if num_ports \u003d\u003d 1:"}],"source_content_type":"text/x-python","patch_set":1,"id":"ae52522e_1487e2b8","line":83,"range":{"start_line":83,"start_character":46,"end_line":83,"end_character":77},"updated":"2021-04-21 09:56:43.000000000","message":"How about we pass \"bound\u003dTrue\" to get_network_port_bindings_by_ip() and filter the empty chassis in the loop there? It would avoid double looping.","commit_id":"17b9a3a5cf62f49c8f8180287dad106257553dbb"},{"author":{"_account_id":23804,"name":"Daniel Alvarez","email":"dalvarez@redhat.com","username":"dalvarez"},"change_message_id":"e2daca075db99af6a03ac7b7fe88bce149ae3f3f","unresolved":false,"context_lines":[{"line_number":80,"context_line":"        remote_address \u003d req.headers.get(\u0027X-Forwarded-For\u0027)"},{"line_number":81,"context_line":"        network_id \u003d req.headers.get(\u0027X-OVN-Network-ID\u0027)"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"        ports \u003d [port for port in self.sb_idl.get_network_port_bindings_by_ip("},{"line_number":84,"context_line":"            network_id, remote_address) if port.chassis]"},{"line_number":85,"context_line":"        num_ports \u003d len(ports)"},{"line_number":86,"context_line":"        if num_ports \u003d\u003d 1:"}],"source_content_type":"text/x-python","patch_set":1,"id":"8cea6aab_b058da6e","line":83,"range":{"start_line":83,"start_character":46,"end_line":83,"end_character":77},"in_reply_to":"3e18f7d9_9d07f11f","updated":"2021-04-22 09:25:57.000000000","message":"Done","commit_id":"17b9a3a5cf62f49c8f8180287dad106257553dbb"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"c4e366185b5d49291c020dd00c6d29f864ac3dbc","unresolved":true,"context_lines":[{"line_number":80,"context_line":"        remote_address \u003d req.headers.get(\u0027X-Forwarded-For\u0027)"},{"line_number":81,"context_line":"        network_id \u003d req.headers.get(\u0027X-OVN-Network-ID\u0027)"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"        ports \u003d [port for port in self.sb_idl.get_network_port_bindings_by_ip("},{"line_number":84,"context_line":"            network_id, remote_address) if port.chassis]"},{"line_number":85,"context_line":"        num_ports \u003d len(ports)"},{"line_number":86,"context_line":"        if num_ports \u003d\u003d 1:"}],"source_content_type":"text/x-python","patch_set":1,"id":"3e18f7d9_9d07f11f","line":83,"range":{"start_line":83,"start_character":46,"end_line":83,"end_character":77},"in_reply_to":"5de478b2_6e8786d2","updated":"2021-04-21 10:56:03.000000000","message":"Code-wise I am fine with this approach but unittests need fixing:\n\nneutron.tests.unit.agent.ovn.metadata.test_server.TestMetadataProxyHandler.test_get_instance_id_network_id                                                                                    \n----------------------------------------------------------------------------------------------------------                                                                                    \n                                                                                                                                                                                              \nCaptured traceback:                                                                                                                                                                           \n~~~~~~~~~~~~~~~~~~~                                                                                                                                                                           \n    Traceback (most recent call last):                                                                                                                                                        \n                                                                                                                                                                                              \n      File \"/tmp/neutron/neutron/tests/base.py\", line 183, in func                                                                                                                            \n    return f(self, *args, **kwargs)                                                                                                                                                           \n\n      File \"/tmp/neutron/neutron/tests/unit/agent/ovn/metadata/test_server.py\", line 120, in test_get_instance_id_network_id\n    self._get_instance_and_project_id_helper(headers, ports,\n\n      File \"/tmp/neutron/neutron/tests/unit/agent/ovn/metadata/test_server.py\", line 101, in _get_instance_and_project_id_helper\n    self.handler._get_instance_and_project_id(req))\n\n      File \"/tmp/neutron/neutron/agent/ovn/metadata/server.py\", line 83, in _get_instance_and_project_id\n    ports \u003d [port for port in self.sb_idl.get_network_port_bindings_by_ip(\n\n      File \"/tmp/neutron/neutron/agent/ovn/metadata/server.py\", line 84, in \u003clistcomp\u003e\n    network_id, remote_address) if port.chassis]\n\n    AttributeError: \u0027OvnPortInfo\u0027 object has no attribute \u0027chassis\u0027","commit_id":"17b9a3a5cf62f49c8f8180287dad106257553dbb"},{"author":{"_account_id":23804,"name":"Daniel Alvarez","email":"dalvarez@redhat.com","username":"dalvarez"},"change_message_id":"bfd49a6826a94cbd8f9954da0fb3aca630543639","unresolved":true,"context_lines":[{"line_number":80,"context_line":"        remote_address \u003d req.headers.get(\u0027X-Forwarded-For\u0027)"},{"line_number":81,"context_line":"        network_id \u003d req.headers.get(\u0027X-OVN-Network-ID\u0027)"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"        ports \u003d [port for port in self.sb_idl.get_network_port_bindings_by_ip("},{"line_number":84,"context_line":"            network_id, remote_address) if port.chassis]"},{"line_number":85,"context_line":"        num_ports \u003d len(ports)"},{"line_number":86,"context_line":"        if num_ports \u003d\u003d 1:"}],"source_content_type":"text/x-python","patch_set":1,"id":"5de478b2_6e8786d2","line":83,"range":{"start_line":83,"start_character":46,"end_line":83,"end_character":77},"in_reply_to":"ae52522e_1487e2b8","updated":"2021-04-21 10:03:50.000000000","message":"Yes, i thought about it too.\n\nThis list is expected to be 100% of the times of one element so double looping is not that expensive. Also in the case where there\u0027s stale ports (until we fix the underlying bug), i don\u0027t expect this to be longer than 2 elements.\n\nHowever I can do what you propose","commit_id":"17b9a3a5cf62f49c8f8180287dad106257553dbb"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"cc744c7e7c19bb2f591f76d4f9508cab0bb71256","unresolved":true,"context_lines":[{"line_number":57,"context_line":"        # We need to open a connection to OVN SouthBound database for"},{"line_number":58,"context_line":"        # each worker so that we can process the metadata requests."},{"line_number":59,"context_line":"        self.sb_idl \u003d ovsdb.MetadataAgentOvnSbIdl("},{"line_number":60,"context_line":"            tables\u003d(\u0027Port_Binding\u0027, \u0027Datapath_Binding\u0027, \u0027Chassis\u0027),"},{"line_number":61,"context_line":"            chassis\u003dself.chassis).start()"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    @webob.dec.wsgify(RequestClass\u003dwebob.Request)"}],"source_content_type":"text/x-python","patch_set":4,"id":"6e22c3d6_828a2187","line":60,"range":{"start_line":60,"start_character":56,"end_line":60,"end_character":65},"updated":"2021-04-22 08:58:06.000000000","message":"Just wondering why do we need this? We\u0027re not watching any chassis events, do we? Or this will not have only effect on events from chassis table?","commit_id":"9d066b0303692d8be9ac055a2d2af4d792de2a5e"},{"author":{"_account_id":23804,"name":"Daniel Alvarez","email":"dalvarez@redhat.com","username":"dalvarez"},"change_message_id":"e2daca075db99af6a03ac7b7fe88bce149ae3f3f","unresolved":true,"context_lines":[{"line_number":57,"context_line":"        # We need to open a connection to OVN SouthBound database for"},{"line_number":58,"context_line":"        # each worker so that we can process the metadata requests."},{"line_number":59,"context_line":"        self.sb_idl \u003d ovsdb.MetadataAgentOvnSbIdl("},{"line_number":60,"context_line":"            tables\u003d(\u0027Port_Binding\u0027, \u0027Datapath_Binding\u0027, \u0027Chassis\u0027),"},{"line_number":61,"context_line":"            chassis\u003dself.chassis).start()"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    @webob.dec.wsgify(RequestClass\u003dwebob.Request)"}],"source_content_type":"text/x-python","patch_set":4,"id":"63085d67_f83f3e11","line":60,"range":{"start_line":60,"start_character":56,"end_line":60,"end_character":65},"in_reply_to":"55ce5ac0_c288f4ab","updated":"2021-04-22 09:25:57.000000000","message":"Yes, that\u0027s the reason! Otherwise we can\u0027t tell if the port is bound or not","commit_id":"9d066b0303692d8be9ac055a2d2af4d792de2a5e"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"3d31a109f232444723d3b057e733d046f003c5ad","unresolved":true,"context_lines":[{"line_number":57,"context_line":"        # We need to open a connection to OVN SouthBound database for"},{"line_number":58,"context_line":"        # each worker so that we can process the metadata requests."},{"line_number":59,"context_line":"        self.sb_idl \u003d ovsdb.MetadataAgentOvnSbIdl("},{"line_number":60,"context_line":"            tables\u003d(\u0027Port_Binding\u0027, \u0027Datapath_Binding\u0027, \u0027Chassis\u0027),"},{"line_number":61,"context_line":"            chassis\u003dself.chassis).start()"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    @webob.dec.wsgify(RequestClass\u003dwebob.Request)"}],"source_content_type":"text/x-python","patch_set":4,"id":"55ce5ac0_c288f4ab","line":60,"range":{"start_line":60,"start_character":56,"end_line":60,"end_character":65},"in_reply_to":"6e22c3d6_828a2187","updated":"2021-04-22 09:05:35.000000000","message":"I believe it may be because in the code we check if port.chassis is set, and for that we need to monitor this table ?\n\nDaniel might be able to confirm it.","commit_id":"9d066b0303692d8be9ac055a2d2af4d792de2a5e"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"77f1c1f188963c360c282759acb4b78d05b8502a","unresolved":true,"context_lines":[{"line_number":58,"context_line":"        # each worker so that we can process the metadata requests."},{"line_number":59,"context_line":"        self.sb_idl \u003d ovsdb.MetadataAgentOvnSbIdl("},{"line_number":60,"context_line":"            tables\u003d(\u0027Port_Binding\u0027, \u0027Datapath_Binding\u0027, \u0027Chassis\u0027),"},{"line_number":61,"context_line":"            chassis\u003dself.chassis).start()"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    @webob.dec.wsgify(RequestClass\u003dwebob.Request)"},{"line_number":64,"context_line":"    def __call__(self, req):"}],"source_content_type":"text/x-python","patch_set":4,"id":"32174737_b55baa37","line":61,"updated":"2021-04-22 09:04:36.000000000","message":"I think we may also need to try to register the Chassis_Private table here, saying because if we pass this chassis parameter it will try to create a condition on that table (in case it exists) [0]. Was this tested on a version of OVN that contains that table ?\n\nWe do something similar at [1].\n\nAlso note that [1] code is ugly because at the time there wasn\u0027t a better way to check if that table existed before we attempt to connect to the DB. Now ovsdbapp has this in place https://review.opendev.org/c/openstack/ovsdbapp/+/772955, maybe we should use it.\n\n[0] https://github.com/openstack/neutron/blob/d5b5f1ac9c19bc93037d35bf75d8805a02d952bc/neutron/agent/ovn/metadata/ovsdb.py#L41-L44\n\n[1] https://github.com/openstack/neutron/blob/d5b5f1ac9c19bc93037d35bf75d8805a02d952bc/neutron/agent/ovn/metadata/agent.py#L234-L247","commit_id":"9d066b0303692d8be9ac055a2d2af4d792de2a5e"},{"author":{"_account_id":23804,"name":"Daniel Alvarez","email":"dalvarez@redhat.com","username":"dalvarez"},"change_message_id":"e2daca075db99af6a03ac7b7fe88bce149ae3f3f","unresolved":true,"context_lines":[{"line_number":58,"context_line":"        # each worker so that we can process the metadata requests."},{"line_number":59,"context_line":"        self.sb_idl \u003d ovsdb.MetadataAgentOvnSbIdl("},{"line_number":60,"context_line":"            tables\u003d(\u0027Port_Binding\u0027, \u0027Datapath_Binding\u0027, \u0027Chassis\u0027),"},{"line_number":61,"context_line":"            chassis\u003dself.chassis).start()"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    @webob.dec.wsgify(RequestClass\u003dwebob.Request)"},{"line_number":64,"context_line":"    def __call__(self, req):"}],"source_content_type":"text/x-python","patch_set":4,"id":"4cff4259_59c1842c","line":61,"in_reply_to":"32174737_b55baa37","updated":"2021-04-22 09:25:57.000000000","message":"I tested it on a devstack setup running master with Chassis_Private and it works. The idea is to create that condition on \u0027chassis\u0027; the post_fork portion doesn\u0027t need Chassis_Private monitoring does it?","commit_id":"9d066b0303692d8be9ac055a2d2af4d792de2a5e"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"cdc863c3fac6c145faebc177de93f869b79ac608","unresolved":true,"context_lines":[{"line_number":58,"context_line":"        # each worker so that we can process the metadata requests."},{"line_number":59,"context_line":"        self.sb_idl \u003d ovsdb.MetadataAgentOvnSbIdl("},{"line_number":60,"context_line":"            tables\u003d(\u0027Port_Binding\u0027, \u0027Datapath_Binding\u0027, \u0027Chassis\u0027),"},{"line_number":61,"context_line":"            chassis\u003dself.chassis).start()"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    @webob.dec.wsgify(RequestClass\u003dwebob.Request)"},{"line_number":64,"context_line":"    def __call__(self, req):"}],"source_content_type":"text/x-python","patch_set":4,"id":"4ab7e5b7_1e0bb0dd","line":61,"in_reply_to":"4cff4259_59c1842c","updated":"2021-04-22 09:38:21.000000000","message":"Indeed, yeah perhaps we do not need Chassis_Private for this since we only looking for port.chassis. Thanks!","commit_id":"9d066b0303692d8be9ac055a2d2af4d792de2a5e"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"77f1c1f188963c360c282759acb4b78d05b8502a","unresolved":true,"context_lines":[{"line_number":83,"context_line":"        network_id \u003d req.headers.get(\u0027X-OVN-Network-ID\u0027)"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"        ports \u003d self.sb_idl.get_network_port_bindings_by_ip(network_id,"},{"line_number":86,"context_line":"                remote_address)"},{"line_number":87,"context_line":"        num_ports \u003d len(ports)"},{"line_number":88,"context_line":"        if num_ports \u003d\u003d 1:"},{"line_number":89,"context_line":"            external_ids \u003d ports[0].external_ids"}],"source_content_type":"text/x-python","patch_set":4,"id":"7654a0f7_d31e126a","line":86,"updated":"2021-04-22 09:04:36.000000000","message":"nit: unrelated change","commit_id":"9d066b0303692d8be9ac055a2d2af4d792de2a5e"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"cc744c7e7c19bb2f591f76d4f9508cab0bb71256","unresolved":true,"context_lines":[{"line_number":83,"context_line":"        network_id \u003d req.headers.get(\u0027X-OVN-Network-ID\u0027)"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"        ports \u003d self.sb_idl.get_network_port_bindings_by_ip(network_id,"},{"line_number":86,"context_line":"                remote_address)"},{"line_number":87,"context_line":"        num_ports \u003d len(ports)"},{"line_number":88,"context_line":"        if num_ports \u003d\u003d 1:"},{"line_number":89,"context_line":"            external_ids \u003d ports[0].external_ids"}],"source_content_type":"text/x-python","patch_set":4,"id":"bf7f7977_7bd89298","line":86,"updated":"2021-04-22 08:58:06.000000000","message":"unrelated change? also now the indent is wrong","commit_id":"9d066b0303692d8be9ac055a2d2af4d792de2a5e"},{"author":{"_account_id":23804,"name":"Daniel Alvarez","email":"dalvarez@redhat.com","username":"dalvarez"},"change_message_id":"e2daca075db99af6a03ac7b7fe88bce149ae3f3f","unresolved":true,"context_lines":[{"line_number":83,"context_line":"        network_id \u003d req.headers.get(\u0027X-OVN-Network-ID\u0027)"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"        ports \u003d self.sb_idl.get_network_port_bindings_by_ip(network_id,"},{"line_number":86,"context_line":"                remote_address)"},{"line_number":87,"context_line":"        num_ports \u003d len(ports)"},{"line_number":88,"context_line":"        if num_ports \u003d\u003d 1:"},{"line_number":89,"context_line":"            external_ids \u003d ports[0].external_ids"}],"source_content_type":"text/x-python","patch_set":4,"id":"2543b8a4_63eab27a","line":86,"in_reply_to":"bf7f7977_7bd89298","updated":"2021-04-22 09:25:57.000000000","message":"ops, will fix :)","commit_id":"9d066b0303692d8be9ac055a2d2af4d792de2a5e"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"3414bd4e663a68399f6bc0a9fc3c3c44f3dbef19","unresolved":true,"context_lines":[{"line_number":57,"context_line":"        # We need to open a connection to OVN SouthBound database for"},{"line_number":58,"context_line":"        # each worker so that we can process the metadata requests."},{"line_number":59,"context_line":"        self.sb_idl \u003d ovsdb.MetadataAgentOvnSbIdl("},{"line_number":60,"context_line":"            tables\u003d(\u0027Port_Binding\u0027, \u0027Datapath_Binding\u0027, \u0027Chassis\u0027),"},{"line_number":61,"context_line":"            chassis\u003dself.chassis).start()"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    @webob.dec.wsgify(RequestClass\u003dwebob.Request)"},{"line_number":64,"context_line":"    def __call__(self, req):"}],"source_content_type":"text/x-python","patch_set":5,"id":"f2c864c6_1c16a68d","line":61,"range":{"start_line":60,"start_character":56,"end_line":61,"end_character":41},"updated":"2021-04-22 16:51:06.000000000","message":"For reference: https://github.com/openstack/neutron/blob/98c934ef6a8041bbd7b99ac49f53986798e8ef81/neutron/agent/ovn/metadata/ovsdb.py#L41\n\nActually it looks like adding Chassis here without modifying the above would be OK because we don\u0027t also include Chassis_Private in the tables, so Chassis *would* be conditionally monitored. But in agent.py we pass both, so I guess that means there we\u0027ve always been listening for all Chassis and only our own Chassis_Private? Is that the intended behavior? Should it be something like:\n\n for table in set(tables).intersection({\u0027Chassis\u0027, \u0027Chassis_Private\u0027}):\n     self.tables[table].condition \u003d [[\u0027name\u0027, \u0027\u003d\u003d\u0027, chassis]]\n\nor am I misunderstanding how things should work?","commit_id":"32e938e698f260af6896f6179a5ffc0838677124"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"2b885764f4434dc8165f7a3ddd9ccc6028a888b2","unresolved":true,"context_lines":[{"line_number":57,"context_line":"        # We need to open a connection to OVN SouthBound database for"},{"line_number":58,"context_line":"        # each worker so that we can process the metadata requests."},{"line_number":59,"context_line":"        self.sb_idl \u003d ovsdb.MetadataAgentOvnSbIdl("},{"line_number":60,"context_line":"            tables\u003d(\u0027Port_Binding\u0027, \u0027Datapath_Binding\u0027, \u0027Chassis\u0027),"},{"line_number":61,"context_line":"            chassis\u003dself.chassis).start()"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    @webob.dec.wsgify(RequestClass\u003dwebob.Request)"},{"line_number":64,"context_line":"    def __call__(self, req):"}],"source_content_type":"text/x-python","patch_set":5,"id":"dc755967_e2d14124","line":61,"range":{"start_line":60,"start_character":56,"end_line":61,"end_character":41},"in_reply_to":"a7a9ef02_2bee1e05","updated":"2021-04-23 16:12:44.000000000","message":"I don\u0027t think that\u0027s what\u0027s happening, though. The register_table() is called for every table in tables that is passed. It\u0027s just the condition that is being set up based on whether Chsasis_Private is passed. So if we pass in both Chassis and Chassis_Private, we will register both tables. And dalvarez was getting an exception previously which made it seem like he actually needed to monitor the Chassis table specifically I thought.\n\nAm I misreading that?","commit_id":"32e938e698f260af6896f6179a5ffc0838677124"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"28b0a9dcbf6b85236439b9ac30ce55d996e593e2","unresolved":true,"context_lines":[{"line_number":57,"context_line":"        # We need to open a connection to OVN SouthBound database for"},{"line_number":58,"context_line":"        # each worker so that we can process the metadata requests."},{"line_number":59,"context_line":"        self.sb_idl \u003d ovsdb.MetadataAgentOvnSbIdl("},{"line_number":60,"context_line":"            tables\u003d(\u0027Port_Binding\u0027, \u0027Datapath_Binding\u0027, \u0027Chassis\u0027),"},{"line_number":61,"context_line":"            chassis\u003dself.chassis).start()"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    @webob.dec.wsgify(RequestClass\u003dwebob.Request)"},{"line_number":64,"context_line":"    def __call__(self, req):"}],"source_content_type":"text/x-python","patch_set":5,"id":"031be441_c1f01ec6","line":61,"range":{"start_line":60,"start_character":56,"end_line":61,"end_character":41},"in_reply_to":"db4ab8d9_48d84df7","updated":"2021-04-23 16:37:25.000000000","message":"Took the liberty to open the LP and submit the fix for it as a separated patch (as we talked on IRC): https://review.opendev.org/c/openstack/neutron/+/787780\n\nAdded you as co-author since I basically used ur code from the comment above for that patch.","commit_id":"32e938e698f260af6896f6179a5ffc0838677124"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"55a75f83537c7524d1ef978bef2f6e4439fcfbd0","unresolved":true,"context_lines":[{"line_number":57,"context_line":"        # We need to open a connection to OVN SouthBound database for"},{"line_number":58,"context_line":"        # each worker so that we can process the metadata requests."},{"line_number":59,"context_line":"        self.sb_idl \u003d ovsdb.MetadataAgentOvnSbIdl("},{"line_number":60,"context_line":"            tables\u003d(\u0027Port_Binding\u0027, \u0027Datapath_Binding\u0027, \u0027Chassis\u0027),"},{"line_number":61,"context_line":"            chassis\u003dself.chassis).start()"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    @webob.dec.wsgify(RequestClass\u003dwebob.Request)"},{"line_number":64,"context_line":"    def __call__(self, req):"}],"source_content_type":"text/x-python","patch_set":5,"id":"db4ab8d9_48d84df7","line":61,"range":{"start_line":60,"start_character":56,"end_line":61,"end_character":41},"in_reply_to":"dc755967_e2d14124","updated":"2021-04-23 16:23:50.000000000","message":"Oh I see what you saying (and we talked on IRC about it too). No, you are correct. So if both tables are passed the Chassis one will not be limited, the whole table is going to be monitored.\n\nWe should change this behavior. Perhaps as a separated patch tho ? It seems like a different problem than what this patch is fixing (tho somewhat related)","commit_id":"32e938e698f260af6896f6179a5ffc0838677124"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"65381d65f457a33069daf6f65627964924f54b90","unresolved":true,"context_lines":[{"line_number":57,"context_line":"        # We need to open a connection to OVN SouthBound database for"},{"line_number":58,"context_line":"        # each worker so that we can process the metadata requests."},{"line_number":59,"context_line":"        self.sb_idl \u003d ovsdb.MetadataAgentOvnSbIdl("},{"line_number":60,"context_line":"            tables\u003d(\u0027Port_Binding\u0027, \u0027Datapath_Binding\u0027, \u0027Chassis\u0027),"},{"line_number":61,"context_line":"            chassis\u003dself.chassis).start()"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    @webob.dec.wsgify(RequestClass\u003dwebob.Request)"},{"line_number":64,"context_line":"    def __call__(self, req):"}],"source_content_type":"text/x-python","patch_set":5,"id":"a7a9ef02_2bee1e05","line":61,"range":{"start_line":60,"start_character":56,"end_line":61,"end_character":41},"in_reply_to":"f2c864c6_1c16a68d","updated":"2021-04-23 08:15:06.000000000","message":"I think it\u0027s simpler than that. It\u0027s just, if the chassis parameter is passed to the method the code will monitor either the Chassis or Chassis_Private table. The later having priority, so if both tables are passed in the \"tables\" parameter, the only one being monitored is the Chassis_Private.\n\nWe could refactor that code one day :D","commit_id":"32e938e698f260af6896f6179a5ffc0838677124"}],"neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/impl_idl_ovn.py":[{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"cc744c7e7c19bb2f591f76d4f9508cab0bb71256","unresolved":true,"context_lines":[{"line_number":847,"context_line":"        return cmd.UpdateChassisExtIdsCommand("},{"line_number":848,"context_line":"            self, chassis, {desc_key: description}, if_exists\u003dFalse)"},{"line_number":849,"context_line":""},{"line_number":850,"context_line":"    def get_network_port_bindings_by_ip(self, network, ip_address, bound\u003dTrue):"},{"line_number":851,"context_line":"        rows \u003d self.db_list_rows(\u0027Port_Binding\u0027).execute(check_error\u003dTrue)"},{"line_number":852,"context_line":"        # TODO(twilson) It would be useful to have a db_find that takes a"},{"line_number":853,"context_line":"        # comparison function"}],"source_content_type":"text/x-python","patch_set":4,"id":"b1fa97af_58eb141a","line":850,"range":{"start_line":850,"start_character":73,"end_line":850,"end_character":77},"updated":"2021-04-22 08:58:06.000000000","message":"Shouldn\u0027t the default be False to keep the backward compatiblity?","commit_id":"9d066b0303692d8be9ac055a2d2af4d792de2a5e"},{"author":{"_account_id":23804,"name":"Daniel Alvarez","email":"dalvarez@redhat.com","username":"dalvarez"},"change_message_id":"e2daca075db99af6a03ac7b7fe88bce149ae3f3f","unresolved":true,"context_lines":[{"line_number":847,"context_line":"        return cmd.UpdateChassisExtIdsCommand("},{"line_number":848,"context_line":"            self, chassis, {desc_key: description}, if_exists\u003dFalse)"},{"line_number":849,"context_line":""},{"line_number":850,"context_line":"    def get_network_port_bindings_by_ip(self, network, ip_address, bound\u003dTrue):"},{"line_number":851,"context_line":"        rows \u003d self.db_list_rows(\u0027Port_Binding\u0027).execute(check_error\u003dTrue)"},{"line_number":852,"context_line":"        # TODO(twilson) It would be useful to have a db_find that takes a"},{"line_number":853,"context_line":"        # comparison function"}],"source_content_type":"text/x-python","patch_set":4,"id":"c19396ad_ee277a77","line":850,"range":{"start_line":850,"start_character":73,"end_line":850,"end_character":77},"in_reply_to":"b1fa97af_58eb141a","updated":"2021-04-22 09:25:57.000000000","message":"right! I changed it to True while testing after creating an OVN LSP with the same IP address of my instance... will change :)","commit_id":"9d066b0303692d8be9ac055a2d2af4d792de2a5e"},{"author":{"_account_id":23804,"name":"Daniel Alvarez","email":"dalvarez@redhat.com","username":"dalvarez"},"change_message_id":"a30fee436a3edb99f5226df2d2805354280749b2","unresolved":true,"context_lines":[{"line_number":847,"context_line":"        return cmd.UpdateChassisExtIdsCommand("},{"line_number":848,"context_line":"            self, chassis, {desc_key: description}, if_exists\u003dFalse)"},{"line_number":849,"context_line":""},{"line_number":850,"context_line":"    def get_network_port_bindings_by_ip(self, network, ip_address, bound\u003dTrue):"},{"line_number":851,"context_line":"        rows \u003d self.db_list_rows(\u0027Port_Binding\u0027).execute(check_error\u003dTrue)"},{"line_number":852,"context_line":"        # TODO(twilson) It would be useful to have a db_find that takes a"},{"line_number":853,"context_line":"        # comparison function"}],"source_content_type":"text/x-python","patch_set":4,"id":"efec988e_dc312ebc","line":850,"range":{"start_line":850,"start_character":73,"end_line":850,"end_character":77},"in_reply_to":"c19396ad_ee277a77","updated":"2021-04-22 09:28:15.000000000","message":"oh wait... no, we want it to be true, I can change the default value to False although there\u0027s no other callers.","commit_id":"9d066b0303692d8be9ac055a2d2af4d792de2a5e"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"2c1b1bd784f35104df6db90ef40d7ae3fa96803a","unresolved":true,"context_lines":[{"line_number":861,"context_line":"            # cycle when we are sure that all namespaces will be created with"},{"line_number":862,"context_line":"            # the Neutron network UUID and not anymore with the OVN datapath"},{"line_number":863,"context_line":"            # UUID."},{"line_number":864,"context_line":"            is_in_network \u003d lambda port: ("},{"line_number":865,"context_line":"                str(port.datapath.uuid) \u003d\u003d network or"},{"line_number":866,"context_line":"                utils.get_network_name_from_datapath(port.datapath) \u003d\u003d network)"},{"line_number":867,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"c18fb1bd_c840773b","line":864,"updated":"2021-04-22 15:11:30.000000000","message":"I like the lambda, it makes the condition below more readable.","commit_id":"32e938e698f260af6896f6179a5ffc0838677124"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"b1500ca9e1d7f09bea77eeed974fba1bfccf4c0e","unresolved":false,"context_lines":[{"line_number":861,"context_line":"            # cycle when we are sure that all namespaces will be created with"},{"line_number":862,"context_line":"            # the Neutron network UUID and not anymore with the OVN datapath"},{"line_number":863,"context_line":"            # UUID."},{"line_number":864,"context_line":"            is_in_network \u003d lambda port: ("},{"line_number":865,"context_line":"                str(port.datapath.uuid) \u003d\u003d network or"},{"line_number":866,"context_line":"                utils.get_network_name_from_datapath(port.datapath) \u003d\u003d network)"},{"line_number":867,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"9005ee06_5d0be229","line":864,"in_reply_to":"c18fb1bd_c840773b","updated":"2021-04-22 16:06:35.000000000","message":"I am amused by the lambda inside a nested function which could just be another netsted function. 😊","commit_id":"32e938e698f260af6896f6179a5ffc0838677124"}]}
