Public bug reported: Similar kind of bug as described in bug #1246489.
When removing a user from a project, the assignment manager retrieves a list of all roles the user has on the project, then removes each role. Each (user, role, project) tuple is removed with a separate call into the driver. If, before a particular role has been removed, that role is deleted by another request calling into the manager (i.e., via delete_role), the call into the driver by the user removal request will raise a RoleNotFound exception and the request will return an HTTP 404 error. Furthermore, any roles in the list after the exceptional role will not be deleted. Another call to Manager.remove_user_from_project will remove the remaining roles. The 404 can easily be avoided by either putting a "try: except: RoleNotFound .. pass" around the driver.remove_role_from_user_and_project calls. Alternatively, a begin/end transaction interface could be added to the driver. In its simplest form, this interface could be implemented by serializing all transactions with a mutex. The SQL driver could implement the interface with database transactions. ** Affects: keystone Importance: Undecided Status: New -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to Keystone. https://bugs.launchpad.net/bugs/1257390 Title: races in assignment manager can cause spurious 404 when removing user from project Status in OpenStack Identity (Keystone): New Bug description: Similar kind of bug as described in bug #1246489. When removing a user from a project, the assignment manager retrieves a list of all roles the user has on the project, then removes each role. Each (user, role, project) tuple is removed with a separate call into the driver. If, before a particular role has been removed, that role is deleted by another request calling into the manager (i.e., via delete_role), the call into the driver by the user removal request will raise a RoleNotFound exception and the request will return an HTTP 404 error. Furthermore, any roles in the list after the exceptional role will not be deleted. Another call to Manager.remove_user_from_project will remove the remaining roles. The 404 can easily be avoided by either putting a "try: except: RoleNotFound .. pass" around the driver.remove_role_from_user_and_project calls. Alternatively, a begin/end transaction interface could be added to the driver. In its simplest form, this interface could be implemented by serializing all transactions with a mutex. The SQL driver could implement the interface with database transactions. To manage notifications about this bug go to: https://bugs.launchpad.net/keystone/+bug/1257390/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : yahoo-eng-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp