)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"8730ce8d10ebd35464be9f2afbc4620aad284874","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"For cases where the router is not DVR enabled, the unused gateway port will have nothing to delete it even if all the router attachments to the external network are deleted."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"The proposed fix creates the agent gw port only if the FIP associated to the VM port is being serviced by a DVR enabled router."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Closes-Bug: #1810349"},{"line_number":18,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"ffd0ebdf_4c5bd32d","line":15,"updated":"2019-01-03 09:15:52.000000000","message":"Please wrap all lines at 73 chars. It\u0027s much easier to read then :)","commit_id":"280a16f832f9f80d469206cfc86ac119826a8ca2"},{"author":{"_account_id":29709,"name":"Enyinna Ochulor","email":"enyinna.ochulor@intel.com","username":"eochulor"},"change_message_id":"025e583166acbc9add42a4d974a35ea22ca6daf1","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"For cases where the router is not DVR enabled, the unused gateway port will have nothing to delete it even if all the router attachments to the external network are deleted."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"The proposed fix creates the agent gw port only if the FIP associated to the VM port is being serviced by a DVR enabled router."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Closes-Bug: #1810349"},{"line_number":18,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"ffd0ebdf_0f0daf3d","line":15,"in_reply_to":"ffd0ebdf_4c5bd32d","updated":"2019-02-04 17:35:57.000000000","message":"Done :)","commit_id":"280a16f832f9f80d469206cfc86ac119826a8ca2"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"791a5d2fcebcd223e89cc79850d9265f714d7eb9","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Enyinna Ochulor \u003cenyinna.ochulor@intel.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2019-01-03 19:07:19 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fixes agent gw ports created on non dvr destination hosts"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"VM migration between nodes creates fips in non-DVR cases. "},{"line_number":10,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"dfd5e7cf_21e2fad6","line":7,"range":{"start_line":7,"start_character":0,"end_line":7,"end_character":57},"updated":"2019-01-08 08:48:21.000000000","message":"I think that the title exceeds the number of characters, take a look this link https://wiki.openstack.org/wiki/GitCommitMessages","commit_id":"222de6aabd3d61f8de20c96f1c3669f8c1b8c6b4"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"5534a0021a3e2ed5fd2a6e6f282bc3eb7975abb5","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fixes agent gw ports created on non dvr destination hosts"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"VM migration between nodes creates fips in non-DVR cases. "},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Fix is an optimization for DVR enabled routers on destination hosts. "},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"dfd5e7cf_ff5ee243","line":9,"updated":"2019-01-07 09:42:59.000000000","message":"tailing white space","commit_id":"222de6aabd3d61f8de20c96f1c3669f8c1b8c6b4"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"5534a0021a3e2ed5fd2a6e6f282bc3eb7975abb5","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"VM migration between nodes creates fips in non-DVR cases. "},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Fix is an optimization for DVR enabled routers on destination hosts. "},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Unused gw ports have nothing to delete them when DVR isn\u0027t enabled ."},{"line_number":14,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"dfd5e7cf_1f5c064a","line":11,"updated":"2019-01-07 09:42:59.000000000","message":"tailing white space","commit_id":"222de6aabd3d61f8de20c96f1c3669f8c1b8c6b4"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"5534a0021a3e2ed5fd2a6e6f282bc3eb7975abb5","unresolved":false,"context_lines":[{"line_number":11,"context_line":"Fix is an optimization for DVR enabled routers on destination hosts. "},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Unused gw ports have nothing to delete them when DVR isn\u0027t enabled ."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Fix creates agent gw port if FIP for VM port has DVR enabled router."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Closes-Bug: #1810349"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"dfd5e7cf_df551e1f","line":14,"updated":"2019-01-07 09:42:59.000000000","message":"Nit, maybe you can save these empty lines. : )","commit_id":"222de6aabd3d61f8de20c96f1c3669f8c1b8c6b4"}],"neutron/db/l3_dvr_db.py":[{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"e312cc814caac309314609f7a754aedc8f063b45","unresolved":false,"context_lines":[{"line_number":964,"context_line":"        if not fips:"},{"line_number":965,"context_line":"            return"},{"line_number":966,"context_line":"        fip \u003d fips[0]"},{"line_number":967,"context_line":"        if not fip or not fip.get(\u0027router_id\u0027):"},{"line_number":968,"context_line":"            return"},{"line_number":969,"context_line":"        network_id \u003d fip.get(\u0027floating_network_id\u0027)"},{"line_number":970,"context_line":"        agent_gw_port \u003d self.create_fip_agent_gw_port_if_not_exists("}],"source_content_type":"text/x-python","patch_set":1,"id":"ffd0ebdf_6d71eee0","line":967,"updated":"2019-01-03 19:06:22.000000000","message":"Wouldn\u0027t L964 prevent against fip being not valid?","commit_id":"280a16f832f9f80d469206cfc86ac119826a8ca2"},{"author":{"_account_id":29709,"name":"Enyinna Ochulor","email":"enyinna.ochulor@intel.com","username":"eochulor"},"change_message_id":"025e583166acbc9add42a4d974a35ea22ca6daf1","unresolved":false,"context_lines":[{"line_number":964,"context_line":"        if not fips:"},{"line_number":965,"context_line":"            return"},{"line_number":966,"context_line":"        fip \u003d fips[0]"},{"line_number":967,"context_line":"        if not fip or not fip.get(\u0027router_id\u0027):"},{"line_number":968,"context_line":"            return"},{"line_number":969,"context_line":"        network_id \u003d fip.get(\u0027floating_network_id\u0027)"},{"line_number":970,"context_line":"        agent_gw_port \u003d self.create_fip_agent_gw_port_if_not_exists("}],"source_content_type":"text/x-python","patch_set":1,"id":"9fdfeff1_53acf8eb","line":967,"in_reply_to":"ffd0ebdf_6d71eee0","updated":"2019-02-04 17:35:57.000000000","message":"I changed this.\n\nThanks, Brian!","commit_id":"280a16f832f9f80d469206cfc86ac119826a8ca2"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"8730ce8d10ebd35464be9f2afbc4620aad284874","unresolved":false,"context_lines":[{"line_number":965,"context_line":"            return"},{"line_number":966,"context_line":"        fip \u003d fips[0]"},{"line_number":967,"context_line":"        if not fip or not fip.get(\u0027router_id\u0027):"},{"line_number":968,"context_line":"            return"},{"line_number":969,"context_line":"        network_id \u003d fip.get(\u0027floating_network_id\u0027)"},{"line_number":970,"context_line":"        agent_gw_port \u003d self.create_fip_agent_gw_port_if_not_exists("},{"line_number":971,"context_line":"            context.elevated(), network_id, host)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ffd0ebdf_ac491f61","line":968,"updated":"2019-01-03 09:15:52.000000000","message":"Maybe You should add some unit or functional test to cover such case?","commit_id":"280a16f832f9f80d469206cfc86ac119826a8ca2"},{"author":{"_account_id":29709,"name":"Enyinna Ochulor","email":"enyinna.ochulor@intel.com","username":"eochulor"},"change_message_id":"025e583166acbc9add42a4d974a35ea22ca6daf1","unresolved":false,"context_lines":[{"line_number":965,"context_line":"            return"},{"line_number":966,"context_line":"        fip \u003d fips[0]"},{"line_number":967,"context_line":"        if not fip or not fip.get(\u0027router_id\u0027):"},{"line_number":968,"context_line":"            return"},{"line_number":969,"context_line":"        network_id \u003d fip.get(\u0027floating_network_id\u0027)"},{"line_number":970,"context_line":"        agent_gw_port \u003d self.create_fip_agent_gw_port_if_not_exists("},{"line_number":971,"context_line":"            context.elevated(), network_id, host)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ffd0ebdf_3a0f932f","line":968,"in_reply_to":"ffd0ebdf_ac491f61","updated":"2019-02-04 17:35:57.000000000","message":"Working on this. I checked the test coverage and this isn\u0027t covered.\nI\u0027ve added unit tests. Thanks, Slawek!","commit_id":"280a16f832f9f80d469206cfc86ac119826a8ca2"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"e312cc814caac309314609f7a754aedc8f063b45","unresolved":false,"context_lines":[{"line_number":972,"context_line":"        LOG.debug(\"Port-in-Migration: Floatingip Agent Gateway port \""},{"line_number":973,"context_line":"                  \"%(gw)s created for the future host: %(dest_host)s\","},{"line_number":974,"context_line":"                  {\u0027gw\u0027: agent_gw_port,"},{"line_number":975,"context_line":"                   \u0027dest_host\u0027: host})"},{"line_number":976,"context_line":""},{"line_number":977,"context_line":"    def create_fip_agent_gw_port_if_not_exists("},{"line_number":978,"context_line":"        self, context, network_id, host):"}],"source_content_type":"text/x-python","patch_set":1,"id":"ffd0ebdf_83b65ed9","line":975,"updated":"2019-01-03 19:06:22.000000000","message":"Odd that we print this message regardless of if we create a new port, I\u0027ll refactor some of this in another patch.","commit_id":"280a16f832f9f80d469206cfc86ac119826a8ca2"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"e312cc814caac309314609f7a754aedc8f063b45","unresolved":false,"context_lines":[{"line_number":993,"context_line":"            return"},{"line_number":994,"context_line":"        l3_agent_mode \u003d self._get_agent_mode(l3_agent_db)"},{"line_number":995,"context_line":"        if l3_agent_mode \u003d\u003d const.L3_AGENT_MODE_DVR_NO_EXTERNAL:"},{"line_number":996,"context_line":"            return"},{"line_number":997,"context_line":"        if l3_agent_db:"},{"line_number":998,"context_line":"            LOG.debug(\"Agent ID exists: %s\", l3_agent_db[\u0027id\u0027])"},{"line_number":999,"context_line":"            f_port \u003d self._get_agent_gw_ports_exist_for_network("}],"source_content_type":"text/x-python","patch_set":1,"id":"ffd0ebdf_e3908a98","line":996,"updated":"2019-01-03 19:06:22.000000000","message":"Seems like the check should just be here, checking l3_agent_mode is not L3_AGENT_MODE_DVR or L3_AGENT_MODE_DVR_SNAT, or is L3_AGENT_MODE_LEGACY.","commit_id":"280a16f832f9f80d469206cfc86ac119826a8ca2"},{"author":{"_account_id":29709,"name":"Enyinna Ochulor","email":"enyinna.ochulor@intel.com","username":"eochulor"},"change_message_id":"025e583166acbc9add42a4d974a35ea22ca6daf1","unresolved":false,"context_lines":[{"line_number":993,"context_line":"            return"},{"line_number":994,"context_line":"        l3_agent_mode \u003d self._get_agent_mode(l3_agent_db)"},{"line_number":995,"context_line":"        if l3_agent_mode \u003d\u003d const.L3_AGENT_MODE_DVR_NO_EXTERNAL:"},{"line_number":996,"context_line":"            return"},{"line_number":997,"context_line":"        if l3_agent_db:"},{"line_number":998,"context_line":"            LOG.debug(\"Agent ID exists: %s\", l3_agent_db[\u0027id\u0027])"},{"line_number":999,"context_line":"            f_port \u003d self._get_agent_gw_ports_exist_for_network("}],"source_content_type":"text/x-python","patch_set":1,"id":"ffd0ebdf_9a279fb7","line":996,"in_reply_to":"ffd0ebdf_e3908a98","updated":"2019-02-04 17:35:57.000000000","message":"Looking into this.","commit_id":"280a16f832f9f80d469206cfc86ac119826a8ca2"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"5534a0021a3e2ed5fd2a6e6f282bc3eb7975abb5","unresolved":false,"context_lines":[{"line_number":964,"context_line":"        if not fips:"},{"line_number":965,"context_line":"            return"},{"line_number":966,"context_line":"        fip \u003d fips[0]"},{"line_number":967,"context_line":"        if not fip or not fip.get(\u0027router_id\u0027):"},{"line_number":968,"context_line":"            return"},{"line_number":969,"context_line":"        network_id \u003d fip.get(\u0027floating_network_id\u0027)"},{"line_number":970,"context_line":"        agent_gw_port \u003d self.create_fip_agent_gw_port_if_not_exists("}],"source_content_type":"text/x-python","patch_set":2,"id":"dfd5e7cf_bfaa9a16","line":967,"range":{"start_line":967,"start_character":15,"end_line":967,"end_character":18},"updated":"2019-01-07 09:42:59.000000000","message":"I\u0027m curious about fip here is None or what?","commit_id":"222de6aabd3d61f8de20c96f1c3669f8c1b8c6b4"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"5534a0021a3e2ed5fd2a6e6f282bc3eb7975abb5","unresolved":false,"context_lines":[{"line_number":964,"context_line":"        if not fips:"},{"line_number":965,"context_line":"            return"},{"line_number":966,"context_line":"        fip \u003d fips[0]"},{"line_number":967,"context_line":"        if not fip or not fip.get(\u0027router_id\u0027):"},{"line_number":968,"context_line":"            return"},{"line_number":969,"context_line":"        network_id \u003d fip.get(\u0027floating_network_id\u0027)"},{"line_number":970,"context_line":"        agent_gw_port \u003d self.create_fip_agent_gw_port_if_not_exists("}],"source_content_type":"text/x-python","patch_set":2,"id":"dfd5e7cf_9f50f634","line":967,"range":{"start_line":967,"start_character":26,"end_line":967,"end_character":46},"updated":"2019-01-07 09:42:59.000000000","message":"IMO, if a floating IP is binding to a port, it will always have the router id. Interesting, why the router id is not set? Any information?","commit_id":"222de6aabd3d61f8de20c96f1c3669f8c1b8c6b4"},{"author":{"_account_id":29709,"name":"Enyinna Ochulor","email":"enyinna.ochulor@intel.com","username":"eochulor"},"change_message_id":"025e583166acbc9add42a4d974a35ea22ca6daf1","unresolved":false,"context_lines":[{"line_number":964,"context_line":"        if not fips:"},{"line_number":965,"context_line":"            return"},{"line_number":966,"context_line":"        fip \u003d fips[0]"},{"line_number":967,"context_line":"        if not fip or not fip.get(\u0027router_id\u0027):"},{"line_number":968,"context_line":"            return"},{"line_number":969,"context_line":"        network_id \u003d fip.get(\u0027floating_network_id\u0027)"},{"line_number":970,"context_line":"        agent_gw_port \u003d self.create_fip_agent_gw_port_if_not_exists("}],"source_content_type":"text/x-python","patch_set":2,"id":"9fdfeff1_533e38b8","line":967,"range":{"start_line":967,"start_character":26,"end_line":967,"end_character":46},"in_reply_to":"dfd5e7cf_9f50f634","updated":"2019-02-04 17:35:57.000000000","message":"I added more code. And I changed this.\n\nThanks, LIU!","commit_id":"222de6aabd3d61f8de20c96f1c3669f8c1b8c6b4"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"791a5d2fcebcd223e89cc79850d9265f714d7eb9","unresolved":false,"context_lines":[{"line_number":964,"context_line":"        if not fips:"},{"line_number":965,"context_line":"            return"},{"line_number":966,"context_line":"        fip \u003d fips[0]"},{"line_number":967,"context_line":"        if not fip or not fip.get(\u0027router_id\u0027):"},{"line_number":968,"context_line":"            return"},{"line_number":969,"context_line":"        network_id \u003d fip.get(\u0027floating_network_id\u0027)"},{"line_number":970,"context_line":"        agent_gw_port \u003d self.create_fip_agent_gw_port_if_not_exists("},{"line_number":971,"context_line":"            context.elevated(), network_id, host)"},{"line_number":972,"context_line":"        LOG.debug(\"Port-in-Migration: Floatingip Agent Gateway port \""},{"line_number":973,"context_line":"                  \"%(gw)s created for the future host: %(dest_host)s\","},{"line_number":974,"context_line":"                  {\u0027gw\u0027: agent_gw_port,"},{"line_number":975,"context_line":"                   \u0027dest_host\u0027: host})"},{"line_number":976,"context_line":""},{"line_number":977,"context_line":"    def create_fip_agent_gw_port_if_not_exists("},{"line_number":978,"context_line":"        self, context, network_id, host):"}],"source_content_type":"text/x-python","patch_set":2,"id":"dfd5e7cf_012b36eb","line":975,"range":{"start_line":967,"start_character":8,"end_line":975,"end_character":38},"updated":"2019-01-08 08:48:21.000000000","message":"Why don\u0027t just include the remaining instructions inside of the if sentence?","commit_id":"222de6aabd3d61f8de20c96f1c3669f8c1b8c6b4"},{"author":{"_account_id":29709,"name":"Enyinna Ochulor","email":"enyinna.ochulor@intel.com","username":"eochulor"},"change_message_id":"025e583166acbc9add42a4d974a35ea22ca6daf1","unresolved":false,"context_lines":[{"line_number":964,"context_line":"        if not fips:"},{"line_number":965,"context_line":"            return"},{"line_number":966,"context_line":"        fip \u003d fips[0]"},{"line_number":967,"context_line":"        if not fip or not fip.get(\u0027router_id\u0027):"},{"line_number":968,"context_line":"            return"},{"line_number":969,"context_line":"        network_id \u003d fip.get(\u0027floating_network_id\u0027)"},{"line_number":970,"context_line":"        agent_gw_port \u003d self.create_fip_agent_gw_port_if_not_exists("},{"line_number":971,"context_line":"            context.elevated(), network_id, host)"},{"line_number":972,"context_line":"        LOG.debug(\"Port-in-Migration: Floatingip Agent Gateway port \""},{"line_number":973,"context_line":"                  \"%(gw)s created for the future host: %(dest_host)s\","},{"line_number":974,"context_line":"                  {\u0027gw\u0027: agent_gw_port,"},{"line_number":975,"context_line":"                   \u0027dest_host\u0027: host})"},{"line_number":976,"context_line":""},{"line_number":977,"context_line":"    def create_fip_agent_gw_port_if_not_exists("},{"line_number":978,"context_line":"        self, context, network_id, host):"}],"source_content_type":"text/x-python","patch_set":2,"id":"9fdfeff1_736edcc9","line":975,"range":{"start_line":967,"start_character":8,"end_line":975,"end_character":38},"in_reply_to":"dfd5e7cf_012b36eb","updated":"2019-02-04 17:35:57.000000000","message":"I added more code, and unit tests.\n\nThanks, Victor!","commit_id":"222de6aabd3d61f8de20c96f1c3669f8c1b8c6b4"},{"author":{"_account_id":25618,"name":"Paweł Suder","email":"pawel@suder.info","username":"SuderPawel"},"change_message_id":"e776e2601d165da937271671750a3f6194c1ca10","unresolved":false,"context_lines":[{"line_number":962,"context_line":"        \"\"\"Create fip agent_gw_port on host if not exists\"\"\""},{"line_number":963,"context_line":"        fips \u003d self._get_floatingips_by_port_id(context, port[\u0027id\u0027])"},{"line_number":964,"context_line":"        if not fips:"},{"line_number":965,"context_line":"            return"},{"line_number":966,"context_line":"        fip \u003d fips[0]"},{"line_number":967,"context_line":"        router_id \u003d fip.get(\u0027router_id\u0027)"},{"line_number":968,"context_line":"        if not router_id:"}],"source_content_type":"text/x-python","patch_set":3,"id":"9fdfeff1_eae4dd3e","line":965,"range":{"start_line":965,"start_character":12,"end_line":965,"end_character":18},"updated":"2019-02-05 08:02:00.000000000","message":"Same as in L969.","commit_id":"97d88b7967abe4c460c9ee78d5db5288d2d49ef1"},{"author":{"_account_id":25618,"name":"Paweł Suder","email":"pawel@suder.info","username":"SuderPawel"},"change_message_id":"e776e2601d165da937271671750a3f6194c1ca10","unresolved":false,"context_lines":[{"line_number":966,"context_line":"        fip \u003d fips[0]"},{"line_number":967,"context_line":"        router_id \u003d fip.get(\u0027router_id\u0027)"},{"line_number":968,"context_line":"        if not router_id:"},{"line_number":969,"context_line":"            return"},{"line_number":970,"context_line":"        router_obj \u003d l3_obj.Router.get_object(context, id\u003drouter_id)"},{"line_number":971,"context_line":"        if not router_obj[\u0027distributed\u0027]:"},{"line_number":972,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":3,"id":"9fdfeff1_2adbc57d","line":969,"range":{"start_line":969,"start_character":12,"end_line":969,"end_character":18},"updated":"2019-02-05 08:02:00.000000000","message":"Shouldn\u0027t be any info/warning logged, before return?","commit_id":"97d88b7967abe4c460c9ee78d5db5288d2d49ef1"},{"author":{"_account_id":25618,"name":"Paweł Suder","email":"pawel@suder.info","username":"SuderPawel"},"change_message_id":"e776e2601d165da937271671750a3f6194c1ca10","unresolved":false,"context_lines":[{"line_number":969,"context_line":"            return"},{"line_number":970,"context_line":"        router_obj \u003d l3_obj.Router.get_object(context, id\u003drouter_id)"},{"line_number":971,"context_line":"        if not router_obj[\u0027distributed\u0027]:"},{"line_number":972,"context_line":"            return"},{"line_number":973,"context_line":"        network_id \u003d fip.get(\u0027floating_network_id\u0027)"},{"line_number":974,"context_line":"        agent_gw_port \u003d self.create_fip_agent_gw_port_if_not_exists("},{"line_number":975,"context_line":"            context.elevated(), network_id, host)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9fdfeff1_4ad8897e","line":972,"range":{"start_line":972,"start_character":12,"end_line":972,"end_character":18},"updated":"2019-02-05 08:02:00.000000000","message":"Same as in L969.","commit_id":"97d88b7967abe4c460c9ee78d5db5288d2d49ef1"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"17087ad23220446e03029d93469ab07aec46ed16","unresolved":false,"context_lines":[{"line_number":957,"context_line":"        if ports:"},{"line_number":958,"context_line":"            return ports[0]"},{"line_number":959,"context_line":""},{"line_number":960,"context_line":"    def check_for_fip_and_create_agent_gw_port_on_host_if_not_exists("},{"line_number":961,"context_line":"            self, context, port, host):"},{"line_number":962,"context_line":"        \"\"\"Create fip agent_gw_port on host if not exists\"\"\""},{"line_number":963,"context_line":"        fips \u003d self._get_floatingips_by_port_id(context, port[\u0027id\u0027])"},{"line_number":964,"context_line":"        if not fips:"}],"source_content_type":"text/x-python","patch_set":4,"id":"5fc1f717_665e8246","line":961,"range":{"start_line":960,"start_character":0,"end_line":961,"end_character":39},"updated":"2019-04-04 22:55:00.000000000","message":"This function by itself, will only be called for DVR routers and if you have a legacy router ( non-DVR ) the call should not end up here.\nCorrect me if I am wrong?\nAlso this will be only called from l3_dvrscheduler_db.py function \u0027dvr_handler_new_service_port\u0027 function.\nIn that function there is check to see if this Service port is migrating to a new host and only then it calls this function.\nIn case if you want to do a redundant check you need to do the check in \u0027l3_dvrscheduler_db.py\u0027.","commit_id":"88ac392474256556f241f7a8f10df7f88ce88b7d"},{"author":{"_account_id":29709,"name":"Enyinna Ochulor","email":"enyinna.ochulor@intel.com","username":"eochulor"},"change_message_id":"271608a3e76e14c4e2a3e901b5b3495bd50047d3","unresolved":false,"context_lines":[{"line_number":957,"context_line":"        if ports:"},{"line_number":958,"context_line":"            return ports[0]"},{"line_number":959,"context_line":""},{"line_number":960,"context_line":"    def check_for_fip_and_create_agent_gw_port_on_host_if_not_exists("},{"line_number":961,"context_line":"            self, context, port, host):"},{"line_number":962,"context_line":"        \"\"\"Create fip agent_gw_port on host if not exists\"\"\""},{"line_number":963,"context_line":"        fips \u003d self._get_floatingips_by_port_id(context, port[\u0027id\u0027])"},{"line_number":964,"context_line":"        if not fips:"}],"source_content_type":"text/x-python","patch_set":4,"id":"5fc1f717_31ef56ea","line":961,"range":{"start_line":960,"start_character":0,"end_line":961,"end_character":39},"in_reply_to":"5fc1f717_665e8246","updated":"2019-04-10 22:59:40.000000000","message":"It\u0027s called on non-dvr routers during live migration. I put the steps to reproduce this in launchpad. This patch does stop the creation of the gateway port in non-dvr router scenarios, but I\u0027ll also look into doing the check in \u0027l3_dvrscheduler_db.py\u0027.\n\n4/5/2019\nI looked at \u0027l3_dvrscheduler_db.py\u0027, and there\u0027s no method in there checking the FIP. Since the check here is due to an FIP condition (router_id), and there\u0027s already an FIP check method \u0027check_for_fip_and_create_agent_gw_port_on_host_if_not_exists\u0027 wouldn\u0027t it be better to have all the FIP related checks in there? And ultimately, the result is that an FIP gw port is created or not. Unless you\u0027re suggesting that the entire method \u0027check_for_fip_and_create_agent_gw_port_on_host_if_not_exists\u0027 should be moved to \u0027l3_dvrscheduler_db.py\u0027?","commit_id":"88ac392474256556f241f7a8f10df7f88ce88b7d"},{"author":{"_account_id":30156,"name":"Igor D.C.","email":"igor.duarte.cardoso@intel.com","username":"igordc"},"change_message_id":"a1f68799bfa93b1313fc67ca519054dadc493a96","unresolved":false,"context_lines":[{"line_number":968,"context_line":"        if not router_id:"},{"line_number":969,"context_line":"            return"},{"line_number":970,"context_line":"        router_obj \u003d l3_obj.Router.get_object(context, id\u003drouter_id)"},{"line_number":971,"context_line":"        if router_obj.distributed is False:"},{"line_number":972,"context_line":"            return"},{"line_number":973,"context_line":"        network_id \u003d fip.get(\u0027floating_network_id\u0027)"},{"line_number":974,"context_line":"        agent_gw_port \u003d self.create_fip_agent_gw_port_if_not_exists("}],"source_content_type":"text/x-python","patch_set":4,"id":"5fc1f717_a65a2a80","line":971,"range":{"start_line":971,"start_character":8,"end_line":971,"end_character":43},"updated":"2019-04-04 22:28:53.000000000","message":"I\u0027d say most developers actually prefer the way you had before (with the \"not\")... certainly if it was a test for True. The removal of the square brackets is welcome.","commit_id":"88ac392474256556f241f7a8f10df7f88ce88b7d"},{"author":{"_account_id":29709,"name":"Enyinna Ochulor","email":"enyinna.ochulor@intel.com","username":"eochulor"},"change_message_id":"271608a3e76e14c4e2a3e901b5b3495bd50047d3","unresolved":false,"context_lines":[{"line_number":968,"context_line":"        if not router_id:"},{"line_number":969,"context_line":"            return"},{"line_number":970,"context_line":"        router_obj \u003d l3_obj.Router.get_object(context, id\u003drouter_id)"},{"line_number":971,"context_line":"        if router_obj.distributed is False:"},{"line_number":972,"context_line":"            return"},{"line_number":973,"context_line":"        network_id \u003d fip.get(\u0027floating_network_id\u0027)"},{"line_number":974,"context_line":"        agent_gw_port \u003d self.create_fip_agent_gw_port_if_not_exists("}],"source_content_type":"text/x-python","patch_set":4,"id":"5fc1f717_51ea22d8","line":971,"range":{"start_line":971,"start_character":8,"end_line":971,"end_character":43},"in_reply_to":"5fc1f717_a65a2a80","updated":"2019-04-10 22:59:40.000000000","message":"Will do in next patch set.","commit_id":"88ac392474256556f241f7a8f10df7f88ce88b7d"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"cd81185d670e17bd24f0fb6ef8e7fce2c985125c","unresolved":false,"context_lines":[{"line_number":962,"context_line":"        \"\"\"Create fip agent_gw_port on host if not exists\"\"\""},{"line_number":963,"context_line":"        fips \u003d self._get_floatingips_by_port_id(context, port[\u0027id\u0027])"},{"line_number":964,"context_line":"        if not fips:"},{"line_number":965,"context_line":"            LOG.debug(\"Port-in-Migration: FIP is None\")"},{"line_number":966,"context_line":"            return"},{"line_number":967,"context_line":"        fip \u003d fips[0]"},{"line_number":968,"context_line":"        router_id \u003d fip.get(\u0027router_id\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"5fc1f717_09e9bc18","line":965,"range":{"start_line":965,"start_character":12,"end_line":965,"end_character":55},"updated":"2019-04-05 22:32:48.000000000","message":"This Log is not necessary.\nDid you read my previous comment.","commit_id":"1f05e898b1f9327c345a309dd02e687b57fb4c03"},{"author":{"_account_id":29709,"name":"Enyinna Ochulor","email":"enyinna.ochulor@intel.com","username":"eochulor"},"change_message_id":"271608a3e76e14c4e2a3e901b5b3495bd50047d3","unresolved":false,"context_lines":[{"line_number":962,"context_line":"        \"\"\"Create fip agent_gw_port on host if not exists\"\"\""},{"line_number":963,"context_line":"        fips \u003d self._get_floatingips_by_port_id(context, port[\u0027id\u0027])"},{"line_number":964,"context_line":"        if not fips:"},{"line_number":965,"context_line":"            LOG.debug(\"Port-in-Migration: FIP is None\")"},{"line_number":966,"context_line":"            return"},{"line_number":967,"context_line":"        fip \u003d fips[0]"},{"line_number":968,"context_line":"        router_id \u003d fip.get(\u0027router_id\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"5fc1f717_69dde0db","line":965,"range":{"start_line":965,"start_character":12,"end_line":965,"end_character":55},"in_reply_to":"5fc1f717_09e9bc18","updated":"2019-04-10 22:59:40.000000000","message":"I did and and I replied. I can take this log out, it was suggested by another reviewer. And I don\u0027t have an objection either way.\n\nAbout your previous comment, I looked at \u0027l3_dvrscheduler_db.py\u0027, and there\u0027s no method in there checking the FIP. Since the check here is due to an FIP condition (router_id), and there\u0027s already an FIP check method \u0027check_for_fip_and_create_agent_gw_port_on_host_if_not_exists\u0027 wouldn\u0027t it be better to have all the FIP related checks in there? And ultimately, the result is that an FIP gw port is created or not. Unless you\u0027re suggesting that the entire method \u0027check_for_fip_and_create_agent_gw_port_on_host_if_not_exists\u0027 should be moved to \u0027l3_dvrscheduler_db.py\u0027?","commit_id":"1f05e898b1f9327c345a309dd02e687b57fb4c03"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"b10647514f04f97afbd611338944cfa7466848cb","unresolved":false,"context_lines":[{"line_number":962,"context_line":"        \"\"\"Create fip agent_gw_port on host if not exists\"\"\""},{"line_number":963,"context_line":"        fips \u003d self._get_floatingips_by_port_id(context, port[\u0027id\u0027])"},{"line_number":964,"context_line":"        if not fips:"},{"line_number":965,"context_line":"            LOG.debug(\"Port-in-Migration: FIP is None\")"},{"line_number":966,"context_line":"            return"},{"line_number":967,"context_line":"        fip \u003d fips[0]"},{"line_number":968,"context_line":"        router_id \u003d fip.get(\u0027router_id\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"5fc1f717_2ab32a9c","line":965,"range":{"start_line":965,"start_character":12,"end_line":965,"end_character":55},"in_reply_to":"5fc1f717_09e9bc18","updated":"2019-04-08 18:24:36.000000000","message":"I understood the scenario from the Bug report on how to reproduce this problem.\nSo this is happening when you live migrate a non-dvr router fip from an existing compute to a new compute node.\nSo the optimum place to add the check would be in the l3_dvr_schedulerdb.py.\n\nhttps://github.com/openstack/neutron/blob/master/neutron/db/l3_dvrscheduler_db.py#L103\n\nHere you can check if it has \u0027dest_host\u0027 and if the router is a dvr router, then go ahead and create a fip agent gateway port.\nYou can use this to check if the router is distributed. \u0027l3_dvr_db.is_distributed_router(router)\u0027\n\nHope this helps.","commit_id":"1f05e898b1f9327c345a309dd02e687b57fb4c03"},{"author":{"_account_id":29709,"name":"Enyinna Ochulor","email":"enyinna.ochulor@intel.com","username":"eochulor"},"change_message_id":"271608a3e76e14c4e2a3e901b5b3495bd50047d3","unresolved":false,"context_lines":[{"line_number":962,"context_line":"        \"\"\"Create fip agent_gw_port on host if not exists\"\"\""},{"line_number":963,"context_line":"        fips \u003d self._get_floatingips_by_port_id(context, port[\u0027id\u0027])"},{"line_number":964,"context_line":"        if not fips:"},{"line_number":965,"context_line":"            LOG.debug(\"Port-in-Migration: FIP is None\")"},{"line_number":966,"context_line":"            return"},{"line_number":967,"context_line":"        fip \u003d fips[0]"},{"line_number":968,"context_line":"        router_id \u003d fip.get(\u0027router_id\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"5fc1f717_800a3f87","line":965,"range":{"start_line":965,"start_character":12,"end_line":965,"end_character":55},"in_reply_to":"5fc1f717_2ab32a9c","updated":"2019-04-10 22:59:40.000000000","message":"Done","commit_id":"1f05e898b1f9327c345a309dd02e687b57fb4c03"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"91fe32cbcd02170561c4cd947b760df9b195351d","unresolved":false,"context_lines":[{"line_number":957,"context_line":"        if ports:"},{"line_number":958,"context_line":"            return ports[0]"},{"line_number":959,"context_line":""},{"line_number":960,"context_line":"    def check_for_fip_create_agent_gw_port_on_host_if_not_exists("},{"line_number":961,"context_line":"            self, context, port, host):"},{"line_number":962,"context_line":"        \"\"\"Create fip agent_gw_port on host if not exists\"\"\""},{"line_number":963,"context_line":"        fips \u003d self._get_floatingips_by_port_id(context, port[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":15,"id":"ffb9cba7_3821e04e","line":960,"range":{"start_line":960,"start_character":8,"end_line":960,"end_character":65},"updated":"2019-04-22 18:01:19.000000000","message":"I feel you don\u0027t need to change the function name here.\nSince it still checks for \u0027fips\u0027 and the creates the fip agent gateway port.","commit_id":"aaa884dd51d0585f8108d9288083adc1c0768468"},{"author":{"_account_id":29709,"name":"Enyinna Ochulor","email":"enyinna.ochulor@intel.com","username":"eochulor"},"change_message_id":"d42e3860d5537d5c007088df7082d2b48fbae9a2","unresolved":false,"context_lines":[{"line_number":957,"context_line":"        if ports:"},{"line_number":958,"context_line":"            return ports[0]"},{"line_number":959,"context_line":""},{"line_number":960,"context_line":"    def check_for_fip_create_agent_gw_port_on_host_if_not_exists("},{"line_number":961,"context_line":"            self, context, port, host):"},{"line_number":962,"context_line":"        \"\"\"Create fip agent_gw_port on host if not exists\"\"\""},{"line_number":963,"context_line":"        fips \u003d self._get_floatingips_by_port_id(context, port[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":15,"id":"ffb9cba7_98afac93","line":960,"range":{"start_line":960,"start_character":8,"end_line":960,"end_character":65},"in_reply_to":"ffb9cba7_3821e04e","updated":"2019-04-29 17:42:50.000000000","message":"I changed it because of pep8 errors. With the name being too long in calls.","commit_id":"aaa884dd51d0585f8108d9288083adc1c0768468"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"d18bd403454240daf2ad6a953fc1c121a7beb7c3","unresolved":false,"context_lines":[{"line_number":957,"context_line":"        if ports:"},{"line_number":958,"context_line":"            return ports[0]"},{"line_number":959,"context_line":""},{"line_number":960,"context_line":"    def check_fip_and_create_agent_gw_port_on_host_if_not_exists("},{"line_number":961,"context_line":"            self, context, port, host):"},{"line_number":962,"context_line":"        \"\"\"Create fip agent_gw_port on host if not exists\"\"\""},{"line_number":963,"context_line":"        fips \u003d self._get_floatingips_by_port_id(context, port[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":17,"id":"ffb9cba7_e0777fd3","line":960,"updated":"2019-04-30 14:50:32.000000000","message":"nit: i wouldn\u0027t change the name of this if you don\u0027t have to","commit_id":"8122a60c6238d02ed24c7b96ee94bd643e5dc1bb"},{"author":{"_account_id":29709,"name":"Enyinna Ochulor","email":"enyinna.ochulor@intel.com","username":"eochulor"},"change_message_id":"842d28457a6cd89a96a530cf71d4aa41e7eff2d1","unresolved":false,"context_lines":[{"line_number":957,"context_line":"        if ports:"},{"line_number":958,"context_line":"            return ports[0]"},{"line_number":959,"context_line":""},{"line_number":960,"context_line":"    def check_fip_and_create_agent_gw_port_on_host_if_not_exists("},{"line_number":961,"context_line":"            self, context, port, host):"},{"line_number":962,"context_line":"        \"\"\"Create fip agent_gw_port on host if not exists\"\"\""},{"line_number":963,"context_line":"        fips \u003d self._get_floatingips_by_port_id(context, port[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":17,"id":"ffb9cba7_712cc301","line":960,"in_reply_to":"ffb9cba7_e0777fd3","updated":"2019-05-02 18:44:44.000000000","message":"I was getting pep8 errors trying to use the name inside an if statement. The change is to shorten the length of the name.","commit_id":"8122a60c6238d02ed24c7b96ee94bd643e5dc1bb"}],"neutron/db/l3_dvrscheduler_db.py":[{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"1b785ae4b3e837c81ef67e0936e5c3af288776e2","unresolved":false,"context_lines":[{"line_number":104,"context_line":"            # Make sure we create the floatingip agent gateway port"},{"line_number":105,"context_line":"            # for the destination node if fip is associated with this"},{"line_number":106,"context_line":"            # fixed port"},{"line_number":107,"context_line":"            l3plugin \u003d directory.get_plugin(plugin_constants.L3)"},{"line_number":108,"context_line":"            fips \u003d l3plugin._get_floatingips_by_port_id("},{"line_number":109,"context_line":"                    context, port)"},{"line_number":110,"context_line":"            fip \u003d fips[0]"},{"line_number":111,"context_line":"            if not fip:"},{"line_number":112,"context_line":"                return"},{"line_number":113,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":7,"id":"3fce034c_9289ca27","line":110,"range":{"start_line":107,"start_character":0,"end_line":110,"end_character":25},"updated":"2019-04-11 17:44:18.000000000","message":"Why do we need to check for fip here. It is already done in \u0027check_for_fip_and_create_agent_gw_port_on_host_if_not_exists\u0027.\n\nAll you need to do is first check if this is a \u0027distributed_router\u0027 else, return.\nL#117 should come here instead of this code. That is my opinion.","commit_id":"0273fc0dec54122de555102562c3583f6f3c5bb2"},{"author":{"_account_id":29709,"name":"Enyinna Ochulor","email":"enyinna.ochulor@intel.com","username":"eochulor"},"change_message_id":"d42e3860d5537d5c007088df7082d2b48fbae9a2","unresolved":false,"context_lines":[{"line_number":104,"context_line":"            # Make sure we create the floatingip agent gateway port"},{"line_number":105,"context_line":"            # for the destination node if fip is associated with this"},{"line_number":106,"context_line":"            # fixed port"},{"line_number":107,"context_line":"            l3plugin \u003d directory.get_plugin(plugin_constants.L3)"},{"line_number":108,"context_line":"            fips \u003d l3plugin._get_floatingips_by_port_id("},{"line_number":109,"context_line":"                    context, port)"},{"line_number":110,"context_line":"            fip \u003d fips[0]"},{"line_number":111,"context_line":"            if not fip:"},{"line_number":112,"context_line":"                return"},{"line_number":113,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":7,"id":"3fce034c_92130ab9","line":110,"range":{"start_line":107,"start_character":0,"end_line":110,"end_character":25},"in_reply_to":"3fce034c_9289ca27","updated":"2019-04-29 17:42:50.000000000","message":"Swami,\n\nHow do I get the router object without the fip?\n\nThanks","commit_id":"0273fc0dec54122de555102562c3583f6f3c5bb2"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"e72df027e4efbeeba1a9c8ef946be62025b927bf","unresolved":false,"context_lines":[{"line_number":109,"context_line":"                    context, port)"},{"line_number":110,"context_line":"            fip \u003d fips[0]"},{"line_number":111,"context_line":"            if not fip:"},{"line_number":112,"context_line":"                return"},{"line_number":113,"context_line":"            try:"},{"line_number":114,"context_line":"                router \u003d l3plugin._get_router(context, fip[\u0027router_id\u0027])"},{"line_number":115,"context_line":"            except l3_exc.RouterNotFound:"}],"source_content_type":"text/x-python","patch_set":7,"id":"3fce034c_87ef5586","line":112,"updated":"2019-04-11 14:02:49.000000000","message":"nitty nit: IMHO for better readability maybe You can add empty line after this line. And the same after L116. That will allow to easily distinguish in visual way different checks.","commit_id":"0273fc0dec54122de555102562c3583f6f3c5bb2"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"e72df027e4efbeeba1a9c8ef946be62025b927bf","unresolved":false,"context_lines":[{"line_number":113,"context_line":"            try:"},{"line_number":114,"context_line":"                router \u003d l3plugin._get_router(context, fip[\u0027router_id\u0027])"},{"line_number":115,"context_line":"            except l3_exc.RouterNotFound:"},{"line_number":116,"context_line":"                return"},{"line_number":117,"context_line":"            if not l3_dvr_db.is_distributed_router(router):"},{"line_number":118,"context_line":"                LOG.debug(\"Port-in-Migration: FIP router isn\u0027t distributed\")"},{"line_number":119,"context_line":"                return"}],"source_content_type":"text/x-python","patch_set":7,"id":"3fce034c_e7f9794d","line":116,"updated":"2019-04-11 14:02:49.000000000","message":"Is that even possible that You will have FIP with some router_id and there will be no this router?","commit_id":"0273fc0dec54122de555102562c3583f6f3c5bb2"},{"author":{"_account_id":29709,"name":"Enyinna Ochulor","email":"enyinna.ochulor@intel.com","username":"eochulor"},"change_message_id":"d42e3860d5537d5c007088df7082d2b48fbae9a2","unresolved":false,"context_lines":[{"line_number":113,"context_line":"            try:"},{"line_number":114,"context_line":"                router \u003d l3plugin._get_router(context, fip[\u0027router_id\u0027])"},{"line_number":115,"context_line":"            except l3_exc.RouterNotFound:"},{"line_number":116,"context_line":"                return"},{"line_number":117,"context_line":"            if not l3_dvr_db.is_distributed_router(router):"},{"line_number":118,"context_line":"                LOG.debug(\"Port-in-Migration: FIP router isn\u0027t distributed\")"},{"line_number":119,"context_line":"                return"}],"source_content_type":"text/x-python","patch_set":7,"id":"3fce034c_b832a7a6","line":116,"in_reply_to":"3fce034c_e7f9794d","updated":"2019-04-29 17:42:50.000000000","message":"Slawek,\n\nI haven\u0027t come across this yet. But I used this because it\u0027s consistent with line 587.","commit_id":"0273fc0dec54122de555102562c3583f6f3c5bb2"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"e72df027e4efbeeba1a9c8ef946be62025b927bf","unresolved":false,"context_lines":[{"line_number":115,"context_line":"            except l3_exc.RouterNotFound:"},{"line_number":116,"context_line":"                return"},{"line_number":117,"context_line":"            if not l3_dvr_db.is_distributed_router(router):"},{"line_number":118,"context_line":"                LOG.debug(\"Port-in-Migration: FIP router isn\u0027t distributed\")"},{"line_number":119,"context_line":"                return"},{"line_number":120,"context_line":"            else:"},{"line_number":121,"context_line":"                (l3plugin."}],"source_content_type":"text/x-python","patch_set":7,"id":"3fce034c_c7e31da4","line":118,"updated":"2019-04-11 14:02:49.000000000","message":"Maybe You can add fip and router id at least to this debug message?","commit_id":"0273fc0dec54122de555102562c3583f6f3c5bb2"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"e72df027e4efbeeba1a9c8ef946be62025b927bf","unresolved":false,"context_lines":[{"line_number":117,"context_line":"            if not l3_dvr_db.is_distributed_router(router):"},{"line_number":118,"context_line":"                LOG.debug(\"Port-in-Migration: FIP router isn\u0027t distributed\")"},{"line_number":119,"context_line":"                return"},{"line_number":120,"context_line":"            else:"},{"line_number":121,"context_line":"                (l3plugin."},{"line_number":122,"context_line":"                 check_for_fip_and_create_agent_gw_port_on_host_if_not_exists("},{"line_number":123,"context_line":"                     context, port, dest_host))"}],"source_content_type":"text/x-python","patch_set":7,"id":"3fce034c_67d589b9","line":120,"range":{"start_line":120,"start_character":12,"end_line":120,"end_character":16},"updated":"2019-04-11 14:02:49.000000000","message":"nit: You don\u0027t need this else here","commit_id":"0273fc0dec54122de555102562c3583f6f3c5bb2"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"f9fd910583b2bdf6ef8e516cc06c6861df9e9347","unresolved":false,"context_lines":[{"line_number":105,"context_line":"            # for the destination node if fip is associated with this"},{"line_number":106,"context_line":"            # fixed port"},{"line_number":107,"context_line":"            l3plugin \u003d directory.get_plugin(plugin_constants.L3)"},{"line_number":108,"context_line":"            fips \u003d l3plugin._get_floatingips_by_port_id("},{"line_number":109,"context_line":"                    context, port)"},{"line_number":110,"context_line":"            fip \u003d fips[0]"},{"line_number":111,"context_line":"            if not fip:"},{"line_number":112,"context_line":"                return"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"            try:"},{"line_number":115,"context_line":"                router \u003d l3plugin._get_router(context, fip[\u0027router_id\u0027])"}],"source_content_type":"text/x-python","patch_set":8,"id":"3fce034c_65cd775c","line":112,"range":{"start_line":108,"start_character":11,"end_line":112,"end_character":22},"updated":"2019-04-11 21:38:25.000000000","message":"You can check for the fip and get the router_id from the L#578.\n\nMay be you can pass in the fip[\u0027router_id\u0027] as an optional argument to this function.","commit_id":"a5f11de725f0a802353641f5870bd72371354225"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"6130cf92d86fa7e0669e64f47616574b973489d3","unresolved":false,"context_lines":[{"line_number":589,"context_line":"                l3plugin.l3_rpc_notifier.routers_updated_on_host("},{"line_number":590,"context_line":"                    context, [fip[\u0027router_id\u0027]],"},{"line_number":591,"context_line":"                    original_port[portbindings.HOST_ID])"},{"line_number":592,"context_line":"        is_new_port_binding_changed \u003d ("},{"line_number":593,"context_line":"            new_port[portbindings.HOST_ID] and"},{"line_number":594,"context_line":"            (original_port[portbindings.HOST_ID] !\u003d"},{"line_number":595,"context_line":"                new_port[portbindings.HOST_ID]))"},{"line_number":596,"context_line":"        dest_host \u003d None"},{"line_number":597,"context_line":"        new_port_profile \u003d new_port.get(portbindings.PROFILE)"},{"line_number":598,"context_line":"        if new_port_profile:"}],"source_content_type":"text/x-python","patch_set":9,"id":"3fce034c_e480578e","line":595,"range":{"start_line":592,"start_character":0,"end_line":595,"end_character":48},"updated":"2019-04-15 17:15:46.000000000","message":"Since \u0027fips\u0027 is only defined under \u0027is_bound_port_moved\u0027, we need to make sure that \u0027fips\u0027 is also valid with \u0027is_new_port_binding_changed\u0027 before passing it to the \u0027dvr_handle_new_service_port\u0027.\n\nSo may be, you can make a small change, where\n\nif is_new_port_binding_changed or is_bound_port_moved: \n  fips \u003d l3plugin._get_floatingips_by_port_id(\n                context, port_id\u003doriginal_port[\u0027id\u0027])\n  fip \u003d fips[0] if fips else None\n\nSo that \u0027fip\u0027 will be valid on both conditions.","commit_id":"42e15eed84673948d9a02a8d04929fee8b863d5c"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"b46d2fdebcec9b957635491c27c27b70e2e5920f","unresolved":false,"context_lines":[{"line_number":593,"context_line":"            new_port[portbindings.HOST_ID] and"},{"line_number":594,"context_line":"            (original_port[portbindings.HOST_ID] !\u003d"},{"line_number":595,"context_line":"                new_port[portbindings.HOST_ID]))"},{"line_number":596,"context_line":"        if is_new_port_binding_changed or is_bound_port_moved:"},{"line_number":597,"context_line":"            fips \u003d l3plugin._get_floatingips_by_port_id("},{"line_number":598,"context_line":"                    context, port_id\u003doriginal_port[\u0027id\u0027])"},{"line_number":599,"context_line":"            fip \u003d fips[0] if fips else None"}],"source_content_type":"text/x-python","patch_set":10,"id":"3fce034c_7cf39774","line":596,"updated":"2019-04-16 00:04:02.000000000","message":"Move this before #L558.\nAlso in that case you can get rid of #L572,#L573 and #L574.","commit_id":"9a20b40db8b1f260d05090717c82ea188e4291e8"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"2863cf761a686682df10c1e89a92e405e0087d11","unresolved":false,"context_lines":[{"line_number":562,"context_line":"        if is_new_port_binding_changed or is_bound_port_moved:"},{"line_number":563,"context_line":"            fips \u003d l3plugin._get_floatingips_by_port_id("},{"line_number":564,"context_line":"                    context, port_id\u003doriginal_port[\u0027id\u0027])"},{"line_number":565,"context_line":"            fip \u003d fips[0] if fips else None"},{"line_number":566,"context_line":"            removed_routers \u003d l3plugin.get_dvr_routers_to_remove("},{"line_number":567,"context_line":"                context,"},{"line_number":568,"context_line":"                original_port,"}],"source_content_type":"text/x-python","patch_set":11,"id":"3fce034c_97f96a4e","line":565,"updated":"2019-04-16 18:50:14.000000000","message":"Add another \u0027if is_bound_port_moved\u0027 at #L565 to keep it as it was before and re-use the \u0027fip\u0027 that you got from #L565.","commit_id":"97e6c33086d65404ae1026b3562b3287a740bed0"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"d69a57508945ba0f47052c7ee8ec526eb4143158","unresolved":false,"context_lines":[{"line_number":105,"context_line":"            # Make sure we create the floatingip agent gateway port"},{"line_number":106,"context_line":"            # for the destination node if fip is associated with this"},{"line_number":107,"context_line":"            # fixed port"},{"line_number":108,"context_line":"            l3plugin \u003d directory.get_plugin(plugin_constants.L3)"},{"line_number":109,"context_line":"            try:"},{"line_number":110,"context_line":"                router \u003d l3plugin._get_router(context, router_id)"},{"line_number":111,"context_line":"            except l3_exc.RouterNotFound:"}],"source_content_type":"text/x-python","patch_set":12,"id":"3fce034c_c5573902","line":108,"updated":"2019-04-16 22:38:34.000000000","message":"Can you also check here for \u0027router_id not None\u0027 before proceeding.","commit_id":"c5b418c6c91c5fea894e99a64eafe7980ad3b718"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"799bb697639e6c773a40c141c3c114020951f399","unresolved":false,"context_lines":[{"line_number":106,"context_line":"            # for the destination node if fip is associated with this"},{"line_number":107,"context_line":"            # fixed port"},{"line_number":108,"context_line":"            l3plugin \u003d directory.get_plugin(plugin_constants.L3)"},{"line_number":109,"context_line":"            if not router_id:"},{"line_number":110,"context_line":"                return"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"            try:"},{"line_number":113,"context_line":"                router \u003d l3plugin._get_router(context, router_id)"}],"source_content_type":"text/x-python","patch_set":13,"id":"3fce034c_43f1facc","line":110,"range":{"start_line":109,"start_character":12,"end_line":110,"end_character":22},"updated":"2019-04-17 08:23:53.000000000","message":"this can be moved above L98 IMO","commit_id":"6340bc388449cfec24ae0963a4ea4eb2130353a2"},{"author":{"_account_id":29709,"name":"Enyinna Ochulor","email":"enyinna.ochulor@intel.com","username":"eochulor"},"change_message_id":"d42e3860d5537d5c007088df7082d2b48fbae9a2","unresolved":false,"context_lines":[{"line_number":106,"context_line":"            # for the destination node if fip is associated with this"},{"line_number":107,"context_line":"            # fixed port"},{"line_number":108,"context_line":"            l3plugin \u003d directory.get_plugin(plugin_constants.L3)"},{"line_number":109,"context_line":"            if not router_id:"},{"line_number":110,"context_line":"                return"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"            try:"},{"line_number":113,"context_line":"                router \u003d l3plugin._get_router(context, router_id)"}],"source_content_type":"text/x-python","patch_set":13,"id":"3fce034c_03e0aef9","line":110,"range":{"start_line":109,"start_character":12,"end_line":110,"end_character":22},"in_reply_to":"3fce034c_43f1facc","updated":"2019-04-29 17:42:50.000000000","message":"Slawek,\nI\u0027m trying to get router_id status when dest_host is true. It looks like moving this to L98 defeats that purpose?","commit_id":"6340bc388449cfec24ae0963a4ea4eb2130353a2"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"799bb697639e6c773a40c141c3c114020951f399","unresolved":false,"context_lines":[{"line_number":115,"context_line":"                return"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"            if not l3_dvr_db.is_distributed_router(router):"},{"line_number":118,"context_line":"                LOG.debug(\"Port-in-Migration: This is a non \""},{"line_number":119,"context_line":"                          \"distributed router %(router)s\","},{"line_number":120,"context_line":"                          {\u0027router\u0027: router})"},{"line_number":121,"context_line":"                return"}],"source_content_type":"text/x-python","patch_set":13,"id":"3fce034c_a3f45ed0","line":118,"range":{"start_line":118,"start_character":27,"end_line":118,"end_character":45},"updated":"2019-04-17 08:23:53.000000000","message":"what means \"port-in-migration\"?","commit_id":"6340bc388449cfec24ae0963a4ea4eb2130353a2"},{"author":{"_account_id":29709,"name":"Enyinna Ochulor","email":"enyinna.ochulor@intel.com","username":"eochulor"},"change_message_id":"d42e3860d5537d5c007088df7082d2b48fbae9a2","unresolved":false,"context_lines":[{"line_number":115,"context_line":"                return"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"            if not l3_dvr_db.is_distributed_router(router):"},{"line_number":118,"context_line":"                LOG.debug(\"Port-in-Migration: This is a non \""},{"line_number":119,"context_line":"                          \"distributed router %(router)s\","},{"line_number":120,"context_line":"                          {\u0027router\u0027: router})"},{"line_number":121,"context_line":"                return"}],"source_content_type":"text/x-python","patch_set":13,"id":"3fce034c_03b98ee7","line":118,"range":{"start_line":118,"start_character":27,"end_line":118,"end_character":45},"in_reply_to":"3fce034c_a3f45ed0","updated":"2019-04-29 17:42:50.000000000","message":"FIP agent gateway port being migrated.","commit_id":"6340bc388449cfec24ae0963a4ea4eb2130353a2"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"425ac6142da50f7ef9df580dd6d0d329616497b6","unresolved":false,"context_lines":[{"line_number":106,"context_line":"            # for the destination node if fip is associated with this"},{"line_number":107,"context_line":"            # fixed port"},{"line_number":108,"context_line":"            l3plugin \u003d directory.get_plugin(plugin_constants.L3)"},{"line_number":109,"context_line":"            if not router_id:"},{"line_number":110,"context_line":"                return"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"            try:"},{"line_number":113,"context_line":"                router \u003d l3plugin._get_router(context, router_id)"}],"source_content_type":"text/x-python","patch_set":14,"id":"3fce034c_ce42ca3e","line":110,"range":{"start_line":109,"start_character":11,"end_line":110,"end_character":22},"updated":"2019-04-18 22:28:08.000000000","message":"I don\u0027t think you should return here, if the router_id does not exist. ( This is the router_id associated with the fip port).\n\nAlso router_id is by default going to be \u0027None\u0027. ( #L127 should take care of checking for actual router_ids).\nSo I would recommend that you check if \u0027router_id is not None\u0027 then call \u0027l3plugin._get_router(context, router_id). otherwise","commit_id":"89d9aaf39bdcb9bdb255ab79a148e4491d4e9acd"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"1a109e2e32351ed7f650a6c2b150b510f95f0e1b","unresolved":false,"context_lines":[{"line_number":116,"context_line":""},{"line_number":117,"context_line":"            if not l3_dvr_db.is_distributed_router(router):"},{"line_number":118,"context_line":"                LOG.debug(\"Port-in-Migration: This is a non \""},{"line_number":119,"context_line":"                          \"distributed router %(router)s\","},{"line_number":120,"context_line":"                          {\u0027router\u0027: router})"},{"line_number":121,"context_line":"                return"},{"line_number":122,"context_line":"            (l3plugin."},{"line_number":123,"context_line":"             check_for_fip_and_create_agent_gw_port_on_host_if_not_exists("}],"source_content_type":"text/x-python","patch_set":14,"id":"3fce034c_29c4a190","line":120,"range":{"start_line":119,"start_character":46,"end_line":120,"end_character":44},"updated":"2019-04-19 04:58:14.000000000","message":"\u0027router_id\u0027 looks better. Otherwise this could be a large log entry.","commit_id":"89d9aaf39bdcb9bdb255ab79a148e4491d4e9acd"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"89bfa44bf59edf73cc141b4146f353ab88d83383","unresolved":false,"context_lines":[{"line_number":119,"context_line":"                          \"distributed router %(router)s\","},{"line_number":120,"context_line":"                          {\u0027router\u0027: router})"},{"line_number":121,"context_line":"                return"},{"line_number":122,"context_line":"            (l3plugin."},{"line_number":123,"context_line":"             check_for_fip_and_create_agent_gw_port_on_host_if_not_exists("},{"line_number":124,"context_line":"                 context, port, dest_host))"},{"line_number":125,"context_line":"        subnet_ids \u003d [ip[\u0027subnet_id\u0027] for ip in port[\u0027fixed_ips\u0027]]"},{"line_number":126,"context_line":"        router_ids \u003d self.get_dvr_routers_by_subnet_ids(context, subnet_ids)"}],"source_content_type":"text/x-python","patch_set":14,"id":"3fce034c_cbc71c96","line":123,"range":{"start_line":122,"start_character":13,"end_line":123,"end_character":73},"updated":"2019-04-18 23:04:09.000000000","message":"What happens in the case where you have a distributed router, but you aren\u0027t using any FIP\u0027s? This is the case that neutron-dynamic-routing works off of. It expects to have the FIP gateway port as long as there is a port connected to an external network through a DVR router with a gateway port. Does this cause us to only instantiate the FIP gateway when there is a FIP? If so, I see that as a problem.","commit_id":"89d9aaf39bdcb9bdb255ab79a148e4491d4e9acd"},{"author":{"_account_id":29709,"name":"Enyinna Ochulor","email":"enyinna.ochulor@intel.com","username":"eochulor"},"change_message_id":"d42e3860d5537d5c007088df7082d2b48fbae9a2","unresolved":false,"context_lines":[{"line_number":119,"context_line":"                          \"distributed router %(router)s\","},{"line_number":120,"context_line":"                          {\u0027router\u0027: router})"},{"line_number":121,"context_line":"                return"},{"line_number":122,"context_line":"            (l3plugin."},{"line_number":123,"context_line":"             check_for_fip_and_create_agent_gw_port_on_host_if_not_exists("},{"line_number":124,"context_line":"                 context, port, dest_host))"},{"line_number":125,"context_line":"        subnet_ids \u003d [ip[\u0027subnet_id\u0027] for ip in port[\u0027fixed_ips\u0027]]"},{"line_number":126,"context_line":"        router_ids \u003d self.get_dvr_routers_by_subnet_ids(context, subnet_ids)"}],"source_content_type":"text/x-python","patch_set":14,"id":"ffb9cba7_f86268d8","line":123,"range":{"start_line":122,"start_character":13,"end_line":123,"end_character":73},"in_reply_to":"3fce034c_cbc71c96","updated":"2019-04-29 17:42:50.000000000","message":"Ryan,\nBased on check_for_fip_and_create_agent_gw_port_on_host_if_not_exists, it looks like an FIP is needed to create an FIP gw port.","commit_id":"89d9aaf39bdcb9bdb255ab79a148e4491d4e9acd"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"83ba4a849ae6678bea9b1a2f498279101cbc1791","unresolved":false,"context_lines":[{"line_number":119,"context_line":"                          \"distributed router %(router)s\","},{"line_number":120,"context_line":"                          {\u0027router\u0027: router})"},{"line_number":121,"context_line":"                return"},{"line_number":122,"context_line":"            (l3plugin."},{"line_number":123,"context_line":"             check_for_fip_and_create_agent_gw_port_on_host_if_not_exists("},{"line_number":124,"context_line":"                 context, port, dest_host))"},{"line_number":125,"context_line":"        subnet_ids \u003d [ip[\u0027subnet_id\u0027] for ip in port[\u0027fixed_ips\u0027]]"},{"line_number":126,"context_line":"        router_ids \u003d self.get_dvr_routers_by_subnet_ids(context, subnet_ids)"}],"source_content_type":"text/x-python","patch_set":14,"id":"ffb9cba7_98132c0e","line":123,"range":{"start_line":122,"start_character":13,"end_line":123,"end_character":73},"in_reply_to":"3fce034c_cbc71c96","updated":"2019-04-22 18:00:13.000000000","message":"this code path will only be executed when there is a live migration of the VM with a Fip.\nSo it is only concerned with private ports that are migrating and have a fip. Otherwise it will not be executed.","commit_id":"89d9aaf39bdcb9bdb255ab79a148e4491d4e9acd"},{"author":{"_account_id":29709,"name":"Enyinna Ochulor","email":"enyinna.ochulor@intel.com","username":"eochulor"},"change_message_id":"c442fb7d500009564c63e1de4819369a6f703edd","unresolved":false,"context_lines":[{"line_number":119,"context_line":"                          \"distributed router %(router)s\","},{"line_number":120,"context_line":"                          {\u0027router\u0027: router})"},{"line_number":121,"context_line":"                return"},{"line_number":122,"context_line":"            (l3plugin."},{"line_number":123,"context_line":"             check_for_fip_and_create_agent_gw_port_on_host_if_not_exists("},{"line_number":124,"context_line":"                 context, port, dest_host))"},{"line_number":125,"context_line":"        subnet_ids \u003d [ip[\u0027subnet_id\u0027] for ip in port[\u0027fixed_ips\u0027]]"},{"line_number":126,"context_line":"        router_ids \u003d self.get_dvr_routers_by_subnet_ids(context, subnet_ids)"}],"source_content_type":"text/x-python","patch_set":14,"id":"dfbec78f_bbf496d0","line":123,"range":{"start_line":122,"start_character":13,"end_line":123,"end_character":73},"in_reply_to":"dfbec78f_2015d39c","updated":"2019-05-09 20:01:00.000000000","message":"Ryan,\n\nLike Swami wrote, this code path is only related to live migration. And my fix doesn\u0027t touch \u0027check_for_fip_and_create_agent_gw_port_on_host_if_not_exists\u0027 This fix looks at the router that\u0027s associated with the FIP.  And it\u0027s stopping the creation of an FIP gw port when the router is not dvr. But yes, currently if there\u0027s a live migration and there\u0027s no FIP, then no FIP gw port gets created.","commit_id":"89d9aaf39bdcb9bdb255ab79a148e4491d4e9acd"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"d296dc980ec7902f94f3c05f6725a284855c96b7","unresolved":false,"context_lines":[{"line_number":119,"context_line":"                          \"distributed router %(router)s\","},{"line_number":120,"context_line":"                          {\u0027router\u0027: router})"},{"line_number":121,"context_line":"                return"},{"line_number":122,"context_line":"            (l3plugin."},{"line_number":123,"context_line":"             check_for_fip_and_create_agent_gw_port_on_host_if_not_exists("},{"line_number":124,"context_line":"                 context, port, dest_host))"},{"line_number":125,"context_line":"        subnet_ids \u003d [ip[\u0027subnet_id\u0027] for ip in port[\u0027fixed_ips\u0027]]"},{"line_number":126,"context_line":"        router_ids \u003d self.get_dvr_routers_by_subnet_ids(context, subnet_ids)"}],"source_content_type":"text/x-python","patch_set":14,"id":"dfbec78f_2015d39c","line":123,"range":{"start_line":122,"start_character":13,"end_line":123,"end_character":73},"in_reply_to":"ffb9cba7_f86268d8","updated":"2019-05-09 19:15:53.000000000","message":"That was my concern. A FIP gw port should be instantiated even if a FIP is not associated. The trigger for creating it should not depend on whether a FIP is associated, the trigger should be that the VM is connected to a network with a router that has a gateway port. Having the FIP gw created is important even in cases where an instance does not have a FIP.","commit_id":"89d9aaf39bdcb9bdb255ab79a148e4491d4e9acd"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"1a109e2e32351ed7f650a6c2b150b510f95f0e1b","unresolved":false,"context_lines":[{"line_number":617,"context_line":"                l3plugin.dvr_handle_new_service_port(context, new_port,"},{"line_number":618,"context_line":"                                                     unbound_migrate\u003dTrue)"},{"line_number":619,"context_line":"            else:"},{"line_number":620,"context_line":"                fip_router_id \u003d None"},{"line_number":621,"context_line":"                if fip:"},{"line_number":622,"context_line":"                    fip_router_id \u003d fip[\u0027router_id\u0027]"},{"line_number":623,"context_line":"                l3plugin.dvr_handle_new_service_port("},{"line_number":624,"context_line":"                    context, new_port,"},{"line_number":625,"context_line":"                    dest_host\u003ddest_host,"}],"source_content_type":"text/x-python","patch_set":14,"id":"3fce034c_a9d8917a","line":622,"range":{"start_line":620,"start_character":16,"end_line":622,"end_character":52},"updated":"2019-04-19 04:58:14.000000000","message":"Why not directly:\nfip_router_id \u003d fip.get(\u0027router_id\u0027) if fip else None","commit_id":"89d9aaf39bdcb9bdb255ab79a148e4491d4e9acd"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"eb34fc0c54dcedb80008e1f13c5c89c636fa2c3c","unresolved":false,"context_lines":[{"line_number":550,"context_line":"        l3plugin \u003d directory.get_plugin(plugin_constants.L3)"},{"line_number":551,"context_line":"        context \u003d kwargs[\u0027context\u0027]"},{"line_number":552,"context_line":"        is_new_port_binding_changed \u003d ("},{"line_number":553,"context_line":"                new_port[portbindings.HOST_ID] and"},{"line_number":554,"context_line":"                (original_port[portbindings.HOST_ID] !\u003d"},{"line_number":555,"context_line":"                    new_port[portbindings.HOST_ID]))"},{"line_number":556,"context_line":"        is_bound_port_moved \u003d ("},{"line_number":557,"context_line":"            original_port[portbindings.HOST_ID] and"},{"line_number":558,"context_line":"            original_port[portbindings.HOST_ID] !\u003d"}],"source_content_type":"text/x-python","patch_set":16,"id":"ffb9cba7_7bb1878f","line":555,"range":{"start_line":553,"start_character":16,"end_line":555,"end_character":52},"updated":"2019-04-23 07:59:03.000000000","message":"nit: IMHO indentation here could be same as in L556-559","commit_id":"90becc7d60efb84d2259eab7f2bbe61e75a874b4"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"d18bd403454240daf2ad6a953fc1c121a7beb7c3","unresolved":false,"context_lines":[{"line_number":105,"context_line":"            # Make sure we create the floatingip agent gateway port"},{"line_number":106,"context_line":"            # for the destination node if fip is associated with this"},{"line_number":107,"context_line":"            # fixed port"},{"line_number":108,"context_line":"            if router_id is not None:"},{"line_number":109,"context_line":"                l3plugin \u003d directory.get_plugin(plugin_constants.L3)"},{"line_number":110,"context_line":"                router \u003d l3plugin._get_router(context, router_id)"},{"line_number":111,"context_line":"                if l3_dvr_db.is_distributed_router(router):"}],"source_content_type":"text/x-python","patch_set":17,"id":"ffb9cba7_4048cb85","line":108,"updated":"2019-04-30 14:50:32.000000000","message":"This check could be up on L104:\n\nif dest_host and router_id is not None:\n\nMaybe that solves the renaming of the function to stay under 80 chars?","commit_id":"8122a60c6238d02ed24c7b96ee94bd643e5dc1bb"},{"author":{"_account_id":29709,"name":"Enyinna Ochulor","email":"enyinna.ochulor@intel.com","username":"eochulor"},"change_message_id":"842d28457a6cd89a96a530cf71d4aa41e7eff2d1","unresolved":false,"context_lines":[{"line_number":105,"context_line":"            # Make sure we create the floatingip agent gateway port"},{"line_number":106,"context_line":"            # for the destination node if fip is associated with this"},{"line_number":107,"context_line":"            # fixed port"},{"line_number":108,"context_line":"            if router_id is not None:"},{"line_number":109,"context_line":"                l3plugin \u003d directory.get_plugin(plugin_constants.L3)"},{"line_number":110,"context_line":"                router \u003d l3plugin._get_router(context, router_id)"},{"line_number":111,"context_line":"                if l3_dvr_db.is_distributed_router(router):"}],"source_content_type":"text/x-python","patch_set":17,"id":"ffb9cba7_f13f5322","line":108,"in_reply_to":"ffb9cba7_4048cb85","updated":"2019-05-02 18:44:44.000000000","message":"Oh... I see","commit_id":"8122a60c6238d02ed24c7b96ee94bd643e5dc1bb"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"d18bd403454240daf2ad6a953fc1c121a7beb7c3","unresolved":false,"context_lines":[{"line_number":115,"context_line":"                else:"},{"line_number":116,"context_line":"                    LOG.debug(\"Port-in-Migration: FIP has a non \""},{"line_number":117,"context_line":"                              \"distributed router %(router_id)s\","},{"line_number":118,"context_line":"                              {\u0027router_id\u0027: router_id})"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"        subnet_ids \u003d [ip[\u0027subnet_id\u0027] for ip in port[\u0027fixed_ips\u0027]]"},{"line_number":121,"context_line":"        router_ids \u003d self.get_dvr_routers_by_subnet_ids(context, subnet_ids)"}],"source_content_type":"text/x-python","patch_set":17,"id":"ffb9cba7_000c133f","line":118,"updated":"2019-04-30 14:50:32.000000000","message":"nit: can you change this slightly?\n\n\"Port-in-Migration: Floating IP has a non-distributed router %(router_id)s\"","commit_id":"8122a60c6238d02ed24c7b96ee94bd643e5dc1bb"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"d18bd403454240daf2ad6a953fc1c121a7beb7c3","unresolved":false,"context_lines":[{"line_number":551,"context_line":"        context \u003d kwargs[\u0027context\u0027]"},{"line_number":552,"context_line":"        is_new_port_binding_changed \u003d ("},{"line_number":553,"context_line":"            new_port[portbindings.HOST_ID] and"},{"line_number":554,"context_line":"            (original_port[portbindings.HOST_ID] !\u003d"},{"line_number":555,"context_line":"            new_port[portbindings.HOST_ID]))"},{"line_number":556,"context_line":"        is_bound_port_moved \u003d ("},{"line_number":557,"context_line":"            original_port[portbindings.HOST_ID] and"}],"source_content_type":"text/x-python","patch_set":17,"id":"ffb9cba7_d313375b","line":554,"updated":"2019-04-30 14:50:32.000000000","message":"Don\u0027t need () around this !\u003d check as in L558","commit_id":"8122a60c6238d02ed24c7b96ee94bd643e5dc1bb"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"d18bd403454240daf2ad6a953fc1c121a7beb7c3","unresolved":false,"context_lines":[{"line_number":557,"context_line":"            original_port[portbindings.HOST_ID] and"},{"line_number":558,"context_line":"            original_port[portbindings.HOST_ID] !\u003d"},{"line_number":559,"context_line":"            new_port[portbindings.HOST_ID])"},{"line_number":560,"context_line":"        fip \u003d None"},{"line_number":561,"context_line":"        dest_host \u003d None"},{"line_number":562,"context_line":"        new_port_profile \u003d new_port.get(portbindings.PROFILE)"},{"line_number":563,"context_line":"        if new_port_profile:"}],"source_content_type":"text/x-python","patch_set":17,"id":"ffb9cba7_93b5bf34","line":560,"updated":"2019-04-30 14:50:32.000000000","message":"s/fip_router_id \u003d None\n\n(see below comment)","commit_id":"8122a60c6238d02ed24c7b96ee94bd643e5dc1bb"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"d18bd403454240daf2ad6a953fc1c121a7beb7c3","unresolved":false,"context_lines":[{"line_number":569,"context_line":"        if is_new_port_binding_changed or is_bound_port_moved or dest_host:"},{"line_number":570,"context_line":"            fips \u003d l3plugin._get_floatingips_by_port_id("},{"line_number":571,"context_line":"                    context, port_id\u003doriginal_port[\u0027id\u0027])"},{"line_number":572,"context_line":"            fip \u003d fips[0] if fips else None"},{"line_number":573,"context_line":"        if is_bound_port_moved:"},{"line_number":574,"context_line":"            removed_routers \u003d l3plugin.get_dvr_routers_to_remove("},{"line_number":575,"context_line":"                context,"}],"source_content_type":"text/x-python","patch_set":17,"id":"ffb9cba7_137b0f7b","line":572,"updated":"2019-04-30 14:50:32.000000000","message":"Moving this here made it obvious we only ever care about fip[\u0027router_id\u0027].  For that reason I would just set that here instead:\n\nif fip:\n    fip_router_id \u003d fip[\u0027router_id\u0027]\n\nThis might mean a few tweaks below but it would clean things up a bit.","commit_id":"8122a60c6238d02ed24c7b96ee94bd643e5dc1bb"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"3ab6b27b99e2f9f0f732921d88ff18046e854327","unresolved":false,"context_lines":[{"line_number":551,"context_line":"        is_new_port_binding_changed \u003d ("},{"line_number":552,"context_line":"            new_port[portbindings.HOST_ID] and"},{"line_number":553,"context_line":"            (original_port[portbindings.HOST_ID] !\u003d"},{"line_number":554,"context_line":"            new_port[portbindings.HOST_ID]))"},{"line_number":555,"context_line":"        is_bound_port_moved \u003d ("},{"line_number":556,"context_line":"            original_port[portbindings.HOST_ID] and"},{"line_number":557,"context_line":"            (original_port[portbindings.HOST_ID] !\u003d"}],"source_content_type":"text/x-python","patch_set":18,"id":"ffb9cba7_9eb85be5","line":554,"updated":"2019-05-01 14:47:32.000000000","message":"The extra () are not necessary here\n\nAnd since I\u0027m nitpicking might as well put it in the same logical order as below:\n    (new_port...\n     new_port...\n     original_port...)","commit_id":"dd0b686408fb5a1e52a6f89235e2b22abf6aed42"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"3ab6b27b99e2f9f0f732921d88ff18046e854327","unresolved":false,"context_lines":[{"line_number":555,"context_line":"        is_bound_port_moved \u003d ("},{"line_number":556,"context_line":"            original_port[portbindings.HOST_ID] and"},{"line_number":557,"context_line":"            (original_port[portbindings.HOST_ID] !\u003d"},{"line_number":558,"context_line":"            new_port[portbindings.HOST_ID]))"},{"line_number":559,"context_line":"        fip_router_id \u003d None"},{"line_number":560,"context_line":"        dest_host \u003d None"},{"line_number":561,"context_line":"        new_port_profile \u003d new_port.get(portbindings.PROFILE)"}],"source_content_type":"text/x-python","patch_set":18,"id":"ffb9cba7_bebd1fd9","line":558,"updated":"2019-05-01 14:47:32.000000000","message":"The extra () are not necessary here","commit_id":"dd0b686408fb5a1e52a6f89235e2b22abf6aed42"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"3ab6b27b99e2f9f0f732921d88ff18046e854327","unresolved":false,"context_lines":[{"line_number":587,"context_line":"                    event, resource, trigger, **removed_router_args)"},{"line_number":588,"context_line":""},{"line_number":589,"context_line":"            def _should_notify_on_fip_update():"},{"line_number":590,"context_line":"                if not fip:"},{"line_number":591,"context_line":"                    return False"},{"line_number":592,"context_line":"                for info in removed_routers:"},{"line_number":593,"context_line":"                    if info[\u0027router_id\u0027] \u003d\u003d fip[\u0027router_id\u0027]:"}],"source_content_type":"text/x-python","patch_set":18,"id":"ffb9cba7_9eadbb9c","line":590,"range":{"start_line":590,"start_character":23,"end_line":590,"end_character":26},"updated":"2019-05-01 14:47:32.000000000","message":"s/fip_router_id","commit_id":"dd0b686408fb5a1e52a6f89235e2b22abf6aed42"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"3ab6b27b99e2f9f0f732921d88ff18046e854327","unresolved":false,"context_lines":[{"line_number":590,"context_line":"                if not fip:"},{"line_number":591,"context_line":"                    return False"},{"line_number":592,"context_line":"                for info in removed_routers:"},{"line_number":593,"context_line":"                    if info[\u0027router_id\u0027] \u003d\u003d fip[\u0027router_id\u0027]:"},{"line_number":594,"context_line":"                        return False"},{"line_number":595,"context_line":"                try:"},{"line_number":596,"context_line":"                    router \u003d l3plugin._get_router(context, fip[\u0027router_id\u0027])"}],"source_content_type":"text/x-python","patch_set":18,"id":"ffb9cba7_3e960f4e","line":593,"range":{"start_line":593,"start_character":44,"end_line":593,"end_character":60},"updated":"2019-05-01 14:47:32.000000000","message":"s/fip_router_id","commit_id":"dd0b686408fb5a1e52a6f89235e2b22abf6aed42"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"3ab6b27b99e2f9f0f732921d88ff18046e854327","unresolved":false,"context_lines":[{"line_number":593,"context_line":"                    if info[\u0027router_id\u0027] \u003d\u003d fip[\u0027router_id\u0027]:"},{"line_number":594,"context_line":"                        return False"},{"line_number":595,"context_line":"                try:"},{"line_number":596,"context_line":"                    router \u003d l3plugin._get_router(context, fip[\u0027router_id\u0027])"},{"line_number":597,"context_line":"                except l3_exc.RouterNotFound:"},{"line_number":598,"context_line":"                    return False"},{"line_number":599,"context_line":"                return l3_dvr_db.is_distributed_router(router)"}],"source_content_type":"text/x-python","patch_set":18,"id":"ffb9cba7_1e99cb77","line":596,"range":{"start_line":596,"start_character":59,"end_line":596,"end_character":75},"updated":"2019-05-01 14:47:32.000000000","message":"s/fip_router_id","commit_id":"dd0b686408fb5a1e52a6f89235e2b22abf6aed42"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"3ab6b27b99e2f9f0f732921d88ff18046e854327","unresolved":false,"context_lines":[{"line_number":600,"context_line":""},{"line_number":601,"context_line":"            if _should_notify_on_fip_update():"},{"line_number":602,"context_line":"                l3plugin.l3_rpc_notifier.routers_updated_on_host("},{"line_number":603,"context_line":"                    context, [fip[\u0027router_id\u0027]],"},{"line_number":604,"context_line":"                    original_port[portbindings.HOST_ID])"},{"line_number":605,"context_line":"        # If dest_host is set, then the port profile has changed"},{"line_number":606,"context_line":"        # and this port is in migration. The call below will"}],"source_content_type":"text/x-python","patch_set":18,"id":"ffb9cba7_be8bdf1c","line":603,"range":{"start_line":603,"start_character":30,"end_line":603,"end_character":46},"updated":"2019-05-01 14:47:32.000000000","message":"s/fip_router_id","commit_id":"dd0b686408fb5a1e52a6f89235e2b22abf6aed42"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"33bd7bce4a784675fd123b440834606d574095fc","unresolved":false,"context_lines":[{"line_number":545,"context_line":"        is_bound_port_moved \u003d ("},{"line_number":546,"context_line":"            original_port[portbindings.HOST_ID] and"},{"line_number":547,"context_line":"            original_port[portbindings.HOST_ID] !\u003d"},{"line_number":548,"context_line":"            new_port[portbindings.HOST_ID])"},{"line_number":549,"context_line":"        if is_bound_port_moved:"},{"line_number":550,"context_line":"            removed_routers \u003d l3plugin.get_dvr_routers_to_remove("},{"line_number":551,"context_line":"                context,"}],"source_content_type":"text/x-python","patch_set":20,"id":"dfbec78f_bdc5d75d","side":"PARENT","line":548,"updated":"2019-05-02 18:39:28.000000000","message":"Sorry to be a pain, but there is no reason to change this code, and goes against our guidelines of changing code not required in a review.  It also makes backporting things harder sometimes.","commit_id":"eeb06ce54d3b3df035ebb298b70ae77491149bca"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"33bd7bce4a784675fd123b440834606d574095fc","unresolved":false,"context_lines":[{"line_number":550,"context_line":"        context \u003d kwargs[\u0027context\u0027]"},{"line_number":551,"context_line":"        is_new_port_binding_changed \u003d new_port[portbindings.HOST_ID] and\\"},{"line_number":552,"context_line":"            (new_port[portbindings.HOST_ID] !\u003d"},{"line_number":553,"context_line":"             original_port[portbindings.HOST_ID])"},{"line_number":554,"context_line":"        is_bound_port_moved \u003d original_port[portbindings.HOST_ID] and\\"},{"line_number":555,"context_line":"            (original_port[portbindings.HOST_ID] !\u003d"},{"line_number":556,"context_line":"             new_port[portbindings.HOST_ID])"}],"source_content_type":"text/x-python","patch_set":20,"id":"dfbec78f_fd902f51","line":553,"updated":"2019-05-02 18:39:28.000000000","message":"is_new_port_binding_changed \u003d (\n    new_port[portbindings.HOST_ID] and\n    new_port[portbindings.HOST_ID] !\u003d\n    original_port[portbindings.HOST_ID])","commit_id":"854fe00d199a209de8a57d449a468c7eb4eae28d"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"33bd7bce4a784675fd123b440834606d574095fc","unresolved":false,"context_lines":[{"line_number":565,"context_line":"                return"},{"line_number":566,"context_line":"        if is_new_port_binding_changed or is_bound_port_moved or dest_host:"},{"line_number":567,"context_line":"            fips \u003d l3plugin._get_floatingips_by_port_id("},{"line_number":568,"context_line":"                    context, port_id\u003doriginal_port[\u0027id\u0027])"},{"line_number":569,"context_line":"            fip \u003d fips[0] if fips else None"},{"line_number":570,"context_line":"            if fip:"},{"line_number":571,"context_line":"                fip_router_id \u003d fip[\u0027router_id\u0027]"}],"source_content_type":"text/x-python","patch_set":20,"id":"dfbec78f_1d98a368","line":568,"updated":"2019-05-02 18:39:28.000000000","message":"nit: indent should be 4 spaces as original code was","commit_id":"854fe00d199a209de8a57d449a468c7eb4eae28d"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"d296dc980ec7902f94f3c05f6725a284855c96b7","unresolved":false,"context_lines":[{"line_number":109,"context_line":"            router \u003d l3plugin._get_router(context, router_id)"},{"line_number":110,"context_line":"            if l3_dvr_db.is_distributed_router(router):"},{"line_number":111,"context_line":"                (l3plugin."},{"line_number":112,"context_line":"                 check_for_fip_and_create_agent_gw_port_on_host_if_not_exists("},{"line_number":113,"context_line":"                     context, port, dest_host))"},{"line_number":114,"context_line":"            else:"},{"line_number":115,"context_line":"                LOG.debug(\"Port-in-Migration: Floating IP has a non-\""}],"source_content_type":"text/x-python","patch_set":21,"id":"dfbec78f_60774b04","line":112,"range":{"start_line":112,"start_character":17,"end_line":112,"end_character":78},"updated":"2019-05-09 19:15:53.000000000","message":"See my comments on PS 14 https://review.opendev.org/#/c/628071/14/neutron/db/l3_dvrscheduler_db.py@123 . I think having the association of a FIP be the trigger for creating the FIP gw port is incomplete and breaks the directly routable networks use case. The check should see whether the port is connected to a subnet with a router that has a gateway port. The FIP gw port should be created even if there is not a FIP. Think of it as a local gateway service port. Even ports without FIP\u0027s can rely on the FIP gw port for network connectivity.","commit_id":"ead2f97083262b21f10de905fe35cc7e45ddb3e4"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"59a50408ece374a115ad776656436fe178f0a2c3","unresolved":false,"context_lines":[{"line_number":109,"context_line":"            router \u003d l3plugin._get_router(context, router_id)"},{"line_number":110,"context_line":"            if l3_dvr_db.is_distributed_router(router):"},{"line_number":111,"context_line":"                (l3plugin."},{"line_number":112,"context_line":"                 check_for_fip_and_create_agent_gw_port_on_host_if_not_exists("},{"line_number":113,"context_line":"                     context, port, dest_host))"},{"line_number":114,"context_line":"            else:"},{"line_number":115,"context_line":"                LOG.debug(\"Port-in-Migration: Floating IP has a non-\""}],"source_content_type":"text/x-python","patch_set":21,"id":"dfbec78f_9eaadfcf","line":112,"range":{"start_line":112,"start_character":17,"end_line":112,"end_character":78},"in_reply_to":"dfbec78f_60774b04","updated":"2019-05-09 21:23:58.000000000","message":"Ryan Tidwell I don\u0027t think we should use this patch for addressing the issue that you bring up.\nRight now the FIP gateway agent on the compute node is only created when the first service port pops up.\nBehind the scenes we are using it as a Gateway port for the fast path exit.\nWe should probably address this in a different patch. ( Also since we only associate routers today to the Network node, we do create the FIP agent gateway port by default when the router is first created. But as far as the compute node is concerned, we only create routers based on the service port availability and so the FIP agent gateway port should also be created based on the service port availability on the compute host","commit_id":"ead2f97083262b21f10de905fe35cc7e45ddb3e4"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"f71312f4739a578937e989843925626ed1b31161","unresolved":false,"context_lines":[{"line_number":563,"context_line":"            dest_host \u003d new_port_profile.get(\u0027migrating_to\u0027)"},{"line_number":564,"context_line":"            # This check is required to prevent an arp update"},{"line_number":565,"context_line":"            # of the allowed_address_pair port."},{"line_number":566,"context_line":"            if new_port_profile.get(\u0027original_owner\u0027):"},{"line_number":567,"context_line":"                return"},{"line_number":568,"context_line":"        if is_new_port_binding_changed or is_bound_port_moved or dest_host:"},{"line_number":569,"context_line":"            fips \u003d l3plugin._get_floatingips_by_port_id("}],"source_content_type":"text/x-python","patch_set":21,"id":"dfbec78f_45ed7923","line":566,"updated":"2019-05-09 17:51:40.000000000","message":"I realize this was just moved from below, but I can find no other occurrence of \u0027original_owner\u0027 in any openstack-related repositories.\n\nhttp://codesearch.openstack.org/?q\u003doriginal_owner\u0026i\u003dnope\u0026files\u003d\u0026repos\u003d\n\nWas this supposed to be original_port[\u0027device_owner\u0027] ?  I actually don\u0027t know.","commit_id":"ead2f97083262b21f10de905fe35cc7e45ddb3e4"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"1367631417fac5767dfdfa0d9913092c63d10e84","unresolved":false,"context_lines":[{"line_number":563,"context_line":"            dest_host \u003d new_port_profile.get(\u0027migrating_to\u0027)"},{"line_number":564,"context_line":"            # This check is required to prevent an arp update"},{"line_number":565,"context_line":"            # of the allowed_address_pair port."},{"line_number":566,"context_line":"            if new_port_profile.get(\u0027original_owner\u0027):"},{"line_number":567,"context_line":"                return"},{"line_number":568,"context_line":"        if is_new_port_binding_changed or is_bound_port_moved or dest_host:"},{"line_number":569,"context_line":"            fips \u003d l3plugin._get_floatingips_by_port_id("}],"source_content_type":"text/x-python","patch_set":21,"id":"dfbec78f_7ef92bc6","line":566,"in_reply_to":"dfbec78f_45ed7923","updated":"2019-05-09 21:37:36.000000000","message":"Brian Haley, I think the \u0027original_device_owner\u0027 was part of this patch, which we added a fix for the unbound port FIP.\nhttps://review.opendev.org/#/c/295579/2/neutron/db/l3_dvr_db.py\nMay be we might not have cleaned it properly in the l3_dvrscheduler_db.py","commit_id":"ead2f97083262b21f10de905fe35cc7e45ddb3e4"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"86eeb208825b75677f0b989b434bd7294e3e915e","unresolved":false,"context_lines":[{"line_number":563,"context_line":"            dest_host \u003d new_port_profile.get(\u0027migrating_to\u0027)"},{"line_number":564,"context_line":"            # This check is required to prevent an arp update"},{"line_number":565,"context_line":"            # of the allowed_address_pair port."},{"line_number":566,"context_line":"            if new_port_profile.get(\u0027original_owner\u0027):"},{"line_number":567,"context_line":"                return"},{"line_number":568,"context_line":"        if is_new_port_binding_changed or is_bound_port_moved or dest_host:"},{"line_number":569,"context_line":"            fips \u003d l3plugin._get_floatingips_by_port_id("}],"source_content_type":"text/x-python","patch_set":21,"id":"dfbec78f_cfb5ffce","line":566,"in_reply_to":"dfbec78f_7ef92bc6","updated":"2019-05-10 01:27:14.000000000","message":"Swami - yes, this one was added in a different change, \nhttps://review.opendev.org/#/c/301410/ and most removed in https://review.opendev.org/#/c/466434/\n\nThis code is wrong now since we\u0027re not using original_owner anywhere, so it needs to get fixed, and I think it can just be removed since it is always None and is never triggered.","commit_id":"ead2f97083262b21f10de905fe35cc7e45ddb3e4"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"a35d0d6ab73766b6b5a0a243438945780ec14948","unresolved":false,"context_lines":[{"line_number":563,"context_line":"            dest_host \u003d new_port_profile.get(\u0027migrating_to\u0027)"},{"line_number":564,"context_line":"            # This check is required to prevent an arp update"},{"line_number":565,"context_line":"            # of the allowed_address_pair port."},{"line_number":566,"context_line":"            if new_port_profile.get(\u0027original_owner\u0027):"},{"line_number":567,"context_line":"                return"},{"line_number":568,"context_line":"        if is_new_port_binding_changed or is_bound_port_moved or dest_host:"},{"line_number":569,"context_line":"            fips \u003d l3plugin._get_floatingips_by_port_id("}],"source_content_type":"text/x-python","patch_set":21,"id":"dfbec78f_a8f0b3fe","line":566,"in_reply_to":"dfbec78f_cfb5ffce","updated":"2019-05-10 18:14:13.000000000","message":"Yes I agree that we can remove those lines #566 and #567. It would not affect anything.","commit_id":"ead2f97083262b21f10de905fe35cc7e45ddb3e4"}],"neutron/tests/unit/db/test_l3_dvr_db.py":[{"author":{"_account_id":25618,"name":"Paweł Suder","email":"pawel@suder.info","username":"SuderPawel"},"change_message_id":"e776e2601d165da937271671750a3f6194c1ca10","unresolved":false,"context_lines":[{"line_number":202,"context_line":"                \u0027create_fip_agent_gw_port_if_not_exists\u0027) as c_fip,\\"},{"line_number":203,"context_line":"                mock.patch.object(router_obj.FloatingIP, \u0027get_objects\u0027,"},{"line_number":204,"context_line":"                                  return_value\u003dfip):"},{"line_number":205,"context_line":"            ("},{"line_number":206,"context_line":"                self.mixin."},{"line_number":207,"context_line":"                check_for_fip_and_create_agent_gw_port_on_host_if_not_exists("},{"line_number":208,"context_line":"                    self.ctx, port, \u0027host\u0027))"},{"line_number":209,"context_line":"            self.assertFalse(c_fip.called)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9fdfeff1_ea005dae","line":206,"range":{"start_line":205,"start_character":13,"end_line":206,"end_character":16},"updated":"2019-02-05 08:02:00.000000000","message":"Why not merge L205 with L206?","commit_id":"97d88b7967abe4c460c9ee78d5db5288d2d49ef1"},{"author":{"_account_id":25618,"name":"Paweł Suder","email":"pawel@suder.info","username":"SuderPawel"},"change_message_id":"e776e2601d165da937271671750a3f6194c1ca10","unresolved":false,"context_lines":[{"line_number":225,"context_line":"                \u0027create_fip_agent_gw_port_if_not_exists\u0027) as c_fip,\\"},{"line_number":226,"context_line":"                mock.patch.object(router_obj.FloatingIP, \u0027get_objects\u0027,"},{"line_number":227,"context_line":"                                  return_value\u003dfip):"},{"line_number":228,"context_line":"            ("},{"line_number":229,"context_line":"                self.mixin."},{"line_number":230,"context_line":"                check_for_fip_and_create_agent_gw_port_on_host_if_not_exists("},{"line_number":231,"context_line":"                    self.ctx, port, \u0027host\u0027))"},{"line_number":232,"context_line":"            self.assertTrue(c_fip.called)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9fdfeff1_aa2c954a","line":229,"range":{"start_line":228,"start_character":13,"end_line":229,"end_character":16},"updated":"2019-02-05 08:02:00.000000000","message":"Similar to L205.","commit_id":"97d88b7967abe4c460c9ee78d5db5288d2d49ef1"},{"author":{"_account_id":30156,"name":"Igor D.C.","email":"igor.duarte.cardoso@intel.com","username":"igordc"},"change_message_id":"850be770fd5d180c546301f9de3a109f0c3f08f9","unresolved":false,"context_lines":[{"line_number":221,"context_line":"            portbindings.HOST_ID: \u0027myhost\u0027,"},{"line_number":222,"context_line":"            \u0027network_id\u0027: \u0027external_net\u0027"},{"line_number":223,"context_line":"        }"},{"line_number":224,"context_line":"        with mock.patch.object(self.mixin,"},{"line_number":225,"context_line":"                \u0027create_fip_agent_gw_port_if_not_exists\u0027) as c_fip,\\"},{"line_number":226,"context_line":"                mock.patch.object(router_obj.FloatingIP, \u0027get_objects\u0027,"},{"line_number":227,"context_line":"                                  return_value\u003dfip):"},{"line_number":228,"context_line":"            ("},{"line_number":229,"context_line":"                self.mixin."},{"line_number":230,"context_line":"                check_for_fip_and_create_agent_gw_port_on_host_if_not_exists("},{"line_number":231,"context_line":"                    self.ctx, port, \u0027host\u0027))"},{"line_number":232,"context_line":"            self.assertTrue(c_fip.called)"},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"    def _test_prepare_direct_delete_dvr_internal_ports(self, port):"},{"line_number":235,"context_line":"        plugin \u003d mock.Mock()"}],"source_content_type":"text/x-python","patch_set":3,"id":"5fc1f717_4b5861f9","line":232,"range":{"start_line":224,"start_character":0,"end_line":232,"end_character":41},"updated":"2019-04-03 00:38:36.000000000","message":"This whole part could be moved to its own private method too, but not significant.","commit_id":"97d88b7967abe4c460c9ee78d5db5288d2d49ef1"},{"author":{"_account_id":30156,"name":"Igor D.C.","email":"igor.duarte.cardoso@intel.com","username":"igordc"},"change_message_id":"a1f68799bfa93b1313fc67ca519054dadc493a96","unresolved":false,"context_lines":[{"line_number":214,"context_line":"            \u0027router_id\u0027: \u0027foo_router_id\u0027"},{"line_number":215,"context_line":"        }]"},{"line_number":216,"context_line":"        router \u003d mock.MagicMock()"},{"line_number":217,"context_line":"\trouter.distributed \u003d True"},{"line_number":218,"context_line":"        router_obj.Router.get_object \u003d mock.Mock(return_value\u003drouter)"},{"line_number":219,"context_line":"        port \u003d {"},{"line_number":220,"context_line":"            \u0027id\u0027: \u00271234\u0027,"}],"source_content_type":"text/x-python","patch_set":4,"id":"5fc1f717_864feebc","line":217,"range":{"start_line":217,"start_character":0,"end_line":217,"end_character":1},"updated":"2019-04-04 22:28:53.000000000","message":"Get rid of tab character","commit_id":"88ac392474256556f241f7a8f10df7f88ce88b7d"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"e72df027e4efbeeba1a9c8ef946be62025b927bf","unresolved":false,"context_lines":[{"line_number":206,"context_line":"            \u0027floating_network_id\u0027: _uuid(),"},{"line_number":207,"context_line":"            \u0027router_id\u0027: \u0027foo_router_id\u0027"},{"line_number":208,"context_line":"        }]"},{"line_number":209,"context_line":"        port \u003d {"},{"line_number":210,"context_line":"            \u0027id\u0027: \u00271234\u0027,"},{"line_number":211,"context_line":"            portbindings.HOST_ID: \u0027myhost\u0027,"},{"line_number":212,"context_line":"            \u0027network_id\u0027: \u0027external_net\u0027"},{"line_number":213,"context_line":"        }"},{"line_number":214,"context_line":"        self._help_check_and_create_fip_gw_port(fip, port, True)"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"    def _help_check_and_create_fip_gw_port(self, fip, port, expected):"}],"source_content_type":"text/x-python","patch_set":7,"id":"3fce034c_f8d916f4","line":213,"range":{"start_line":209,"start_character":0,"end_line":213,"end_character":9},"updated":"2019-04-11 14:02:49.000000000","message":"port is the same in both cases, You can move it to helper method maybe","commit_id":"0273fc0dec54122de555102562c3583f6f3c5bb2"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"e72df027e4efbeeba1a9c8ef946be62025b927bf","unresolved":false,"context_lines":[{"line_number":221,"context_line":"            (self.mixin."},{"line_number":222,"context_line":"             check_for_fip_and_create_agent_gw_port_on_host_if_not_exists("},{"line_number":223,"context_line":"                    self.ctx, port, \u0027host\u0027))"},{"line_number":224,"context_line":"            self.assertEquals(c_fip.called, expected)"},{"line_number":225,"context_line":""},{"line_number":226,"context_line":"    def _test_prepare_direct_delete_dvr_internal_ports(self, port):"},{"line_number":227,"context_line":"        plugin \u003d mock.Mock()"}],"source_content_type":"text/x-python","patch_set":7,"id":"3fce034c_98cb321d","line":224,"updated":"2019-04-11 14:02:49.000000000","message":"please use pattern:\n\n    assertEqual(expected, actual)","commit_id":"0273fc0dec54122de555102562c3583f6f3c5bb2"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"d18bd403454240daf2ad6a953fc1c121a7beb7c3","unresolved":false,"context_lines":[{"line_number":192,"context_line":"            \u0027device_owner\u0027: [const.DEVICE_OWNER_AGENT_GW]})"},{"line_number":193,"context_line":""},{"line_number":194,"context_line":"    def test_check_for_fip_and_create_agent_gw_port_no_fip(self):"},{"line_number":195,"context_line":"        fip \u003d None"},{"line_number":196,"context_line":"        self._help_check_and_create_fip_gw_port(fip, False)"},{"line_number":197,"context_line":""},{"line_number":198,"context_line":"    def test_check_for_fip_and_create_agent_gw_port_with_dvr_true(self):"}],"source_content_type":"text/x-python","patch_set":17,"id":"ffb9cba7_f3dafb75","line":195,"updated":"2019-04-30 14:50:32.000000000","message":"I would just pass None directly below.\n\nAlso, just a nit, but could you put the _helper method above the two tests?","commit_id":"8122a60c6238d02ed24c7b96ee94bd643e5dc1bb"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"d18bd403454240daf2ad6a953fc1c121a7beb7c3","unresolved":false,"context_lines":[{"line_number":203,"context_line":"        }]"},{"line_number":204,"context_line":"        self._help_check_and_create_fip_gw_port(fip, True)"},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"    def _help_check_and_create_fip_gw_port(self, fip, expected):"},{"line_number":207,"context_line":"        port \u003d {"},{"line_number":208,"context_line":"            \u0027id\u0027: \u00271234\u0027,"},{"line_number":209,"context_line":"            portbindings.HOST_ID: \u0027myhost\u0027,"}],"source_content_type":"text/x-python","patch_set":17,"id":"ffb9cba7_33f5f3ed","line":206,"updated":"2019-04-30 14:50:32.000000000","message":"Doesn\u0027t seem like you need the \u0027expected\u0027 argument, if fip is not None the call should have happened.","commit_id":"8122a60c6238d02ed24c7b96ee94bd643e5dc1bb"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"d18bd403454240daf2ad6a953fc1c121a7beb7c3","unresolved":false,"context_lines":[{"line_number":216,"context_line":"            (self.mixin."},{"line_number":217,"context_line":"             check_fip_and_create_agent_gw_port_on_host_if_not_exists("},{"line_number":218,"context_line":"                    self.ctx, port, \u0027host\u0027))"},{"line_number":219,"context_line":"            self.assertEqual(expected, c_fip.called)"},{"line_number":220,"context_line":""},{"line_number":221,"context_line":"    def _test_prepare_direct_delete_dvr_internal_ports(self, port):"},{"line_number":222,"context_line":"        plugin \u003d mock.Mock()"}],"source_content_type":"text/x-python","patch_set":17,"id":"ffb9cba7_93bcdf06","line":219,"updated":"2019-04-30 14:50:32.000000000","message":"This should be asserting that c_fip was called with the correct arguments for completeness:\n\nif fip:\n    c_fip.assert_called_once_with(...)\nelse:\n    c_fip.assert_not_called()","commit_id":"8122a60c6238d02ed24c7b96ee94bd643e5dc1bb"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"3ab6b27b99e2f9f0f732921d88ff18046e854327","unresolved":false,"context_lines":[{"line_number":199,"context_line":"        }"},{"line_number":200,"context_line":"        ctxt \u003d self.ctx"},{"line_number":201,"context_line":"        ctxt.elevated \u003d mock.Mock()"},{"line_number":202,"context_line":"        ctxt.elevated.return_value \u003d \u0027fake_context\u0027"},{"line_number":203,"context_line":"        with mock.patch.object(self.mixin,"},{"line_number":204,"context_line":"                \u0027create_fip_agent_gw_port_if_not_exists\u0027) as c_fip,\\"},{"line_number":205,"context_line":"                mock.patch.object(router_obj.FloatingIP, \u0027get_objects\u0027,"}],"source_content_type":"text/x-python","patch_set":18,"id":"ffb9cba7_3e784fc2","line":202,"updated":"2019-05-01 14:47:32.000000000","message":"Just create a context mock object here, no need for the elevated part:\n\nctxt \u003d mock.Mock()","commit_id":"dd0b686408fb5a1e52a6f89235e2b22abf6aed42"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"3ab6b27b99e2f9f0f732921d88ff18046e854327","unresolved":false,"context_lines":[{"line_number":203,"context_line":"        with mock.patch.object(self.mixin,"},{"line_number":204,"context_line":"                \u0027create_fip_agent_gw_port_if_not_exists\u0027) as c_fip,\\"},{"line_number":205,"context_line":"                mock.patch.object(router_obj.FloatingIP, \u0027get_objects\u0027,"},{"line_number":206,"context_line":"                                  return_value\u003dfip):"},{"line_number":207,"context_line":"            (self.mixin."},{"line_number":208,"context_line":"             check_for_fip_and_create_agent_gw_port_on_host_if_not_exists("},{"line_number":209,"context_line":"                    ctxt, port, \u0027host\u0027))"}],"source_content_type":"text/x-python","patch_set":18,"id":"ffb9cba7_9e485b87","line":206,"range":{"start_line":206,"start_character":47,"end_line":206,"end_character":50},"updated":"2019-05-01 14:47:32.000000000","message":"s/[fip], see below","commit_id":"dd0b686408fb5a1e52a6f89235e2b22abf6aed42"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"3ab6b27b99e2f9f0f732921d88ff18046e854327","unresolved":false,"context_lines":[{"line_number":208,"context_line":"             check_for_fip_and_create_agent_gw_port_on_host_if_not_exists("},{"line_number":209,"context_line":"                    ctxt, port, \u0027host\u0027))"},{"line_number":210,"context_line":"            if fip:"},{"line_number":211,"context_line":"                c_fip.assert_called_once_with(\u0027fake_context\u0027,"},{"line_number":212,"context_line":"                                              \u0027fake_net_id\u0027,"},{"line_number":213,"context_line":"                                              \u0027host\u0027)"},{"line_number":214,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":18,"id":"ffb9cba7_5e7503ca","line":211,"range":{"start_line":211,"start_character":46,"end_line":211,"end_character":60},"updated":"2019-05-01 14:47:32.000000000","message":"and check ctxt.elevated() here","commit_id":"dd0b686408fb5a1e52a6f89235e2b22abf6aed42"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"3ab6b27b99e2f9f0f732921d88ff18046e854327","unresolved":false,"context_lines":[{"line_number":209,"context_line":"                    ctxt, port, \u0027host\u0027))"},{"line_number":210,"context_line":"            if fip:"},{"line_number":211,"context_line":"                c_fip.assert_called_once_with(\u0027fake_context\u0027,"},{"line_number":212,"context_line":"                                              \u0027fake_net_id\u0027,"},{"line_number":213,"context_line":"                                              \u0027host\u0027)"},{"line_number":214,"context_line":"            else:"},{"line_number":215,"context_line":"                c_fip.assert_not_called()"}],"source_content_type":"text/x-python","patch_set":18,"id":"ffb9cba7_1e29cb99","line":212,"range":{"start_line":212,"start_character":46,"end_line":212,"end_character":59},"updated":"2019-05-01 14:47:32.000000000","message":"s/fip[\u0027floating_network_id\u0027]","commit_id":"dd0b686408fb5a1e52a6f89235e2b22abf6aed42"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"3ab6b27b99e2f9f0f732921d88ff18046e854327","unresolved":false,"context_lines":[{"line_number":222,"context_line":"            \u0027id\u0027: _uuid(),"},{"line_number":223,"context_line":"            \u0027floating_network_id\u0027: \u0027fake_net_id\u0027,"},{"line_number":224,"context_line":"            \u0027router_id\u0027: \u0027foo_router_id\u0027"},{"line_number":225,"context_line":"        }]"},{"line_number":226,"context_line":"        self._help_check_and_create_fip_gw_port(fip\u003dfip)"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"    def _test_prepare_direct_delete_dvr_internal_ports(self, port):"}],"source_content_type":"text/x-python","patch_set":18,"id":"ffb9cba7_9e161b55","line":225,"updated":"2019-05-01 14:47:32.000000000","message":"fip should just be a dict, not a list, that way you can check for \u0027fake_net_id\u0027 above","commit_id":"dd0b686408fb5a1e52a6f89235e2b22abf6aed42"}]}
