)]}'
{"nova/db/sqlalchemy/api.py":[{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"9aa028581bcb83931a21f3e8acf34fcd78d0deeb","unresolved":false,"context_lines":[{"line_number":895,"context_line":"    session \u003d get_session()"},{"line_number":896,"context_line":""},{"line_number":897,"context_line":"    with session.begin():"},{"line_number":898,"context_line":"        floating_ip_ref \u003d model_query(context, models.FloatingIp,"},{"line_number":899,"context_line":"                                      session\u003dsession).\\"},{"line_number":900,"context_line":"                          filter_by(address\u003daddress).\\"},{"line_number":901,"context_line":"                          filter(models.FloatingIp.project_id !\u003d None).\\"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAW3%2F%2FfNg%3D","line":898,"updated":"2014-04-14 09:27:29.000000000","message":"A read with no locking.","commit_id":"23ce4cd8e03b53d06ba64170c7b7c4ec07609470"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"9aa028581bcb83931a21f3e8acf34fcd78d0deeb","unresolved":false,"context_lines":[{"line_number":902,"context_line":"                          first()"},{"line_number":903,"context_line":""},{"line_number":904,"context_line":"        if floating_ip_ref:"},{"line_number":905,"context_line":"            floating_ip_ref.update({\u0027project_id\u0027: None,"},{"line_number":906,"context_line":"                                    \u0027host\u0027: None,"},{"line_number":907,"context_line":"                                    \u0027auto_assigned\u0027: False})"},{"line_number":908,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAW3%2F%2FfNc%3D","line":905,"updated":"2014-04-14 09:27:29.000000000","message":"A dependent write.\n\nThis is still a race.","commit_id":"23ce4cd8e03b53d06ba64170c7b7c4ec07609470"}],"nova/network/floating_ips.py":[{"author":{"_account_id":5292,"name":"Christopher Yeoh","email":"cbkyeoh@gmail.com","username":"cyeoh-0"},"change_message_id":"ba515aea8a58498bb3e77a4821f8e9aea8763b32","unresolved":false,"context_lines":[{"line_number":286,"context_line":""},{"line_number":287,"context_line":"        floating_ip_ref \u003d floating_ip_obj.FloatingIP.deallocate(context,"},{"line_number":288,"context_line":"                                                                address)"},{"line_number":289,"context_line":"        # (bug1268569) Enter race condition here"},{"line_number":290,"context_line":"        if floating_ip_ref is None:"},{"line_number":291,"context_line":"            if reservations:"},{"line_number":292,"context_line":"                QUOTAS.rollback(context, reservations, project_id\u003dproject_id)"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAW3%2F%2F%2BvU%3D","line":289,"updated":"2014-04-09 04:28:16.000000000","message":"So I think you should expand on the comment her rather than just reference a bug report. Something along the lines of:\n\n# floating_ip_ref will be None if concurrently another API call has also deallocated the same floating ip","commit_id":"c67f3b3e75ea834d997cee8b4d6b9b9556066570"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"d6359814c67675b7d81388452e9c5cfe50a5de12","unresolved":false,"context_lines":[{"line_number":286,"context_line":""},{"line_number":287,"context_line":"        floating_ip_ref \u003d floating_ip_obj.FloatingIP.deallocate(context,"},{"line_number":288,"context_line":"                                                                address)"},{"line_number":289,"context_line":"        # (bug1268569) Enter race condition here"},{"line_number":290,"context_line":"        if floating_ip_ref is None:"},{"line_number":291,"context_line":"            if reservations:"},{"line_number":292,"context_line":"                QUOTAS.rollback(context, reservations, project_id\u003dproject_id)"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAW3%2F%2F%2Bs0%3D","line":289,"in_reply_to":"AAAAW3%2F%2F%2BvU%3D","updated":"2014-04-09 04:42:20.000000000","message":"Done","commit_id":"c67f3b3e75ea834d997cee8b4d6b9b9556066570"},{"author":{"_account_id":5292,"name":"Christopher Yeoh","email":"cbkyeoh@gmail.com","username":"cyeoh-0"},"change_message_id":"ba515aea8a58498bb3e77a4821f8e9aea8763b32","unresolved":false,"context_lines":[{"line_number":290,"context_line":"        if floating_ip_ref is None:"},{"line_number":291,"context_line":"            if reservations:"},{"line_number":292,"context_line":"                QUOTAS.rollback(context, reservations, project_id\u003dproject_id)"},{"line_number":293,"context_line":"            LOG.debug(_(\"Failed to deallocate floating ip: %s\") % address)"},{"line_number":294,"context_line":"        else:"},{"line_number":295,"context_line":"            # Commit the reservations"},{"line_number":296,"context_line":"            if reservations:"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAW3%2F%2F%2BvQ%3D","line":293,"updated":"2014-04-09 04:28:16.000000000","message":"So I think we should raise an exception here so the deallocation fails along the same lines if they attempted to deallocate a floating ip that was already deallocated. It would be better than just silently succeeding and they would have no indication that its likely their app is misbehaving","commit_id":"c67f3b3e75ea834d997cee8b4d6b9b9556066570"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"d6359814c67675b7d81388452e9c5cfe50a5de12","unresolved":false,"context_lines":[{"line_number":290,"context_line":"        if floating_ip_ref is None:"},{"line_number":291,"context_line":"            if reservations:"},{"line_number":292,"context_line":"                QUOTAS.rollback(context, reservations, project_id\u003dproject_id)"},{"line_number":293,"context_line":"            LOG.debug(_(\"Failed to deallocate floating ip: %s\") % address)"},{"line_number":294,"context_line":"        else:"},{"line_number":295,"context_line":"            # Commit the reservations"},{"line_number":296,"context_line":"            if reservations:"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAW3%2F%2F%2Bss%3D","line":293,"in_reply_to":"AAAAW3%2F%2F%2BvQ%3D","updated":"2014-04-09 04:42:20.000000000","message":"Done, thanks","commit_id":"c67f3b3e75ea834d997cee8b4d6b9b9556066570"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"9aa028581bcb83931a21f3e8acf34fcd78d0deeb","unresolved":false,"context_lines":[{"line_number":288,"context_line":"                                                                address)"},{"line_number":289,"context_line":"        # floating_ip_ref will be None if concurrently another"},{"line_number":290,"context_line":"        # API call has also deallocated the same floating ip"},{"line_number":291,"context_line":"        if floating_ip_ref is None:"},{"line_number":292,"context_line":"            if reservations:"},{"line_number":293,"context_line":"                QUOTAS.rollback(context, reservations, project_id\u003dproject_id)"},{"line_number":294,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAW3%2F%2FfNI%3D","line":291,"updated":"2014-04-14 09:27:29.000000000","message":"Only if the update happened on the same Nova instance, and it still races.","commit_id":"23ce4cd8e03b53d06ba64170c7b7c4ec07609470"}]}
