)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"41c667db92ef0b11ab742198cad9619911da61c8","unresolved":true,"context_lines":[{"line_number":12,"context_line":"the local router is not up, then provisioning_complete"},{"line_number":13,"context_line":"will not be sent."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Related-Bug: #1813787"},{"line_number":16,"context_line":"Change-Id: I00c5e6e0b11929a5b98e21e21a1090b60466515e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":29,"id":"9ea69ca7_5fb917d0","line":15,"range":{"start_line":15,"start_character":0,"end_line":15,"end_character":7},"updated":"2021-04-22 08:09:00.000000000","message":"why not Closes?","commit_id":"26e7b8187284f8073fdc010850b70ec5cc0bde24"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"640a2bef9d4faa2014017ca40b2b53fc45484bf1","unresolved":false,"context_lines":[{"line_number":12,"context_line":"the local router is not up, then provisioning_complete"},{"line_number":13,"context_line":"will not be sent."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Related-Bug: #1813787"},{"line_number":16,"context_line":"Change-Id: I00c5e6e0b11929a5b98e21e21a1090b60466515e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":29,"id":"83d5f9c2_e6d0ef7f","line":15,"range":{"start_line":15,"start_character":0,"end_line":15,"end_character":7},"in_reply_to":"718d7a42_f36ed292","updated":"2021-04-29 10:13:19.000000000","message":"Done","commit_id":"26e7b8187284f8073fdc010850b70ec5cc0bde24"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"0df9f329438696ebd042a5972ab4cc3a08395bb6","unresolved":true,"context_lines":[{"line_number":12,"context_line":"the local router is not up, then provisioning_complete"},{"line_number":13,"context_line":"will not be sent."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Related-Bug: #1813787"},{"line_number":16,"context_line":"Change-Id: I00c5e6e0b11929a5b98e21e21a1090b60466515e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":29,"id":"ba9f91d4_fd785181","line":15,"range":{"start_line":15,"start_character":0,"end_line":15,"end_character":7},"in_reply_to":"9ea69ca7_5fb917d0","updated":"2021-04-22 08:47:25.000000000","message":"There are some patches have been merged for this bug, all for the same one.","commit_id":"26e7b8187284f8073fdc010850b70ec5cc0bde24"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"fc183647e5e746275ac7700f5778b6ceb40dd375","unresolved":true,"context_lines":[{"line_number":12,"context_line":"the local router is not up, then provisioning_complete"},{"line_number":13,"context_line":"will not be sent."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Related-Bug: #1813787"},{"line_number":16,"context_line":"Change-Id: I00c5e6e0b11929a5b98e21e21a1090b60466515e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":29,"id":"718d7a42_f36ed292","line":15,"range":{"start_line":15,"start_character":0,"end_line":15,"end_character":7},"in_reply_to":"ba9f91d4_fd785181","updated":"2021-04-22 08:58:15.000000000","message":"But shouldn\u0027t this one finally close the bug? If yes than this should be Closes. If more patches needed than this should be Partial.","commit_id":"26e7b8187284f8073fdc010850b70ec5cc0bde24"}],"neutron/agent/l3/agent.py":[{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"695d9854a98f09c893cbba074fc6586a69bbb878","unresolved":false,"context_lines":[{"line_number":519,"context_line":"        ri.process()"},{"line_number":520,"context_line":"        registry.notify(resources.ROUTER, events.AFTER_CREATE, self, router\u003dri)"},{"line_number":521,"context_line":"        self.l3_ext_manager.add_router(self.context, router)"},{"line_number":522,"context_line":"        self.router_info_processed[router[\u0027id\u0027]] \u003d router[\u0027id\u0027]"},{"line_number":523,"context_line":""},{"line_number":524,"context_line":"    def _process_updated_router(self, router):"},{"line_number":525,"context_line":"        ri \u003d self.router_info[router[\u0027id\u0027]]"}],"source_content_type":"text/x-python","patch_set":3,"id":"9fdfeff1_9a761170","line":522,"range":{"start_line":522,"start_character":51,"end_line":522,"end_character":63},"updated":"2019-01-30 20:16:30.000000000","message":"Seems like this should be True, or a dict of things that have been processed based on your comment on L472, but then this init would have to be in _router_added().","commit_id":"6a274ba54bd15454af6f83da1a977e73815029c1"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"9ceb1b1f07ee06a7cf4a8a510f1235c84e560470","unresolved":false,"context_lines":[{"line_number":519,"context_line":"        ri.process()"},{"line_number":520,"context_line":"        registry.notify(resources.ROUTER, events.AFTER_CREATE, self, router\u003dri)"},{"line_number":521,"context_line":"        self.l3_ext_manager.add_router(self.context, router)"},{"line_number":522,"context_line":"        self.router_info_processed[router[\u0027id\u0027]] \u003d router[\u0027id\u0027]"},{"line_number":523,"context_line":""},{"line_number":524,"context_line":"    def _process_updated_router(self, router):"},{"line_number":525,"context_line":"        ri \u003d self.router_info[router[\u0027id\u0027]]"}],"source_content_type":"text/x-python","patch_set":3,"id":"9fdfeff1_2cbfafd1","line":522,"range":{"start_line":522,"start_character":51,"end_line":522,"end_character":63},"in_reply_to":"9fdfeff1_9a761170","updated":"2019-01-31 01:49:32.000000000","message":"No, _router_added is just added it to the dict router_info. It is not done processing.\n\nAnd comments L472 is not related to this patch too much. That will be my other idea of \"neutron resource status (health) checking\". I will raise this to our meeting or detail it to a new RFE.","commit_id":"6a274ba54bd15454af6f83da1a977e73815029c1"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"102f0f58bda84f3f617e4d93c464277cefaaeef7","unresolved":false,"context_lines":[{"line_number":215,"context_line":"        else:"},{"line_number":216,"context_line":"            self.conf \u003d cfg.CONF"},{"line_number":217,"context_line":"        self.router_info \u003d {}"},{"line_number":218,"context_line":"        self.router_info_processed \u003d {}"},{"line_number":219,"context_line":""},{"line_number":220,"context_line":"        self._check_config_params()"},{"line_number":221,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"9fdfeff1_81acb335","line":218,"range":{"start_line":218,"start_character":8,"end_line":218,"end_character":39},"updated":"2019-02-11 18:01:50.000000000","message":"We have this information in self.router_info. Every time we add/remove a router, this variable is updated. Why do we need the new one?","commit_id":"9c877790dde77c439de359bed30211ca9c4aea73"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"44b9146a04e7563e267dcb81e4200c047fc983d3","unresolved":false,"context_lines":[{"line_number":215,"context_line":"        else:"},{"line_number":216,"context_line":"            self.conf \u003d cfg.CONF"},{"line_number":217,"context_line":"        self.router_info \u003d {}"},{"line_number":218,"context_line":"        self.router_info_processed \u003d {}"},{"line_number":219,"context_line":""},{"line_number":220,"context_line":"        self._check_config_params()"},{"line_number":221,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"9fdfeff1_df792bfc","line":218,"range":{"start_line":218,"start_character":8,"end_line":218,"end_character":39},"in_reply_to":"9fdfeff1_81acb335","updated":"2019-02-11 22:21:58.000000000","message":"In case router was already in router_info but not processed yet, please see line line 517-521.","commit_id":"9c877790dde77c439de359bed30211ca9c4aea73"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"102f0f58bda84f3f617e4d93c464277cefaaeef7","unresolved":false,"context_lines":[{"line_number":472,"context_line":"            # TODO(liuyulong): we can add more check to this method to verify"},{"line_number":473,"context_line":"            # the router is processed properly, such as check the iptables"},{"line_number":474,"context_line":"            # rules, route rules etc."},{"line_number":475,"context_line":"            return True"},{"line_number":476,"context_line":""},{"line_number":477,"context_line":"    def network_update(self, context, **kwargs):"},{"line_number":478,"context_line":"        network_id \u003d kwargs[\u0027network\u0027][\u0027id\u0027]"}],"source_content_type":"text/x-python","patch_set":6,"id":"9fdfeff1_417b2bbd","line":475,"updated":"2019-02-11 18:01:50.000000000","message":"Because the expected returned value of this function is boolean, just in case you should add a default \"return False\".","commit_id":"9c877790dde77c439de359bed30211ca9c4aea73"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"cba4054c811fdd330e94779525e9c4a9ba97dd48","unresolved":false,"context_lines":[{"line_number":472,"context_line":"            # TODO(liuyulong): we can add more check to this method to verify"},{"line_number":473,"context_line":"            # the router is processed properly, such as check the iptables"},{"line_number":474,"context_line":"            # rules, route rules etc."},{"line_number":475,"context_line":"            return True"},{"line_number":476,"context_line":""},{"line_number":477,"context_line":"    def network_update(self, context, **kwargs):"},{"line_number":478,"context_line":"        network_id \u003d kwargs[\u0027network\u0027][\u0027id\u0027]"}],"source_content_type":"text/x-python","patch_set":6,"id":"9fdfeff1_94ea98d5","line":475,"in_reply_to":"9fdfeff1_417b2bbd","updated":"2019-02-12 23:23:25.000000000","message":"Done","commit_id":"9c877790dde77c439de359bed30211ca9c4aea73"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"320fdd88e1cf9b93001a3344c67af10847e30d06","unresolved":false,"context_lines":[{"line_number":577,"context_line":""},{"line_number":578,"context_line":"    def is_router_up(self, context, router_id):"},{"line_number":579,"context_line":"        LOG.debug(\u0027Check router %s agent status\u0027, router_id)"},{"line_number":580,"context_line":"        if router_id in self.router_info_processed:"},{"line_number":581,"context_line":"            # TODO(liuyulong): we can add more check to this method to verify"},{"line_number":582,"context_line":"            # the router is processed properly, such as check the iptables"},{"line_number":583,"context_line":"            # rules, route rules etc."}],"source_content_type":"text/x-python","patch_set":13,"id":"9fb8cfa7_f65a3c4e","line":580,"range":{"start_line":580,"start_character":8,"end_line":580,"end_character":51},"updated":"2019-06-06 08:20:00.000000000","message":"why not just simply:\n\n    return router_id in self.router_info_processed\n\n?","commit_id":"9e51c5a69b76a082d985cf85b32f1f65fb83df26"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"a07752414665eac496177f9b9394d4629448822f","unresolved":false,"context_lines":[{"line_number":577,"context_line":""},{"line_number":578,"context_line":"    def is_router_up(self, context, router_id):"},{"line_number":579,"context_line":"        LOG.debug(\u0027Check router %s agent status\u0027, router_id)"},{"line_number":580,"context_line":"        if router_id in self.router_info_processed:"},{"line_number":581,"context_line":"            # TODO(liuyulong): we can add more check to this method to verify"},{"line_number":582,"context_line":"            # the router is processed properly, such as check the iptables"},{"line_number":583,"context_line":"            # rules, route rules etc."}],"source_content_type":"text/x-python","patch_set":13,"id":"9fb8cfa7_442988e3","line":580,"range":{"start_line":580,"start_character":8,"end_line":580,"end_character":51},"in_reply_to":"9fb8cfa7_f65a3c4e","updated":"2019-07-01 01:09:28.000000000","message":"OK, I will refactor this.","commit_id":"9e51c5a69b76a082d985cf85b32f1f65fb83df26"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"d72a4452adf079207f72724985bb370158e7c7b6","unresolved":false,"context_lines":[{"line_number":545,"context_line":"        if ri is None:"},{"line_number":546,"context_line":"            LOG.warning(\"Info for router %s was not found. \""},{"line_number":547,"context_line":"                        \"Performing router cleanup\", router_id)"},{"line_number":548,"context_line":"            self.namespaces_manager.ensure_router_cleanup(router_id)"},{"line_number":549,"context_line":"            return"},{"line_number":550,"context_line":""},{"line_number":551,"context_line":"        registry.publish(resources.ROUTER, events.BEFORE_DELETE, self,"}],"source_content_type":"text/x-python","patch_set":17,"id":"7faddb67_5893a6a3","line":548,"updated":"2019-08-21 13:43:44.000000000","message":"We should also make sure that router_info_processed is cleaned here.","commit_id":"9f5be9b1ec90392f3c572e24c123bf3b22707808"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"e4f63a8312a0bf309e5c8641af728ccdcd4dd572","unresolved":false,"context_lines":[{"line_number":545,"context_line":"        if ri is None:"},{"line_number":546,"context_line":"            LOG.warning(\"Info for router %s was not found. \""},{"line_number":547,"context_line":"                        \"Performing router cleanup\", router_id)"},{"line_number":548,"context_line":"            self.namespaces_manager.ensure_router_cleanup(router_id)"},{"line_number":549,"context_line":"            return"},{"line_number":550,"context_line":""},{"line_number":551,"context_line":"        registry.publish(resources.ROUTER, events.BEFORE_DELETE, self,"}],"source_content_type":"text/x-python","patch_set":17,"id":"7faddb67_d33457fd","line":548,"in_reply_to":"7faddb67_5893a6a3","updated":"2019-08-21 14:47:44.000000000","message":"Hmm, the last line of function \"_process_added_router\" will do the push action. If router is not in \"self.router_info\" cache, it should not in \"self.router_info_processed\". But it should be OK if we can fill all code path to prevent unexcepted behaviors. Thanks","commit_id":"9f5be9b1ec90392f3c572e24c123bf3b22707808"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"4b5c14cd615d8e0fab9f9c78d63b724d442d2d05","unresolved":false,"context_lines":[{"line_number":545,"context_line":"        if ri is None:"},{"line_number":546,"context_line":"            LOG.warning(\"Info for router %s was not found. \""},{"line_number":547,"context_line":"                        \"Performing router cleanup\", router_id)"},{"line_number":548,"context_line":"            self.namespaces_manager.ensure_router_cleanup(router_id)"},{"line_number":549,"context_line":"            return"},{"line_number":550,"context_line":""},{"line_number":551,"context_line":"        registry.publish(resources.ROUTER, events.BEFORE_DELETE, self,"}],"source_content_type":"text/x-python","patch_set":17,"id":"7faddb67_309efe53","line":548,"in_reply_to":"7faddb67_d33457fd","updated":"2019-08-21 20:47:24.000000000","message":"Done","commit_id":"9f5be9b1ec90392f3c572e24c123bf3b22707808"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"da11fcd388cc50e09caf943565cd05df189dc26f","unresolved":false,"context_lines":[{"line_number":545,"context_line":"        if ri is None:"},{"line_number":546,"context_line":"            LOG.warning(\"Info for router %s was not found. \""},{"line_number":547,"context_line":"                        \"Performing router cleanup\", router_id)"},{"line_number":548,"context_line":"            self.namespaces_manager.ensure_router_cleanup(router_id)"},{"line_number":549,"context_line":"            return"},{"line_number":550,"context_line":""},{"line_number":551,"context_line":"        registry.publish(resources.ROUTER, events.BEFORE_DELETE, self,"}],"source_content_type":"text/x-python","patch_set":17,"id":"7faddb67_040e203a","line":548,"in_reply_to":"7faddb67_d33457fd","updated":"2019-08-21 19:33:03.000000000","message":"My thought is that an extra line to ensure the router_info_processed is kept clean even when a race condition happens and this code path is exercised is low-cost but wise.","commit_id":"9f5be9b1ec90392f3c572e24c123bf3b22707808"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"d72a4452adf079207f72724985bb370158e7c7b6","unresolved":false,"context_lines":[{"line_number":603,"context_line":""},{"line_number":604,"context_line":"    def is_router_up(self, context, router_id):"},{"line_number":605,"context_line":"        LOG.debug(\u0027Check router %s agent status\u0027, router_id)"},{"line_number":606,"context_line":"        if router_id in self.router_info_processed:"},{"line_number":607,"context_line":"            # TODO(liuyulong): we can add more check to this method to verify"},{"line_number":608,"context_line":"            # the router is processed properly, such as check the iptables"},{"line_number":609,"context_line":"            # rules, route rules etc."}],"source_content_type":"text/x-python","patch_set":17,"id":"7faddb67_f88db27b","line":606,"updated":"2019-08-21 13:43:44.000000000","message":"Until we have such additional checks implemented, perhaps this can be left as:\n\n        return router_id in self.router_info_processed","commit_id":"9f5be9b1ec90392f3c572e24c123bf3b22707808"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"4b5c14cd615d8e0fab9f9c78d63b724d442d2d05","unresolved":false,"context_lines":[{"line_number":603,"context_line":""},{"line_number":604,"context_line":"    def is_router_up(self, context, router_id):"},{"line_number":605,"context_line":"        LOG.debug(\u0027Check router %s agent status\u0027, router_id)"},{"line_number":606,"context_line":"        if router_id in self.router_info_processed:"},{"line_number":607,"context_line":"            # TODO(liuyulong): we can add more check to this method to verify"},{"line_number":608,"context_line":"            # the router is processed properly, such as check the iptables"},{"line_number":609,"context_line":"            # rules, route rules etc."}],"source_content_type":"text/x-python","patch_set":17,"id":"7faddb67_10a3c29f","line":606,"in_reply_to":"7faddb67_f88db27b","updated":"2019-08-21 20:47:24.000000000","message":"Done","commit_id":"9f5be9b1ec90392f3c572e24c123bf3b22707808"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"945e0651f608915be2b1e0685e308666ff18a1e4","unresolved":false,"context_lines":[{"line_number":607,"context_line":"        # TODO(liuyulong): we can add more check to this method to verify"},{"line_number":608,"context_line":"        # the router is processed properly, such as check the iptables"},{"line_number":609,"context_line":"        # rules, route rules etc."},{"line_number":610,"context_line":"        return router_id in self.router_info_processed:"},{"line_number":611,"context_line":""},{"line_number":612,"context_line":"    def network_update(self, context, **kwargs):"},{"line_number":613,"context_line":"        network_id \u003d kwargs[\u0027network\u0027][\u0027id\u0027]"}],"source_content_type":"text/x-python","patch_set":18,"id":"7faddb67_7f9be1c7","line":610,"updated":"2019-08-21 19:40:10.000000000","message":"I think the trailing colon here is what is killing all the CI tests","commit_id":"ab5ad8ef5efec3cacb4dd98fe02bfcb58e58c202"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"2558ffba3d9f890f2e72045adff671d90b2dc2c8","unresolved":true,"context_lines":[{"line_number":600,"context_line":"        # TODO(liuyulong): we can add more check to this method to verify"},{"line_number":601,"context_line":"        # the router is processed properly, such as check the iptables"},{"line_number":602,"context_line":"        # rules, route rules etc."},{"line_number":603,"context_line":"        return router_id in self.router_info_processed"},{"line_number":604,"context_line":""},{"line_number":605,"context_line":"    def network_update(self, context, **kwargs):"},{"line_number":606,"context_line":"        network_id \u003d kwargs[\u0027network\u0027][\u0027id\u0027]"}],"source_content_type":"text/x-python","patch_set":32,"id":"2f5fce5e_7872127a","line":603,"range":{"start_line":603,"start_character":33,"end_line":603,"end_character":54},"updated":"2021-05-18 15:02:06.000000000","message":"If the agent is restarted, we\u0027ll need until the fullsync is done, right?","commit_id":"39f961b35c63b62a19e23f6a6878499d7615571f"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"2a0d7b46b12452dcb4f3dcc49df5846e04e8e2dd","unresolved":true,"context_lines":[{"line_number":600,"context_line":"        # TODO(liuyulong): we can add more check to this method to verify"},{"line_number":601,"context_line":"        # the router is processed properly, such as check the iptables"},{"line_number":602,"context_line":"        # rules, route rules etc."},{"line_number":603,"context_line":"        return router_id in self.router_info_processed"},{"line_number":604,"context_line":""},{"line_number":605,"context_line":"    def network_update(self, context, **kwargs):"},{"line_number":606,"context_line":"        network_id \u003d kwargs[\u0027network\u0027][\u0027id\u0027]"}],"source_content_type":"text/x-python","patch_set":32,"id":"da78742c_2b10eaa8","line":603,"range":{"start_line":603,"start_character":33,"end_line":603,"end_character":54},"in_reply_to":"2f5fce5e_7872127a","updated":"2021-05-21 08:09:54.000000000","message":"If after 10 times retry the router is still not processed, it will continue the work. The max time for this check will be 165s, see the test case here:\n\nhttps://review.opendev.org/c/openstack/neutron/+/633871/32/neutron/tests/unit/db/test_l3_dvr_db.py#55","commit_id":"39f961b35c63b62a19e23f6a6878499d7615571f"}],"neutron/conf/common.py":[{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"41c667db92ef0b11ab742198cad9619911da61c8","unresolved":true,"context_lines":[{"line_number":153,"context_line":"                       \u00272. DHCP scheduler API extension \u0027"},{"line_number":154,"context_line":"                       \u00273. Network scheduling mechanism \u0027"},{"line_number":155,"context_line":"                       \u00274. DHCP RPC/notification\u0027)),"},{"line_number":156,"context_line":"    cfg.BoolOpt(\u0027check_dvr_local_router_up\u0027, default\u003dTrue,"},{"line_number":157,"context_line":"                help\u003d_(\u0027Whether to check the router is up in the port host \u0027"},{"line_number":158,"context_line":"                       \u0027before remove the provisioning block.\u0027)),"},{"line_number":159,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":29,"id":"e9e124cd_1cac5b22","line":156,"range":{"start_line":156,"start_character":16,"end_line":156,"end_character":57},"updated":"2021-04-22 08:09:00.000000000","message":"Why would someone prefer to disable it in a DVR deployment?","commit_id":"26e7b8187284f8073fdc010850b70ec5cc0bde24"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"fc183647e5e746275ac7700f5778b6ceb40dd375","unresolved":false,"context_lines":[{"line_number":153,"context_line":"                       \u00272. DHCP scheduler API extension \u0027"},{"line_number":154,"context_line":"                       \u00273. Network scheduling mechanism \u0027"},{"line_number":155,"context_line":"                       \u00274. DHCP RPC/notification\u0027)),"},{"line_number":156,"context_line":"    cfg.BoolOpt(\u0027check_dvr_local_router_up\u0027, default\u003dTrue,"},{"line_number":157,"context_line":"                help\u003d_(\u0027Whether to check the router is up in the port host \u0027"},{"line_number":158,"context_line":"                       \u0027before remove the provisioning block.\u0027)),"},{"line_number":159,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":29,"id":"e51f8edc_2365ac1f","line":156,"range":{"start_line":156,"start_character":16,"end_line":156,"end_character":57},"in_reply_to":"0c51fdab_4a2c4dfb","updated":"2021-04-22 08:58:15.000000000","message":"Ack","commit_id":"26e7b8187284f8073fdc010850b70ec5cc0bde24"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"260b4430de249c641f19409c773202e284fba017","unresolved":true,"context_lines":[{"line_number":153,"context_line":"                       \u00272. DHCP scheduler API extension \u0027"},{"line_number":154,"context_line":"                       \u00273. Network scheduling mechanism \u0027"},{"line_number":155,"context_line":"                       \u00274. DHCP RPC/notification\u0027)),"},{"line_number":156,"context_line":"    cfg.BoolOpt(\u0027check_dvr_local_router_up\u0027, default\u003dTrue,"},{"line_number":157,"context_line":"                help\u003d_(\u0027Whether to check the router is up in the port host \u0027"},{"line_number":158,"context_line":"                       \u0027before remove the provisioning block.\u0027)),"},{"line_number":159,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":29,"id":"0c51fdab_4a2c4dfb","line":156,"range":{"start_line":156,"start_character":16,"end_line":156,"end_character":57},"in_reply_to":"e9e124cd_1cac5b22","updated":"2021-04-22 08:45:10.000000000","message":"1. For some deployment, they may not rely on the dvr local router to do data proxy. Then they can disable this.\n2. Some deployment may not needs to wait the networking is done, such as they set \"vip_plug_is_fatal \u003d False\", then this is not usable as well.\n3. For large scale resources, or VM booting storm, this may cause some potential performance problem. Give a chance for those deployment to not wait on this check.","commit_id":"26e7b8187284f8073fdc010850b70ec5cc0bde24"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"9b27678f91962607c62bace944111ddd43bede53","unresolved":true,"context_lines":[{"line_number":154,"context_line":"                       \u00273. Network scheduling mechanism \u0027"},{"line_number":155,"context_line":"                       \u00274. DHCP RPC/notification\u0027)),"},{"line_number":156,"context_line":"    cfg.BoolOpt(\u0027check_dvr_local_router_up\u0027, default\u003dTrue,"},{"line_number":157,"context_line":"                help\u003d_(\u0027Whether to check the router is up in the port host \u0027"},{"line_number":158,"context_line":"                       \u0027before remove the provisioning block.\u0027)),"},{"line_number":159,"context_line":"]"},{"line_number":160,"context_line":""}],"source_content_type":"text/x-python","patch_set":31,"id":"916be00a_f4c36591","line":157,"range":{"start_line":157,"start_character":65,"end_line":157,"end_character":74},"updated":"2021-05-07 20:30:22.000000000","message":"compute node hosting the port ?","commit_id":"3e8d448a9bee12dda3e94cf08e7059ab771b7aac"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"56f37040aaf2870f89748809db977f6f2e282dc1","unresolved":false,"context_lines":[{"line_number":154,"context_line":"                       \u00273. Network scheduling mechanism \u0027"},{"line_number":155,"context_line":"                       \u00274. DHCP RPC/notification\u0027)),"},{"line_number":156,"context_line":"    cfg.BoolOpt(\u0027check_dvr_local_router_up\u0027, default\u003dTrue,"},{"line_number":157,"context_line":"                help\u003d_(\u0027Whether to check the router is up in the port host \u0027"},{"line_number":158,"context_line":"                       \u0027before remove the provisioning block.\u0027)),"},{"line_number":159,"context_line":"]"},{"line_number":160,"context_line":""}],"source_content_type":"text/x-python","patch_set":31,"id":"76d2bd84_ce33bb82","line":157,"range":{"start_line":157,"start_character":65,"end_line":157,"end_character":74},"in_reply_to":"916be00a_f4c36591","updated":"2021-05-14 11:39:40.000000000","message":"Done","commit_id":"3e8d448a9bee12dda3e94cf08e7059ab771b7aac"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"9b27678f91962607c62bace944111ddd43bede53","unresolved":true,"context_lines":[{"line_number":155,"context_line":"                       \u00274. DHCP RPC/notification\u0027)),"},{"line_number":156,"context_line":"    cfg.BoolOpt(\u0027check_dvr_local_router_up\u0027, default\u003dTrue,"},{"line_number":157,"context_line":"                help\u003d_(\u0027Whether to check the router is up in the port host \u0027"},{"line_number":158,"context_line":"                       \u0027before remove the provisioning block.\u0027)),"},{"line_number":159,"context_line":"]"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"core_cli_opts \u003d ["}],"source_content_type":"text/x-python","patch_set":31,"id":"2930a64f_1a71b05c","line":158,"range":{"start_line":158,"start_character":31,"end_line":158,"end_character":37},"updated":"2021-05-07 20:30:22.000000000","message":"s/removing","commit_id":"3e8d448a9bee12dda3e94cf08e7059ab771b7aac"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"56f37040aaf2870f89748809db977f6f2e282dc1","unresolved":false,"context_lines":[{"line_number":155,"context_line":"                       \u00274. DHCP RPC/notification\u0027)),"},{"line_number":156,"context_line":"    cfg.BoolOpt(\u0027check_dvr_local_router_up\u0027, default\u003dTrue,"},{"line_number":157,"context_line":"                help\u003d_(\u0027Whether to check the router is up in the port host \u0027"},{"line_number":158,"context_line":"                       \u0027before remove the provisioning block.\u0027)),"},{"line_number":159,"context_line":"]"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"core_cli_opts \u003d ["}],"source_content_type":"text/x-python","patch_set":31,"id":"ad53bf85_8133bb5a","line":158,"range":{"start_line":158,"start_character":31,"end_line":158,"end_character":37},"in_reply_to":"2930a64f_1a71b05c","updated":"2021-05-14 11:39:40.000000000","message":"Done","commit_id":"3e8d448a9bee12dda3e94cf08e7059ab771b7aac"}],"neutron/db/l3_db.py":[{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"320fdd88e1cf9b93001a3344c67af10847e30d06","unresolved":false,"context_lines":[{"line_number":1996,"context_line":"        self.l3_rpc_notifier.router_deleted(context, router_id)"},{"line_number":1997,"context_line":""},{"line_number":1998,"context_line":"    def is_router_up(self, context, router_id, host):"},{"line_number":1999,"context_line":"        # TODO(liuyulong): this method can be exposed to API as a admin"},{"line_number":2000,"context_line":"        # can leverage this to check router status."},{"line_number":2001,"context_line":"        return self.l3_rpc_notifier.is_router_up("},{"line_number":2002,"context_line":"            context, router_id, host)"}],"source_content_type":"text/x-python","patch_set":13,"id":"9fb8cfa7_b654c422","line":1999,"range":{"start_line":1999,"start_character":10,"end_line":1999,"end_character":25},"updated":"2019-06-06 08:20:00.000000000","message":"do You want to propose such change to address this todo? if no, maybe \"NOTE\" would be better?","commit_id":"9e51c5a69b76a082d985cf85b32f1f65fb83df26"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"a07752414665eac496177f9b9394d4629448822f","unresolved":false,"context_lines":[{"line_number":1996,"context_line":"        self.l3_rpc_notifier.router_deleted(context, router_id)"},{"line_number":1997,"context_line":""},{"line_number":1998,"context_line":"    def is_router_up(self, context, router_id, host):"},{"line_number":1999,"context_line":"        # TODO(liuyulong): this method can be exposed to API as a admin"},{"line_number":2000,"context_line":"        # can leverage this to check router status."},{"line_number":2001,"context_line":"        return self.l3_rpc_notifier.is_router_up("},{"line_number":2002,"context_line":"            context, router_id, host)"}],"source_content_type":"text/x-python","patch_set":13,"id":"9fb8cfa7_840b007b","line":1999,"range":{"start_line":1999,"start_character":10,"end_line":1999,"end_character":25},"in_reply_to":"9fb8cfa7_b654c422","updated":"2019-07-01 01:09:28.000000000","message":"I have a related RFE for this:\nhttps://bugs.launchpad.net/neutron/+bug/1817872","commit_id":"9e51c5a69b76a082d985cf85b32f1f65fb83df26"}],"neutron/db/l3_dvr_db.py":[{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"102f0f58bda84f3f617e4d93c464277cefaaeef7","unresolved":false,"context_lines":[{"line_number":1263,"context_line":"    if get_host_active_compute_port_count("},{"line_number":1264,"context_line":"            context, host, port[\u0027network_id\u0027]) \u003e 0:"},{"line_number":1265,"context_line":"        return"},{"line_number":1266,"context_line":"    ports \u003d port_obj.Port.get_objects("},{"line_number":1267,"context_line":"        context,"},{"line_number":1268,"context_line":"        network_id\u003dport[\u0027network_id\u0027],"},{"line_number":1269,"context_line":"        device_owner\u003dconst.DEVICE_OWNER_DVR_INTERFACE)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9fdfeff1_94086f28","line":1266,"range":{"start_line":1266,"start_character":26,"end_line":1266,"end_character":37},"updated":"2019-02-11 18:01:50.000000000","message":"We are having issues with DB access (retrieval time). Because we need only one object, can we limit this query?\n\nlimit \u003d 1\npager \u003d base_obj.Pager(sorts\u003dNone, limit, page_reverse\u003dNone, marker\u003dNone)\nports \u003d port_obj.Port.get_objects(......, _pager\u003dpager)","commit_id":"9c877790dde77c439de359bed30211ca9c4aea73"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"cba4054c811fdd330e94779525e9c4a9ba97dd48","unresolved":false,"context_lines":[{"line_number":1263,"context_line":"    if get_host_active_compute_port_count("},{"line_number":1264,"context_line":"            context, host, port[\u0027network_id\u0027]) \u003e 0:"},{"line_number":1265,"context_line":"        return"},{"line_number":1266,"context_line":"    ports \u003d port_obj.Port.get_objects("},{"line_number":1267,"context_line":"        context,"},{"line_number":1268,"context_line":"        network_id\u003dport[\u0027network_id\u0027],"},{"line_number":1269,"context_line":"        device_owner\u003dconst.DEVICE_OWNER_DVR_INTERFACE)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9fdfeff1_74edb4ee","line":1266,"range":{"start_line":1266,"start_character":26,"end_line":1266,"end_character":37},"in_reply_to":"9fdfeff1_94086f28","updated":"2019-02-12 23:23:25.000000000","message":"Done","commit_id":"9c877790dde77c439de359bed30211ca9c4aea73"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"102f0f58bda84f3f617e4d93c464277cefaaeef7","unresolved":false,"context_lines":[{"line_number":1285,"context_line":"                # Due to the upgrading issue of bug #1815463, we skip this"},{"line_number":1286,"context_line":"                # check if the RPC version does not match."},{"line_number":1287,"context_line":"                if isinstance(e, oslo_messaging.UnsupportedVersion):"},{"line_number":1288,"context_line":"                    LOG.warning(\"Failed to check port %s related DVR local \""},{"line_number":1289,"context_line":"                                \"router %s up status at %s, RPC error: %s\","},{"line_number":1290,"context_line":"                                port[\u0027id\u0027], router_id, host, e)"},{"line_number":1291,"context_line":"                    break"}],"source_content_type":"text/x-python","patch_set":6,"id":"9fdfeff1_743b8bc7","line":1288,"range":{"start_line":1288,"start_character":24,"end_line":1288,"end_character":31},"updated":"2019-02-11 18:01:50.000000000","message":"In case of version mismatch, we can reduce the LOG level. In case the agent is not updated, the process will run as without this patch.","commit_id":"9c877790dde77c439de359bed30211ca9c4aea73"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"b34f857088353a8fec37870b8143478d6ec57267","unresolved":false,"context_lines":[{"line_number":1286,"context_line":"                # Due to the upgrading issue of bug #1815463, we skip this"},{"line_number":1287,"context_line":"                # check if the RPC version does not match."},{"line_number":1288,"context_line":"                if isinstance(e, oslo_messaging.UnsupportedVersion):"},{"line_number":1289,"context_line":"                    LOG.warning(\"Failed to check port %s related DVR local \""},{"line_number":1290,"context_line":"                                \"router %s up status at %s, RPC error: %s\","},{"line_number":1291,"context_line":"                                port[\u0027id\u0027], router_id, host, e)"},{"line_number":1292,"context_line":"                    break"}],"source_content_type":"text/x-python","patch_set":7,"id":"9fdfeff1_4156a2d0","line":1289,"range":{"start_line":1289,"start_character":24,"end_line":1289,"end_character":31},"updated":"2019-02-13 19:26:46.000000000","message":"nit nit: I still think this log level is too high.","commit_id":"b6ebdc7c0886ae22d97875c72f7a02e2efeebd78"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"fb4c357ba6ba2257d1de376240004630e89d8a66","unresolved":false,"context_lines":[{"line_number":1278,"context_line":"        try:"},{"line_number":1279,"context_line":"            if l3_plugin.is_router_up("},{"line_number":1280,"context_line":"                    context, router_id, host):"},{"line_number":1281,"context_line":"                LOG.debug(\"Port %s related DVR local router %s \""},{"line_number":1282,"context_line":"                          \"is up at %s\", port[\u0027id\u0027], router_id, host)"},{"line_number":1283,"context_line":"                return"},{"line_number":1284,"context_line":"        except Exception as e:"}],"source_content_type":"text/x-python","patch_set":8,"id":"9fdfeff1_3342943f","line":1281,"range":{"start_line":1281,"start_character":43,"end_line":1281,"end_character":46},"updated":"2019-02-15 17:07:56.000000000","message":"s/to DVR","commit_id":"d8a60e7e44147ac1e05875dc80f1d85c6f6e4d2e"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"fb4c357ba6ba2257d1de376240004630e89d8a66","unresolved":false,"context_lines":[{"line_number":1279,"context_line":"            if l3_plugin.is_router_up("},{"line_number":1280,"context_line":"                    context, router_id, host):"},{"line_number":1281,"context_line":"                LOG.debug(\"Port %s related DVR local router %s \""},{"line_number":1282,"context_line":"                          \"is up at %s\", port[\u0027id\u0027], router_id, host)"},{"line_number":1283,"context_line":"                return"},{"line_number":1284,"context_line":"        except Exception as e:"},{"line_number":1285,"context_line":"            with excutils.save_and_reraise_exception(reraise\u003dFalse):"}],"source_content_type":"text/x-python","patch_set":8,"id":"9fdfeff1_d351c80f","line":1282,"updated":"2019-02-15 17:07:56.000000000","message":"It would be better if these messages used %(port_id)s, etc and a dict so we don\u0027t wind-up with the wrong number of arguments passed.","commit_id":"d8a60e7e44147ac1e05875dc80f1d85c6f6e4d2e"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"fb4c357ba6ba2257d1de376240004630e89d8a66","unresolved":false,"context_lines":[{"line_number":1287,"context_line":"                # check if the RPC version does not match."},{"line_number":1288,"context_line":"                if (isinstance(e, oslo_messaging.RemoteError) and"},{"line_number":1289,"context_line":"                        e.exc_type \u003d\u003d \u0027UnsupportedVersion\u0027):"},{"line_number":1290,"context_line":"                    LOG.warning(\"Failed to check port %s related DVR local \""},{"line_number":1291,"context_line":"                                \"router %s up status at %s, agent side \""},{"line_number":1292,"context_line":"                                \"RPC error: %s\","},{"line_number":1293,"context_line":"                                port[\u0027id\u0027], router_id, host, e)"}],"source_content_type":"text/x-python","patch_set":8,"id":"9fdfeff1_73549cfe","line":1290,"range":{"start_line":1290,"start_character":65,"end_line":1290,"end_character":68},"updated":"2019-02-15 17:07:56.000000000","message":"s/to DVR","commit_id":"d8a60e7e44147ac1e05875dc80f1d85c6f6e4d2e"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"fb4c357ba6ba2257d1de376240004630e89d8a66","unresolved":false,"context_lines":[{"line_number":1292,"context_line":"                                \"RPC error: %s\","},{"line_number":1293,"context_line":"                                port[\u0027id\u0027], router_id, host, e)"},{"line_number":1294,"context_line":"                    break"},{"line_number":1295,"context_line":"                LOG.warning(\"Failed to check port %s related DVR local \""},{"line_number":1296,"context_line":"                            \"router %s up status at %s, error: %s\","},{"line_number":1297,"context_line":"                            port[\u0027id\u0027], router_id, host, e)"},{"line_number":1298,"context_line":"        LOG.debug(\"Port %s related DVR local router %s is not up at %s, \""}],"source_content_type":"text/x-python","patch_set":8,"id":"9fdfeff1_1343d040","line":1295,"range":{"start_line":1295,"start_character":61,"end_line":1295,"end_character":64},"updated":"2019-02-15 17:07:56.000000000","message":"s/to DVR","commit_id":"d8a60e7e44147ac1e05875dc80f1d85c6f6e4d2e"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"fb4c357ba6ba2257d1de376240004630e89d8a66","unresolved":false,"context_lines":[{"line_number":1295,"context_line":"                LOG.warning(\"Failed to check port %s related DVR local \""},{"line_number":1296,"context_line":"                            \"router %s up status at %s, error: %s\","},{"line_number":1297,"context_line":"                            port[\u0027id\u0027], router_id, host, e)"},{"line_number":1298,"context_line":"        LOG.debug(\"Port %s related DVR local router %s is not up at %s, \""},{"line_number":1299,"context_line":"                  \"checking again ...\", port[\u0027id\u0027], router_id, host)"},{"line_number":1300,"context_line":"        greenthread.sleep(3 * i)"},{"line_number":1301,"context_line":"    LOG.warning(\"Port %s related DVR local router %s may not up at %s.\","}],"source_content_type":"text/x-python","patch_set":8,"id":"9fdfeff1_57a4e54a","line":1298,"range":{"start_line":1298,"start_character":35,"end_line":1298,"end_character":38},"updated":"2019-02-15 17:07:56.000000000","message":"s/to DVR","commit_id":"d8a60e7e44147ac1e05875dc80f1d85c6f6e4d2e"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"fb4c357ba6ba2257d1de376240004630e89d8a66","unresolved":false,"context_lines":[{"line_number":1297,"context_line":"                            port[\u0027id\u0027], router_id, host, e)"},{"line_number":1298,"context_line":"        LOG.debug(\"Port %s related DVR local router %s is not up at %s, \""},{"line_number":1299,"context_line":"                  \"checking again ...\", port[\u0027id\u0027], router_id, host)"},{"line_number":1300,"context_line":"        greenthread.sleep(3 * i)"},{"line_number":1301,"context_line":"    LOG.warning(\"Port %s related DVR local router %s may not up at %s.\","},{"line_number":1302,"context_line":"                port[\u0027id\u0027], router_id, host)"}],"source_content_type":"text/x-python","patch_set":8,"id":"9fdfeff1_134d103a","line":1300,"updated":"2019-02-15 17:07:56.000000000","message":"Isn\u0027t this going to sleep and then possibly exit the loop without trying again?  I don\u0027t think that\u0027s good as we said we\u0027re checking again and we\u0027re not.","commit_id":"d8a60e7e44147ac1e05875dc80f1d85c6f6e4d2e"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"48a966537de20caa2c447de14ca5dc648fc2e680","unresolved":false,"context_lines":[{"line_number":1297,"context_line":"                            port[\u0027id\u0027], router_id, host, e)"},{"line_number":1298,"context_line":"        LOG.debug(\"Port %s related DVR local router %s is not up at %s, \""},{"line_number":1299,"context_line":"                  \"checking again ...\", port[\u0027id\u0027], router_id, host)"},{"line_number":1300,"context_line":"        greenthread.sleep(3 * i)"},{"line_number":1301,"context_line":"    LOG.warning(\"Port %s related DVR local router %s may not up at %s.\","},{"line_number":1302,"context_line":"                port[\u0027id\u0027], router_id, host)"}],"source_content_type":"text/x-python","patch_set":8,"id":"9fdfeff1_b07aeded","line":1300,"in_reply_to":"9fdfeff1_134d103a","updated":"2019-02-16 14:33:02.000000000","message":"IMO, the last check is not necessary, no matter the router status we will just continue the port provisioning. And we are saving that RPC calling time. The last 30s is L3-agent\u0027s last chance to make router ready. I will still dig into that why it costs too much time.","commit_id":"d8a60e7e44147ac1e05875dc80f1d85c6f6e4d2e"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"fb4c357ba6ba2257d1de376240004630e89d8a66","unresolved":false,"context_lines":[{"line_number":1298,"context_line":"        LOG.debug(\"Port %s related DVR local router %s is not up at %s, \""},{"line_number":1299,"context_line":"                  \"checking again ...\", port[\u0027id\u0027], router_id, host)"},{"line_number":1300,"context_line":"        greenthread.sleep(3 * i)"},{"line_number":1301,"context_line":"    LOG.warning(\"Port %s related DVR local router %s may not up at %s.\","},{"line_number":1302,"context_line":"                port[\u0027id\u0027], router_id, host)"}],"source_content_type":"text/x-python","patch_set":8,"id":"9fdfeff1_b37764a0","line":1301,"range":{"start_line":1301,"start_character":33,"end_line":1301,"end_character":35},"updated":"2019-02-15 17:07:56.000000000","message":"s/to DVR","commit_id":"d8a60e7e44147ac1e05875dc80f1d85c6f6e4d2e"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"fb4c357ba6ba2257d1de376240004630e89d8a66","unresolved":false,"context_lines":[{"line_number":1299,"context_line":"                  \"checking again ...\", port[\u0027id\u0027], router_id, host)"},{"line_number":1300,"context_line":"        greenthread.sleep(3 * i)"},{"line_number":1301,"context_line":"    LOG.warning(\"Port %s related DVR local router %s may not up at %s.\","},{"line_number":1302,"context_line":"                port[\u0027id\u0027], router_id, host)"}],"source_content_type":"text/x-python","patch_set":8,"id":"9fdfeff1_f39bac6f","line":1302,"updated":"2019-02-15 17:07:56.000000000","message":"BTW, there\u0027s a lot of messages here, don\u0027t know if we can reduce, even if just by one.","commit_id":"d8a60e7e44147ac1e05875dc80f1d85c6f6e4d2e"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"48a966537de20caa2c447de14ca5dc648fc2e680","unresolved":false,"context_lines":[{"line_number":1299,"context_line":"                  \"checking again ...\", port[\u0027id\u0027], router_id, host)"},{"line_number":1300,"context_line":"        greenthread.sleep(3 * i)"},{"line_number":1301,"context_line":"    LOG.warning(\"Port %s related DVR local router %s may not up at %s.\","},{"line_number":1302,"context_line":"                port[\u0027id\u0027], router_id, host)"}],"source_content_type":"text/x-python","patch_set":8,"id":"9fdfeff1_f0739514","line":1302,"in_reply_to":"9fdfeff1_f39bac6f","updated":"2019-02-16 14:33:02.000000000","message":"Some of our cloud operators say that \"Please log more\"... : )","commit_id":"d8a60e7e44147ac1e05875dc80f1d85c6f6e4d2e"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"2456a966cd13d5ab0891fea787979963f970f0c2","unresolved":false,"context_lines":[{"line_number":1306,"context_line":"                   \"host\": host})"},{"line_number":1307,"context_line":"        greenthread.sleep(3 * i)"},{"line_number":1308,"context_line":"    LOG.warning(\"Port %(port_id)s related to DVR local router \""},{"line_number":1309,"context_line":"                \"%(router_id)s may not up at %(host)s.\","},{"line_number":1310,"context_line":"                {\"port_id\": port[\u0027id\u0027], \"router_id\": router_id,"},{"line_number":1311,"context_line":"                 \"host\": host})"}],"source_content_type":"text/x-python","patch_set":9,"id":"9fdfeff1_78ebf511","line":1309,"range":{"start_line":1309,"start_character":39,"end_line":1309,"end_character":41},"updated":"2019-02-18 17:02:55.000000000","message":"s/be up","commit_id":"ebb0c4815f390b7983020b067609d84288f31b7d"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"a988a726748091fd6361ad9ed73acbeef66b7e7c","unresolved":false,"context_lines":[{"line_number":1306,"context_line":"                   \"host\": host})"},{"line_number":1307,"context_line":"        greenthread.sleep(3 * i)"},{"line_number":1308,"context_line":"    LOG.warning(\"Port %(port_id)s related to DVR local router \""},{"line_number":1309,"context_line":"                \"%(router_id)s may not up at %(host)s.\","},{"line_number":1310,"context_line":"                {\"port_id\": port[\u0027id\u0027], \"router_id\": router_id,"},{"line_number":1311,"context_line":"                 \"host\": host})"}],"source_content_type":"text/x-python","patch_set":9,"id":"9fdfeff1_e12ba892","line":1309,"range":{"start_line":1309,"start_character":39,"end_line":1309,"end_character":41},"in_reply_to":"9fdfeff1_78ebf511","updated":"2019-02-19 08:45:38.000000000","message":"Done","commit_id":"ebb0c4815f390b7983020b067609d84288f31b7d"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"473057f788b99d3f230ec9c757a1aa06cde326f4","unresolved":false,"context_lines":[{"line_number":1271,"context_line":"    router \u003d l3_plugin.get_router(context, router_id)"},{"line_number":1272,"context_line":"    if not router[\u0027admin_state_up\u0027]:"},{"line_number":1273,"context_line":"        return"},{"line_number":1274,"context_line":"    for i in range(1, 11):"},{"line_number":1275,"context_line":"        try:"},{"line_number":1276,"context_line":"            if l3_plugin.is_router_up("},{"line_number":1277,"context_line":"                    context, router_id, host):"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fdfeff1_064ec737","line":1274,"updated":"2019-02-21 13:31:15.000000000","message":"why 11? Is it some magic number?","commit_id":"d75f93a6b871fe816016459e0a3c8fe23cf375b2"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"783b1f6c5188d4fc029ba51569bbcb227d606a4a","unresolved":false,"context_lines":[{"line_number":1271,"context_line":"    router \u003d l3_plugin.get_router(context, router_id)"},{"line_number":1272,"context_line":"    if not router[\u0027admin_state_up\u0027]:"},{"line_number":1273,"context_line":"        return"},{"line_number":1274,"context_line":"    for i in range(1, 11):"},{"line_number":1275,"context_line":"        try:"},{"line_number":1276,"context_line":"            if l3_plugin.is_router_up("},{"line_number":1277,"context_line":"                    context, router_id, host):"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fdfeff1_46c92f77","line":1274,"in_reply_to":"9fdfeff1_064ec737","updated":"2019-02-21 14:03:09.000000000","message":"It\u0027s range is [1-10]. In mathematical notation it is: [1, 11). Here you go:\n\n\u003e\u003e\u003e range(10)\n[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]\n\u003e\u003e\u003e range(11)\n[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\n\u003e\u003e\u003e range(0, 10)\n[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]\n\u003e\u003e\u003e range(1, 11)\n[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]","commit_id":"d75f93a6b871fe816016459e0a3c8fe23cf375b2"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"ff1165b09c1bb7058dc998fb5e5d72c7eb5fbb9c","unresolved":false,"context_lines":[{"line_number":1271,"context_line":"    router \u003d l3_plugin.get_router(context, router_id)"},{"line_number":1272,"context_line":"    if not router[\u0027admin_state_up\u0027]:"},{"line_number":1273,"context_line":"        return"},{"line_number":1274,"context_line":"    for i in range(1, 11):"},{"line_number":1275,"context_line":"        try:"},{"line_number":1276,"context_line":"            if l3_plugin.is_router_up("},{"line_number":1277,"context_line":"                    context, router_id, host):"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fdfeff1_a23547dd","line":1274,"in_reply_to":"9fdfeff1_46c92f77","updated":"2019-02-22 19:29:08.000000000","message":"yes, I understand but why 11 and not e.g. 21 or 101 or any other value :)","commit_id":"d75f93a6b871fe816016459e0a3c8fe23cf375b2"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"a99311f637c72dd35adffaeb99ec9bbbec5e4781","unresolved":false,"context_lines":[{"line_number":1271,"context_line":"    router \u003d l3_plugin.get_router(context, router_id)"},{"line_number":1272,"context_line":"    if not router[\u0027admin_state_up\u0027]:"},{"line_number":1273,"context_line":"        return"},{"line_number":1274,"context_line":"    for i in range(1, 11):"},{"line_number":1275,"context_line":"        try:"},{"line_number":1276,"context_line":"            if l3_plugin.is_router_up("},{"line_number":1277,"context_line":"                    context, router_id, host):"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fdfeff1_37eae5d7","line":1274,"in_reply_to":"9fdfeff1_a23547dd","updated":"2019-02-25 08:43:43.000000000","message":"Firstly 10 times seems like a basic consensus in most neutron retry situation. Then, totally 165s is closing to half of the vif_plugging_timeout default 300s.\nhttps://github.com/openstack/nova/blob/master/nova/conf/compute.py#L154-L157\nThat is saying we give L3 agent some times to setup router, and do not make instance waiting too long.","commit_id":"d75f93a6b871fe816016459e0a3c8fe23cf375b2"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"d439880f4fb98d5bb454c61825f6c4ad9523e64b","unresolved":false,"context_lines":[{"line_number":1268,"context_line":"    router \u003d l3_plugin.get_router(context, router_id)"},{"line_number":1269,"context_line":"    if not router[\u0027admin_state_up\u0027]:"},{"line_number":1270,"context_line":"        return"},{"line_number":1271,"context_line":"    for i in range(1, 11):"},{"line_number":1272,"context_line":"        try:"},{"line_number":1273,"context_line":"            if l3_plugin.is_router_up("},{"line_number":1274,"context_line":"                    context, router_id, host):"}],"source_content_type":"text/x-python","patch_set":14,"id":"7faddb67_1c9606f2","line":1271,"range":{"start_line":1271,"start_character":13,"end_line":1271,"end_character":25},"updated":"2019-07-10 18:54:05.000000000","message":"why is this 11? for range.","commit_id":"c941043ab3d0d9893149d15cb7376fa967adf338"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"0405b9dd8ae64e1acbc1a56bfa3368e41d35e0fc","unresolved":false,"context_lines":[{"line_number":1268,"context_line":"    router \u003d l3_plugin.get_router(context, router_id)"},{"line_number":1269,"context_line":"    if not router[\u0027admin_state_up\u0027]:"},{"line_number":1270,"context_line":"        return"},{"line_number":1271,"context_line":"    for i in range(1, 11):"},{"line_number":1272,"context_line":"        try:"},{"line_number":1273,"context_line":"            if l3_plugin.is_router_up("},{"line_number":1274,"context_line":"                    context, router_id, host):"}],"source_content_type":"text/x-python","patch_set":14,"id":"7faddb67_aa70b2a6","line":1271,"range":{"start_line":1271,"start_character":13,"end_line":1271,"end_character":25},"in_reply_to":"7faddb67_1c9606f2","updated":"2019-07-11 14:28:55.000000000","message":"We\u0027ve already talked about this here:\nhttps://review.opendev.org/#/c/633871/10/neutron/db/l3_dvr_db.py@1274","commit_id":"c941043ab3d0d9893149d15cb7376fa967adf338"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"04c79b790de23f361d90ae4928b2a6b56e722c03","unresolved":false,"context_lines":[{"line_number":1303,"context_line":"                            \"%(host)s, error: %(error)s\","},{"line_number":1304,"context_line":"                            {\"port_id\": port[\u0027id\u0027],"},{"line_number":1305,"context_line":"                             \"router_id\": router_id,"},{"line_number":1306,"context_line":"                             \"host\": host, \"error\": e})"},{"line_number":1307,"context_line":"        LOG.debug(\"Port %(port_id)s related to DVR local router \""},{"line_number":1308,"context_line":"                  \"%(router_id)s is not up at %(host)s, \""},{"line_number":1309,"context_line":"                  \"checking again ...\","}],"source_content_type":"text/x-python","patch_set":14,"id":"9fb8cfa7_d0cd125f","line":1306,"updated":"2019-07-02 16:35:29.000000000","message":"nit: I know the above messages are slightly different, but won\u0027t just printing %(error)s have an obvious string to figure it out?  Then you could just LOG.warning() once and break in the case of messaging failures?\n\nAnd it\u0027s only a nit...","commit_id":"c941043ab3d0d9893149d15cb7376fa967adf338"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"d72a4452adf079207f72724985bb370158e7c7b6","unresolved":false,"context_lines":[{"line_number":1287,"context_line":"    if not lib_ext.is_extension_supported(l3_plugin, \u0027dvr\u0027):"},{"line_number":1288,"context_line":"        return"},{"line_number":1289,"context_line":"    if get_host_active_compute_port_count("},{"line_number":1290,"context_line":"            context, host, port[\u0027network_id\u0027]) \u003e 0:"},{"line_number":1291,"context_line":"        return"},{"line_number":1292,"context_line":"    ports \u003d port_obj.Port.get_objects("},{"line_number":1293,"context_line":"        context,"}],"source_content_type":"text/x-python","patch_set":17,"id":"7faddb67_987d9e6e","line":1290,"updated":"2019-08-21 13:43:44.000000000","message":"Forgive me, but I\u0027m not quite sure why we return if there are any active ports for that network on that compute node.  Am I understanding that correctly?","commit_id":"9f5be9b1ec90392f3c572e24c123bf3b22707808"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"da11fcd388cc50e09caf943565cd05df189dc26f","unresolved":false,"context_lines":[{"line_number":1287,"context_line":"    if not lib_ext.is_extension_supported(l3_plugin, \u0027dvr\u0027):"},{"line_number":1288,"context_line":"        return"},{"line_number":1289,"context_line":"    if get_host_active_compute_port_count("},{"line_number":1290,"context_line":"            context, host, port[\u0027network_id\u0027]) \u003e 0:"},{"line_number":1291,"context_line":"        return"},{"line_number":1292,"context_line":"    ports \u003d port_obj.Port.get_objects("},{"line_number":1293,"context_line":"        context,"}],"source_content_type":"text/x-python","patch_set":17,"id":"7faddb67_c403280f","line":1290,"in_reply_to":"7faddb67_337e0b19","updated":"2019-08-21 19:33:03.000000000","message":"I see, that makes sense.  Thanks!","commit_id":"9f5be9b1ec90392f3c572e24c123bf3b22707808"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"e4f63a8312a0bf309e5c8641af728ccdcd4dd572","unresolved":false,"context_lines":[{"line_number":1287,"context_line":"    if not lib_ext.is_extension_supported(l3_plugin, \u0027dvr\u0027):"},{"line_number":1288,"context_line":"        return"},{"line_number":1289,"context_line":"    if get_host_active_compute_port_count("},{"line_number":1290,"context_line":"            context, host, port[\u0027network_id\u0027]) \u003e 0:"},{"line_number":1291,"context_line":"        return"},{"line_number":1292,"context_line":"    ports \u003d port_obj.Port.get_objects("},{"line_number":1293,"context_line":"        context,"}],"source_content_type":"text/x-python","patch_set":17,"id":"7faddb67_337e0b19","line":1290,"in_reply_to":"7faddb67_987d9e6e","updated":"2019-08-21 14:47:44.000000000","message":"All this is for the first port which hosted to a new host, and the dvr local router should be processed. When there already has ports under this dvr router, the local router must be processed before. So no need to check/wait again.","commit_id":"9f5be9b1ec90392f3c572e24c123bf3b22707808"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"d72a4452adf079207f72724985bb370158e7c7b6","unresolved":false,"context_lines":[{"line_number":1300,"context_line":"    router \u003d l3_plugin.get_router(context, router_id)"},{"line_number":1301,"context_line":"    if not router[\u0027admin_state_up\u0027]:"},{"line_number":1302,"context_line":"        return"},{"line_number":1303,"context_line":"    for i in range(1, 11):"},{"line_number":1304,"context_line":"        try:"},{"line_number":1305,"context_line":"            if l3_plugin.is_router_up("},{"line_number":1306,"context_line":"                    context, router_id, host):"}],"source_content_type":"text/x-python","patch_set":17,"id":"7faddb67_38982abe","line":1303,"updated":"2019-08-21 13:43:44.000000000","message":"I don\u0027t think constants for 1 and 11 are needed here, but a comment that indicates the values for \"i\" are then used to determine the sleep interval for the linear backoff method would be nice.  My first reflex was to think: isn\u0027t this the same as \"range(10)\" except not zero-indexed?  I also think that naming the variable something descriptive, like \"delay_counter\" would both make the code more self-documenting and also make it easier to spot where the variable is used, 40 lines later.","commit_id":"9f5be9b1ec90392f3c572e24c123bf3b22707808"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"e4f63a8312a0bf309e5c8641af728ccdcd4dd572","unresolved":false,"context_lines":[{"line_number":1300,"context_line":"    router \u003d l3_plugin.get_router(context, router_id)"},{"line_number":1301,"context_line":"    if not router[\u0027admin_state_up\u0027]:"},{"line_number":1302,"context_line":"        return"},{"line_number":1303,"context_line":"    for i in range(1, 11):"},{"line_number":1304,"context_line":"        try:"},{"line_number":1305,"context_line":"            if l3_plugin.is_router_up("},{"line_number":1306,"context_line":"                    context, router_id, host):"}],"source_content_type":"text/x-python","patch_set":17,"id":"7faddb67_d3c1b7e5","line":1303,"in_reply_to":"7faddb67_38982abe","updated":"2019-08-21 14:47:44.000000000","message":"How about \u0027interval_factor\u0027?","commit_id":"9f5be9b1ec90392f3c572e24c123bf3b22707808"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"4b5c14cd615d8e0fab9f9c78d63b724d442d2d05","unresolved":false,"context_lines":[{"line_number":1300,"context_line":"    router \u003d l3_plugin.get_router(context, router_id)"},{"line_number":1301,"context_line":"    if not router[\u0027admin_state_up\u0027]:"},{"line_number":1302,"context_line":"        return"},{"line_number":1303,"context_line":"    for i in range(1, 11):"},{"line_number":1304,"context_line":"        try:"},{"line_number":1305,"context_line":"            if l3_plugin.is_router_up("},{"line_number":1306,"context_line":"                    context, router_id, host):"}],"source_content_type":"text/x-python","patch_set":17,"id":"7faddb67_70e6b6e9","line":1303,"in_reply_to":"7faddb67_d3c1b7e5","updated":"2019-08-21 20:47:24.000000000","message":"Done","commit_id":"9f5be9b1ec90392f3c572e24c123bf3b22707808"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"da11fcd388cc50e09caf943565cd05df189dc26f","unresolved":false,"context_lines":[{"line_number":1300,"context_line":"    router \u003d l3_plugin.get_router(context, router_id)"},{"line_number":1301,"context_line":"    if not router[\u0027admin_state_up\u0027]:"},{"line_number":1302,"context_line":"        return"},{"line_number":1303,"context_line":"    for i in range(1, 11):"},{"line_number":1304,"context_line":"        try:"},{"line_number":1305,"context_line":"            if l3_plugin.is_router_up("},{"line_number":1306,"context_line":"                    context, router_id, host):"}],"source_content_type":"text/x-python","patch_set":17,"id":"7faddb67_e4fe6404","line":1303,"in_reply_to":"7faddb67_d3c1b7e5","updated":"2019-08-21 19:33:03.000000000","message":"I like it, go with that.","commit_id":"9f5be9b1ec90392f3c572e24c123bf3b22707808"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"9cc3568ceeb883f2090b58674d8e26508e4c76ad","unresolved":false,"context_lines":[{"line_number":1355,"context_line":"                                {\"port_id\": port[\u0027id\u0027],"},{"line_number":1356,"context_line":"                                 \"router_id\": router_id,"},{"line_number":1357,"context_line":"                                 \"host\": host, \"error\": e})"},{"line_number":1358,"context_line":"                    break"},{"line_number":1359,"context_line":"                if isinstance(e, oslo_messaging.MessagingTimeout):"},{"line_number":1360,"context_line":"                    LOG.warning(\"Failed to check port %(port_id)s related to \""},{"line_number":1361,"context_line":"                                \"DVR local router %(router_id)s up status at \""}],"source_content_type":"text/x-python","patch_set":20,"id":"3fa7e38b_743502da","line":1358,"updated":"2019-09-19 00:48:47.000000000","message":"Does it make sense here to just return?  We know the l3-agent doesn\u0027t support the RPC, and trying again will most likely get the same failure.","commit_id":"194873468873d50a32c5e710f8f35562ab4be135"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"3966c7100c787cb442914dcbd152e0885ed07b2a","unresolved":false,"context_lines":[{"line_number":1355,"context_line":"                                {\"port_id\": port[\u0027id\u0027],"},{"line_number":1356,"context_line":"                                 \"router_id\": router_id,"},{"line_number":1357,"context_line":"                                 \"host\": host, \"error\": e})"},{"line_number":1358,"context_line":"                    break"},{"line_number":1359,"context_line":"                if isinstance(e, oslo_messaging.MessagingTimeout):"},{"line_number":1360,"context_line":"                    LOG.warning(\"Failed to check port %(port_id)s related to \""},{"line_number":1361,"context_line":"                                \"DVR local router %(router_id)s up status at \""}],"source_content_type":"text/x-python","patch_set":20,"id":"3fa7e38b_ebbcac6a","line":1358,"in_reply_to":"3fa7e38b_743502da","updated":"2019-09-19 11:20:17.000000000","message":"The loop will break, right? And looks \"break\" and \"return\" are mostly same here. \"break\" will get another extra warning log.","commit_id":"194873468873d50a32c5e710f8f35562ab4be135"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"50137d4b12cf9fcb5958fc03178ce9bbb9567268","unresolved":false,"context_lines":[{"line_number":1355,"context_line":"                                {\"port_id\": port[\u0027id\u0027],"},{"line_number":1356,"context_line":"                                 \"router_id\": router_id,"},{"line_number":1357,"context_line":"                                 \"host\": host, \"error\": e})"},{"line_number":1358,"context_line":"                    break"},{"line_number":1359,"context_line":"                if isinstance(e, oslo_messaging.MessagingTimeout):"},{"line_number":1360,"context_line":"                    LOG.warning(\"Failed to check port %(port_id)s related to \""},{"line_number":1361,"context_line":"                                \"DVR local router %(router_id)s up status at \""}],"source_content_type":"text/x-python","patch_set":20,"id":"3fa7e38b_9bf0df69","line":1358,"in_reply_to":"3fa7e38b_ebbcac6a","updated":"2019-09-19 16:28:02.000000000","message":"It was too late for me to review was the problem :)","commit_id":"194873468873d50a32c5e710f8f35562ab4be135"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"99532aaed85d2d693ba42aa99f799a26b3b8c3e0","unresolved":true,"context_lines":[{"line_number":1279,"context_line":"        device_owner\u003dconst.DEVICE_OWNER_DVR_INTERFACE)"},{"line_number":1280,"context_line":"    if not ports:"},{"line_number":1281,"context_line":"        return"},{"line_number":1282,"context_line":"    router_id \u003d ports[0][\u0027device_id\u0027]"},{"line_number":1283,"context_line":"    router \u003d l3_plugin.get_router(context, router_id)"},{"line_number":1284,"context_line":"    if not router[\u0027admin_state_up\u0027]:"},{"line_number":1285,"context_line":"        return"}],"source_content_type":"text/x-python","patch_set":26,"id":"34c05532_998598e6","line":1282,"range":{"start_line":1282,"start_character":4,"end_line":1282,"end_character":37},"updated":"2021-04-21 07:27:56.000000000","message":"This logic seems not correct to me: there might be several DVR routers connected to same network, but different subnets, so we need the one/all DVR routers which has/have interfaces from port\u0027s subnet(s).","commit_id":"80f3dfadc3b2d481744196b1a5921fff6f87bcc7"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"8528bf0f0f665757e918c7f079dcaa65161e5c39","unresolved":true,"context_lines":[{"line_number":1279,"context_line":"        device_owner\u003dconst.DEVICE_OWNER_DVR_INTERFACE)"},{"line_number":1280,"context_line":"    if not ports:"},{"line_number":1281,"context_line":"        return"},{"line_number":1282,"context_line":"    router_id \u003d ports[0][\u0027device_id\u0027]"},{"line_number":1283,"context_line":"    router \u003d l3_plugin.get_router(context, router_id)"},{"line_number":1284,"context_line":"    if not router[\u0027admin_state_up\u0027]:"},{"line_number":1285,"context_line":"        return"}],"source_content_type":"text/x-python","patch_set":26,"id":"54624e92_a468fc70","line":1282,"range":{"start_line":1282,"start_character":4,"end_line":1282,"end_character":37},"in_reply_to":"34c05532_998598e6","updated":"2021-04-21 07:41:52.000000000","message":"Make sense, it has been a long time since I wrote this line. The more detail should be, the port\u0027s first fixed IP\u0027s subnet\u0027s related router. Because usually inside the VM, the guest OS topically set the first IP as primary. The corresponding router should server for it.\n\nBut uncommon use case is that one subnet is connected to two routers. And VM\u0027s port has two IPs from this subnet. And the default route is point to the second one. For instance:\n* subnet1 range 192.168.1.0/24;\n* 192.168.1.1 used for router1 as gateway IP\n* 192.168.1.254 used for router2 as gateway IP\n* subnet1 change the default route to 192.168.1.254\n* users VM has fixed IPs 192.168.1.100 and 192.168.1.200\n\nThen we should check the router2 is up.\n\nLooks a bit complicated now.","commit_id":"80f3dfadc3b2d481744196b1a5921fff6f87bcc7"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"6cf63df0f84a8993e7d32197451507657e99232a","unresolved":true,"context_lines":[{"line_number":1279,"context_line":"        device_owner\u003dconst.DEVICE_OWNER_DVR_INTERFACE)"},{"line_number":1280,"context_line":"    if not ports:"},{"line_number":1281,"context_line":"        return"},{"line_number":1282,"context_line":"    router_id \u003d ports[0][\u0027device_id\u0027]"},{"line_number":1283,"context_line":"    router \u003d l3_plugin.get_router(context, router_id)"},{"line_number":1284,"context_line":"    if not router[\u0027admin_state_up\u0027]:"},{"line_number":1285,"context_line":"        return"}],"source_content_type":"text/x-python","patch_set":26,"id":"e98246e9_c6d27429","line":1282,"range":{"start_line":1282,"start_character":4,"end_line":1282,"end_character":37},"in_reply_to":"54624e92_a468fc70","updated":"2021-04-21 08:02:26.000000000","message":"I\u0027m not sure the order of IPs/subnets with which the VM was created is honored here. I\u0027d just get all subnets from all port\u0027s IP allocations and get all routers having interfaces from those  subnets - should be simple enough and we\u0027re on the safe side.","commit_id":"80f3dfadc3b2d481744196b1a5921fff6f87bcc7"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"ab489d6b16741ec2b1bea47f87822fab671aee1d","unresolved":true,"context_lines":[{"line_number":1279,"context_line":"        device_owner\u003dconst.DEVICE_OWNER_DVR_INTERFACE)"},{"line_number":1280,"context_line":"    if not ports:"},{"line_number":1281,"context_line":"        return"},{"line_number":1282,"context_line":"    router_id \u003d ports[0][\u0027device_id\u0027]"},{"line_number":1283,"context_line":"    router \u003d l3_plugin.get_router(context, router_id)"},{"line_number":1284,"context_line":"    if not router[\u0027admin_state_up\u0027]:"},{"line_number":1285,"context_line":"        return"}],"source_content_type":"text/x-python","patch_set":26,"id":"35871dcb_98043633","line":1282,"range":{"start_line":1282,"start_character":4,"end_line":1282,"end_character":37},"in_reply_to":"e98246e9_c6d27429","updated":"2021-04-21 08:29:49.000000000","message":"Done, with check all the connected routers.","commit_id":"80f3dfadc3b2d481744196b1a5921fff6f87bcc7"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"e3ecaf14e58b382ce14e50af028b6c93091746c9","unresolved":true,"context_lines":[{"line_number":1393,"context_line":"        return"},{"line_number":1394,"context_line":"    ports \u003d port_obj.Port.get_objects("},{"line_number":1395,"context_line":"        context,"},{"line_number":1396,"context_line":"        _pager\u003dbase_obj.Pager(limit\u003d1),"},{"line_number":1397,"context_line":"        network_id\u003dport[\u0027network_id\u0027],"},{"line_number":1398,"context_line":"        device_owner\u003dconst.DEVICE_OWNER_DVR_INTERFACE)"},{"line_number":1399,"context_line":"    if not ports:"}],"source_content_type":"text/x-python","patch_set":27,"id":"60f0b68d_e63bf77a","line":1396,"range":{"start_line":1396,"start_character":0,"end_line":1396,"end_character":39},"updated":"2021-04-21 09:12:58.000000000","message":"why need pager?","commit_id":"90351875ea213aa48d91edbe90ff3788c83b163c"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"84c09411e86c23ae4bf07c37ac8855d18564bd7f","unresolved":true,"context_lines":[{"line_number":1393,"context_line":"        return"},{"line_number":1394,"context_line":"    ports \u003d port_obj.Port.get_objects("},{"line_number":1395,"context_line":"        context,"},{"line_number":1396,"context_line":"        _pager\u003dbase_obj.Pager(limit\u003d1),"},{"line_number":1397,"context_line":"        network_id\u003dport[\u0027network_id\u0027],"},{"line_number":1398,"context_line":"        device_owner\u003dconst.DEVICE_OWNER_DVR_INTERFACE)"},{"line_number":1399,"context_line":"    if not ports:"}],"source_content_type":"text/x-python","patch_set":27,"id":"1d307129_ff2fcaf9","line":1396,"range":{"start_line":1396,"start_character":0,"end_line":1396,"end_character":39},"in_reply_to":"60f0b68d_e63bf77a","updated":"2021-04-22 03:48:23.000000000","message":"removed, thanks","commit_id":"90351875ea213aa48d91edbe90ff3788c83b163c"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"f1af126b0844d78afcfacbfb608d35e089c50455","unresolved":true,"context_lines":[{"line_number":1391,"context_line":"    if get_host_active_compute_port_count("},{"line_number":1392,"context_line":"            context, host, port[\u0027network_id\u0027]) \u003e 0:"},{"line_number":1393,"context_line":"        return"},{"line_number":1394,"context_line":"    ports \u003d port_obj.Port.get_objects("},{"line_number":1395,"context_line":"        context,"},{"line_number":1396,"context_line":"        _pager\u003dbase_obj.Pager(limit\u003d1),"},{"line_number":1397,"context_line":"        network_id\u003dport[\u0027network_id\u0027],"},{"line_number":1398,"context_line":"        device_owner\u003dconst.DEVICE_OWNER_DVR_INTERFACE)"},{"line_number":1399,"context_line":"    if not ports:"},{"line_number":1400,"context_line":"        return"},{"line_number":1401,"context_line":"    router_ids \u003d []"},{"line_number":1402,"context_line":"    port_subnets \u003d set([ip[\u0027subnet_id\u0027] for ip in port[\u0027fixed_ips\u0027]])"},{"line_number":1403,"context_line":"    for r_port in ports:"},{"line_number":1404,"context_line":"        subnets \u003d set([ip[\u0027subnet_id\u0027] for ip in r_port[\u0027fixed_ips\u0027]])"},{"line_number":1405,"context_line":"        if subnets \u0026 port_subnets:"},{"line_number":1406,"context_line":"            router_ids.append(r_port[\u0027device_id\u0027])"},{"line_number":1407,"context_line":"    if not router_ids:"},{"line_number":1408,"context_line":"        return"},{"line_number":1409,"context_line":"    r_admin_states \u003d {"}],"source_content_type":"text/x-python","patch_set":27,"id":"78813605_7c132085","line":1406,"range":{"start_line":1394,"start_character":4,"end_line":1406,"end_character":50},"updated":"2021-04-21 08:26:48.000000000","message":"L3_DVRsch_db_mixin.get_dvr_routers_by_subnet_ids could be used","commit_id":"90351875ea213aa48d91edbe90ff3788c83b163c"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"84c09411e86c23ae4bf07c37ac8855d18564bd7f","unresolved":true,"context_lines":[{"line_number":1391,"context_line":"    if get_host_active_compute_port_count("},{"line_number":1392,"context_line":"            context, host, port[\u0027network_id\u0027]) \u003e 0:"},{"line_number":1393,"context_line":"        return"},{"line_number":1394,"context_line":"    ports \u003d port_obj.Port.get_objects("},{"line_number":1395,"context_line":"        context,"},{"line_number":1396,"context_line":"        _pager\u003dbase_obj.Pager(limit\u003d1),"},{"line_number":1397,"context_line":"        network_id\u003dport[\u0027network_id\u0027],"},{"line_number":1398,"context_line":"        device_owner\u003dconst.DEVICE_OWNER_DVR_INTERFACE)"},{"line_number":1399,"context_line":"    if not ports:"},{"line_number":1400,"context_line":"        return"},{"line_number":1401,"context_line":"    router_ids \u003d []"},{"line_number":1402,"context_line":"    port_subnets \u003d set([ip[\u0027subnet_id\u0027] for ip in port[\u0027fixed_ips\u0027]])"},{"line_number":1403,"context_line":"    for r_port in ports:"},{"line_number":1404,"context_line":"        subnets \u003d set([ip[\u0027subnet_id\u0027] for ip in r_port[\u0027fixed_ips\u0027]])"},{"line_number":1405,"context_line":"        if subnets \u0026 port_subnets:"},{"line_number":1406,"context_line":"            router_ids.append(r_port[\u0027device_id\u0027])"},{"line_number":1407,"context_line":"    if not router_ids:"},{"line_number":1408,"context_line":"        return"},{"line_number":1409,"context_line":"    r_admin_states \u003d {"}],"source_content_type":"text/x-python","patch_set":27,"id":"b2a599af_346093f9","line":1406,"range":{"start_line":1394,"start_character":4,"end_line":1406,"end_character":50},"in_reply_to":"78813605_7c132085","updated":"2021-04-22 03:48:23.000000000","message":"removed, thanks","commit_id":"90351875ea213aa48d91edbe90ff3788c83b163c"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"41c667db92ef0b11ab742198cad9619911da61c8","unresolved":true,"context_lines":[{"line_number":1364,"context_line":"    return cfg.CONF.router_distributed"},{"line_number":1365,"context_line":""},{"line_number":1366,"context_line":""},{"line_number":1367,"context_line":"def get_host_active_compute_port_count(context, host, network_id):"},{"line_number":1368,"context_line":"    query \u003d context.session.query(models_v2.Port)"},{"line_number":1369,"context_line":"    query \u003d query.join(ml2_models.PortBinding)"},{"line_number":1370,"context_line":"    query \u003d query.filter(models_v2.Port.network_id \u003d\u003d network_id,"},{"line_number":1371,"context_line":"                         models_v2.Port.status \u003d\u003d"},{"line_number":1372,"context_line":"                         const.PORT_STATUS_ACTIVE,"},{"line_number":1373,"context_line":"                         ml2_models.PortBinding.host \u003d\u003d host,"},{"line_number":1374,"context_line":"                         models_v2.Port.device_owner.startswith("},{"line_number":1375,"context_line":"                             const.DEVICE_OWNER_COMPUTE_PREFIX))"},{"line_number":1376,"context_line":"    return query.count()"},{"line_number":1377,"context_line":""},{"line_number":1378,"context_line":""},{"line_number":1379,"context_line":"def check_l3_dvr_router_is_up(context, port, host):"}],"source_content_type":"text/x-python","patch_set":29,"id":"48de8703_8e490d3f","line":1376,"range":{"start_line":1367,"start_character":0,"end_line":1376,"end_character":24},"updated":"2021-04-22 08:09:00.000000000","message":"not needed, _check_dvr_serviceable_ports_on_host should be used, please see below","commit_id":"26e7b8187284f8073fdc010850b70ec5cc0bde24"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"260b4430de249c641f19409c773202e284fba017","unresolved":true,"context_lines":[{"line_number":1364,"context_line":"    return cfg.CONF.router_distributed"},{"line_number":1365,"context_line":""},{"line_number":1366,"context_line":""},{"line_number":1367,"context_line":"def get_host_active_compute_port_count(context, host, network_id):"},{"line_number":1368,"context_line":"    query \u003d context.session.query(models_v2.Port)"},{"line_number":1369,"context_line":"    query \u003d query.join(ml2_models.PortBinding)"},{"line_number":1370,"context_line":"    query \u003d query.filter(models_v2.Port.network_id \u003d\u003d network_id,"},{"line_number":1371,"context_line":"                         models_v2.Port.status \u003d\u003d"},{"line_number":1372,"context_line":"                         const.PORT_STATUS_ACTIVE,"},{"line_number":1373,"context_line":"                         ml2_models.PortBinding.host \u003d\u003d host,"},{"line_number":1374,"context_line":"                         models_v2.Port.device_owner.startswith("},{"line_number":1375,"context_line":"                             const.DEVICE_OWNER_COMPUTE_PREFIX))"},{"line_number":1376,"context_line":"    return query.count()"},{"line_number":1377,"context_line":""},{"line_number":1378,"context_line":""},{"line_number":1379,"context_line":"def check_l3_dvr_router_is_up(context, port, host):"}],"source_content_type":"text/x-python","patch_set":29,"id":"051ece76_02e38743","line":1376,"range":{"start_line":1367,"start_character":0,"end_line":1376,"end_character":24},"in_reply_to":"48de8703_8e490d3f","updated":"2021-04-22 08:45:10.000000000","message":"Please see my comments below.","commit_id":"26e7b8187284f8073fdc010850b70ec5cc0bde24"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"41c667db92ef0b11ab742198cad9619911da61c8","unresolved":true,"context_lines":[{"line_number":1387,"context_line":"    l3_plugin \u003d directory.get_plugin(plugin_constants.L3)"},{"line_number":1388,"context_line":"    if not lib_ext.is_extension_supported(l3_plugin, \u0027dvr\u0027):"},{"line_number":1389,"context_line":"        return"},{"line_number":1390,"context_line":"    if get_host_active_compute_port_count("},{"line_number":1391,"context_line":"            context, host, port[\u0027network_id\u0027]) \u003e 0:"},{"line_number":1392,"context_line":"        return"},{"line_number":1393,"context_line":"    port_subnets \u003d set([ip[\u0027subnet_id\u0027] for ip in port[\u0027fixed_ips\u0027]])"},{"line_number":1394,"context_line":"    router_ids \u003d l3_plugin.get_dvr_routers_by_subnet_ids("}],"source_content_type":"text/x-python","patch_set":29,"id":"7502b401_40ff24b8","line":1391,"range":{"start_line":1390,"start_character":4,"end_line":1391,"end_character":51},"updated":"2021-04-22 08:09:00.000000000","message":"These could be just ports from another subnet with another or no router at all. Need to use _check_dvr_serviceable_ports_on_host() here, which checks by subnet_ids.\nAnd please move this check after get_dvr_routers_by_subnet_ids as it\u0027s more expensive.","commit_id":"26e7b8187284f8073fdc010850b70ec5cc0bde24"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"fc183647e5e746275ac7700f5778b6ceb40dd375","unresolved":true,"context_lines":[{"line_number":1387,"context_line":"    l3_plugin \u003d directory.get_plugin(plugin_constants.L3)"},{"line_number":1388,"context_line":"    if not lib_ext.is_extension_supported(l3_plugin, \u0027dvr\u0027):"},{"line_number":1389,"context_line":"        return"},{"line_number":1390,"context_line":"    if get_host_active_compute_port_count("},{"line_number":1391,"context_line":"            context, host, port[\u0027network_id\u0027]) \u003e 0:"},{"line_number":1392,"context_line":"        return"},{"line_number":1393,"context_line":"    port_subnets \u003d set([ip[\u0027subnet_id\u0027] for ip in port[\u0027fixed_ips\u0027]])"},{"line_number":1394,"context_line":"    router_ids \u003d l3_plugin.get_dvr_routers_by_subnet_ids("}],"source_content_type":"text/x-python","patch_set":29,"id":"ded96465_7385103e","line":1391,"range":{"start_line":1390,"start_character":4,"end_line":1391,"end_character":51},"in_reply_to":"61f6a345_0c7aeba7","updated":"2021-04-22 08:58:15.000000000","message":"I mean the case when net A has two subnets: s1 and s2. s1 is not connected to any router and has active ports on host H1. s2 is connected to a DVR router and has no ports on host H1 yet. Current check will return True which is wrong.","commit_id":"26e7b8187284f8073fdc010850b70ec5cc0bde24"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"640a2bef9d4faa2014017ca40b2b53fc45484bf1","unresolved":false,"context_lines":[{"line_number":1387,"context_line":"    l3_plugin \u003d directory.get_plugin(plugin_constants.L3)"},{"line_number":1388,"context_line":"    if not lib_ext.is_extension_supported(l3_plugin, \u0027dvr\u0027):"},{"line_number":1389,"context_line":"        return"},{"line_number":1390,"context_line":"    if get_host_active_compute_port_count("},{"line_number":1391,"context_line":"            context, host, port[\u0027network_id\u0027]) \u003e 0:"},{"line_number":1392,"context_line":"        return"},{"line_number":1393,"context_line":"    port_subnets \u003d set([ip[\u0027subnet_id\u0027] for ip in port[\u0027fixed_ips\u0027]])"},{"line_number":1394,"context_line":"    router_ids \u003d l3_plugin.get_dvr_routers_by_subnet_ids("}],"source_content_type":"text/x-python","patch_set":29,"id":"4fccefb0_64d3e7cb","line":1391,"range":{"start_line":1390,"start_character":4,"end_line":1391,"end_character":51},"in_reply_to":"6a0f44fa_2c9e3af5","updated":"2021-04-29 10:13:19.000000000","message":"Done","commit_id":"26e7b8187284f8073fdc010850b70ec5cc0bde24"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"260b4430de249c641f19409c773202e284fba017","unresolved":true,"context_lines":[{"line_number":1387,"context_line":"    l3_plugin \u003d directory.get_plugin(plugin_constants.L3)"},{"line_number":1388,"context_line":"    if not lib_ext.is_extension_supported(l3_plugin, \u0027dvr\u0027):"},{"line_number":1389,"context_line":"        return"},{"line_number":1390,"context_line":"    if get_host_active_compute_port_count("},{"line_number":1391,"context_line":"            context, host, port[\u0027network_id\u0027]) \u003e 0:"},{"line_number":1392,"context_line":"        return"},{"line_number":1393,"context_line":"    port_subnets \u003d set([ip[\u0027subnet_id\u0027] for ip in port[\u0027fixed_ips\u0027]])"},{"line_number":1394,"context_line":"    router_ids \u003d l3_plugin.get_dvr_routers_by_subnet_ids("}],"source_content_type":"text/x-python","patch_set":29,"id":"61f6a345_0c7aeba7","line":1391,"range":{"start_line":1390,"start_character":4,"end_line":1391,"end_character":51},"in_reply_to":"7502b401_40ff24b8","updated":"2021-04-22 08:45:10.000000000","message":"If one compute port from same network is ACTIVE in a host, that indicates all the connected routers has been processed once. So we assume the routers all are up. No need to recheck it again, since these DB query is a bit time-consuming. This will use the method you mentioned here, for details can be found at bug [1] and its fix [2].\n\n[1] https://bugs.launchpad.net/neutron/+bug/1786272\n[2] https://review.opendev.org/c/openstack/neutron/+/597567/41/neutron/db/l3_dvrscheduler_db.py","commit_id":"26e7b8187284f8073fdc010850b70ec5cc0bde24"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"ba55b4d8f6564c459839a93a633e7c0dd7180a84","unresolved":true,"context_lines":[{"line_number":1387,"context_line":"    l3_plugin \u003d directory.get_plugin(plugin_constants.L3)"},{"line_number":1388,"context_line":"    if not lib_ext.is_extension_supported(l3_plugin, \u0027dvr\u0027):"},{"line_number":1389,"context_line":"        return"},{"line_number":1390,"context_line":"    if get_host_active_compute_port_count("},{"line_number":1391,"context_line":"            context, host, port[\u0027network_id\u0027]) \u003e 0:"},{"line_number":1392,"context_line":"        return"},{"line_number":1393,"context_line":"    port_subnets \u003d set([ip[\u0027subnet_id\u0027] for ip in port[\u0027fixed_ips\u0027]])"},{"line_number":1394,"context_line":"    router_ids \u003d l3_plugin.get_dvr_routers_by_subnet_ids("}],"source_content_type":"text/x-python","patch_set":29,"id":"6a0f44fa_2c9e3af5","line":1391,"range":{"start_line":1390,"start_character":4,"end_line":1391,"end_character":51},"in_reply_to":"ded96465_7385103e","updated":"2021-04-22 10:40:44.000000000","message":"An extrem corner case, but it is true. I just tested that, the router will not be created in host if VM only from s1 which is not connected to router.","commit_id":"26e7b8187284f8073fdc010850b70ec5cc0bde24"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"41c667db92ef0b11ab742198cad9619911da61c8","unresolved":true,"context_lines":[{"line_number":1396,"context_line":"    if not router_ids:"},{"line_number":1397,"context_line":"        return"},{"line_number":1398,"context_line":"    r_admin_states \u003d {"},{"line_number":1399,"context_line":"        router_id: l3_plugin.get_router(context, router_id)[\u0027admin_state_up\u0027]"},{"line_number":1400,"context_line":"        for router_id in router_ids}"},{"line_number":1401,"context_line":"    if not any(r_admin_states.values()):"},{"line_number":1402,"context_line":"        return"}],"source_content_type":"text/x-python","patch_set":29,"id":"eb6447f8_88ba3de5","line":1399,"range":{"start_line":1399,"start_character":29,"end_line":1399,"end_character":39},"updated":"2021-04-22 08:09:00.000000000","message":"get_router() does many things not needed here. I\u0027d use l3_plugin.get_routers() with filters by ids and admin_state_up, or maybe you\u0027ll find an even cheaper way.","commit_id":"26e7b8187284f8073fdc010850b70ec5cc0bde24"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"640a2bef9d4faa2014017ca40b2b53fc45484bf1","unresolved":false,"context_lines":[{"line_number":1396,"context_line":"    if not router_ids:"},{"line_number":1397,"context_line":"        return"},{"line_number":1398,"context_line":"    r_admin_states \u003d {"},{"line_number":1399,"context_line":"        router_id: l3_plugin.get_router(context, router_id)[\u0027admin_state_up\u0027]"},{"line_number":1400,"context_line":"        for router_id in router_ids}"},{"line_number":1401,"context_line":"    if not any(r_admin_states.values()):"},{"line_number":1402,"context_line":"        return"}],"source_content_type":"text/x-python","patch_set":29,"id":"63eae9d6_1bc3f997","line":1399,"range":{"start_line":1399,"start_character":29,"end_line":1399,"end_character":39},"in_reply_to":"eb6447f8_88ba3de5","updated":"2021-04-29 10:13:19.000000000","message":"Done","commit_id":"26e7b8187284f8073fdc010850b70ec5cc0bde24"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"2558ffba3d9f890f2e72045adff671d90b2dc2c8","unresolved":true,"context_lines":[{"line_number":1429,"context_line":"                  \"is not up at %(host)s, checking again ...\","},{"line_number":1430,"context_line":"                  {\"port_id\": port[\u0027id\u0027],"},{"line_number":1431,"context_line":"                   \"host\": host})"},{"line_number":1432,"context_line":"        greenthread.sleep(3 * interval_factor)"},{"line_number":1433,"context_line":"    LOG.warning(\"Port %(port_id)s related DVR local router \""},{"line_number":1434,"context_line":"                \"may not be up at %(host)s.\","},{"line_number":1435,"context_line":"                {\"port_id\": port[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":32,"id":"c9810977_4b2047d5","line":1432,"range":{"start_line":1432,"start_character":8,"end_line":1432,"end_character":46},"updated":"2021-05-18 15:02:06.000000000","message":"Are we sure we want to introduce a sleep? This is usually like a troyan horse when using greenthreads: we never know if we\u0027ll be back to this thread.","commit_id":"39f961b35c63b62a19e23f6a6878499d7615571f"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"2a0d7b46b12452dcb4f3dcc49df5846e04e8e2dd","unresolved":true,"context_lines":[{"line_number":1429,"context_line":"                  \"is not up at %(host)s, checking again ...\","},{"line_number":1430,"context_line":"                  {\"port_id\": port[\u0027id\u0027],"},{"line_number":1431,"context_line":"                   \"host\": host})"},{"line_number":1432,"context_line":"        greenthread.sleep(3 * interval_factor)"},{"line_number":1433,"context_line":"    LOG.warning(\"Port %(port_id)s related DVR local router \""},{"line_number":1434,"context_line":"                \"may not be up at %(host)s.\","},{"line_number":1435,"context_line":"                {\"port_id\": port[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":32,"id":"4c30f58f_a3cb7143","line":1432,"range":{"start_line":1432,"start_character":8,"end_line":1432,"end_character":46},"in_reply_to":"c9810977_4b2047d5","updated":"2021-05-21 08:09:54.000000000","message":"Such \"for action wait and sleep\" is common use in Neutron. I have no better solution for such wait mechanism. Ideas?","commit_id":"39f961b35c63b62a19e23f6a6878499d7615571f"}],"neutron/plugins/ml2/rpc.py":[{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"695d9854a98f09c893cbba074fc6586a69bbb878","unresolved":false,"context_lines":[{"line_number":50,"context_line":""},{"line_number":51,"context_line":"def get_host_active_compute_port_count(context, host, network_id):"},{"line_number":52,"context_line":"    query \u003d context.session.query(models_v2.Port)"},{"line_number":53,"context_line":"    query1 \u003d query.join(ml2_models.PortBinding)"},{"line_number":54,"context_line":"    query1 \u003d query1.filter(models_v2.Port.network_id \u003d\u003d network_id,"},{"line_number":55,"context_line":"                           models_v2.Port.status \u003d\u003d"},{"line_number":56,"context_line":"                           n_const.PORT_STATUS_ACTIVE,"}],"source_content_type":"text/x-python","patch_set":3,"id":"9fdfeff1_3a34c592","line":53,"range":{"start_line":53,"start_character":4,"end_line":53,"end_character":10},"updated":"2019-01-30 20:16:30.000000000","message":"can be \u0027query\u0027, and below","commit_id":"6a274ba54bd15454af6f83da1a977e73815029c1"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"695d9854a98f09c893cbba074fc6586a69bbb878","unresolved":false,"context_lines":[{"line_number":324,"context_line":"                rpc_context, port[\u0027id\u0027], resources.PORT,"},{"line_number":325,"context_line":"                provisioning_blocks.L2_AGENT_ENTITY)"},{"line_number":326,"context_line":""},{"line_number":327,"context_line":"    def check_l3_dvr_router_is_up(self, context, port, host):"},{"line_number":328,"context_line":"        if not host:"},{"line_number":329,"context_line":"            LOG.debug(\"Not check port %s DVR local router: unknown host.\","},{"line_number":330,"context_line":"                      port[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":3,"id":"9fdfeff1_bd92ef55","line":327,"updated":"2019-01-30 20:16:30.000000000","message":"To do this cleaner, this code should live in db/l3_dvr_db and be called from above, as to not introduce all this L3 logic in the L2 code.","commit_id":"6a274ba54bd15454af6f83da1a977e73815029c1"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"9ceb1b1f07ee06a7cf4a8a510f1235c84e560470","unresolved":false,"context_lines":[{"line_number":324,"context_line":"                rpc_context, port[\u0027id\u0027], resources.PORT,"},{"line_number":325,"context_line":"                provisioning_blocks.L2_AGENT_ENTITY)"},{"line_number":326,"context_line":""},{"line_number":327,"context_line":"    def check_l3_dvr_router_is_up(self, context, port, host):"},{"line_number":328,"context_line":"        if not host:"},{"line_number":329,"context_line":"            LOG.debug(\"Not check port %s DVR local router: unknown host.\","},{"line_number":330,"context_line":"                      port[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":3,"id":"9fdfeff1_6c1a9717","line":327,"in_reply_to":"9fdfeff1_bd92ef55","updated":"2019-01-31 01:49:32.000000000","message":"IMO, this is ambiguous boundary. Actually we only call two L3 methods in this function. And we call a lot of L2 query. So, I will move this function out, maybe as a util function.","commit_id":"6a274ba54bd15454af6f83da1a977e73815029c1"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"695d9854a98f09c893cbba074fc6586a69bbb878","unresolved":false,"context_lines":[{"line_number":327,"context_line":"    def check_l3_dvr_router_is_up(self, context, port, host):"},{"line_number":328,"context_line":"        if not host:"},{"line_number":329,"context_line":"            LOG.debug(\"Not check port %s DVR local router: unknown host.\","},{"line_number":330,"context_line":"                      port[\u0027id\u0027])"},{"line_number":331,"context_line":"            return"},{"line_number":332,"context_line":"        device_owner \u003d port[\u0027device_owner\u0027]"},{"line_number":333,"context_line":"        if not device_owner.startswith(n_const.DEVICE_OWNER_COMPUTE_PREFIX):"}],"source_content_type":"text/x-python","patch_set":3,"id":"9fdfeff1_dd825300","line":330,"updated":"2019-01-30 20:16:30.000000000","message":"There\u0027s a lot of debugging in this method, I would try and reduce it to just what\u0027s necessary.","commit_id":"6a274ba54bd15454af6f83da1a977e73815029c1"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"695d9854a98f09c893cbba074fc6586a69bbb878","unresolved":false,"context_lines":[{"line_number":361,"context_line":"                      \"admin_state_up is False.\","},{"line_number":362,"context_line":"                      port[\u0027id\u0027], router_id)"},{"line_number":363,"context_line":"            return"},{"line_number":364,"context_line":"        for i in range(1, 11):"},{"line_number":365,"context_line":"            try:"},{"line_number":366,"context_line":"                if l3_plugin.is_router_up("},{"line_number":367,"context_line":"                        context, router_id, host):"}],"source_content_type":"text/x-python","patch_set":3,"id":"9fdfeff1_dd333361","line":364,"updated":"2019-01-30 20:16:30.000000000","message":"This could wait 165 seconds I think, that seems too long.","commit_id":"6a274ba54bd15454af6f83da1a977e73815029c1"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"9ceb1b1f07ee06a7cf4a8a510f1235c84e560470","unresolved":false,"context_lines":[{"line_number":361,"context_line":"                      \"admin_state_up is False.\","},{"line_number":362,"context_line":"                      port[\u0027id\u0027], router_id)"},{"line_number":363,"context_line":"            return"},{"line_number":364,"context_line":"        for i in range(1, 11):"},{"line_number":365,"context_line":"            try:"},{"line_number":366,"context_line":"                if l3_plugin.is_router_up("},{"line_number":367,"context_line":"                        context, router_id, host):"}],"source_content_type":"text/x-python","patch_set":3,"id":"9fdfeff1_2cd56f44","line":364,"in_reply_to":"9fdfeff1_dd333361","updated":"2019-01-31 01:49:32.000000000","message":"In our deployment, the router processing procedure can sometimes cost 300s+, but this is an extreme case. Most of the concurrent router processing related to VM booting, they can use 10-30s to be set.","commit_id":"6a274ba54bd15454af6f83da1a977e73815029c1"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"695d9854a98f09c893cbba074fc6586a69bbb878","unresolved":false,"context_lines":[{"line_number":374,"context_line":"                            port[\u0027id\u0027], router_id, host, e)"},{"line_number":375,"context_line":"            LOG.debug(\"Port %s related DVR local router %s is not up at %s, \""},{"line_number":376,"context_line":"                      \"checking again ...\", port[\u0027id\u0027], router_id, host)"},{"line_number":377,"context_line":"            greenthread.sleep(3 * i)"},{"line_number":378,"context_line":"        LOG.warning(\"Port %s related DVR local router %s is not up at %s.\","},{"line_number":379,"context_line":"                    port[\u0027id\u0027], router_id, host)"},{"line_number":380,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9fdfeff1_bd3c2f2f","line":377,"updated":"2019-01-30 20:16:30.000000000","message":"This will cause a sleep(30) on the last iteration, only to return right afterwards.","commit_id":"6a274ba54bd15454af6f83da1a977e73815029c1"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"9ceb1b1f07ee06a7cf4a8a510f1235c84e560470","unresolved":false,"context_lines":[{"line_number":374,"context_line":"                            port[\u0027id\u0027], router_id, host, e)"},{"line_number":375,"context_line":"            LOG.debug(\"Port %s related DVR local router %s is not up at %s, \""},{"line_number":376,"context_line":"                      \"checking again ...\", port[\u0027id\u0027], router_id, host)"},{"line_number":377,"context_line":"            greenthread.sleep(3 * i)"},{"line_number":378,"context_line":"        LOG.warning(\"Port %s related DVR local router %s is not up at %s.\","},{"line_number":379,"context_line":"                    port[\u0027id\u0027], router_id, host)"},{"line_number":380,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9fdfeff1_4cd8f379","line":377,"in_reply_to":"9fdfeff1_bd3c2f2f","updated":"2019-01-31 01:49:32.000000000","message":"Just give l3-agent another 30s to hurry up, this is the last chance. : )","commit_id":"6a274ba54bd15454af6f83da1a977e73815029c1"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"695d9854a98f09c893cbba074fc6586a69bbb878","unresolved":false,"context_lines":[{"line_number":376,"context_line":"                      \"checking again ...\", port[\u0027id\u0027], router_id, host)"},{"line_number":377,"context_line":"            greenthread.sleep(3 * i)"},{"line_number":378,"context_line":"        LOG.warning(\"Port %s related DVR local router %s is not up at %s.\","},{"line_number":379,"context_line":"                    port[\u0027id\u0027], router_id, host)"},{"line_number":380,"context_line":""},{"line_number":381,"context_line":"    def notify_l2pop_port_wiring(self, port_id, rpc_context,"},{"line_number":382,"context_line":"                                 status, host):"}],"source_content_type":"text/x-python","patch_set":3,"id":"9fdfeff1_5d20a3f7","line":379,"updated":"2019-01-30 20:16:30.000000000","message":"If we got here, the router is still not configured, but the provisioning will still be marked complete by caller.  If the goal is to block or fail provisioning if the router is not up, then we should return a status so the caller can do the right thing.","commit_id":"6a274ba54bd15454af6f83da1a977e73815029c1"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"9ceb1b1f07ee06a7cf4a8a510f1235c84e560470","unresolved":false,"context_lines":[{"line_number":376,"context_line":"                      \"checking again ...\", port[\u0027id\u0027], router_id, host)"},{"line_number":377,"context_line":"            greenthread.sleep(3 * i)"},{"line_number":378,"context_line":"        LOG.warning(\"Port %s related DVR local router %s is not up at %s.\","},{"line_number":379,"context_line":"                    port[\u0027id\u0027], router_id, host)"},{"line_number":380,"context_line":""},{"line_number":381,"context_line":"    def notify_l2pop_port_wiring(self, port_id, rpc_context,"},{"line_number":382,"context_line":"                                 status, host):"}],"source_content_type":"text/x-python","patch_set":3,"id":"9fdfeff1_ac4ddf3e","line":379,"in_reply_to":"9fdfeff1_5d20a3f7","updated":"2019-01-31 01:49:32.000000000","message":"Yes, finally it will be the original behavior without this change. We just give l3-agent a chance to process the router. Directly break the port provisioning seems a little rough. Since we have gave the router 165s to process the router info, IMO, it is as long as enough. And besides, we are still working on how to reduce the router processing time, why and when it is time-cosuming.","commit_id":"6a274ba54bd15454af6f83da1a977e73815029c1"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"473057f788b99d3f230ec9c757a1aa06cde326f4","unresolved":false,"context_lines":[{"line_number":301,"context_line":"            if not port:"},{"line_number":302,"context_line":"                # port doesn\u0027t exist, no need to add a provisioning block"},{"line_number":303,"context_line":"                return"},{"line_number":304,"context_line":"            l3_dvr_db.check_l3_dvr_router_is_up(rpc_context, port, host)"},{"line_number":305,"context_line":"            provisioning_blocks.provisioning_complete("},{"line_number":306,"context_line":"                rpc_context, port[\u0027id\u0027], resources.PORT,"},{"line_number":307,"context_line":"                provisioning_blocks.L2_AGENT_ENTITY)"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fdfeff1_461b6f1b","line":304,"updated":"2019-02-21 13:31:15.000000000","message":"why we need to do it this way and not in way like other service are doing it (e.g. dhcp-agent).\nSomething like: during port creation check if dvr router for this port and this host is UP or not yet. If not yet, set provisioning block to it. When router will be up, remove provisioning block for all ports connected to this router on this host.\nThoughts?","commit_id":"d75f93a6b871fe816016459e0a3c8fe23cf375b2"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"ff1165b09c1bb7058dc998fb5e5d72c7eb5fbb9c","unresolved":false,"context_lines":[{"line_number":301,"context_line":"            if not port:"},{"line_number":302,"context_line":"                # port doesn\u0027t exist, no need to add a provisioning block"},{"line_number":303,"context_line":"                return"},{"line_number":304,"context_line":"            l3_dvr_db.check_l3_dvr_router_is_up(rpc_context, port, host)"},{"line_number":305,"context_line":"            provisioning_blocks.provisioning_complete("},{"line_number":306,"context_line":"                rpc_context, port[\u0027id\u0027], resources.PORT,"},{"line_number":307,"context_line":"                provisioning_blocks.L2_AGENT_ENTITY)"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fdfeff1_a244671a","line":304,"in_reply_to":"9fdfeff1_29ce3c83","updated":"2019-02-22 19:29:08.000000000","message":"First of all this solution with some \"custom\" function which checks in some loop if router is provisioned or not looks not \"perfect\" for me.\nAbout mixing L2 and L3 and lack of proper informations, I think that in method https://github.com/openstack/neutron/blob/master/neutron/db/l3_dvrscheduler_db.py#L85 there is kind of entry point to schedule dvr router to new host. We have there subnet_ids connected to router so IMO we can get ports from specific host and with IPs from specific subnet and set provisioning block with entity L3 for them.\nLater in \"is_router_up\" method in https://review.openstack.org/#/c/633871/10/neutron/agent/l3/agent.py You can maybe \"reverse\" the logic and instead of answering to request from neutron-server, send to server information that router is up and on server side it may just remove this provisioning block for ports from this host and connected to same subnets as this router has connected - something very similar is done with ports in L2 agent - they send such information about it\u0027s state to neutron-server.\n\nThoughts?","commit_id":"d75f93a6b871fe816016459e0a3c8fe23cf375b2"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"783b1f6c5188d4fc029ba51569bbcb227d606a4a","unresolved":false,"context_lines":[{"line_number":301,"context_line":"            if not port:"},{"line_number":302,"context_line":"                # port doesn\u0027t exist, no need to add a provisioning block"},{"line_number":303,"context_line":"                return"},{"line_number":304,"context_line":"            l3_dvr_db.check_l3_dvr_router_is_up(rpc_context, port, host)"},{"line_number":305,"context_line":"            provisioning_blocks.provisioning_complete("},{"line_number":306,"context_line":"                rpc_context, port[\u0027id\u0027], resources.PORT,"},{"line_number":307,"context_line":"                provisioning_blocks.L2_AGENT_ENTITY)"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fdfeff1_a6181b84","line":304,"in_reply_to":"9fdfeff1_461b6f1b","updated":"2019-02-21 14:03:09.000000000","message":"Firstly, if there are active ports related to the same DVR router, this line:\nhttps://review.openstack.org/#/c/633871/10/neutron/db/l3_dvr_db.py@1258\nwill stop the check.\n\nFor the DHCP style, IMO, it will be complicated for such interaction between L2 and L3 scenario. DHCP agent can get the ports which have been processed locally, because it needs to set the related port MAC and IP configs. L3 agent does not have such natural ability. The port under a dvr router should be retrieved in a loop in l3 agent side, then send the provisioning_complete, otherwise, things will be really complicated. IMO, it will be something like this:\n(1) rotational\na. add_provisioning_component for L3 and port\nb. port is set up at compute host\nc. dvr local router is up at compute host\nd. l3 agent retrieved the dvr related port, and send provisioning_complete\n\n(2) brain burning\na. add_provisioning_component for L3 and related port\nb. port is setting up at compute host\nc. dvr local router is setting up at compute host (may not complete)\nd. l2 plugin send l3-agent that there will have one port setup\n(find the port and router relationship)\ne. l3-agent record this port setup notification\n(find/record the port and router relationship)\nf. l3-agent looping check the port related router state\ng. l3-agent send provisioning_complete","commit_id":"d75f93a6b871fe816016459e0a3c8fe23cf375b2"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"b32b14849748d4e191005cca8e3095c746e0f293","unresolved":false,"context_lines":[{"line_number":301,"context_line":"            if not port:"},{"line_number":302,"context_line":"                # port doesn\u0027t exist, no need to add a provisioning block"},{"line_number":303,"context_line":"                return"},{"line_number":304,"context_line":"            l3_dvr_db.check_l3_dvr_router_is_up(rpc_context, port, host)"},{"line_number":305,"context_line":"            provisioning_blocks.provisioning_complete("},{"line_number":306,"context_line":"                rpc_context, port[\u0027id\u0027], resources.PORT,"},{"line_number":307,"context_line":"                provisioning_blocks.L2_AGENT_ENTITY)"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fdfeff1_c35e3be8","line":304,"in_reply_to":"9fdfeff1_a244671a","updated":"2019-02-25 08:42:20.000000000","message":"As we discussed on IRC today, I will not block this solution. If others things that it\u0027s fine to do it this way than ok for me :)","commit_id":"d75f93a6b871fe816016459e0a3c8fe23cf375b2"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"a99311f637c72dd35adffaeb99ec9bbbec5e4781","unresolved":false,"context_lines":[{"line_number":301,"context_line":"            if not port:"},{"line_number":302,"context_line":"                # port doesn\u0027t exist, no need to add a provisioning block"},{"line_number":303,"context_line":"                return"},{"line_number":304,"context_line":"            l3_dvr_db.check_l3_dvr_router_is_up(rpc_context, port, host)"},{"line_number":305,"context_line":"            provisioning_blocks.provisioning_complete("},{"line_number":306,"context_line":"                rpc_context, port[\u0027id\u0027], resources.PORT,"},{"line_number":307,"context_line":"                provisioning_blocks.L2_AGENT_ENTITY)"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fdfeff1_084ea0c0","line":304,"in_reply_to":"9fdfeff1_a244671a","updated":"2019-02-25 08:43:43.000000000","message":"This is a basic conclusion after IRC talking.\n\n\u0027is_router_up\u0027 will not be necessary to call anymore, as you recommended, it will be something like this:\n1. port is created/updated\n2. l3_dvrscheduler_db adds L3 provisioning_component for the port\n3. l3 agent setup the router\n4. l3 agent call neutron server (l3_plugin) says one router is up\n5. l3 (dvr) plugin find out the router related L2 ports, remove L3 provisioning_component for them\n\nBut a race condition may happen:\n1. port1 and port2 are from same subnet and same dvr router1, and will be setup at same host1.\n2. port1 created L3 the provisioning_component\n3. router1 is up at one host1\n4. port2 is trying to create L3 the provisioning_component\n5. L3 plugin will find/remove all router1 related L3 provisioning_component (race condition)\n6. port2 is created L3 provisioning_component (race condition)\n7. router is up at that host1, port2 will have no way to remove the L3 provisioning_component\n\nSo, we will refactor the router_updated notification with related router id. And let the l3 agent call neutron server (l3 plugin) with specific port id directly after the router setup.","commit_id":"d75f93a6b871fe816016459e0a3c8fe23cf375b2"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"c3bfb6fd418a330ce5ebd1d2a2107f125d7bd79f","unresolved":false,"context_lines":[{"line_number":301,"context_line":"            if not port:"},{"line_number":302,"context_line":"                # port doesn\u0027t exist, no need to add a provisioning block"},{"line_number":303,"context_line":"                return"},{"line_number":304,"context_line":"            l3_dvr_db.check_l3_dvr_router_is_up(rpc_context, port, host)"},{"line_number":305,"context_line":"            provisioning_blocks.provisioning_complete("},{"line_number":306,"context_line":"                rpc_context, port[\u0027id\u0027], resources.PORT,"},{"line_number":307,"context_line":"                provisioning_blocks.L2_AGENT_ENTITY)"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fdfeff1_29ce3c83","line":304,"in_reply_to":"9fdfeff1_a6181b84","updated":"2019-02-21 14:11:42.000000000","message":"Fix the wrong line number, it is this:\nhttps://review.openstack.org/#/c/633871/10/neutron/db/l3_dvr_db.py@1260\nIf there already have active ports in the host, all the following will not do anymore.\n\nIt had related LOG there before:\nhttps://review.openstack.org/#/c/633871/3/neutron/plugins/ml2/rpc.py@343","commit_id":"d75f93a6b871fe816016459e0a3c8fe23cf375b2"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"99532aaed85d2d693ba42aa99f799a26b3b8c3e0","unresolved":true,"context_lines":[{"line_number":327,"context_line":"            if not port:"},{"line_number":328,"context_line":"                # port doesn\u0027t exist, no need to add a provisioning block"},{"line_number":329,"context_line":"                return"},{"line_number":330,"context_line":"            l3_dvr_db.check_l3_dvr_router_is_up(rpc_context, port, host)"},{"line_number":331,"context_line":"            provisioning_blocks.provisioning_complete("},{"line_number":332,"context_line":"                rpc_context, port[\u0027id\u0027], resources.PORT,"},{"line_number":333,"context_line":"                provisioning_blocks.L2_AGENT_ENTITY)"}],"source_content_type":"text/x-python","patch_set":26,"id":"90b03f7e_bc98437e","line":330,"range":{"start_line":330,"start_character":12,"end_line":330,"end_character":72},"updated":"2021-04-21 07:27:56.000000000","message":"Can skip this if DVR is not enabled on the cluster, right?","commit_id":"80f3dfadc3b2d481744196b1a5921fff6f87bcc7"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"2b0458356e71259a1a03c10f734d429e2c9585a6","unresolved":false,"context_lines":[{"line_number":327,"context_line":"            if not port:"},{"line_number":328,"context_line":"                # port doesn\u0027t exist, no need to add a provisioning block"},{"line_number":329,"context_line":"                return"},{"line_number":330,"context_line":"            l3_dvr_db.check_l3_dvr_router_is_up(rpc_context, port, host)"},{"line_number":331,"context_line":"            provisioning_blocks.provisioning_complete("},{"line_number":332,"context_line":"                rpc_context, port[\u0027id\u0027], resources.PORT,"},{"line_number":333,"context_line":"                provisioning_blocks.L2_AGENT_ENTITY)"}],"source_content_type":"text/x-python","patch_set":26,"id":"4d1b03a4_35b6466b","line":330,"range":{"start_line":330,"start_character":12,"end_line":330,"end_character":72},"in_reply_to":"2fcf0199_64e72331","updated":"2021-04-21 10:37:29.000000000","message":"Ack","commit_id":"80f3dfadc3b2d481744196b1a5921fff6f87bcc7"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"ab489d6b16741ec2b1bea47f87822fab671aee1d","unresolved":true,"context_lines":[{"line_number":327,"context_line":"            if not port:"},{"line_number":328,"context_line":"                # port doesn\u0027t exist, no need to add a provisioning block"},{"line_number":329,"context_line":"                return"},{"line_number":330,"context_line":"            l3_dvr_db.check_l3_dvr_router_is_up(rpc_context, port, host)"},{"line_number":331,"context_line":"            provisioning_blocks.provisioning_complete("},{"line_number":332,"context_line":"                rpc_context, port[\u0027id\u0027], resources.PORT,"},{"line_number":333,"context_line":"                provisioning_blocks.L2_AGENT_ENTITY)"}],"source_content_type":"text/x-python","patch_set":26,"id":"2fcf0199_64e72331","line":330,"range":{"start_line":330,"start_character":12,"end_line":330,"end_character":72},"in_reply_to":"733a3947_c1ed4d1e","updated":"2021-04-21 08:29:49.000000000","message":"We do not have that dvr feature enabled in config. We have \"router_distributed \u003d True/False\" which is used to determain the router is DVR or not in API (if True, typically for normal user to create DVR by default). But admin can override this value to create DVR by directly ignoring this config option.","commit_id":"80f3dfadc3b2d481744196b1a5921fff6f87bcc7"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"8528bf0f0f665757e918c7f079dcaa65161e5c39","unresolved":true,"context_lines":[{"line_number":327,"context_line":"            if not port:"},{"line_number":328,"context_line":"                # port doesn\u0027t exist, no need to add a provisioning block"},{"line_number":329,"context_line":"                return"},{"line_number":330,"context_line":"            l3_dvr_db.check_l3_dvr_router_is_up(rpc_context, port, host)"},{"line_number":331,"context_line":"            provisioning_blocks.provisioning_complete("},{"line_number":332,"context_line":"                rpc_context, port[\u0027id\u0027], resources.PORT,"},{"line_number":333,"context_line":"                provisioning_blocks.L2_AGENT_ENTITY)"}],"source_content_type":"text/x-python","patch_set":26,"id":"da1a5e12_a8a775c2","line":330,"range":{"start_line":330,"start_character":12,"end_line":330,"end_character":72},"in_reply_to":"90b03f7e_bc98437e","updated":"2021-04-21 07:41:52.000000000","message":"Yes, this function has \"lib_ext.is_extension_supported(l3_plugin, \u0027dvr\u0027)\" check.","commit_id":"80f3dfadc3b2d481744196b1a5921fff6f87bcc7"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"6cf63df0f84a8993e7d32197451507657e99232a","unresolved":true,"context_lines":[{"line_number":327,"context_line":"            if not port:"},{"line_number":328,"context_line":"                # port doesn\u0027t exist, no need to add a provisioning block"},{"line_number":329,"context_line":"                return"},{"line_number":330,"context_line":"            l3_dvr_db.check_l3_dvr_router_is_up(rpc_context, port, host)"},{"line_number":331,"context_line":"            provisioning_blocks.provisioning_complete("},{"line_number":332,"context_line":"                rpc_context, port[\u0027id\u0027], resources.PORT,"},{"line_number":333,"context_line":"                provisioning_blocks.L2_AGENT_ENTITY)"}],"source_content_type":"text/x-python","patch_set":26,"id":"733a3947_c1ed4d1e","line":330,"range":{"start_line":330,"start_character":12,"end_line":330,"end_character":72},"in_reply_to":"da1a5e12_a8a775c2","updated":"2021-04-21 08:02:26.000000000","message":"\u003e Yes, this function has \"lib_ext.is_extension_supported(l3_plugin, \u0027dvr\u0027)\" check.\n\nIf I\u0027m not mistaken \"dvr extension is supported by plugin\" and \"dvr feature enabled in config\" might be different things.","commit_id":"80f3dfadc3b2d481744196b1a5921fff6f87bcc7"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"f1af126b0844d78afcfacbfb608d35e089c50455","unresolved":true,"context_lines":[{"line_number":327,"context_line":"            if not port:"},{"line_number":328,"context_line":"                # port doesn\u0027t exist, no need to add a provisioning block"},{"line_number":329,"context_line":"                return"},{"line_number":330,"context_line":"            l3_dvr_db.check_l3_dvr_router_is_up(rpc_context, port, host)"},{"line_number":331,"context_line":"            provisioning_blocks.provisioning_complete("},{"line_number":332,"context_line":"                rpc_context, port[\u0027id\u0027], resources.PORT,"},{"line_number":333,"context_line":"                provisioning_blocks.L2_AGENT_ENTITY)"}],"source_content_type":"text/x-python","patch_set":27,"id":"25b003b1_bc6e5f58","line":330,"range":{"start_line":330,"start_character":12,"end_line":330,"end_character":72},"updated":"2021-04-21 08:26:48.000000000","message":"Please check my previous comment","commit_id":"90351875ea213aa48d91edbe90ff3788c83b163c"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"2b0458356e71259a1a03c10f734d429e2c9585a6","unresolved":false,"context_lines":[{"line_number":327,"context_line":"            if not port:"},{"line_number":328,"context_line":"                # port doesn\u0027t exist, no need to add a provisioning block"},{"line_number":329,"context_line":"                return"},{"line_number":330,"context_line":"            l3_dvr_db.check_l3_dvr_router_is_up(rpc_context, port, host)"},{"line_number":331,"context_line":"            provisioning_blocks.provisioning_complete("},{"line_number":332,"context_line":"                rpc_context, port[\u0027id\u0027], resources.PORT,"},{"line_number":333,"context_line":"                provisioning_blocks.L2_AGENT_ENTITY)"}],"source_content_type":"text/x-python","patch_set":27,"id":"f76ded5b_3b816fc5","line":330,"range":{"start_line":330,"start_character":12,"end_line":330,"end_character":72},"in_reply_to":"25b003b1_bc6e5f58","updated":"2021-04-21 10:37:29.000000000","message":"please ignore","commit_id":"90351875ea213aa48d91edbe90ff3788c83b163c"}],"neutron/tests/unit/db/test_l3_dvr_db.py":[{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"7f735d2206bbbccabc480d1fd03631a4e4f2f1b1","unresolved":false,"context_lines":[{"line_number":1128,"context_line":"        self.assertIsNone(not_compute_port)"},{"line_number":1129,"context_line":"        port_3 \u003d {\u0027id\u0027: _uuid(),"},{"line_number":1130,"context_line":"                  \u0027device_owner\u0027: \u0027compute:nova\u0027}"},{"line_number":1131,"context_line":"        with mock.patch(\"neutron_lib.api.extensions.is_extension_supported\","},{"line_number":1132,"context_line":"                        return_value\u003dFalse):"},{"line_number":1133,"context_line":"            extension_not_enabled \u003d l3_dvr_db.check_l3_dvr_router_is_up("},{"line_number":1134,"context_line":"                self.ctx, port_3, \u0027fake_host\u0027)"},{"line_number":1135,"context_line":"            self.assertIsNone(extension_not_enabled)"},{"line_number":1136,"context_line":"        with mock.patch(\u0027neutron.db.l3_dvr_db.\u0027"},{"line_number":1137,"context_line":"                        \u0027get_host_active_compute_port_count\u0027,"},{"line_number":1138,"context_line":"                        return_value\u003d1):"}],"source_content_type":"text/x-python","patch_set":11,"id":"3fce034c_409330fb","line":1135,"range":{"start_line":1131,"start_character":7,"end_line":1135,"end_character":52},"updated":"2019-04-17 07:48:36.000000000","message":"IMO this should be in separate test case.\n\nAs an assertion here You can maybe mock get_host_active_compute_port_count() and check that it wasn\u0027t called","commit_id":"6f4de3945b23dab767051829c6e13c264ad8cb6f"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"fd4d84f72eb6eab1d31c052cd90f3940797665b2","unresolved":false,"context_lines":[{"line_number":1128,"context_line":"        self.assertIsNone(not_compute_port)"},{"line_number":1129,"context_line":"        port_3 \u003d {\u0027id\u0027: _uuid(),"},{"line_number":1130,"context_line":"                  \u0027device_owner\u0027: \u0027compute:nova\u0027}"},{"line_number":1131,"context_line":"        with mock.patch(\"neutron_lib.api.extensions.is_extension_supported\","},{"line_number":1132,"context_line":"                        return_value\u003dFalse):"},{"line_number":1133,"context_line":"            extension_not_enabled \u003d l3_dvr_db.check_l3_dvr_router_is_up("},{"line_number":1134,"context_line":"                self.ctx, port_3, \u0027fake_host\u0027)"},{"line_number":1135,"context_line":"            self.assertIsNone(extension_not_enabled)"},{"line_number":1136,"context_line":"        with mock.patch(\u0027neutron.db.l3_dvr_db.\u0027"},{"line_number":1137,"context_line":"                        \u0027get_host_active_compute_port_count\u0027,"},{"line_number":1138,"context_line":"                        return_value\u003d1):"}],"source_content_type":"text/x-python","patch_set":11,"id":"3fce034c_d193545a","line":1135,"range":{"start_line":1131,"start_character":7,"end_line":1135,"end_character":52},"in_reply_to":"3fce034c_409330fb","updated":"2019-04-18 13:56:02.000000000","message":"Done","commit_id":"6f4de3945b23dab767051829c6e13c264ad8cb6f"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"7f735d2206bbbccabc480d1fd03631a4e4f2f1b1","unresolved":false,"context_lines":[{"line_number":1133,"context_line":"            extension_not_enabled \u003d l3_dvr_db.check_l3_dvr_router_is_up("},{"line_number":1134,"context_line":"                self.ctx, port_3, \u0027fake_host\u0027)"},{"line_number":1135,"context_line":"            self.assertIsNone(extension_not_enabled)"},{"line_number":1136,"context_line":"        with mock.patch(\u0027neutron.db.l3_dvr_db.\u0027"},{"line_number":1137,"context_line":"                        \u0027get_host_active_compute_port_count\u0027,"},{"line_number":1138,"context_line":"                        return_value\u003d1):"},{"line_number":1139,"context_line":"            has_up_port \u003d l3_dvr_db.check_l3_dvr_router_is_up("},{"line_number":1140,"context_line":"                self.ctx, port_3, \u0027fake_host\u0027)"},{"line_number":1141,"context_line":"            self.assertIsNone(has_up_port)"},{"line_number":1142,"context_line":""},{"line_number":1143,"context_line":"        router_dict \u003d {\u0027name\u0027: \u0027test_router\u0027, \u0027admin_state_up\u0027: False,"},{"line_number":1144,"context_line":"                       \u0027distributed\u0027: True}"}],"source_content_type":"text/x-python","patch_set":11,"id":"3fce034c_c0b88077","line":1141,"range":{"start_line":1136,"start_character":0,"end_line":1141,"end_character":42},"updated":"2019-04-17 07:48:36.000000000","message":"and this one also,\n\nAs assertion You can e.g. mock Port.get_objects() method here and check that it wasn\u0027t called","commit_id":"6f4de3945b23dab767051829c6e13c264ad8cb6f"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"fd4d84f72eb6eab1d31c052cd90f3940797665b2","unresolved":false,"context_lines":[{"line_number":1133,"context_line":"            extension_not_enabled \u003d l3_dvr_db.check_l3_dvr_router_is_up("},{"line_number":1134,"context_line":"                self.ctx, port_3, \u0027fake_host\u0027)"},{"line_number":1135,"context_line":"            self.assertIsNone(extension_not_enabled)"},{"line_number":1136,"context_line":"        with mock.patch(\u0027neutron.db.l3_dvr_db.\u0027"},{"line_number":1137,"context_line":"                        \u0027get_host_active_compute_port_count\u0027,"},{"line_number":1138,"context_line":"                        return_value\u003d1):"},{"line_number":1139,"context_line":"            has_up_port \u003d l3_dvr_db.check_l3_dvr_router_is_up("},{"line_number":1140,"context_line":"                self.ctx, port_3, \u0027fake_host\u0027)"},{"line_number":1141,"context_line":"            self.assertIsNone(has_up_port)"},{"line_number":1142,"context_line":""},{"line_number":1143,"context_line":"        router_dict \u003d {\u0027name\u0027: \u0027test_router\u0027, \u0027admin_state_up\u0027: False,"},{"line_number":1144,"context_line":"                       \u0027distributed\u0027: True}"}],"source_content_type":"text/x-python","patch_set":11,"id":"3fce034c_719ce069","line":1141,"range":{"start_line":1136,"start_character":0,"end_line":1141,"end_character":42},"in_reply_to":"3fce034c_c0b88077","updated":"2019-04-18 13:56:02.000000000","message":"Done","commit_id":"6f4de3945b23dab767051829c6e13c264ad8cb6f"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"7f735d2206bbbccabc480d1fd03631a4e4f2f1b1","unresolved":false,"context_lines":[{"line_number":1182,"context_line":"                             \u0027network_id\u0027: subnet[\u0027subnet\u0027][\u0027network_id\u0027]}"},{"line_number":1183,"context_line":"                l3_dvr_db.check_l3_dvr_router_is_up("},{"line_number":1184,"context_line":"                        self.ctx, fake_port, \u0027fake_host\u0027)"},{"line_number":1185,"context_line":"                self.assertEqual(165, fake_timer.counter)"}],"source_content_type":"text/x-python","patch_set":11,"id":"3fce034c_e049fc8a","line":1185,"updated":"2019-04-17 07:48:36.000000000","message":"Can\u0027t You simply assert that sleep was called 10 times?","commit_id":"6f4de3945b23dab767051829c6e13c264ad8cb6f"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"fd4d84f72eb6eab1d31c052cd90f3940797665b2","unresolved":false,"context_lines":[{"line_number":1182,"context_line":"                             \u0027network_id\u0027: subnet[\u0027subnet\u0027][\u0027network_id\u0027]}"},{"line_number":1183,"context_line":"                l3_dvr_db.check_l3_dvr_router_is_up("},{"line_number":1184,"context_line":"                        self.ctx, fake_port, \u0027fake_host\u0027)"},{"line_number":1185,"context_line":"                self.assertEqual(165, fake_timer.counter)"}],"source_content_type":"text/x-python","patch_set":11,"id":"3fce034c_91994c7a","line":1185,"in_reply_to":"3fce034c_79c7f097","updated":"2019-04-18 13:56:02.000000000","message":"Done","commit_id":"6f4de3945b23dab767051829c6e13c264ad8cb6f"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"adf14e2d69a434ecd318b5dac21dfdc49b53ab6d","unresolved":false,"context_lines":[{"line_number":1182,"context_line":"                             \u0027network_id\u0027: subnet[\u0027subnet\u0027][\u0027network_id\u0027]}"},{"line_number":1183,"context_line":"                l3_dvr_db.check_l3_dvr_router_is_up("},{"line_number":1184,"context_line":"                        self.ctx, fake_port, \u0027fake_host\u0027)"},{"line_number":1185,"context_line":"                self.assertEqual(165, fake_timer.counter)"}],"source_content_type":"text/x-python","patch_set":11,"id":"3fce034c_79c7f097","line":1185,"in_reply_to":"3fce034c_d1ad9e9b","updated":"2019-04-18 06:11:59.000000000","message":"maybe You can add some comment or use constant with \"self descriptive\" name for it?\nIt took me some time to understand why it\u0027s 165 here :)","commit_id":"6f4de3945b23dab767051829c6e13c264ad8cb6f"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"86bf757c1f761aef57a75995e4a0fb1df8608df6","unresolved":false,"context_lines":[{"line_number":1182,"context_line":"                             \u0027network_id\u0027: subnet[\u0027subnet\u0027][\u0027network_id\u0027]}"},{"line_number":1183,"context_line":"                l3_dvr_db.check_l3_dvr_router_is_up("},{"line_number":1184,"context_line":"                        self.ctx, fake_port, \u0027fake_host\u0027)"},{"line_number":1185,"context_line":"                self.assertEqual(165, fake_timer.counter)"}],"source_content_type":"text/x-python","patch_set":11,"id":"3fce034c_d1ad9e9b","line":1185,"in_reply_to":"3fce034c_e049fc8a","updated":"2019-04-18 01:07:39.000000000","message":"IMO, this case 165s should be tested specifically. Let the developer or users be aware of this longest sleep time.","commit_id":"6f4de3945b23dab767051829c6e13c264ad8cb6f"}],"releasenotes/notes/check_router_is_up-38c11826653bf829.yaml":[{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"9b27678f91962607c62bace944111ddd43bede53","unresolved":true,"context_lines":[{"line_number":4,"context_line":"    Added a new config option ``check_dvr_local_router_up`` for the cloud"},{"line_number":5,"context_line":"    which will have large scale instance booting requests to ensure the L3"},{"line_number":6,"context_line":"    related functions are ready for the traffic from the VM to outside, for"},{"line_number":7,"context_line":"    instance metadate data."}],"source_content_type":"text/x-yaml","patch_set":31,"id":"5673a263_6f374b65","line":7,"range":{"start_line":7,"start_character":13,"end_line":7,"end_character":21},"updated":"2021-05-07 20:30:22.000000000","message":"s/metadata\n\nand maybe \u0027requests\u0027 instead of \u0027data\u0027?","commit_id":"3e8d448a9bee12dda3e94cf08e7059ab771b7aac"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"56f37040aaf2870f89748809db977f6f2e282dc1","unresolved":false,"context_lines":[{"line_number":4,"context_line":"    Added a new config option ``check_dvr_local_router_up`` for the cloud"},{"line_number":5,"context_line":"    which will have large scale instance booting requests to ensure the L3"},{"line_number":6,"context_line":"    related functions are ready for the traffic from the VM to outside, for"},{"line_number":7,"context_line":"    instance metadate data."}],"source_content_type":"text/x-yaml","patch_set":31,"id":"6cdcbe15_2c1aca54","line":7,"range":{"start_line":7,"start_character":13,"end_line":7,"end_character":21},"in_reply_to":"5673a263_6f374b65","updated":"2021-05-14 11:39:40.000000000","message":"Done","commit_id":"3e8d448a9bee12dda3e94cf08e7059ab771b7aac"}]}
