)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"20e3192079bfaef088a511ba22e43e7d58a154a5","unresolved":false,"context_lines":[{"line_number":9,"context_line":"When creating a subnet with flag dhcpv6-stateless, both the server and"},{"line_number":10,"context_line":"the DHCP linux driver attempt to assign an ip address to the DHCP port."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"This patchset removes the server attempts to assign an address to the"},{"line_number":13,"context_line":"DHCP port. That should be handled by the agent."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: If1eb4046865f43b15ba97c52e2d0b9343dc72c19"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"df140735_c795e188","line":12,"updated":"2017-06-02 19:37:15.000000000","message":"is solution working for agentless dhcp drivers?","commit_id":"bda37c173ef2f6c8b8dff4d27873ad09d60f1938"}],"neutron/db/ipam_pluggable_backend.py":[{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"cb78140a747f8449e07c32f52b288a0072ffef11","unresolved":false,"context_lines":[{"line_number":476,"context_line":"                LOG.debug(\"Requesting with IP request: %s port: %s ip: %s \""},{"line_number":477,"context_line":"                          \"for subnet %s and ipam_subnet %s\", ip_request,"},{"line_number":478,"context_line":"                          port, ip, subnet, ipam_subnet)"},{"line_number":479,"context_line":"                ip_address \u003d ipam_subnet.allocate(ip_request)"},{"line_number":480,"context_line":"                allocated \u003d models_v2.IPAllocation(network_id\u003dnetwork_id,"},{"line_number":481,"context_line":"                                                   port_id\u003dport[\u0027id\u0027],"},{"line_number":482,"context_line":"                                                   ip_address\u003dip_address,"},{"line_number":483,"context_line":"                                                   subnet_id\u003dsubnet[\u0027id\u0027])"},{"line_number":484,"context_line":"                try:"},{"line_number":485,"context_line":"                    # Do the insertion of each IP allocation entry within"},{"line_number":486,"context_line":"                    # the context of a nested transaction, so that the entry"}],"source_content_type":"text/x-python","patch_set":1,"id":"df140735_267188aa","line":483,"range":{"start_line":479,"start_character":0,"end_line":483,"end_character":74},"updated":"2017-05-31 22:08:48.000000000","message":"The question is still open as to why both this method and the create dhcp port request are able to allocate the same ip address. This method is executed by https://github.com/openstack/neutron/blob/master/neutron/db/db_base_plugin_v2.py#L662, as part of a subnet create post-commit. So we are not in a writer DB context, while the DHCP port create is. Should we move these lines under L489 below? This would prevent other potential instances of the \"IP address already allocated\" exception that are not related to subnet creations or dhcp port creations / updates. So far, all the instances I have analyzed in Kibana of bug https://bugs.launchpad.net/neutron/+bug/1655567 involve a subnet creation racing with a dhcp port create / update","commit_id":"4ef796509116d0bf979e038d2ba0ed3de41cad47"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"695fe3e671a25d09d88fb1756b76655c2f59c582","unresolved":false,"context_lines":[{"line_number":476,"context_line":"                LOG.debug(\"Requesting with IP request: %s port: %s ip: %s \""},{"line_number":477,"context_line":"                          \"for subnet %s and ipam_subnet %s\", ip_request,"},{"line_number":478,"context_line":"                          port, ip, subnet, ipam_subnet)"},{"line_number":479,"context_line":"                ip_address \u003d ipam_subnet.allocate(ip_request)"},{"line_number":480,"context_line":"                allocated \u003d models_v2.IPAllocation(network_id\u003dnetwork_id,"},{"line_number":481,"context_line":"                                                   port_id\u003dport[\u0027id\u0027],"},{"line_number":482,"context_line":"                                                   ip_address\u003dip_address,"},{"line_number":483,"context_line":"                                                   subnet_id\u003dsubnet[\u0027id\u0027])"},{"line_number":484,"context_line":"                try:"},{"line_number":485,"context_line":"                    # Do the insertion of each IP allocation entry within"},{"line_number":486,"context_line":"                    # the context of a nested transaction, so that the entry"}],"source_content_type":"text/x-python","patch_set":3,"id":"df140735_b21ff659","line":483,"range":{"start_line":479,"start_character":0,"end_line":483,"end_character":74},"updated":"2017-06-01 19:24:05.000000000","message":"The question is still open as to why both this method and the create dhcp port request are able to allocate the same ip address. This method is executed by https://github.com/openstack/neutron/blob/master/neutron/db/db_base_plugin_v2.py#L662, as part of a subnet create post-commit. So we are not in a writer DB context, while the DHCP port create is. Should we move these lines under L489 below? This would prevent other potential instances of the \"IP address already allocated\" exception that are not related to this race between subnet creations and dhcp port creations / updates. So far, all the instances I have analyzed in Kibana of bug https://bugs.launchpad.net/neutron/+bug/1655567 involve a subnet creation racing with a dhcp port create / update","commit_id":"bda37c173ef2f6c8b8dff4d27873ad09d60f1938"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"e63e5b2221282f2711da2ba88ec4e2c64f5324b2","unresolved":false,"context_lines":[{"line_number":476,"context_line":"                LOG.debug(\"Requesting with IP request: %s port: %s ip: %s \""},{"line_number":477,"context_line":"                          \"for subnet %s and ipam_subnet %s\", ip_request,"},{"line_number":478,"context_line":"                          port, ip, subnet, ipam_subnet)"},{"line_number":479,"context_line":"                ip_address \u003d ipam_subnet.allocate(ip_request)"},{"line_number":480,"context_line":"                allocated \u003d models_v2.IPAllocation(network_id\u003dnetwork_id,"},{"line_number":481,"context_line":"                                                   port_id\u003dport[\u0027id\u0027],"},{"line_number":482,"context_line":"                                                   ip_address\u003dip_address,"},{"line_number":483,"context_line":"                                                   subnet_id\u003dsubnet[\u0027id\u0027])"},{"line_number":484,"context_line":"                try:"},{"line_number":485,"context_line":"                    # Do the insertion of each IP allocation entry within"},{"line_number":486,"context_line":"                    # the context of a nested transaction, so that the entry"}],"source_content_type":"text/x-python","patch_set":3,"id":"df140735_4559d68b","line":483,"range":{"start_line":479,"start_character":0,"end_line":483,"end_character":74},"in_reply_to":"df140735_b21ff659","updated":"2017-06-02 13:55:32.000000000","message":"That is a good question.  It does seem as though the allocation should be using the write context.","commit_id":"bda37c173ef2f6c8b8dff4d27873ad09d60f1938"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"2a24fe66c4bb6b1f09268651e4e5a87f9d7c1856","unresolved":false,"context_lines":[{"line_number":499,"context_line":"                        LOG.debug(\"Reverting IP allocation failed for %s\","},{"line_number":500,"context_line":"                                  ip_address)"},{"line_number":501,"context_line":"                except ipam_exc.IpAddressAlreadyAllocated:"},{"line_number":502,"context_line":"                    if port[\u0027device_owner\u0027] !\u003d constants.DEVICE_OWNER_DHCP:"},{"line_number":503,"context_line":"                        raise"},{"line_number":504,"context_line":"                    LOG.debug(\"Port %s is a DHCP port that got its IPv6 \""},{"line_number":505,"context_line":"                              \"auto-address in a create or update DHCP port \""}],"source_content_type":"text/x-python","patch_set":4,"id":"7f231b9d_bc3c10e1","line":502,"updated":"2017-06-17 07:58:35.000000000","message":"Does DHCP even need to be special-cased here? It seems like this race could exist with any concurrent port update request and we should be able to safely ignore it and continue.","commit_id":"4cada894c4b9e54aca7439d2e786c8acc9836956"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"beef6d083c657498080596e2f53e6464ad78245f","unresolved":false,"context_lines":[{"line_number":499,"context_line":"                        LOG.debug(\"Reverting IP allocation failed for %s\","},{"line_number":500,"context_line":"                                  ip_address)"},{"line_number":501,"context_line":"                except ipam_exc.IpAddressAlreadyAllocated:"},{"line_number":502,"context_line":"                    if port[\u0027device_owner\u0027] !\u003d constants.DEVICE_OWNER_DHCP:"},{"line_number":503,"context_line":"                        raise"},{"line_number":504,"context_line":"                    LOG.debug(\"Port %s is a DHCP port that got its IPv6 \""},{"line_number":505,"context_line":"                              \"auto-address in a create or update DHCP port \""}],"source_content_type":"text/x-python","patch_set":4,"id":"7f231b9d_bc8f4974","line":502,"in_reply_to":"7f231b9d_bc3c10e1","updated":"2017-06-19 19:00:52.000000000","message":"You are correct. It can happen with any port create or update request that is initiated immediately after the subnet create request. I have only found the DHCP variety in my analysis of gate failures. That is why I special-cased it. But in theory, in can happen with any port","commit_id":"4cada894c4b9e54aca7439d2e786c8acc9836956"}]}
