)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"28f0c6ffb450bdf32b643a780ba4bbd25b4f3ca1","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"The code that validated that the subnet had one free IP address was"},{"line_number":14,"context_line":"removed. This would not guarantee that a port would indeed be free,"},{"line_number":15,"context_line":"that is, a parallel operation could have created a port on the subnet"},{"line_number":16,"context_line":"during this check."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Closes-bug: #1514810"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"ba8a016a_d946b94e","line":15,"updated":"2015-11-23 22:20:27.000000000","message":"so in other words, bug 1443798 can still occur under some tricky circumstances? The original patch was merged in rush to meet RC2, we knew it wasn\u0027t super-polished.","commit_id":"8d8444aa0ce0e6db1ebbc922311ec1eef546f2fe"}],"neutron/db/ipam_pluggable_backend.py":[{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"a513298e1600b437ac47c2d6bb9125d88348756c","unresolved":false,"context_lines":[{"line_number":155,"context_line":"        ip_request \u003d factory.get_request(context, None, {})"},{"line_number":156,"context_line":"        ipam_subnet \u003d ipam_driver.get_subnet(subnet[\u0027id\u0027])"},{"line_number":157,"context_line":"        try:"},{"line_number":158,"context_line":"            ip_address \u003d ipam_subnet.allocate(ip_request)"},{"line_number":159,"context_line":"        except Exception:"},{"line_number":160,"context_line":"            raise n_exc.IpAddressGenerationFailure(net_id\u003dsubnet[\u0027network_id\u0027])"},{"line_number":161,"context_line":"        # Free the address"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba8a016a_7e3de1db","line":158,"updated":"2015-11-19 11:55:11.000000000","message":"In case of 3rd party driver this check may costs 2 additional API calls to external system (for allocate/deallocate).\n0c1f96ad5a6606c1205bd50ea944c3a383892cde introduced this check to fail early if there is no free addresses left.\nSo I am curious if it would be cheaper to skip this check for the pluggable ipam and fail later when the real ip allocation fails.\nHowever I am not sure if skipping this check here and failing later looks the same for user.","commit_id":"090c87052be2eadf27844b9ed4cbf2b33b86c2fb"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"6785124e449abcca8d45924fd0630d9227707889","unresolved":false,"context_lines":[{"line_number":155,"context_line":"        ip_request \u003d factory.get_request(context, None, {})"},{"line_number":156,"context_line":"        ipam_subnet \u003d ipam_driver.get_subnet(subnet[\u0027id\u0027])"},{"line_number":157,"context_line":"        try:"},{"line_number":158,"context_line":"            ip_address \u003d ipam_subnet.allocate(ip_request)"},{"line_number":159,"context_line":"        except Exception:"},{"line_number":160,"context_line":"            raise n_exc.IpAddressGenerationFailure(net_id\u003dsubnet[\u0027network_id\u0027])"},{"line_number":161,"context_line":"        # Free the address"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba8a016a_b23a9897","line":158,"in_reply_to":"ba8a016a_7e3de1db","updated":"2015-11-19 12:41:18.000000000","message":"thanks! when i was writing the code i was always in two minds, the first was to keep the existing functionality, which is inherently broken or to drop the check:\n                if cur_subnet:\n                    range_qry \u003d context.session.query(models_v2.\n                        IPAvailabilityRange).join(models_v2.IPAllocationPool)\n                    ip_range \u003d range_qry.filter_by(subnet_id\u003ds[\u0027id\u0027]).first()\n                    if not ip_range:\n                        raise n_exc.IpAddressGenerationFailure(\n                            net_id\u003dcur_subnet.network_id)\nI should have dropped the check. I will do this in the next patch and update the commit message explaining why.\n\na different thread could be creating a port so the check is effectively useless.","commit_id":"090c87052be2eadf27844b9ed4cbf2b33b86c2fb"}]}
