)]}'
{"neutron/agent/dhcp/agent.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"aaa9ca38365e40e69ca4235d764581f19e91c915","unresolved":false,"context_lines":[{"line_number":406,"context_line":"            port_id \u003d payload[\u0027port_id\u0027]"},{"line_number":407,"context_line":"            port \u003d self.cache.get_port_by_id(port_id)"},{"line_number":408,"context_line":"            return port.network_id if port else None"},{"line_number":409,"context_line":"        return None"},{"line_number":410,"context_line":""},{"line_number":411,"context_line":"    @_wait_if_syncing"},{"line_number":412,"context_line":"    def subnet_delete_end(self, context, payload):"}],"source_content_type":"text/x-python","patch_set":1,"id":"df87a7cf_9108f128","line":409,"updated":"2017-12-03 08:37:25.000000000","message":"by default the method returns None. You do not need to specifically return None","commit_id":"224ed76b33ad32f1c0a5fb2333d37c8a3db57b01"},{"author":{"_account_id":25437,"name":"Allain Legacy","email":"alegacy@redhat.com","username":"alegacy"},"change_message_id":"c8dd56f984f3db14086fbf195e8251c7d57e8968","unresolved":false,"context_lines":[{"line_number":406,"context_line":"            port_id \u003d payload[\u0027port_id\u0027]"},{"line_number":407,"context_line":"            port \u003d self.cache.get_port_by_id(port_id)"},{"line_number":408,"context_line":"            return port.network_id if port else None"},{"line_number":409,"context_line":"        return None"},{"line_number":410,"context_line":""},{"line_number":411,"context_line":"    @_wait_if_syncing"},{"line_number":412,"context_line":"    def subnet_delete_end(self, context, payload):"}],"source_content_type":"text/x-python","patch_set":1,"id":"df87a7cf_a5b59433","line":409,"in_reply_to":"df87a7cf_9108f128","updated":"2017-12-04 17:45:46.000000000","message":"removed. thanks.","commit_id":"224ed76b33ad32f1c0a5fb2333d37c8a3db57b01"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"c4beb897bc891685fea4e1cfdb94126fa75bcb88","unresolved":false,"context_lines":[{"line_number":411,"context_line":"    def subnet_delete_end(self, context, payload):"},{"line_number":412,"context_line":"        \"\"\"Handle the subnet.delete.end notification event.\"\"\""},{"line_number":413,"context_line":"        subnet_id \u003d payload[\u0027subnet_id\u0027]"},{"line_number":414,"context_line":"        with _net_lock(self._get_network_lock_id(payload)):"},{"line_number":415,"context_line":"            network \u003d self.cache.get_network_by_subnet_id(subnet_id)"},{"line_number":416,"context_line":"            if not network:"},{"line_number":417,"context_line":"                return"}],"source_content_type":"text/x-python","patch_set":2,"id":"df87a7cf_65c73e98","line":414,"updated":"2017-12-07 05:06:45.000000000","message":"This looks wrong.  _get_network_lock_id() could return None, in which case _net_lock() will still acquire a lock, but one without an ID on the end.  I\u0027m assuming that\u0027s why the old code used to return in that case?","commit_id":"99b73ec3b721fdf5a36bf4182aa640a13f671722"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"e81715e1121ba2463b03810d0c3bd5f1d72cb8c9","unresolved":false,"context_lines":[{"line_number":411,"context_line":"    def subnet_delete_end(self, context, payload):"},{"line_number":412,"context_line":"        \"\"\"Handle the subnet.delete.end notification event.\"\"\""},{"line_number":413,"context_line":"        subnet_id \u003d payload[\u0027subnet_id\u0027]"},{"line_number":414,"context_line":"        with _net_lock(self._get_network_lock_id(payload)):"},{"line_number":415,"context_line":"            network \u003d self.cache.get_network_by_subnet_id(subnet_id)"},{"line_number":416,"context_line":"            if not network:"},{"line_number":417,"context_line":"                return"}],"source_content_type":"text/x-python","patch_set":2,"id":"df87a7cf_76d35a61","line":414,"in_reply_to":"df87a7cf_64a65756","updated":"2017-12-08 03:38:37.000000000","message":"Well I\u0027d rather do it right, plus if you do it like this:\n\nnetwork_id \u003d self._get_network_lock_id(payload)\nif not network_id:\n    return\nwith _net_lock(network_id):\n\nthen it\u0027s pretty close to what L378-9 is.","commit_id":"99b73ec3b721fdf5a36bf4182aa640a13f671722"},{"author":{"_account_id":25437,"name":"Allain Legacy","email":"alegacy@redhat.com","username":"alegacy"},"change_message_id":"6a7ebb31c1a1ceffca4e1232eb648001723bd2d3","unresolved":false,"context_lines":[{"line_number":411,"context_line":"    def subnet_delete_end(self, context, payload):"},{"line_number":412,"context_line":"        \"\"\"Handle the subnet.delete.end notification event.\"\"\""},{"line_number":413,"context_line":"        subnet_id \u003d payload[\u0027subnet_id\u0027]"},{"line_number":414,"context_line":"        with _net_lock(self._get_network_lock_id(payload)):"},{"line_number":415,"context_line":"            network \u003d self.cache.get_network_by_subnet_id(subnet_id)"},{"line_number":416,"context_line":"            if not network:"},{"line_number":417,"context_line":"                return"}],"source_content_type":"text/x-python","patch_set":2,"id":"df87a7cf_64a65756","line":414,"in_reply_to":"df87a7cf_65c73e98","updated":"2017-12-07 13:48:00.000000000","message":"Is that really a problem?  A lock will still be acquired; albeit, with a generic name (i.e., dhcp-agent-network-lock-None) and then the subsequent code will return if it cannot proceed if it cannot find the related network.   Given that case should only happen in rare occasion and this code is only temporary (i.e., as per my comment it can be removed when the server is guaranteed to provide the \u0027network_id\u0027) I don\u0027t see this as a problem.","commit_id":"99b73ec3b721fdf5a36bf4182aa640a13f671722"},{"author":{"_account_id":25437,"name":"Allain Legacy","email":"alegacy@redhat.com","username":"alegacy"},"change_message_id":"c3387f6e1c59553811bda8cfb8b8838310abb0c3","unresolved":false,"context_lines":[{"line_number":411,"context_line":"    def subnet_delete_end(self, context, payload):"},{"line_number":412,"context_line":"        \"\"\"Handle the subnet.delete.end notification event.\"\"\""},{"line_number":413,"context_line":"        subnet_id \u003d payload[\u0027subnet_id\u0027]"},{"line_number":414,"context_line":"        with _net_lock(self._get_network_lock_id(payload)):"},{"line_number":415,"context_line":"            network \u003d self.cache.get_network_by_subnet_id(subnet_id)"},{"line_number":416,"context_line":"            if not network:"},{"line_number":417,"context_line":"                return"}],"source_content_type":"text/x-python","patch_set":2,"id":"df87a7cf_e0a6890f","line":414,"in_reply_to":"df87a7cf_76d35a61","updated":"2017-12-11 13:53:26.000000000","message":"Updated.","commit_id":"99b73ec3b721fdf5a36bf4182aa640a13f671722"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"83d6e3753c20229c7f867dd3179c5acea0f4ceec","unresolved":false,"context_lines":[{"line_number":393,"context_line":"        \"\"\"Determine which lock to hold when servicing an RPC event\"\"\""},{"line_number":394,"context_line":"        # TODO(alegacy): in a future release this function can be removed and"},{"line_number":395,"context_line":"        # uses of it can be replaced with payload[\u0027network_id\u0027].  It exists"},{"line_number":396,"context_line":"        # only to satisfy backwards compatibility between older servers and"},{"line_number":397,"context_line":"        # newer agents.  Once the \u0027network_id\u0027 attribute is guaranteed to be"},{"line_number":398,"context_line":"        # sent by the server on all *_delete_end events then it can be removed."},{"line_number":399,"context_line":"        if \u0027network_id\u0027 in payload:"}],"source_content_type":"text/x-python","patch_set":6,"id":"5f7c97a3_348deed2","line":396,"updated":"2018-05-10 09:55:16.000000000","message":"I\u0027m fine with it but I\u0027m not sure if such order of upgrades is supported at all. I always though that server should be upgraded first and it should be able to run with older agents. Otherwise there can be much more mess than this lock only as newer agents can ask for OVO objects which are not supported by server for example :)\n\nMaybe we could get rid of this function and just write proper release note about that? (just thinking)","commit_id":"fa78b580105111b1238e5b18d415b08e8fb35d97"}],"neutron/api/rpc/agentnotifiers/dhcp_rpc_agent_api.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"bef7cc20cadcf064a9ca8fdc363a546eedf970b4","unresolved":false,"context_lines":[{"line_number":293,"context_line":"        if method_name.endswith(\"_delete_end\"):"},{"line_number":294,"context_line":"            if \u0027id\u0027 in obj_value:"},{"line_number":295,"context_line":"                self._notify_agents(context, method_name,"},{"line_number":296,"context_line":"                                    {obj_type + \u0027_id\u0027: obj_value[\u0027id\u0027],"},{"line_number":297,"context_line":"                                     \u0027network_id\u0027: network_id},"},{"line_number":298,"context_line":"                                    network_id)"},{"line_number":299,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":4,"id":"df7087c5_4bc42e40","line":296,"updated":"2018-03-15 14:41:56.000000000","message":"should you be doing this in the case of an object type of \u0027network\u0027? that is done in the line above","commit_id":"a73eb0f8a855e074c1e2055562ae1e18ddff18ce"},{"author":{"_account_id":25437,"name":"Allain Legacy","email":"alegacy@redhat.com","username":"alegacy"},"change_message_id":"5794e206ee20e743d543dd5aae592e6cb2947da1","unresolved":false,"context_lines":[{"line_number":293,"context_line":"        if method_name.endswith(\"_delete_end\"):"},{"line_number":294,"context_line":"            if \u0027id\u0027 in obj_value:"},{"line_number":295,"context_line":"                self._notify_agents(context, method_name,"},{"line_number":296,"context_line":"                                    {obj_type + \u0027_id\u0027: obj_value[\u0027id\u0027],"},{"line_number":297,"context_line":"                                     \u0027network_id\u0027: network_id},"},{"line_number":298,"context_line":"                                    network_id)"},{"line_number":299,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":4,"id":"df7087c5_6b8c92d6","line":296,"in_reply_to":"df7087c5_4bc42e40","updated":"2018-03-15 14:49:45.000000000","message":"I can restructure it to only add it if \"network_id\" is not already part of the payload.","commit_id":"a73eb0f8a855e074c1e2055562ae1e18ddff18ce"}]}
