)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":32586,"name":"Elvira García Ruiz","display_name":"Elvira","email":"egarciar@redhat.com","username":"elvira"},"change_message_id":"5e40a9aea7fdbf3b77402de32b0b6dbc2e07527e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"434291cb_3e23555e","updated":"2022-02-11 13:27:41.000000000","message":"LGTM!","commit_id":"6636f65663446d939a9e3379468bfbca6c9a4f7b"},{"author":{"_account_id":30380,"name":"ZhouHeng","email":"zhouhenglc@inspur.com","username":"zhouhenglc"},"change_message_id":"440b84348fcc1152b78a2800a244c77e9219eee4","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"3b05a090_915f0f06","updated":"2022-01-19 09:41:54.000000000","message":"recheck","commit_id":"6636f65663446d939a9e3379468bfbca6c9a4f7b"}],"neutron/services/ovn_l3/plugin.py":[{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"ba93a41daf66824506dbaeb407a8b221580036d3","unresolved":true,"context_lines":[{"line_number":345,"context_line":"            # device owner is router_gateway. We need to look into it and"},{"line_number":346,"context_line":"            # fix the problem in Neutron before updating it here."},{"line_number":347,"context_line":"            if host:"},{"line_number":348,"context_line":"                port \u003d self._plugin.update_port("},{"line_number":349,"context_line":"                    context, port[\u0027id\u0027],"},{"line_number":350,"context_line":"                    {\u0027port\u0027: {portbindings.HOST_ID: host}})"},{"line_number":351,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"c809ff65_afea5b50","line":348,"range":{"start_line":348,"start_character":16,"end_line":348,"end_character":46},"updated":"2022-03-08 08:16:30.000000000","message":"I don\u0027t understand this change. When the port binding is updated, the status of the port doesn\u0027t change. The port status is changed before. This port retrieved from the \"update_port\" method should have the same status as the one retrieved from \"get_ports\".\n\nAs you commented in the LP bug, first you set node A to down. This is when the port changes its status. When the GW port is bound again but to node B (attending PortBindingChassisEvent), this port status is already changed to down.\n\nI don\u0027t see how this code was failing before.","commit_id":"6636f65663446d939a9e3379468bfbca6c9a4f7b"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"de02a00a2eaaffb401a3ac425338c3747aefe220","unresolved":true,"context_lines":[{"line_number":345,"context_line":"            # device owner is router_gateway. We need to look into it and"},{"line_number":346,"context_line":"            # fix the problem in Neutron before updating it here."},{"line_number":347,"context_line":"            if host:"},{"line_number":348,"context_line":"                port \u003d self._plugin.update_port("},{"line_number":349,"context_line":"                    context, port[\u0027id\u0027],"},{"line_number":350,"context_line":"                    {\u0027port\u0027: {portbindings.HOST_ID: host}})"},{"line_number":351,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"feb05e5e_c856de38","line":348,"range":{"start_line":348,"start_character":16,"end_line":348,"end_character":46},"in_reply_to":"516396dc_f1d82715","updated":"2022-03-08 09:44:56.000000000","message":"Exactly, this what I was looking for. When the port binding is updated, we always set the port status to DOWN and clear the port binding.","commit_id":"6636f65663446d939a9e3379468bfbca6c9a4f7b"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"1d61bb81006418a5b44dab2d9b85d369f956fb96","unresolved":true,"context_lines":[{"line_number":345,"context_line":"            # device owner is router_gateway. We need to look into it and"},{"line_number":346,"context_line":"            # fix the problem in Neutron before updating it here."},{"line_number":347,"context_line":"            if host:"},{"line_number":348,"context_line":"                port \u003d self._plugin.update_port("},{"line_number":349,"context_line":"                    context, port[\u0027id\u0027],"},{"line_number":350,"context_line":"                    {\u0027port\u0027: {portbindings.HOST_ID: host}})"},{"line_number":351,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"aa63b004_b2d1c8a5","line":348,"range":{"start_line":348,"start_character":16,"end_line":348,"end_character":46},"in_reply_to":"8dd30644_1f6d0edd","updated":"2022-03-08 08:57:22.000000000","message":"This is not what Lucas is saying. What Lucas is stating is that \"update_port_status\" cannot be called from inside an active transaction. This is because \"update_port_status\" is calling \"update_port_statuses\" that has a transaction guard. That means \"update_port\" and \"update_port_status\" need to be in two different transactions.\n\nThat doesn\u0027t explain why the port status retrieved from \"get_ports\" is different from \"update_port\".","commit_id":"6636f65663446d939a9e3379468bfbca6c9a4f7b"},{"author":{"_account_id":30380,"name":"ZhouHeng","email":"zhouhenglc@inspur.com","username":"zhouhenglc"},"change_message_id":"a6020a3300646d8f2ed007b7a013839d2998f36f","unresolved":true,"context_lines":[{"line_number":345,"context_line":"            # device owner is router_gateway. We need to look into it and"},{"line_number":346,"context_line":"            # fix the problem in Neutron before updating it here."},{"line_number":347,"context_line":"            if host:"},{"line_number":348,"context_line":"                port \u003d self._plugin.update_port("},{"line_number":349,"context_line":"                    context, port[\u0027id\u0027],"},{"line_number":350,"context_line":"                    {\u0027port\u0027: {portbindings.HOST_ID: host}})"},{"line_number":351,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"516396dc_f1d82715","line":348,"range":{"start_line":348,"start_character":16,"end_line":348,"end_character":46},"in_reply_to":"aa63b004_b2d1c8a5","updated":"2022-03-08 09:17:57.000000000","message":"if we call \"update_port\" with update binding host, will set port status to down.\nhttps://github.com/openstack/neutron/blob/master/neutron/plugins/ml2/plugin.py#L1827\nhttps://github.com/openstack/neutron/blob/master/neutron/plugins/ml2/plugin.py#L532","commit_id":"6636f65663446d939a9e3379468bfbca6c9a4f7b"},{"author":{"_account_id":30380,"name":"ZhouHeng","email":"zhouhenglc@inspur.com","username":"zhouhenglc"},"change_message_id":"794961a718428771a21ba24f908ba571f4af96ff","unresolved":true,"context_lines":[{"line_number":345,"context_line":"            # device owner is router_gateway. We need to look into it and"},{"line_number":346,"context_line":"            # fix the problem in Neutron before updating it here."},{"line_number":347,"context_line":"            if host:"},{"line_number":348,"context_line":"                port \u003d self._plugin.update_port("},{"line_number":349,"context_line":"                    context, port[\u0027id\u0027],"},{"line_number":350,"context_line":"                    {\u0027port\u0027: {portbindings.HOST_ID: host}})"},{"line_number":351,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"8dd30644_1f6d0edd","line":348,"range":{"start_line":348,"start_character":16,"end_line":348,"end_character":46},"in_reply_to":"c809ff65_afea5b50","updated":"2022-03-08 08:42:46.000000000","message":"hi rodolfo, you can see lucasagomes‘s notes in L345. if port\u0027s device_owner is router_gateway will chagne port status to down.\nif port[\u0027status\u0027] is active(from L340 get_ports), after update_port(L348) port actual status will be change to down. if we do not update \"port[\u0027stauts\u0027]\", will not execute update_port_status and set port status to active.","commit_id":"6636f65663446d939a9e3379468bfbca6c9a4f7b"}]}
