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)
Reviewed: https:/ /review. openstack. org/153656 /git.openstack. org/cgit/ openstack/ keystone/ commit/ ?id=0b1027886ae 6bc29abd86aa8ed e499be5f5fc2ae
Committed: https:/
Submitter: Jenkins
Branch: master
commit 0b1027886ae6bc2 9abd86aa8ede499 be5f5fc2ae
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: Iab95ed8b3913c0 20eafa919231d76 4ba8b780571
Closes-Bug: #1419043