Conflict on isolated credential setup
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Identity (keystone) |
Fix Released
|
Critical
|
Matthew Treinish | ||
Icehouse |
Fix Released
|
Critical
|
Guang Yee | ||
Juno |
Fix Released
|
Critical
|
Guang Yee | ||
tempest |
Invalid
|
Undecided
|
Unassigned |
Bug Description
From the following run (in progress) - http://
2015-02-06 15:50:27.935 | =======
2015-02-06 15:50:27.935 | Failed 1 tests - output below:
2015-02-06 15:50:27.935 | =======
2015-02-06 15:50:27.935 |
2015-02-06 15:50:27.935 | setUpClass (tempest.
2015-02-06 15:50:27.936 | -------
2015-02-06 15:50:27.936 |
2015-02-06 15:50:27.936 | Captured traceback:
2015-02-06 15:50:27.936 | ~~~~~~~~~~~~~~~~~~~
2015-02-06 15:50:27.936 | Traceback (most recent call last):
2015-02-06 15:50:27.936 | File "tempest/test.py", line 273, in setUpClass
2015-02-06 15:50:27.936 | cls.resource_
2015-02-06 15:50:27.936 | File "tempest/
2015-02-06 15:50:27.936 | super(Aggregate
2015-02-06 15:50:27.936 | File "tempest/
2015-02-06 15:50:27.936 | super(BaseCompu
2015-02-06 15:50:27.936 | File "tempest/
2015-02-06 15:50:27.937 | cls.os = cls.get_
2015-02-06 15:50:27.937 | File "tempest/test.py", line 407, in get_client_manager
2015-02-06 15:50:27.937 | creds = cls.isolated_
2015-02-06 15:50:27.937 | File "tempest/
2015-02-06 15:50:27.937 | return self.get_
2015-02-06 15:50:27.937 | File "tempest/
2015-02-06 15:50:27.937 | credentials = self._create_
2015-02-06 15:50:27.937 | File "tempest/
2015-02-06 15:50:27.937 | tenant, email)
2015-02-06 15:50:27.937 | File "tempest/
2015-02-06 15:50:27.937 | username, password, tenant['id'], email)
2015-02-06 15:50:27.937 | File "tempest/
2015-02-06 15:50:27.938 | resp, body = self.post('users', post_body)
2015-02-06 15:50:27.938 | File "/opt/stack/
2015-02-06 15:50:27.938 | return self.request(
2015-02-06 15:50:27.938 | File "tempest/
2015-02-06 15:50:27.938 | raise exceptions.
2015-02-06 15:50:27.938 | Conflict: An object with that identifier already exists
2015-02-06 15:50:27.938 | Details: An object with that identifier already exists
2015-02-06 15:50:27.938 | Details: {u'title': u'Conflict', u'message': u'Conflict occurred attempting to store role - Duplicate Entry', u'code': 409}
2015-02-06 15:50:27.938 |
Some how isolated_credential calls are failing.
It appears that this might be racing on creating identical roles on multiple users - http://
That's about the time of the failure.
Changed in keystone: | |
milestone: | none → kilo-3 |
Changed in keystone: | |
status: | Fix Committed → Fix Released |
Changed in keystone: | |
milestone: | kilo-3 → 2015.1.0 |
It looks like keystone races in setting up default role when creating 2 users simultaneously.
2015-02-06 15:27:17.980468 25961 INFO keystone. assignment. core [-] Creating the default role 9fe2ff9ee4384b1 894a90878d3e92b ab because it does not exist. assignment. core [-] Creating the default role 9fe2ff9ee4384b1 894a90878d3e92b ab because it does not exist. common. sql.core [-] Conflict role: (IntegrityError) (1062, "Duplicate entry '9fe2ff9ee4384b 1894a90878d3e92 bab' for key 'PRIMARY'") 'INSERT INTO role (id, name, extra) VALUES (%s, %s, %s)' ('9fe2ff9ee4384 b1894a90878d3e9 2bab', '_member_', '{}') wrapper /opt/stack/ new/keystone/ keystone/ common/ sql/core. py:399 common. wsgi [-] Conflict occurred attempting to store role - Duplicate Entry
2015-02-06 15:27:17.982766 25959 INFO keystone.
2015-02-06 15:27:17.988287 25959 DEBUG keystone.
2015-02-06 15:27:17.988978 25959 WARNING keystone.
That speaks to a deep race in the keystone allocator that should be fixed.