Comment 9 for bug 1419043

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to keystone (stable/juno)

Reviewed: https://review.openstack.org/153713
Committed: https://git.openstack.org/cgit/openstack/keystone/commit/?id=b84e22be601f9f6fc48a9e10a3fb508c576b1d93
Submitter: Jenkins
Branch: stable/juno

commit b84e22be601f9f6fc48a9e10a3fb508c576b1d93
Author: Matthew Treinish <email address hidden>
Date: Fri Feb 6 13:52:00 2015 -0500

    Fix race on default role creation

    In add_user_to_project() it checks if the default role exists before
    trying to add the role to the user and project. If it doesn't exist it
    will attempt to create the role. However if 2 requests happen at
    roughly the same time the 2 role creations will race causing one to
    fail with a conflict error. This patch addresses this issue by catching
    the conflict exception and treating it as the create succeeded (which it
    did just elsewhere)

    Conflicts:
     keystone/assignment/core.py

    Change-Id: Iab95ed8b3913c020eafa919231d764ba8b780571
    Closes-Bug: #1419043
    (cherry picked from commit 0b1027886ae6bc29abd86aa8ede499be5f5fc2ae)