Comment 5 for bug 1419043

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

Reviewed: https://review.openstack.org/153656
Committed: https://git.openstack.org/cgit/openstack/keystone/commit/?id=0b1027886ae6bc29abd86aa8ede499be5f5fc2ae
Submitter: Jenkins
Branch: master

commit 0b1027886ae6bc29abd86aa8ede499be5f5fc2ae
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)

    Change-Id: Iab95ed8b3913c020eafa919231d764ba8b780571
    Closes-Bug: #1419043