Unclear error when attempting to create duplicate resources with certain names
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Identity (keystone) |
Fix Released
|
Undecided
|
Colleen Murphy |
Bug Description
When a user accidentally tries to create certain resources they have already created, if the name of the resource has 'name' or 'id' in the name, the action fails with a very unclear error message. For example, when creating a federation mapping:
$ openstack mapping create mapping_
+------
| Field | Value |
+------
| id | mapping_
| rules | [{u'remote': [{u'type': u'HTTP_
+------
$ openstack mapping create mapping_
string indices must be integers (HTTP 400) (Request-ID: req-d37fa5f1-
$ openstack mapping create mapping_
+------
| Field | Value |
+------
| id | mapping_
| rules | [{u'remote': [{u'type': u'HTTP_
+------
$ openstack mapping create mapping_
string indices must be integers (HTTP 400) (Request-ID: req-5efee6af-
But the error is clearer if the string does not have a special substring in it:
$ openstack mapping create mapping_
+------
| Field | Value |
+------
| id | mapping_
| rules | [{u'remote': [{u'type': u'HTTP_
+------
$ openstack mapping create mapping_
Conflict occurred attempting to store mapping - Duplicate entry. (HTTP 409) (Request-ID: req-8fa12715-
Similarly for creating a federation protocol with 'id' or 'name' in the the name of the protocol:
$ openstack federation protocol create protocol_
+------
| Field | Value |
+------
| id | protocol_
| identity_provider | google |
| mapping | mapping_
+------
$ openstack federation protocol create protocol_
string indices must be integers (HTTP 400) (Request-ID: req-d0659c94-
Or if the identity provider has 'id' or 'name' in its name:
$ openstack federation protocol create normal_protocol --mapping mapping_
+------
| Field | Value |
+------
| id | normal_protocol |
| identity_provider | sso_service_
| mapping | mapping_
+------
$ openstack federation protocol create normal_protocol --mapping mapping_
string indices must be integers (HTTP 400) (Request-ID: req-ddafd212-
Changed in keystone: | |
milestone: | none → pike-1 |
Fix proposed to branch: master /review. openstack. org/438896
Review: https:/