)]}'
{"neutron/agent/dhcp/agent.py":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"dfd109ee64ad888602081fe866d4b40c9be4b89d","unresolved":false,"context_lines":[{"line_number":388,"context_line":"                old_ips \u003d {i[\u0027ip_address\u0027] for i in orig[\u0027fixed_ips\u0027] or []}"},{"line_number":389,"context_line":"                new_ips \u003d {i[\u0027ip_address\u0027] for i in updated_port[\u0027fixed_ips\u0027]}"},{"line_number":390,"context_line":"                old_subs \u003d {i[\u0027subnet_id\u0027] for i in orig[\u0027fixed_ips\u0027] or []}"},{"line_number":391,"context_line":"                new_subs \u003d {i[\u0027subnet_id\u0027] for i in updated_port[\u0027fixed_ips\u0027]}"},{"line_number":392,"context_line":"                if new_subs !\u003d old_subs:"},{"line_number":393,"context_line":"                    # subnets being serviced by port have changed, this could"},{"line_number":394,"context_line":"                    # indicate a subnet_delete is in progress. schedule a"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a8ec9b2_d956a905","line":391,"updated":"2016-09-20 16:48:23.000000000","message":"In the original problem reported in the bug this patch is linked to, the port update didn\u0027t come because of a subnet delete. The port update came from the DHCP agent in response to something else that happened before the subnet delete started. So, the subnets wouldn\u0027t have changed.\n\nI\u0027m just saying that this change doesn\u0027t seem relevant to the problem in the bug unless I\u0027ve misunderstood something. This might be a nice thing to do, but I don\u0027t think it solves the original problem and I\u0027m not sure it will improve subnet delete contention at all.","commit_id":"941a78222e2c13a6ebf275d2e55573178623d231"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"ad917765263cabc031f8d7578845bff18324004f","unresolved":false,"context_lines":[{"line_number":388,"context_line":"                old_ips \u003d {i[\u0027ip_address\u0027] for i in orig[\u0027fixed_ips\u0027] or []}"},{"line_number":389,"context_line":"                new_ips \u003d {i[\u0027ip_address\u0027] for i in updated_port[\u0027fixed_ips\u0027]}"},{"line_number":390,"context_line":"                old_subs \u003d {i[\u0027subnet_id\u0027] for i in orig[\u0027fixed_ips\u0027] or []}"},{"line_number":391,"context_line":"                new_subs \u003d {i[\u0027subnet_id\u0027] for i in updated_port[\u0027fixed_ips\u0027]}"},{"line_number":392,"context_line":"                if new_subs !\u003d old_subs:"},{"line_number":393,"context_line":"                    # subnets being serviced by port have changed, this could"},{"line_number":394,"context_line":"                    # indicate a subnet_delete is in progress. schedule a"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a8ec9b2_54e89010","line":391,"in_reply_to":"7a8ec9b2_3a59355b","updated":"2016-09-20 23:53:56.000000000","message":"@Ihar I think you nailed it on the head. I have tried to address the mistaken deallocation here [1. But, you probably are aware since you\u0027ve reviewed it.\n\nWe might have a multi-faceted problem here that we can tackle from a few different angles [1][2]. I\u0027m not discounting any of them at the moment.\n\n[1] https://review.openstack.org/#/c/372794\n[2] https://review.openstack.org/#/c/373536/","commit_id":"941a78222e2c13a6ebf275d2e55573178623d231"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"e46d26e9b6d4f64bf07f71d5f267e0e1075e1105","unresolved":false,"context_lines":[{"line_number":388,"context_line":"                old_ips \u003d {i[\u0027ip_address\u0027] for i in orig[\u0027fixed_ips\u0027] or []}"},{"line_number":389,"context_line":"                new_ips \u003d {i[\u0027ip_address\u0027] for i in updated_port[\u0027fixed_ips\u0027]}"},{"line_number":390,"context_line":"                old_subs \u003d {i[\u0027subnet_id\u0027] for i in orig[\u0027fixed_ips\u0027] or []}"},{"line_number":391,"context_line":"                new_subs \u003d {i[\u0027subnet_id\u0027] for i in updated_port[\u0027fixed_ips\u0027]}"},{"line_number":392,"context_line":"                if new_subs !\u003d old_subs:"},{"line_number":393,"context_line":"                    # subnets being serviced by port have changed, this could"},{"line_number":394,"context_line":"                    # indicate a subnet_delete is in progress. schedule a"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a8ec9b2_3a59355b","line":391,"in_reply_to":"7a8ec9b2_d956a905","updated":"2016-09-20 20:47:59.000000000","message":"If you would like to see how this reduces contention, put a \u0027time.sleep(2)\u0027 right after the update_port call here: https://github.com/openstack/neutron/blob/827b741e0a6fade20b985989fb57cff2e4252afe/neutron/plugins/ml2/plugin.py#L1168\n\nThen try to delete a subnet with and without this patch in devstack with the DHCP agent running.","commit_id":"941a78222e2c13a6ebf275d2e55573178623d231"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"b80994d50b9c7f2fe7937e7b0e4373aafcd6ea6d","unresolved":false,"context_lines":[{"line_number":388,"context_line":"                old_ips \u003d {i[\u0027ip_address\u0027] for i in orig[\u0027fixed_ips\u0027] or []}"},{"line_number":389,"context_line":"                new_ips \u003d {i[\u0027ip_address\u0027] for i in updated_port[\u0027fixed_ips\u0027]}"},{"line_number":390,"context_line":"                old_subs \u003d {i[\u0027subnet_id\u0027] for i in orig[\u0027fixed_ips\u0027] or []}"},{"line_number":391,"context_line":"                new_subs \u003d {i[\u0027subnet_id\u0027] for i in updated_port[\u0027fixed_ips\u0027]}"},{"line_number":392,"context_line":"                if new_subs !\u003d old_subs:"},{"line_number":393,"context_line":"                    # subnets being serviced by port have changed, this could"},{"line_number":394,"context_line":"                    # indicate a subnet_delete is in progress. schedule a"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a8ec9b2_abfee0ab","line":391,"in_reply_to":"7a8ec9b2_d956a905","updated":"2016-09-20 17:14:07.000000000","message":"The way I see it, one update comes through API, and another one comes from DHCP agent. Since the latter uses just subnet_id for fixed_ips allocation, neutron (mistakenly) requests deallocation for the ip allocation. In the meantime, API request fetches ip allocations before DHCP agent removed the previous allocation, and passes those into IPAM layer. The latter one fails because it now sees the missing allocation among those detected for cleanup.\n\nThe traceback attached to the linked bug belongs to API layer. I hit the bug today for one of my patches, and when I looked through the test that triggered it, and the test tempest output, it was pretty clear that the operation that failed was subnet delete.","commit_id":"941a78222e2c13a6ebf275d2e55573178623d231"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"e48b1b65bc97b49494d2d378629882a20280a2f7","unresolved":false,"context_lines":[{"line_number":391,"context_line":"                new_subs \u003d {i[\u0027subnet_id\u0027] for i in updated_port[\u0027fixed_ips\u0027]}"},{"line_number":392,"context_line":"                if new_subs !\u003d old_subs:"},{"line_number":393,"context_line":"                    # subnets being serviced by port have changed, this could"},{"line_number":394,"context_line":"                    # indicate a subnet_delete is in progress. schedule a"},{"line_number":395,"context_line":"                    # resync rather than an immediate restart so we don\u0027t"},{"line_number":396,"context_line":"                    # attempt to re-allocate IPs at the same time the server"},{"line_number":397,"context_line":"                    # is deleting them."}],"source_content_type":"text/x-python","patch_set":3,"id":"7a8ec9b2_fc3625e6","line":394,"updated":"2016-09-20 01:58:22.000000000","message":"but if it doesn\u0027t, don\u0027t we delay the update for as long as it takes to periodically resync the network? How can we tell with more certainty that the subnet is indeed being deleted?","commit_id":"941a78222e2c13a6ebf275d2e55573178623d231"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"6c6c4d6f70e5f9bf47ce598ea144a8a5a0c43fee","unresolved":false,"context_lines":[{"line_number":391,"context_line":"                new_subs \u003d {i[\u0027subnet_id\u0027] for i in updated_port[\u0027fixed_ips\u0027]}"},{"line_number":392,"context_line":"                if new_subs !\u003d old_subs:"},{"line_number":393,"context_line":"                    # subnets being serviced by port have changed, this could"},{"line_number":394,"context_line":"                    # indicate a subnet_delete is in progress. schedule a"},{"line_number":395,"context_line":"                    # resync rather than an immediate restart so we don\u0027t"},{"line_number":396,"context_line":"                    # attempt to re-allocate IPs at the same time the server"},{"line_number":397,"context_line":"                    # is deleting them."}],"source_content_type":"text/x-python","patch_set":3,"id":"7a8ec9b2_174e4ac1","line":394,"in_reply_to":"7a8ec9b2_fc3625e6","updated":"2016-09-20 03:00:49.000000000","message":"If there is a real subnet update or subnet delete, we will get a real event corresponding to that shortly after.\n\nThis only delays the weird corner case where a user has manually updated their DHCP port to remove it from a subnet, which is a silly change anyway because the agent will just add itself back on the resync.","commit_id":"941a78222e2c13a6ebf275d2e55573178623d231"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"c313fe80502f09abeef7148a079fa80fc51a1a1b","unresolved":false,"context_lines":[{"line_number":396,"context_line":"                    # attempt to re-allocate IPs at the same time the server"},{"line_number":397,"context_line":"                    # is deleting them."},{"line_number":398,"context_line":"                    self.schedule_resync(\"Agent port was modified\","},{"line_number":399,"context_line":"                                         updated_port.network_id)"},{"line_number":400,"context_line":"                elif old_ips !\u003d new_ips:"},{"line_number":401,"context_line":"                    LOG.debug(\"Agent IPs on network %s changed from %s to %s\","},{"line_number":402,"context_line":"                              network.id, old_ips, new_ips)"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a8ec9b2_0b8b651f","line":399,"updated":"2016-09-20 13:09:27.000000000","message":"shouldn\u0027t we skip line 405 here because the agent will resync the port and trigger the dnsmasq restart when it\u0027s done anyway?","commit_id":"941a78222e2c13a6ebf275d2e55573178623d231"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"e46d26e9b6d4f64bf07f71d5f267e0e1075e1105","unresolved":false,"context_lines":[{"line_number":396,"context_line":"                    # attempt to re-allocate IPs at the same time the server"},{"line_number":397,"context_line":"                    # is deleting them."},{"line_number":398,"context_line":"                    self.schedule_resync(\"Agent port was modified\","},{"line_number":399,"context_line":"                                         updated_port.network_id)"},{"line_number":400,"context_line":"                elif old_ips !\u003d new_ips:"},{"line_number":401,"context_line":"                    LOG.debug(\"Agent IPs on network %s changed from %s to %s\","},{"line_number":402,"context_line":"                              network.id, old_ips, new_ips)"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a8ec9b2_dd7f6b64","line":399,"in_reply_to":"7a8ec9b2_0b8b651f","updated":"2016-09-20 20:47:59.000000000","message":"sure, i suppose it\u0027s a waste of a SIGHUP","commit_id":"941a78222e2c13a6ebf275d2e55573178623d231"}]}
