)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"12789b30ed56365dc8bcbcd29f43a2219d33e173","unresolved":false,"context_lines":[{"line_number":13,"context_line":"I plan to refine this pattern and use it for other types of resources"},{"line_number":14,"context_line":"in the L3 agent in the near future."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Partially-Implements: bp restructure-l3-agent"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Change-Id: I9a62ae84686e26a42c72c4a6f50cecce30c4841e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9aa7fdbe_5936a953","line":16,"updated":"2014-10-21 22:08:14.000000000","message":"I know this bp is not there yet.  I\u0027m trying to get our legal department to let me post it but they have not responded to my plea.","commit_id":"5eb4b8832aeb0773c4adf8c345366e1554a98b96"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"8590645a5677918e1c53eec99d449296a8f8e79e","unresolved":false,"context_lines":[{"line_number":13,"context_line":"I plan to refine this pattern and use it for other types of resources"},{"line_number":14,"context_line":"in the L3 agent in the near future."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Partially-Implements: bp restructure-l3-agent"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Change-Id: I9a62ae84686e26a42c72c4a6f50cecce30c4841e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9aa7fdbe_22ee09b5","line":16,"in_reply_to":"9aa7fdbe_5936a953","updated":"2014-10-22 05:03:59.000000000","message":"Surely you jest?","commit_id":"5eb4b8832aeb0773c4adf8c345366e1554a98b96"}],"neutron/agent/l3_agent.py":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"b3cbc866bc91a6d7e0d58cb9d0dc62564154598c","unresolved":false,"context_lines":[{"line_number":1848,"context_line":"            return"},{"line_number":1849,"context_line":""},{"line_number":1850,"context_line":"        # Capture a picture of namespaces *before* fetching the full list from"},{"line_number":1851,"context_line":"        # the database.  This is important to correctly identify stale ones."},{"line_number":1852,"context_line":"        namespaces \u003d set()"},{"line_number":1853,"context_line":"        if self._clean_stale_namespaces:"},{"line_number":1854,"context_line":"            namespaces \u003d self._list_namespaces()"}],"source_content_type":"text/x-python","patch_set":1,"id":"9aa7fdbe_42b05b43","side":"PARENT","line":1851,"updated":"2014-10-22 14:58:49.000000000","message":"I thought I could relax this a bit but I realized this morning that I cannot.  I\u0027ve got to ensure that the call to plugin_rpc.get_routers(...) happens inside the \"with ...track_and_clean_stale\" context below to ensure that this is still true.","commit_id":"4cf50b9bbc8292b766f48746c009e162babb9e17"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"7c827880350dd0f5f501627290eded882c6a3946","unresolved":false,"context_lines":[{"line_number":1829,"context_line":"        except Exception:"},{"line_number":1830,"context_line":"            LOG.exception(_(\"Failed synchronizing routers\"))"},{"line_number":1831,"context_line":"            raise n_exc.AbortSyncRouters()"},{"line_number":1832,"context_line":""},{"line_number":1833,"context_line":"        else:"},{"line_number":1834,"context_line":"            LOG.debug(_(\u0027Processing :%r\u0027), routers)"},{"line_number":1835,"context_line":"            for r in routers:"}],"source_content_type":"text/x-python","patch_set":2,"id":"9aa7fdbe_5b276212","line":1832,"updated":"2014-10-22 16:40:41.000000000","message":"nit:  I didn\u0027t mean to add a line here.  If there is a next patch, I\u0027ll remove it.","commit_id":"1730f1757d407b1c151ff27971c511dd398ccdc9"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"ab3374d0a11f7f81ceccf1d6e0afd6d74fb9e88f","unresolved":false,"context_lines":[{"line_number":1829,"context_line":"        except Exception:"},{"line_number":1830,"context_line":"            LOG.exception(_(\"Failed synchronizing routers\"))"},{"line_number":1831,"context_line":"            raise n_exc.AbortSyncRouters()"},{"line_number":1832,"context_line":""},{"line_number":1833,"context_line":"        else:"},{"line_number":1834,"context_line":"            LOG.debug(_(\u0027Processing :%r\u0027), routers)"},{"line_number":1835,"context_line":"            for r in routers:"}],"source_content_type":"text/x-python","patch_set":2,"id":"9aa7fdbe_3af12f6b","line":1832,"in_reply_to":"9aa7fdbe_5b276212","updated":"2014-10-28 18:09:21.000000000","message":"Done","commit_id":"1730f1757d407b1c151ff27971c511dd398ccdc9"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"25a420d0b698170dff0d0b8b1112f8de6e8e95c8","unresolved":false,"context_lines":[{"line_number":1842,"context_line":"            self.fullsync \u003d False"},{"line_number":1843,"context_line":"            LOG.debug(_(\"periodic_sync_routers_task successfully completed\"))"},{"line_number":1844,"context_line":""},{"line_number":1845,"context_line":"            curr_router_ids \u003d set([r[\u0027id\u0027] for r in routers])"},{"line_number":1846,"context_line":""},{"line_number":1847,"context_line":"            # Delete routers that have disappeared since the last sync"},{"line_number":1848,"context_line":"            for router_id in prev_router_ids - curr_router_ids:"}],"source_content_type":"text/x-python","patch_set":2,"id":"9aa7fdbe_0d052945","line":1845,"updated":"2014-10-28 09:25:29.000000000","message":"In the spirit of refactoring, change this to \u0027... \u003d set(r[\u0027id\u0027] for r in routers)\u0027. set\u0027s constructor works with a generator as an argument, and changing the list comprehension to a generator will save creation of the temporary list.","commit_id":"1730f1757d407b1c151ff27971c511dd398ccdc9"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"ab3374d0a11f7f81ceccf1d6e0afd6d74fb9e88f","unresolved":false,"context_lines":[{"line_number":1842,"context_line":"            self.fullsync \u003d False"},{"line_number":1843,"context_line":"            LOG.debug(_(\"periodic_sync_routers_task successfully completed\"))"},{"line_number":1844,"context_line":""},{"line_number":1845,"context_line":"            curr_router_ids \u003d set([r[\u0027id\u0027] for r in routers])"},{"line_number":1846,"context_line":""},{"line_number":1847,"context_line":"            # Delete routers that have disappeared since the last sync"},{"line_number":1848,"context_line":"            for router_id in prev_router_ids - curr_router_ids:"}],"source_content_type":"text/x-python","patch_set":2,"id":"9aa7fdbe_da74a3d0","line":1845,"in_reply_to":"9aa7fdbe_0d052945","updated":"2014-10-28 18:09:21.000000000","message":"You are correct about the set constructor and all of that.  I usually like to keep patches focused on a single goal and this doesn\u0027t help me meet that goal.  I think I move this line in another patch (or I intend to) so I\u0027ll take care of this there.","commit_id":"1730f1757d407b1c151ff27971c511dd398ccdc9"}],"neutron/agent/linux/namespaces.py":[{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"25a420d0b698170dff0d0b8b1112f8de6e8e95c8","unresolved":false,"context_lines":[{"line_number":21,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"class NamespaceManager(object):"},{"line_number":25,"context_line":"    def __init__(self, prefixes, clean_stale\u003dFalse):"},{"line_number":26,"context_line":"        \"\"\"Initialize the NamespaceManager"},{"line_number":27,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9aa7fdbe_0816f74b","line":24,"updated":"2014-10-28 09:25:29.000000000","message":"Since this class\u0027s name is NamespaceManager, I expected it to also manage and keep track of new namespaces from the moment they are created, however this is still kept in l3_agent. For this reason I think a more appropriate name is NamespaceHelper.\n\nQuestion: are you planning to move the creation and tracking of namespaces to this class at any point? This is also somewhat linked to what Isaku wrote.","commit_id":"1730f1757d407b1c151ff27971c511dd398ccdc9"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"ab3374d0a11f7f81ceccf1d6e0afd6d74fb9e88f","unresolved":false,"context_lines":[{"line_number":21,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"class NamespaceManager(object):"},{"line_number":25,"context_line":"    def __init__(self, prefixes, clean_stale\u003dFalse):"},{"line_number":26,"context_line":"        \"\"\"Initialize the NamespaceManager"},{"line_number":27,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9aa7fdbe_5a50b331","line":24,"in_reply_to":"9aa7fdbe_0816f74b","updated":"2014-10-28 18:09:21.000000000","message":"Answer:  Yes.  I plan to do so.  One step at a time.","commit_id":"1730f1757d407b1c151ff27971c511dd398ccdc9"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"25a420d0b698170dff0d0b8b1112f8de6e8e95c8","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":"class NamespaceManager(object):"},{"line_number":25,"context_line":"    def __init__(self, prefixes, clean_stale\u003dFalse):"},{"line_number":26,"context_line":"        \"\"\"Initialize the NamespaceManager"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"        :param prefixes The set of namespace prefix to manage.  Namespaces"},{"line_number":29,"context_line":"               with other prefixes will be ignored."}],"source_content_type":"text/x-python","patch_set":2,"id":"9aa7fdbe_4d80118b","line":26,"updated":"2014-10-28 09:25:29.000000000","message":"nit: missing \u0027.\u0027 at the end of the sentence.","commit_id":"1730f1757d407b1c151ff27971c511dd398ccdc9"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"ab3374d0a11f7f81ceccf1d6e0afd6d74fb9e88f","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":"class NamespaceManager(object):"},{"line_number":25,"context_line":"    def __init__(self, prefixes, clean_stale\u003dFalse):"},{"line_number":26,"context_line":"        \"\"\"Initialize the NamespaceManager"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"        :param prefixes The set of namespace prefix to manage.  Namespaces"},{"line_number":29,"context_line":"               with other prefixes will be ignored."}],"source_content_type":"text/x-python","patch_set":2,"id":"9aa7fdbe_ba60bf01","line":26,"in_reply_to":"9aa7fdbe_4d80118b","updated":"2014-10-28 18:09:21.000000000","message":"Done","commit_id":"1730f1757d407b1c151ff27971c511dd398ccdc9"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"25a420d0b698170dff0d0b8b1112f8de6e8e95c8","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        self._clean_stale \u003d clean_stale"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    def get_prefix_and_id(self, ns_name):"},{"line_number":37,"context_line":"        \"\"\"Get the prefix and id from the namespace name"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"        :param ns_name The name of the namespace"},{"line_number":40,"context_line":"        :returns: tuple with prefix and id or None if no prefix matches"}],"source_content_type":"text/x-python","patch_set":2,"id":"9aa7fdbe_2d758dca","line":37,"updated":"2014-10-28 09:25:29.000000000","message":"nit: missing \u0027.\u0027 at the end of the sentence.","commit_id":"1730f1757d407b1c151ff27971c511dd398ccdc9"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"ab3374d0a11f7f81ceccf1d6e0afd6d74fb9e88f","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        self._clean_stale \u003d clean_stale"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    def get_prefix_and_id(self, ns_name):"},{"line_number":37,"context_line":"        \"\"\"Get the prefix and id from the namespace name"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"        :param ns_name The name of the namespace"},{"line_number":40,"context_line":"        :returns: tuple with prefix and id or None if no prefix matches"}],"source_content_type":"text/x-python","patch_set":2,"id":"9aa7fdbe_da5bc351","line":37,"in_reply_to":"9aa7fdbe_2d758dca","updated":"2014-10-28 18:09:21.000000000","message":"Done","commit_id":"1730f1757d407b1c151ff27971c511dd398ccdc9"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"25a420d0b698170dff0d0b8b1112f8de6e8e95c8","unresolved":false,"context_lines":[{"line_number":44,"context_line":"                return (prefix, ns_name[len(prefix):])"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    def is_managed(self, ns_name):"},{"line_number":47,"context_line":"        \"\"\"Return True if the namespace name passed belongs to this manager.\"\"\""},{"line_number":48,"context_line":"        return self.get_prefix_and_id(ns_name) is not None"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    def list_all(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"9aa7fdbe_ad533d15","line":47,"updated":"2014-10-28 09:25:29.000000000","message":"The docstring is misleading. All this function tests is whether or not a namespace with the appropriate naming scheme (\"%s-%s\" % (prefix, id)) is present in the current machine. If I were to create a new dummy \"qrouter-1232123123\" namespace, according to this function it will also be managed.","commit_id":"1730f1757d407b1c151ff27971c511dd398ccdc9"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"3a32e7e6e1a004c981fe18eaa4fcaec257a53204","unresolved":false,"context_lines":[{"line_number":44,"context_line":"                return (prefix, ns_name[len(prefix):])"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    def is_managed(self, ns_name):"},{"line_number":47,"context_line":"        \"\"\"Return True if the namespace name passed belongs to this manager.\"\"\""},{"line_number":48,"context_line":"        return self.get_prefix_and_id(ns_name) is not None"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    def list_all(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"9aa7fdbe_f8b7a038","line":47,"in_reply_to":"9aa7fdbe_9a14db4d","updated":"2014-10-29 07:45:42.000000000","message":"Nevermind, upon re-reading I\u0027ve understood what you\u0027re trying to do...\n\nMaybe change the doctoring to: \"Return True if the namespace\u0027s name passed is of a known prefix.\"?","commit_id":"1730f1757d407b1c151ff27971c511dd398ccdc9"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"ab3374d0a11f7f81ceccf1d6e0afd6d74fb9e88f","unresolved":false,"context_lines":[{"line_number":44,"context_line":"                return (prefix, ns_name[len(prefix):])"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    def is_managed(self, ns_name):"},{"line_number":47,"context_line":"        \"\"\"Return True if the namespace name passed belongs to this manager.\"\"\""},{"line_number":48,"context_line":"        return self.get_prefix_and_id(ns_name) is not None"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    def list_all(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"9aa7fdbe_9a14db4d","line":47,"in_reply_to":"9aa7fdbe_ad533d15","updated":"2014-10-28 18:09:21.000000000","message":"This doesn\u0027t test if the namespace is present in the current machine.  I don\u0027t understand what you\u0027re trying to tell me here.","commit_id":"1730f1757d407b1c151ff27971c511dd398ccdc9"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"25a420d0b698170dff0d0b8b1112f8de6e8e95c8","unresolved":false,"context_lines":[{"line_number":50,"context_line":"    def list_all(self):"},{"line_number":51,"context_line":"        \"\"\"Get a set of all namespaces on host managed by this manager.\"\"\""},{"line_number":52,"context_line":"        try:"},{"line_number":53,"context_line":"            root_ip \u003d ip_lib.IPWrapper(self.root_helper)"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"            namespaces \u003d root_ip.get_namespaces(self.root_helper)"},{"line_number":56,"context_line":"            return set(ns for ns in namespaces if self.is_managed(ns))"}],"source_content_type":"text/x-python","patch_set":2,"id":"9aa7fdbe_ed59c535","line":53,"updated":"2014-10-28 09:25:29.000000000","message":"In the spirit of refactoring: afaik the constructor can\u0027t raise RuntimeError, so it should be moved to outside the try-except block.","commit_id":"1730f1757d407b1c151ff27971c511dd398ccdc9"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"505ba9ef16cc1563871b4142d0baaee7b0df6f31","unresolved":false,"context_lines":[{"line_number":55,"context_line":"            namespaces \u003d root_ip.get_namespaces(self.root_helper)"},{"line_number":56,"context_line":"            return set(ns for ns in namespaces if self.is_managed(ns))"},{"line_number":57,"context_line":"        except RuntimeError:"},{"line_number":58,"context_line":"            LOG.exception(_(\u0027RuntimeError in obtaining namespace list for \u0027"},{"line_number":59,"context_line":"                            \u0027namespace cleanup.\u0027))"},{"line_number":60,"context_line":"            return set()"},{"line_number":61,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9aa7fdbe_9da514a4","line":58,"range":{"start_line":58,"start_character":26,"end_line":58,"end_character":27},"updated":"2014-10-24 02:37:11.000000000","message":"_LE?","commit_id":"1730f1757d407b1c151ff27971c511dd398ccdc9"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"ab3374d0a11f7f81ceccf1d6e0afd6d74fb9e88f","unresolved":false,"context_lines":[{"line_number":55,"context_line":"            namespaces \u003d root_ip.get_namespaces(self.root_helper)"},{"line_number":56,"context_line":"            return set(ns for ns in namespaces if self.is_managed(ns))"},{"line_number":57,"context_line":"        except RuntimeError:"},{"line_number":58,"context_line":"            LOG.exception(_(\u0027RuntimeError in obtaining namespace list for \u0027"},{"line_number":59,"context_line":"                            \u0027namespace cleanup.\u0027))"},{"line_number":60,"context_line":"            return set()"},{"line_number":61,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9aa7fdbe_ae3c04c9","line":58,"in_reply_to":"9aa7fdbe_42570026","updated":"2014-10-28 18:09:21.000000000","message":"Done (but not twice)  ;)","commit_id":"1730f1757d407b1c151ff27971c511dd398ccdc9"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"25a420d0b698170dff0d0b8b1112f8de6e8e95c8","unresolved":false,"context_lines":[{"line_number":55,"context_line":"            namespaces \u003d root_ip.get_namespaces(self.root_helper)"},{"line_number":56,"context_line":"            return set(ns for ns in namespaces if self.is_managed(ns))"},{"line_number":57,"context_line":"        except RuntimeError:"},{"line_number":58,"context_line":"            LOG.exception(_(\u0027RuntimeError in obtaining namespace list for \u0027"},{"line_number":59,"context_line":"                            \u0027namespace cleanup.\u0027))"},{"line_number":60,"context_line":"            return set()"},{"line_number":61,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9aa7fdbe_42570026","line":58,"in_reply_to":"9aa7fdbe_9da514a4","updated":"2014-10-28 09:25:29.000000000","message":"Seconded.","commit_id":"1730f1757d407b1c151ff27971c511dd398ccdc9"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"25a420d0b698170dff0d0b8b1112f8de6e8e95c8","unresolved":false,"context_lines":[{"line_number":89,"context_line":"        # should be instances of some class and have a well-managed lifecycle."},{"line_number":90,"context_line":"        # Otherwise, things could really mess up.  So, for now, we signal"},{"line_number":91,"context_line":"        # interest in a namespace by adding it to this set.  This is a decent"},{"line_number":92,"context_line":"        # intermediate step."},{"line_number":93,"context_line":"        yield ids_to_keep"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"        # TODO(carl) Preserves old behavior of L3 agent where cleaning"}],"source_content_type":"text/x-python","patch_set":2,"id":"9aa7fdbe_c81f8f59","line":92,"updated":"2014-10-28 09:25:29.000000000","message":"I really like this idea.","commit_id":"1730f1757d407b1c151ff27971c511dd398ccdc9"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"ab3374d0a11f7f81ceccf1d6e0afd6d74fb9e88f","unresolved":false,"context_lines":[{"line_number":89,"context_line":"        # should be instances of some class and have a well-managed lifecycle."},{"line_number":90,"context_line":"        # Otherwise, things could really mess up.  So, for now, we signal"},{"line_number":91,"context_line":"        # interest in a namespace by adding it to this set.  This is a decent"},{"line_number":92,"context_line":"        # intermediate step."},{"line_number":93,"context_line":"        yield ids_to_keep"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"        # TODO(carl) Preserves old behavior of L3 agent where cleaning"}],"source_content_type":"text/x-python","patch_set":2,"id":"9aa7fdbe_ce48682f","line":92,"in_reply_to":"9aa7fdbe_c81f8f59","updated":"2014-10-28 18:09:21.000000000","message":"Thanks.","commit_id":"1730f1757d407b1c151ff27971c511dd398ccdc9"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"25a420d0b698170dff0d0b8b1112f8de6e8e95c8","unresolved":false,"context_lines":[{"line_number":90,"context_line":"        # Otherwise, things could really mess up.  So, for now, we signal"},{"line_number":91,"context_line":"        # interest in a namespace by adding it to this set.  This is a decent"},{"line_number":92,"context_line":"        # intermediate step."},{"line_number":93,"context_line":"        yield ids_to_keep"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"        # TODO(carl) Preserves old behavior of L3 agent where cleaning"},{"line_number":96,"context_line":"        # namespaces was only done once after restart.  Still a good idea?"}],"source_content_type":"text/x-python","patch_set":2,"id":"9aa7fdbe_4d1f31b7","line":93,"updated":"2014-10-28 09:25:29.000000000","message":"Took me a while to understand what happens here, mainly because I haven\u0027t seen this kind of code before (yielding an object so outside logic can modify it). Maybe add a comment here to clarify what happens here?","commit_id":"1730f1757d407b1c151ff27971c511dd398ccdc9"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"ab3374d0a11f7f81ceccf1d6e0afd6d74fb9e88f","unresolved":false,"context_lines":[{"line_number":90,"context_line":"        # Otherwise, things could really mess up.  So, for now, we signal"},{"line_number":91,"context_line":"        # interest in a namespace by adding it to this set.  This is a decent"},{"line_number":92,"context_line":"        # intermediate step."},{"line_number":93,"context_line":"        yield ids_to_keep"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"        # TODO(carl) Preserves old behavior of L3 agent where cleaning"},{"line_number":96,"context_line":"        # namespaces was only done once after restart.  Still a good idea?"}],"source_content_type":"text/x-python","patch_set":2,"id":"9aa7fdbe_ae4de43f","line":93,"in_reply_to":"9aa7fdbe_4d1f31b7","updated":"2014-10-28 18:09:21.000000000","message":"Done","commit_id":"1730f1757d407b1c151ff27971c511dd398ccdc9"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"286cef54625d33d2ee5b4f828d1c48290475e5f4","unresolved":false,"context_lines":[{"line_number":107,"context_line":"                # TODO(carl) This shouldn\u0027t call back to the L3 agent in the"},{"line_number":108,"context_line":"                # long term.  A future refactor should further encapsulate the"},{"line_number":109,"context_line":"                # details of how to destroy namespaces to decouple this from"},{"line_number":110,"context_line":"                # the L3 agent.  One step at a time."},{"line_number":111,"context_line":"                l3_agent.destroy_namespace(ns)"},{"line_number":112,"context_line":"            except RuntimeError:"},{"line_number":113,"context_line":"                msg \u003d _(\u0027Failed to destroy stale namespace %s\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9aa7fdbe_143f52d7","line":110,"updated":"2014-10-23 13:35:50.000000000","message":"Probably namespace creation should be encapsulated. something like NamespaceWrapper which has\ncreate(id), destroy(id), is_managed(ns_name), get_id(ns_name)\n\nAnyway +1 for step-by-step.","commit_id":"1730f1757d407b1c151ff27971c511dd398ccdc9"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"3098ccfe3c9291a87db9968a7999c5a86dbc09db","unresolved":false,"context_lines":[{"line_number":107,"context_line":"                # TODO(carl) This shouldn\u0027t call back to the L3 agent in the"},{"line_number":108,"context_line":"                # long term.  A future refactor should further encapsulate the"},{"line_number":109,"context_line":"                # details of how to destroy namespaces to decouple this from"},{"line_number":110,"context_line":"                # the L3 agent.  One step at a time."},{"line_number":111,"context_line":"                l3_agent.destroy_namespace(ns)"},{"line_number":112,"context_line":"            except RuntimeError:"},{"line_number":113,"context_line":"                msg \u003d _(\u0027Failed to destroy stale namespace %s\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9aa7fdbe_4d7ea81a","line":110,"in_reply_to":"9aa7fdbe_143f52d7","updated":"2014-10-23 16:43:42.000000000","message":"Feedback is one major reason I want to expose my work step by step as early as I can get it posted.  Thank you for yours.","commit_id":"1730f1757d407b1c151ff27971c511dd398ccdc9"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"ab3374d0a11f7f81ceccf1d6e0afd6d74fb9e88f","unresolved":false,"context_lines":[{"line_number":107,"context_line":"                # TODO(carl) This shouldn\u0027t call back to the L3 agent in the"},{"line_number":108,"context_line":"                # long term.  A future refactor should further encapsulate the"},{"line_number":109,"context_line":"                # details of how to destroy namespaces to decouple this from"},{"line_number":110,"context_line":"                # the L3 agent.  One step at a time."},{"line_number":111,"context_line":"                l3_agent.destroy_namespace(ns)"},{"line_number":112,"context_line":"            except RuntimeError:"},{"line_number":113,"context_line":"                msg \u003d _(\u0027Failed to destroy stale namespace %s\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9aa7fdbe_6e985c6a","line":110,"in_reply_to":"9aa7fdbe_4d7ea81a","updated":"2014-10-28 18:09:21.000000000","message":"I\u0027m thinking that I may have a few types of namespaces with overloaded create and destroy and a common Namespace baseclass to accomplish what you suggest here.\n\nThis would target the code that is in neutron/agent/l3_agent.py:L634-L715 of the old code.\n\nHowever, I don\u0027t have all of the details worked out.  These classes will also work in to my TODO on L83.  I\u0027ll be working on this soon and we can discuss it in Paris.","commit_id":"1730f1757d407b1c151ff27971c511dd398ccdc9"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"505ba9ef16cc1563871b4142d0baaee7b0df6f31","unresolved":false,"context_lines":[{"line_number":110,"context_line":"                # the L3 agent.  One step at a time."},{"line_number":111,"context_line":"                l3_agent.destroy_namespace(ns)"},{"line_number":112,"context_line":"            except RuntimeError:"},{"line_number":113,"context_line":"                msg \u003d _(\u0027Failed to destroy stale namespace %s\u0027)"},{"line_number":114,"context_line":"                LOG.exception(msg, ns)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9aa7fdbe_7d9dd058","line":113,"range":{"start_line":113,"start_character":22,"end_line":113,"end_character":23},"updated":"2014-10-24 02:37:11.000000000","message":"_LE?","commit_id":"1730f1757d407b1c151ff27971c511dd398ccdc9"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"ab3374d0a11f7f81ceccf1d6e0afd6d74fb9e88f","unresolved":false,"context_lines":[{"line_number":110,"context_line":"                # the L3 agent.  One step at a time."},{"line_number":111,"context_line":"                l3_agent.destroy_namespace(ns)"},{"line_number":112,"context_line":"            except RuntimeError:"},{"line_number":113,"context_line":"                msg \u003d _(\u0027Failed to destroy stale namespace %s\u0027)"},{"line_number":114,"context_line":"                LOG.exception(msg, ns)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9aa7fdbe_ce1dc810","line":113,"in_reply_to":"9aa7fdbe_2d6bcd1e","updated":"2014-10-28 18:09:21.000000000","message":"Done and done.  Since I did this using refactoring techniques, this code came somewhere else (neutron/agent/l3_agent.py:L630) and I didn\u0027t notice that removing a few levels of indentation would allow this to be collapsed on to one line.","commit_id":"1730f1757d407b1c151ff27971c511dd398ccdc9"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"25a420d0b698170dff0d0b8b1112f8de6e8e95c8","unresolved":false,"context_lines":[{"line_number":110,"context_line":"                # the L3 agent.  One step at a time."},{"line_number":111,"context_line":"                l3_agent.destroy_namespace(ns)"},{"line_number":112,"context_line":"            except RuntimeError:"},{"line_number":113,"context_line":"                msg \u003d _(\u0027Failed to destroy stale namespace %s\u0027)"},{"line_number":114,"context_line":"                LOG.exception(msg, ns)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9aa7fdbe_2d6bcd1e","line":113,"in_reply_to":"9aa7fdbe_7d9dd058","updated":"2014-10-28 09:25:29.000000000","message":"Also, we don\u0027t really need the \u0027msg\u0027 variable here...","commit_id":"1730f1757d407b1c151ff27971c511dd398ccdc9"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"e8e18aff827bc1fcf32572b905eba6e430eb9ae2","unresolved":false,"context_lines":[{"line_number":16,"context_line":"import contextlib"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from neutron.agent.linux import ip_lib"},{"line_number":19,"context_line":"from neutron.openstack.common.gettextutils import _LE"},{"line_number":20,"context_line":"from neutron.openstack.common import log as logging"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"LOG \u003d logging.getLogger(__name__)"}],"source_content_type":"text/x-python","patch_set":7,"id":"5a890539_4a5f0de5","line":19,"updated":"2014-12-04 18:12:55.000000000","message":"This line is incorrect now.","commit_id":"fc9236e1837838532962a07fe927b3d981aba3e3"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"566624af6b9088dea6eacc024c7b7232886f541a","unresolved":false,"context_lines":[{"line_number":99,"context_line":"        yield ids_to_keep"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"        # TODO(carl) Preserves old behavior of L3 agent where cleaning"},{"line_number":102,"context_line":"        # namespaces was only done once after restart.  Still a good idea?"},{"line_number":103,"context_line":"        if not self._clean_stale:"},{"line_number":104,"context_line":"            return"},{"line_number":105,"context_line":"        self._clean_stale \u003d False"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a890539_1a71aede","line":102,"updated":"2014-12-05 17:17:45.000000000","message":"I wonder as well if this should be run periodically.  Not sure if \u0027device busy\u0027 errors can be ignored in this context.","commit_id":"3a444357ab90d48868b1c8a73a39ac04f0e2ae86"}],"neutron/common/exceptions.py":[{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"505ba9ef16cc1563871b4142d0baaee7b0df6f31","unresolved":false,"context_lines":[{"line_number":342,"context_line":""},{"line_number":343,"context_line":""},{"line_number":344,"context_line":"class AbortSyncRouters(NeutronException):"},{"line_number":345,"context_line":"    message \u003d _(\"Aborting periodic_sync_routers_task due to an error\")"}],"source_content_type":"text/x-python","patch_set":2,"id":"9aa7fdbe_3d334864","line":345,"updated":"2014-10-24 02:37:11.000000000","message":"is there any plan to use this exception out of l3-agent?\notherwise it\u0027s better to define this in the agent.","commit_id":"1730f1757d407b1c151ff27971c511dd398ccdc9"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"3afbabc76f09d986e2f2a32ce08b449c88d5db73","unresolved":false,"context_lines":[{"line_number":342,"context_line":""},{"line_number":343,"context_line":""},{"line_number":344,"context_line":"class AbortSyncRouters(NeutronException):"},{"line_number":345,"context_line":"    message \u003d _(\"Aborting periodic_sync_routers_task due to an error\")"}],"source_content_type":"text/x-python","patch_set":4,"id":"9aa7fdbe_a3db327c","line":345,"updated":"2014-10-29 02:38:12.000000000","message":"is there any plan to use this exception out of l3-agent? otherwise it\u0027s better to define this in the agent.","commit_id":"124cbc86deeaa2b369abe3996ea852136ba07b0d"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"dc09a1e86c215e63889587ecc7a0f2af12c3d5d6","unresolved":false,"context_lines":[{"line_number":342,"context_line":""},{"line_number":343,"context_line":""},{"line_number":344,"context_line":"class AbortSyncRouters(NeutronException):"},{"line_number":345,"context_line":"    message \u003d _(\"Aborting periodic_sync_routers_task due to an error\")"}],"source_content_type":"text/x-python","patch_set":4,"id":"9aa7fdbe_5e45e2b1","line":345,"in_reply_to":"9aa7fdbe_a3db327c","updated":"2014-10-29 19:17:29.000000000","message":"Thanks for reiterating this question.  I did not intend to skip it in PS2.  In fact, I had a response prepared and failed to post it.\n\nThere is no intention to use this outside.  I put it here simply because I put RouterNotCompatibleWithAgent (one above) here too in a past review.  I think we should be consistent with where they live but I\u0027d be okay if you wanted to post a patch to move them in to l3_agent.py.\n\nI had originally defined RouterNotCompatibleWithAgent in l3_agent.py but someone suggested I move it here in one of the patch sets.  Since I didn\u0027t feel strongly about where it should live, and there were no existing exceptions defined in l3_agent.py, I obliged and moved it here.","commit_id":"124cbc86deeaa2b369abe3996ea852136ba07b0d"}],"neutron/tests/unit/agent/linux/test_namespaces.py":[{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"566624af6b9088dea6eacc024c7b7232886f541a","unresolved":false,"context_lines":[{"line_number":76,"context_line":"    def test_track_and_clean_stale(self):"},{"line_number":77,"context_line":"        prev_namespaces \u003d [\u0027qrouter-aoeu\u0027, \u0027snat-aoeu\u0027,"},{"line_number":78,"context_line":"                           \u0027snat-router_id\u0027, \u0027qrouter-router_id\u0027,"},{"line_number":79,"context_line":"                           \u0027qrouter-oldrouter\u0027, \u0027snat-oldrouter\u0027]"},{"line_number":80,"context_line":"        self.manager.list_all \u003d mock.Mock(return_value\u003dprev_namespaces)"},{"line_number":81,"context_line":"        l3_agent \u003d mock.Mock()"},{"line_number":82,"context_line":"        self.assertTrue(self.manager._clean_stale)"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a890539_9d011807","line":79,"updated":"2014-12-05 17:17:45.000000000","message":"How about fip-xxx namespaces?","commit_id":"3a444357ab90d48868b1c8a73a39ac04f0e2ae86"},{"author":{"_account_id":10971,"name":"Michael Smith","email":"michael.smith6@hp.com","username":"mrsmith"},"change_message_id":"142709fc468e38fb8c92342438476f0b668e3535","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        prev_namespaces \u003d [\u0027qrouter-aoeu\u0027, \u0027snat-aoeu\u0027,"},{"line_number":78,"context_line":"                           \u0027snat-router_id\u0027, \u0027qrouter-router_id\u0027,"},{"line_number":79,"context_line":"                           \u0027qrouter-oldrouter\u0027, \u0027snat-oldrouter\u0027]"},{"line_number":80,"context_line":"        self.manager.list_all \u003d mock.Mock(return_value\u003dprev_namespaces)"},{"line_number":81,"context_line":"        l3_agent \u003d mock.Mock()"},{"line_number":82,"context_line":"        self.assertTrue(self.manager._clean_stale)"},{"line_number":83,"context_line":"        with self.manager.track_and_clean_stale(l3_agent) as ids_to_keep:"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a961159_508f61cc","line":80,"updated":"2014-12-09 17:45:52.000000000","message":"re-asking from PS8 - what about fip-xxx namespaces?","commit_id":"71b2d278296ecc8cc599e9378cbad3612aea9c82"},{"author":{"_account_id":9093,"name":"Chuck Carlino","email":"chuckjcarlino@gmail.com","username":"ChuckC"},"change_message_id":"11f963c06210681b3b7165751c79107efe255970","unresolved":false,"context_lines":[{"line_number":28,"context_line":"        self.manager.root_helper \u003d None"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"    def test_get_prefix_and_id(self):"},{"line_number":31,"context_line":"        self.assertEqual(self.manager.get_prefix_and_id(\u0027qrouter-router_id\u0027),"},{"line_number":32,"context_line":"                         (\u0027qrouter-\u0027, \u0027router_id\u0027))"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    def test_get_prefix_and_id_snat(self):"}],"source_content_type":"text/x-python","patch_set":11,"id":"3a961159_e70327b6","line":31,"updated":"2014-12-10 02:09:21.000000000","message":"Here and most of the other assertEqual\u0027s, expected values should come first.","commit_id":"a744264b0fa158ac8f49f0f8dc53e3be8125a3b4"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"5fa51706ea8e34e02f97027181378fb5f07d8c4e","unresolved":false,"context_lines":[{"line_number":28,"context_line":"        self.manager.root_helper \u003d None"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"    def test_get_prefix_and_id(self):"},{"line_number":31,"context_line":"        self.assertEqual(self.manager.get_prefix_and_id(\u0027qrouter-router_id\u0027),"},{"line_number":32,"context_line":"                         (\u0027qrouter-\u0027, \u0027router_id\u0027))"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    def test_get_prefix_and_id_snat(self):"}],"source_content_type":"text/x-python","patch_set":11,"id":"3a961159_ab7625a2","line":31,"in_reply_to":"3a961159_e70327b6","updated":"2014-12-10 23:41:04.000000000","message":"Done","commit_id":"a744264b0fa158ac8f49f0f8dc53e3be8125a3b4"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"cec6725a0500c3af8a35c2a3857fea7388052f93","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        prev_namespaces \u003d [\u0027qrouter-aoeu\u0027, \u0027snat-aoeu\u0027,"},{"line_number":78,"context_line":"                           \u0027snat-router_id\u0027, \u0027qrouter-router_id\u0027,"},{"line_number":79,"context_line":"                           \u0027qrouter-oldrouter\u0027, \u0027snat-oldrouter\u0027]"},{"line_number":80,"context_line":"        self.manager.list_all \u003d mock.Mock(return_value\u003dprev_namespaces)"},{"line_number":81,"context_line":"        l3_agent \u003d mock.Mock()"},{"line_number":82,"context_line":"        self.assertTrue(self.manager._clean_stale)"},{"line_number":83,"context_line":"        with self.manager.track_and_clean_stale(l3_agent) as ids_to_keep:"}],"source_content_type":"text/x-python","patch_set":11,"id":"3a961159_ffb9f915","line":80,"updated":"2014-12-09 19:19:17.000000000","message":"Don\u0027t forget about Michael\u0027s question in PS8.\n\nwhat about fip-xxx namespaces?","commit_id":"a744264b0fa158ac8f49f0f8dc53e3be8125a3b4"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"72a459d6fa37a9272de50640d7b5bc63274df028","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        prev_namespaces \u003d [\u0027qrouter-aoeu\u0027, \u0027snat-aoeu\u0027,"},{"line_number":78,"context_line":"                           \u0027snat-router_id\u0027, \u0027qrouter-router_id\u0027,"},{"line_number":79,"context_line":"                           \u0027qrouter-oldrouter\u0027, \u0027snat-oldrouter\u0027]"},{"line_number":80,"context_line":"        self.manager.list_all \u003d mock.Mock(return_value\u003dprev_namespaces)"},{"line_number":81,"context_line":"        l3_agent \u003d mock.Mock()"},{"line_number":82,"context_line":"        self.assertTrue(self.manager._clean_stale)"},{"line_number":83,"context_line":"        with self.manager.track_and_clean_stale(l3_agent) as ids_to_keep:"}],"source_content_type":"text/x-python","patch_set":11,"id":"3a961159_c551a037","line":80,"in_reply_to":"3a961159_ffb9f915","updated":"2014-12-10 23:04:38.000000000","message":"This patch will not handle the cleanup of fip namespaces at this time.  I\u0027ll handle that later.","commit_id":"a744264b0fa158ac8f49f0f8dc53e3be8125a3b4"}]}
