)]}'
{"neutron/agent/l3/agent.py":[{"author":{"_account_id":7715,"name":"Hirofumi Ichihara","email":"ichihara.hirofumi@gmail.com","username":"Hirofumi-Ichihara"},"change_message_id":"6bf1f17f1b6e84508bd335b2c84114dc61e8c675","unresolved":false,"context_lines":[{"line_number":335,"context_line":"        ri \u003d self.router_info.get(router_id)"},{"line_number":336,"context_line":"        if ri is None:"},{"line_number":337,"context_line":"            LOG.warn(_LW(\"Info for router %s was not found. \""},{"line_number":338,"context_line":"                         \"Performing router cleanup\"), router_id)"},{"line_number":339,"context_line":"            self.namespaces_manager.ensure_router_cleanup(router_id)"},{"line_number":340,"context_line":"            return"},{"line_number":341,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"fa32b979_8ccef6b2","line":338,"updated":"2015-06-22 08:09:46.000000000","message":"The message may be incorrect in case router_delete_namespaces \u003d False. namespace isn\u0027t removed in the case.","commit_id":"650092230dada0aac05481f605def4eafdff309d"},{"author":{"_account_id":7715,"name":"Hirofumi Ichihara","email":"ichihara.hirofumi@gmail.com","username":"Hirofumi-Ichihara"},"change_message_id":"642d1284e0530cd4bad8919458fcad2a23847a15","unresolved":false,"context_lines":[{"line_number":335,"context_line":"        ri \u003d self.router_info.get(router_id)"},{"line_number":336,"context_line":"        if ri is None:"},{"line_number":337,"context_line":"            LOG.warn(_LW(\"Info for router %s was not found. \""},{"line_number":338,"context_line":"                         \"Performing router cleanup\"), router_id)"},{"line_number":339,"context_line":"            self.namespaces_manager.ensure_router_cleanup(router_id)"},{"line_number":340,"context_line":"            return"},{"line_number":341,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"fa32b979_bd77633a","line":338,"in_reply_to":"fa32b979_1a1215b5","updated":"2015-06-22 10:22:44.000000000","message":"What does it mean if so? It seems user gets \"Failed to destroy stale namespace\" if Error occurs in the process.","commit_id":"650092230dada0aac05481f605def4eafdff309d"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"152d63627739d8dd375486cad8f8b47a930c8e19","unresolved":false,"context_lines":[{"line_number":335,"context_line":"        ri \u003d self.router_info.get(router_id)"},{"line_number":336,"context_line":"        if ri is None:"},{"line_number":337,"context_line":"            LOG.warn(_LW(\"Info for router %s was not found. \""},{"line_number":338,"context_line":"                         \"Performing router cleanup\"), router_id)"},{"line_number":339,"context_line":"            self.namespaces_manager.ensure_router_cleanup(router_id)"},{"line_number":340,"context_line":"            return"},{"line_number":341,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"fa32b979_1a1215b5","line":338,"in_reply_to":"fa32b979_8ccef6b2","updated":"2015-06-22 10:02:22.000000000","message":"This message doesn\u0027t say \u0027deleting namespace\u0027, cleanup means not only namespace deletion","commit_id":"650092230dada0aac05481f605def4eafdff309d"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"da095cfb52096eb5a563f0fb3ce8b351a09be268","unresolved":false,"context_lines":[{"line_number":335,"context_line":"        ri \u003d self.router_info.get(router_id)"},{"line_number":336,"context_line":"        if ri is None:"},{"line_number":337,"context_line":"            LOG.warn(_LW(\"Info for router %s was not found. \""},{"line_number":338,"context_line":"                         \"Performing router cleanup\"), router_id)"},{"line_number":339,"context_line":"            self.namespaces_manager.ensure_router_cleanup(router_id)"},{"line_number":340,"context_line":"            return"},{"line_number":341,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"fa32b979_e06c5e0a","line":338,"in_reply_to":"fa32b979_bd77633a","updated":"2015-06-22 10:51:55.000000000","message":"Cleanup also cleans stale metadata proxy processes. So I don\u0027t see any contradiction in the message even if router_delete_namespaces \u003d\u003d False","commit_id":"650092230dada0aac05481f605def4eafdff309d"},{"author":{"_account_id":7715,"name":"Hirofumi Ichihara","email":"ichihara.hirofumi@gmail.com","username":"Hirofumi-Ichihara"},"change_message_id":"89ef6d1f6fc00c113082ee15d68946475cc4f5de","unresolved":false,"context_lines":[{"line_number":335,"context_line":"        ri \u003d self.router_info.get(router_id)"},{"line_number":336,"context_line":"        if ri is None:"},{"line_number":337,"context_line":"            LOG.warn(_LW(\"Info for router %s was not found. \""},{"line_number":338,"context_line":"                         \"Performing router cleanup\"), router_id)"},{"line_number":339,"context_line":"            self.namespaces_manager.ensure_router_cleanup(router_id)"},{"line_number":340,"context_line":"            return"},{"line_number":341,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"fa32b979_c5634819","line":338,"in_reply_to":"fa32b979_e06c5e0a","updated":"2015-06-22 23:19:12.000000000","message":"I\u0027m not sure yet that it doesn\u0027t confuse users but it\u0027s nitpick since default value of router_delete_namespaces is True.","commit_id":"650092230dada0aac05481f605def4eafdff309d"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"3d5d5c3a2ee31632b32d436a9f5a9638ad68799a","unresolved":false,"context_lines":[{"line_number":554,"context_line":""},{"line_number":555,"context_line":"            # Delete routers that have disappeared since the last sync"},{"line_number":556,"context_line":"            for router_id in prev_router_ids - curr_router_ids:"},{"line_number":557,"context_line":"                ns_manager.keep_router(router_id)"},{"line_number":558,"context_line":"                update \u003d queue.RouterUpdate(router_id,"},{"line_number":559,"context_line":"                                            queue.PRIORITY_SYNC_ROUTERS_TASK,"},{"line_number":560,"context_line":"                                            timestamp\u003dtimestamp,"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba3cc151_31562c2a","line":557,"updated":"2015-06-30 00:15:00.000000000","message":"Maybe we can just check here to see if the router is known in self.router_info and execute L557 - L562 only if it is.  If it isn\u0027t then the cleanup code in __exit__ in the namespace manager should catch it, right?","commit_id":"9efa1fdeed86d249b2d3dde987a1fb98290140f0"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"aad38ec438404d4cdd2825a146249e1df44c1db9","unresolved":false,"context_lines":[{"line_number":554,"context_line":""},{"line_number":555,"context_line":"            # Delete routers that have disappeared since the last sync"},{"line_number":556,"context_line":"            for router_id in prev_router_ids - curr_router_ids:"},{"line_number":557,"context_line":"                ns_manager.keep_router(router_id)"},{"line_number":558,"context_line":"                update \u003d queue.RouterUpdate(router_id,"},{"line_number":559,"context_line":"                                            queue.PRIORITY_SYNC_ROUTERS_TASK,"},{"line_number":560,"context_line":"                                            timestamp\u003dtimestamp,"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba3cc151_788fa9cc","line":557,"in_reply_to":"ba3cc151_31562c2a","updated":"2015-06-30 09:17:53.000000000","message":"Actually we\u0027ll reach here only if router is known to the agent (is in prev_router_ids). \n\nThe case which I\u0027m trying to cover is when agent is started, resync initiated, fetches routers from server (router A is there), adds events to the queue (and calls ns_manager.keep_router() at #544) then receives router_deleted notification for router A while router A is yet unknown (update event from resync is not processed). This looks like a very rare case but still may happen (and I faced it actually) not only on agent restart but any time if there are intermittent problems with server-agent rpc communication","commit_id":"9efa1fdeed86d249b2d3dde987a1fb98290140f0"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"99d6852e9d99381ac581b90c1fb3d1a5d3880771","unresolved":false,"context_lines":[{"line_number":554,"context_line":""},{"line_number":555,"context_line":"            # Delete routers that have disappeared since the last sync"},{"line_number":556,"context_line":"            for router_id in prev_router_ids - curr_router_ids:"},{"line_number":557,"context_line":"                ns_manager.keep_router(router_id)"},{"line_number":558,"context_line":"                update \u003d queue.RouterUpdate(router_id,"},{"line_number":559,"context_line":"                                            queue.PRIORITY_SYNC_ROUTERS_TASK,"},{"line_number":560,"context_line":"                                            timestamp\u003dtimestamp,"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba3cc151_8cea410e","line":557,"in_reply_to":"ba3cc151_788fa9cc","updated":"2015-07-01 04:32:01.000000000","message":"I think we\u0027re talking about the same case.  \"while router A is yet unknown\" to me seems to indicate that the following change here would keep us out of this bug:\n\n  for router_id in prev_router_ids - curr_router_ids:\n      if router_id in self.router_info:\n          ns_manager.keep_router(router_id)\n          update \u003d ...\n\nWouldn\u0027t it?  From my comment in the other file, we got in to the situation because someone called keep_router on a router that was not known in router_info.  I think that call to keep_router was here on L557 and this change avoids it.","commit_id":"9efa1fdeed86d249b2d3dde987a1fb98290140f0"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"9343719e8bebf79fa971fefd8847ea56b12bf6cc","unresolved":false,"context_lines":[{"line_number":554,"context_line":""},{"line_number":555,"context_line":"            # Delete routers that have disappeared since the last sync"},{"line_number":556,"context_line":"            for router_id in prev_router_ids - curr_router_ids:"},{"line_number":557,"context_line":"                ns_manager.keep_router(router_id)"},{"line_number":558,"context_line":"                update \u003d queue.RouterUpdate(router_id,"},{"line_number":559,"context_line":"                                            queue.PRIORITY_SYNC_ROUTERS_TASK,"},{"line_number":560,"context_line":"                                            timestamp\u003dtimestamp,"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba3cc151_9237614c","line":557,"in_reply_to":"ba3cc151_8cea410e","updated":"2015-07-02 15:14:07.000000000","message":"Well, prev_router_ids is set(self.router_info) so no need for extra check: loop will be executed only for routers known to the agent.\n\nIn the described case keep_router is called at #544: on resync server returns router A and 543-548 is executed. While update is not yet processed for router A - router A is deleted and \u0027router_deleted\u0027 event is processed with a higher priority. At that point router is still unknown so agent will skip removal. The patch suggests to ensure cleanup for unknown routers.","commit_id":"9efa1fdeed86d249b2d3dde987a1fb98290140f0"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"c505c2208f4b3ab9a123ab9463c2d9035c66e52a","unresolved":false,"context_lines":[{"line_number":554,"context_line":""},{"line_number":555,"context_line":"            # Delete routers that have disappeared since the last sync"},{"line_number":556,"context_line":"            for router_id in prev_router_ids - curr_router_ids:"},{"line_number":557,"context_line":"                ns_manager.keep_router(router_id)"},{"line_number":558,"context_line":"                update \u003d queue.RouterUpdate(router_id,"},{"line_number":559,"context_line":"                                            queue.PRIORITY_SYNC_ROUTERS_TASK,"},{"line_number":560,"context_line":"                                            timestamp\u003dtimestamp,"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba3cc151_fae55f08","line":557,"in_reply_to":"ba3cc151_9237614c","updated":"2015-07-02 16:56:32.000000000","message":"I see now.  We\u0027re not thinking of the same case.  Thanks for your patience.","commit_id":"9efa1fdeed86d249b2d3dde987a1fb98290140f0"}],"neutron/agent/l3/namespace_manager.py":[{"author":{"_account_id":11343,"name":"Gal Sagie","email":"gal.sagie@gmail.com","username":"GalSagie"},"change_message_id":"1133e98ca3b5cc2cad0ce24e8e8c06547d9eee94","unresolved":false,"context_lines":[{"line_number":118,"context_line":"    def ensure_router_cleanup(self, router_id):"},{"line_number":119,"context_line":"        \"\"\"Performs cleanup for a router\"\"\""},{"line_number":120,"context_line":"        for ns in self.list_all():"},{"line_number":121,"context_line":"            if ns.endswith(router_id):"},{"line_number":122,"context_line":"                ns_prefix \u003d namespaces.get_prefix_from_ns_name(ns)"},{"line_number":123,"context_line":"                self._cleanup(ns_prefix, router_id)"},{"line_number":124,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1af86dd1_1beec122","line":121,"updated":"2015-06-12 09:12:49.000000000","message":"Shouldn\u0027t you call here :\n\nns_prefix, ns_id \u003d self.get_prefix_and_id(ns)\n\nself._cleanup(ns_prefix, ns_id)\n\n(instead of calling the _cleanup() with the router_id)","commit_id":"0c8c7737ede65fb8a78788c8acebf7fc1d2ddfae"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"bb676998322d7d8996beeb3153d1ed81f2345fbe","unresolved":false,"context_lines":[{"line_number":118,"context_line":"    def ensure_router_cleanup(self, router_id):"},{"line_number":119,"context_line":"        \"\"\"Performs cleanup for a router\"\"\""},{"line_number":120,"context_line":"        for ns in self.list_all():"},{"line_number":121,"context_line":"            if ns.endswith(router_id):"},{"line_number":122,"context_line":"                ns_prefix \u003d namespaces.get_prefix_from_ns_name(ns)"},{"line_number":123,"context_line":"                self._cleanup(ns_prefix, router_id)"},{"line_number":124,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"fa32b979_ca4b8caf","line":121,"in_reply_to":"1af86dd1_1beec122","updated":"2015-06-15 12:48:53.000000000","message":"how is it better/different?","commit_id":"0c8c7737ede65fb8a78788c8acebf7fc1d2ddfae"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"8ce65d0531d95dc1de873b4acc3883bd3b090a14","unresolved":false,"context_lines":[{"line_number":118,"context_line":"    def ensure_router_cleanup(self, router_id):"},{"line_number":119,"context_line":"        \"\"\"Performs cleanup for a router\"\"\""},{"line_number":120,"context_line":"        for ns in self.list_all():"},{"line_number":121,"context_line":"            if ns.endswith(router_id):"},{"line_number":122,"context_line":"                ns_prefix \u003d namespaces.get_prefix_from_ns_name(ns)"},{"line_number":123,"context_line":"                self._cleanup(ns_prefix, router_id)"},{"line_number":124,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"fa32b979_9645ceb4","line":121,"in_reply_to":"fa32b979_ac5e5ae7","updated":"2015-06-19 14:51:43.000000000","message":"Agreed, fixed in PS3","commit_id":"0c8c7737ede65fb8a78788c8acebf7fc1d2ddfae"},{"author":{"_account_id":11343,"name":"Gal Sagie","email":"gal.sagie@gmail.com","username":"GalSagie"},"change_message_id":"005ea06901e25af1cead900e4334ffdde7372387","unresolved":false,"context_lines":[{"line_number":118,"context_line":"    def ensure_router_cleanup(self, router_id):"},{"line_number":119,"context_line":"        \"\"\"Performs cleanup for a router\"\"\""},{"line_number":120,"context_line":"        for ns in self.list_all():"},{"line_number":121,"context_line":"            if ns.endswith(router_id):"},{"line_number":122,"context_line":"                ns_prefix \u003d namespaces.get_prefix_from_ns_name(ns)"},{"line_number":123,"context_line":"                self._cleanup(ns_prefix, router_id)"},{"line_number":124,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"fa32b979_ac5e5ae7","line":121,"in_reply_to":"fa32b979_ca4b8caf","updated":"2015-06-15 16:28:49.000000000","message":"i guess there is a \"secret assumption\" that the namespace id is similar to the router id. \n\nthis might be true but still something i personally prefer to see consistent (because in the above code which you extracted get_prefix_and_id is used and i think for consistency this should be used here as well )(unless i got something wrong)","commit_id":"0c8c7737ede65fb8a78788c8acebf7fc1d2ddfae"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"a08ae46dc421734173b6806a4d13e318e0a6d576","unresolved":false,"context_lines":[{"line_number":122,"context_line":"                ns_prefix \u003d namespaces.get_prefix_from_ns_name(ns)"},{"line_number":123,"context_line":"                self._cleanup(ns_prefix, router_id)"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"    def _cleanup(self, ns_prefix, ns_id):"},{"line_number":126,"context_line":"        if ns_prefix \u003d\u003d namespaces.NS_PREFIX:"},{"line_number":127,"context_line":"            ns \u003d namespaces.RouterNamespace(ns_id,"},{"line_number":128,"context_line":"                                            self.agent_conf,"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa32b979_4598ff77","line":125,"updated":"2015-06-19 06:50:54.000000000","message":"these objects are constructed with the same args, you can dedup a little:\n\nif ns_prefix \u003d\u003d namespaces.NS_PREFIX:\n    nc \u003d namespaces.RouterNamespace\nelse:\n    nc \u003d dvr_snat_ns.SnatNamespace\nns \u003d nc(ns_id, self.agent_conf, self.driver, use_ipv6\u003dFalse)","commit_id":"15e424f3382f4b6d5b01dcfbabd7df583239ded6"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"f9a4b82384aca07fdb54f68a7c44f3ce2be7d00c","unresolved":false,"context_lines":[{"line_number":122,"context_line":"                ns_prefix \u003d namespaces.get_prefix_from_ns_name(ns)"},{"line_number":123,"context_line":"                self._cleanup(ns_prefix, router_id)"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"    def _cleanup(self, ns_prefix, ns_id):"},{"line_number":126,"context_line":"        if ns_prefix \u003d\u003d namespaces.NS_PREFIX:"},{"line_number":127,"context_line":"            ns \u003d namespaces.RouterNamespace(ns_id,"},{"line_number":128,"context_line":"                                            self.agent_conf,"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa32b979_96b5ce32","line":125,"in_reply_to":"fa32b979_4598ff77","updated":"2015-06-19 14:51:50.000000000","message":"will do","commit_id":"15e424f3382f4b6d5b01dcfbabd7df583239ded6"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"3d5d5c3a2ee31632b32d436a9f5a9638ad68799a","unresolved":false,"context_lines":[{"line_number":63,"context_line":"        self._all_namespaces \u003d set()"},{"line_number":64,"context_line":"        self._ids_to_keep \u003d set()"},{"line_number":65,"context_line":"        if self._clean_stale:"},{"line_number":66,"context_line":"            self._all_namespaces \u003d self.list_all()"},{"line_number":67,"context_line":"        return self"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def __exit__(self, exc_type, value, traceback):"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba3cc151_1159a85a","line":66,"updated":"2015-06-30 00:15:00.000000000","message":"The stale namespace would be listed here, right?  Then, something must call keep_router for the regular stale namespace logic to not work right.  Does that make sense?","commit_id":"9efa1fdeed86d249b2d3dde987a1fb98290140f0"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"aad38ec438404d4cdd2825a146249e1df44c1db9","unresolved":false,"context_lines":[{"line_number":63,"context_line":"        self._all_namespaces \u003d set()"},{"line_number":64,"context_line":"        self._ids_to_keep \u003d set()"},{"line_number":65,"context_line":"        if self._clean_stale:"},{"line_number":66,"context_line":"            self._all_namespaces \u003d self.list_all()"},{"line_number":67,"context_line":"        return self"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def __exit__(self, exc_type, value, traceback):"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba3cc151_3bed9b25","line":66,"in_reply_to":"ba3cc151_1159a85a","updated":"2015-06-30 09:17:53.000000000","message":"Definitely, and  keep_router() is actually called (described in the previos comment)","commit_id":"9efa1fdeed86d249b2d3dde987a1fb98290140f0"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"72c1b8aa357451c6086a1772fb1a2a31a4ba9a1b","unresolved":false,"context_lines":[{"line_number":117,"context_line":""},{"line_number":118,"context_line":"    def ensure_router_cleanup(self, router_id):"},{"line_number":119,"context_line":"        \"\"\"Performs cleanup for a router\"\"\""},{"line_number":120,"context_line":"        for ns in self.list_all():"},{"line_number":121,"context_line":"            if ns.endswith(router_id):"},{"line_number":122,"context_line":"                ns_prefix, ns_id \u003d self.get_prefix_and_id(ns)"},{"line_number":123,"context_line":"                self._cleanup(ns_prefix, ns_id)"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa32b979_a0bda869","line":120,"updated":"2015-06-23 17:20:54.000000000","message":"You don\u0027t need to list all the namespaces since you have the router_id. This could be:\n\ndef ensure_router_cleanup(self, router_id):\n    self._cleanup(namespaces.NS_PREFIX, router_id)\n\nIt\u0027s a bit confusing to see this method in this class. As the doc string says this class is a context manager to clean up namespaces and this method is used outside of the context manager. I wonder if there\u0027s a better place for it...","commit_id":"9efa1fdeed86d249b2d3dde987a1fb98290140f0"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"a69b1c64d6b34325ec70d008a686a5f9b31631f7","unresolved":false,"context_lines":[{"line_number":117,"context_line":""},{"line_number":118,"context_line":"    def ensure_router_cleanup(self, router_id):"},{"line_number":119,"context_line":"        \"\"\"Performs cleanup for a router\"\"\""},{"line_number":120,"context_line":"        for ns in self.list_all():"},{"line_number":121,"context_line":"            if ns.endswith(router_id):"},{"line_number":122,"context_line":"                ns_prefix, ns_id \u003d self.get_prefix_and_id(ns)"},{"line_number":123,"context_line":"                self._cleanup(ns_prefix, ns_id)"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa32b979_7f7ac425","line":120,"in_reply_to":"fa32b979_04d6cb4e","updated":"2015-06-24 09:40:29.000000000","message":"Yeah, it\u0027s handled, but it\u0027s still exceptional case logged at exception level so not a normal condition. We can use namespace exists() from ip_lib but it still ends up in enumerating all namespaces so I doubt we\u0027ll benefit much with it. ensure_router_cleanup() is also kind of exceptional case and should not be called often during normal agent functioning. I think I tend to leave as is for now..","commit_id":"9efa1fdeed86d249b2d3dde987a1fb98290140f0"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"996139daef18b95a595d062d47e6fd0914fef456","unresolved":false,"context_lines":[{"line_number":117,"context_line":""},{"line_number":118,"context_line":"    def ensure_router_cleanup(self, router_id):"},{"line_number":119,"context_line":"        \"\"\"Performs cleanup for a router\"\"\""},{"line_number":120,"context_line":"        for ns in self.list_all():"},{"line_number":121,"context_line":"            if ns.endswith(router_id):"},{"line_number":122,"context_line":"                ns_prefix, ns_id \u003d self.get_prefix_and_id(ns)"},{"line_number":123,"context_line":"                self._cleanup(ns_prefix, ns_id)"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba3cc151_80e7cb11","line":120,"in_reply_to":"fa32b979_7f7ac425","updated":"2015-06-29 08:18:36.000000000","message":"since it\u0027s an exceptional case, I agree with you. Removing my \u0027-1\u0027 ...","commit_id":"9efa1fdeed86d249b2d3dde987a1fb98290140f0"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"416048a949348683e89239b078bd7ba61bcbae6a","unresolved":false,"context_lines":[{"line_number":117,"context_line":""},{"line_number":118,"context_line":"    def ensure_router_cleanup(self, router_id):"},{"line_number":119,"context_line":"        \"\"\"Performs cleanup for a router\"\"\""},{"line_number":120,"context_line":"        for ns in self.list_all():"},{"line_number":121,"context_line":"            if ns.endswith(router_id):"},{"line_number":122,"context_line":"                ns_prefix, ns_id \u003d self.get_prefix_and_id(ns)"},{"line_number":123,"context_line":"                self._cleanup(ns_prefix, ns_id)"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa32b979_eb04da15","line":120,"in_reply_to":"fa32b979_a0bda869","updated":"2015-06-24 08:00:17.000000000","message":"Good point Rossella. The reason for listing all namespaces was to ensure all possible router namespaces are removed - they might be qrouter and csnat namespaces, since with only router_id we don\u0027t know if it was DVR or legacy router. I\u0027ll check if we can simply do cleanup for all possible namespaces with no failures if namespace does not exist.","commit_id":"9efa1fdeed86d249b2d3dde987a1fb98290140f0"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"0e3724d10b79d61a7247ee0cc6fd4da99309ecfa","unresolved":false,"context_lines":[{"line_number":117,"context_line":""},{"line_number":118,"context_line":"    def ensure_router_cleanup(self, router_id):"},{"line_number":119,"context_line":"        \"\"\"Performs cleanup for a router\"\"\""},{"line_number":120,"context_line":"        for ns in self.list_all():"},{"line_number":121,"context_line":"            if ns.endswith(router_id):"},{"line_number":122,"context_line":"                ns_prefix, ns_id \u003d self.get_prefix_and_id(ns)"},{"line_number":123,"context_line":"                self._cleanup(ns_prefix, ns_id)"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa32b979_04d6cb4e","line":120,"in_reply_to":"fa32b979_eb04da15","updated":"2015-06-24 09:15:46.000000000","message":"Oh yes you are right, the router could be DVR or legacy. It should be possible to remove a non existent namespace without failing (at line 137 RuntimeError is caught) . Anyway let me know how it goes :)","commit_id":"9efa1fdeed86d249b2d3dde987a1fb98290140f0"}]}
