)]}'
{"neutron/agent/ovn/metadata/agent.py":[{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"406e7b2e9076f2865ee5f06dac493caae8024e2b","unresolved":true,"context_lines":[{"line_number":145,"context_line":"    def match_fn(self, event, row, old):"},{"line_number":146,"context_line":"        try:"},{"line_number":147,"context_line":"            return (row.chassis[0].name \u003d\u003d self.agent.chassis and"},{"line_number":148,"context_line":"                    not old.chassis)"},{"line_number":149,"context_line":"        except (IndexError, AttributeError):"},{"line_number":150,"context_line":"            return False"},{"line_number":151,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"2abea7c0_9bc95387","side":"PARENT","line":148,"range":{"start_line":148,"start_character":20,"end_line":148,"end_character":35},"updated":"2023-03-30 11:33:23.000000000","message":"Why do you remove this condition?","commit_id":"6e1dbe978166a29c93bce0f52375319897c9b877"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"406e7b2e9076f2865ee5f06dac493caae8024e2b","unresolved":true,"context_lines":[{"line_number":355,"context_line":"            self.chassis,"},{"line_number":356,"context_line":"            self.net_chassis_id,"},{"line_number":357,"context_line":"        )"},{"line_number":358,"context_line":"        self.sb_idl.ovsdb_connection.idl.set_table_condition("},{"line_number":359,"context_line":"            \"Port_Binding\","},{"line_number":360,"context_line":"            ["},{"line_number":361,"context_line":"                [\"chassis\", \"\u003d\u003d\", [\"uuid\", str(self.net_chassis_id)]],"},{"line_number":362,"context_line":"                [\"type\", \"\u003d\u003d\", \"localport\"],"},{"line_number":363,"context_line":"            ],"},{"line_number":364,"context_line":"        )"},{"line_number":365,"context_line":""},{"line_number":366,"context_line":"        while ("},{"line_number":367,"context_line":"                self.sb_idl.idl.tables[\"Port_Binding\"].condition_state.acked !\u003d"}],"source_content_type":"text/x-python","patch_set":2,"id":"10c5ca6c_41d05094","line":364,"range":{"start_line":358,"start_character":0,"end_line":364,"end_character":9},"updated":"2023-03-30 11:33:23.000000000","message":"You should create this condition in \"MetadataAgentOvnSbIdl\", when creating the IDL instance.","commit_id":"e673977c9afae3af54b63fc2760668b76fa19b91"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"406e7b2e9076f2865ee5f06dac493caae8024e2b","unresolved":true,"context_lines":[{"line_number":363,"context_line":"            ],"},{"line_number":364,"context_line":"        )"},{"line_number":365,"context_line":""},{"line_number":366,"context_line":"        while ("},{"line_number":367,"context_line":"                self.sb_idl.idl.tables[\"Port_Binding\"].condition_state.acked !\u003d"},{"line_number":368,"context_line":"                self.sb_idl.idl.tables[\"Port_Binding\"].condition_state.latest"},{"line_number":369,"context_line":"        ):"},{"line_number":370,"context_line":"            # Wakes up connection.Connection.run() to run run"},{"line_number":371,"context_line":"            self.sb_idl.ovsdb_connection.txns.put(None)"},{"line_number":372,"context_line":"            LOG.debug(\"Waiting for Monitor condition to be acked\")"},{"line_number":373,"context_line":"            time.sleep(1)"},{"line_number":374,"context_line":""},{"line_number":375,"context_line":"    def _get_own_chassis_name(self):"},{"line_number":376,"context_line":"        \"\"\"Return the external_ids:system-id value of the Open_vSwitch table."}],"source_content_type":"text/x-python","patch_set":2,"id":"d6312cc5_da970f6e","line":373,"range":{"start_line":366,"start_character":7,"end_line":373,"end_character":25},"updated":"2023-03-30 11:33:23.000000000","message":"Why do you need this confirmation?","commit_id":"e673977c9afae3af54b63fc2760668b76fa19b91"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"05ef40955c8304b11a9faf9c4e35789e730bd5bc","unresolved":true,"context_lines":[{"line_number":363,"context_line":"            ],"},{"line_number":364,"context_line":"        )"},{"line_number":365,"context_line":""},{"line_number":366,"context_line":"        while ("},{"line_number":367,"context_line":"                self.sb_idl.idl.tables[\"Port_Binding\"].condition_state.acked !\u003d"},{"line_number":368,"context_line":"                self.sb_idl.idl.tables[\"Port_Binding\"].condition_state.latest"},{"line_number":369,"context_line":"        ):"},{"line_number":370,"context_line":"            # Wakes up connection.Connection.run() to run run"},{"line_number":371,"context_line":"            self.sb_idl.ovsdb_connection.txns.put(None)"},{"line_number":372,"context_line":"            LOG.debug(\"Waiting for Monitor condition to be acked\")"},{"line_number":373,"context_line":"            time.sleep(1)"},{"line_number":374,"context_line":""},{"line_number":375,"context_line":"    def _get_own_chassis_name(self):"},{"line_number":376,"context_line":"        \"\"\"Return the external_ids:system-id value of the Open_vSwitch table."}],"source_content_type":"text/x-python","patch_set":2,"id":"f5106878_602b9cad","line":373,"range":{"start_line":366,"start_character":7,"end_line":373,"end_character":25},"in_reply_to":"c3aa0448_6a0d3908","updated":"2023-04-24 14:29:05.000000000","message":"1) Create the SB IDL with the condition in L359\n2) Create and register an event to receive the Port_Binding register that matches what you are looking for.\n3) The agent will have an event (similar to \"_post_fork_event\"), that will be set when the previous mentioned event is received and the chassis_id written in the agent.\n\nHaving waits like this one proposed are not acceptable, we should have an event driver agent.","commit_id":"e673977c9afae3af54b63fc2760668b76fa19b91"},{"author":{"_account_id":35676,"name":"Max","email":"max.lamprecht@digits.schwarz","username":"lamprechtm"},"change_message_id":"e5da8de78d1beee9023f36c6586ed70aa1892ebd","unresolved":true,"context_lines":[{"line_number":363,"context_line":"            ],"},{"line_number":364,"context_line":"        )"},{"line_number":365,"context_line":""},{"line_number":366,"context_line":"        while ("},{"line_number":367,"context_line":"                self.sb_idl.idl.tables[\"Port_Binding\"].condition_state.acked !\u003d"},{"line_number":368,"context_line":"                self.sb_idl.idl.tables[\"Port_Binding\"].condition_state.latest"},{"line_number":369,"context_line":"        ):"},{"line_number":370,"context_line":"            # Wakes up connection.Connection.run() to run run"},{"line_number":371,"context_line":"            self.sb_idl.ovsdb_connection.txns.put(None)"},{"line_number":372,"context_line":"            LOG.debug(\"Waiting for Monitor condition to be acked\")"},{"line_number":373,"context_line":"            time.sleep(1)"},{"line_number":374,"context_line":""},{"line_number":375,"context_line":"    def _get_own_chassis_name(self):"},{"line_number":376,"context_line":"        \"\"\"Return the external_ids:system-id value of the Open_vSwitch table."}],"source_content_type":"text/x-python","patch_set":2,"id":"c3aa0448_6a0d3908","line":373,"range":{"start_line":366,"start_character":7,"end_line":373,"end_character":25},"in_reply_to":"d6312cc5_da970f6e","updated":"2023-03-31 12:02:36.000000000","message":"Updating the monitor condition in ovsdbapp is done asynchronously. But we need the data of Port_Bindings directly after the call of fetch_network_chassis_id() so we wait at this point until the monitor condition in IDL is acked so we can make sure the data is consistent. Otherwise it can be that the Port_Bindings are empty locally in the cache of IDL. This is not the nicest way and therefore is still WIP. Ideas here are very welcome.","commit_id":"e673977c9afae3af54b63fc2760668b76fa19b91"}],"neutron/agent/ovn/metadata/ovsdb.py":[{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"406e7b2e9076f2865ee5f06dac493caae8024e2b","unresolved":true,"context_lines":[{"line_number":56,"context_line":"        # Make sure we don\u0027t fetch anything at the startup."},{"line_number":57,"context_line":"        # After we received the uuid of the network agent, we will"},{"line_number":58,"context_line":"        # update the table condition to match the chassis id."},{"line_number":59,"context_line":"        self.set_table_condition(\u0027Port_Binding\u0027, [])"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"        if events:"},{"line_number":62,"context_line":"            self.notify_handler.watch_events(events)"}],"source_content_type":"text/x-python","patch_set":2,"id":"0011cdc7_9f166aaf","line":59,"range":{"start_line":59,"start_character":0,"end_line":59,"end_character":9},"updated":"2023-03-30 11:33:23.000000000","message":"Why don\u0027t you set the condition for Port_Binding here?","commit_id":"e673977c9afae3af54b63fc2760668b76fa19b91"},{"author":{"_account_id":35676,"name":"Max","email":"max.lamprecht@digits.schwarz","username":"lamprechtm"},"change_message_id":"e5da8de78d1beee9023f36c6586ed70aa1892ebd","unresolved":true,"context_lines":[{"line_number":56,"context_line":"        # Make sure we don\u0027t fetch anything at the startup."},{"line_number":57,"context_line":"        # After we received the uuid of the network agent, we will"},{"line_number":58,"context_line":"        # update the table condition to match the chassis id."},{"line_number":59,"context_line":"        self.set_table_condition(\u0027Port_Binding\u0027, [])"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"        if events:"},{"line_number":62,"context_line":"            self.notify_handler.watch_events(events)"}],"source_content_type":"text/x-python","patch_set":2,"id":"52f781bf_313eb141","line":59,"range":{"start_line":59,"start_character":0,"end_line":59,"end_character":9},"in_reply_to":"0011cdc7_9f166aaf","updated":"2023-03-31 12:02:36.000000000","message":"The reason why we set the Port_Binding to [] here is so we don\u0027t get any monitor events but the table still created in IDL. We need the chassis_id from the ovn-controller so we can set the table condition to this and only get monitor events for the chassis from the ovn-controller instead of getting all Port_Bindings events. Ultimately, it\u0027s this:\n1. initially no port_bindings\n2. lookup on chassis_id from ovn-controller\n3. update monitor condition from Port_Bindings to chassis_id from ovn-controller\n4. wait that the monitor condition is acked","commit_id":"e673977c9afae3af54b63fc2760668b76fa19b91"}],"neutron/agent/ovn/metadata/server.py":[{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"406e7b2e9076f2865ee5f06dac493caae8024e2b","unresolved":true,"context_lines":[{"line_number":99,"context_line":"        remote_address \u003d req.headers.get(\u0027X-Forwarded-For\u0027)"},{"line_number":100,"context_line":"        network_id \u003d req.headers.get(\u0027X-OVN-Network-ID\u0027)"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"        ports \u003d self.sb_idl.get_network_port_bindings_by_ip("},{"line_number":103,"context_line":"            self.net_chassis_id,"},{"line_number":104,"context_line":"            network_id,"},{"line_number":105,"context_line":"            remote_address)"}],"source_content_type":"text/x-python","patch_set":2,"id":"01566bae_5246dd69","line":102,"range":{"start_line":102,"start_character":28,"end_line":102,"end_character":59},"updated":"2023-03-30 11:33:23.000000000","message":"1) You are not updating this method.\n2) When adding a new parameter, please add it at the end of the method signature.","commit_id":"e673977c9afae3af54b63fc2760668b76fa19b91"},{"author":{"_account_id":35676,"name":"Max","email":"max.lamprecht@digits.schwarz","username":"lamprechtm"},"change_message_id":"e5da8de78d1beee9023f36c6586ed70aa1892ebd","unresolved":true,"context_lines":[{"line_number":99,"context_line":"        remote_address \u003d req.headers.get(\u0027X-Forwarded-For\u0027)"},{"line_number":100,"context_line":"        network_id \u003d req.headers.get(\u0027X-OVN-Network-ID\u0027)"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"        ports \u003d self.sb_idl.get_network_port_bindings_by_ip("},{"line_number":103,"context_line":"            self.net_chassis_id,"},{"line_number":104,"context_line":"            network_id,"},{"line_number":105,"context_line":"            remote_address)"}],"source_content_type":"text/x-python","patch_set":2,"id":"6ea6e087_d44866e4","line":102,"range":{"start_line":102,"start_character":28,"end_line":102,"end_character":59},"in_reply_to":"01566bae_5246dd69","updated":"2023-03-31 12:02:36.000000000","message":"changed 😊","commit_id":"e673977c9afae3af54b63fc2760668b76fa19b91"}]}
