cliff.app Conflict occurred attempting to store user

Bug #1282724 reported by Joe Gordon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-openstackclient
Invalid
Undecided
Unassigned

Bug Description

2014-02-19 00:50:32.456 | 2014-02-19 00:50:32 ++ grep ' id '
2014-02-19 00:50:32.878 | 2014-02-19 00:50:32 ERROR: cliff.app Conflict occurred attempting to store project. (IntegrityError) duplicate key value violates unique constraint "proj_dom_name_unique"
2014-02-19 00:50:32.917 | 2014-02-19 00:50:32 DETAIL: Key (domain_id, name)=(default, swifttenanttest1) already exists.
2014-02-19 00:50:32.917 | 2014-02-19 00:50:32 'INSERT INTO project (id, name, domain_id, description, enabled, extra) VALUES (%(id)s, %(name)s, %(domain_id)s, %(description)s, %(enabled)s, %(extra)s)' {'description': None, 'extra': '{}', 'enabled': True, 'domain_id': 'default', 'id': 'efd42f27deb5404e81d7eb77b97717de', 'name': u'swifttenanttest1'} (HTTP 409)
2014-02-19 00:50:32.917 | 2014-02-19 00:50:32 + SWIFT_TENANT_TEST1=
2014-02-19 00:50:32.917 | 2014-02-19 00:50:32 + die_if_not_set 559 SWIFT_TENANT_TEST1 'Failure creating SWIFT_TENANT_TEST1'
2014-02-19 00:50:32.918 | 2014-02-19 00:50:32 + local exitcode=0
2014-02-19 00:50:32.918 | 2014-02-19 00:50:32 ++ set +o
2014-02-19 00:50:32.918 | 2014-02-19 00:50:32 ++ grep xtrace
2014-02-19 00:50:32.919 | 2014-02-19 00:50:32 + FXTRACE='set -o xtrace'
2014-02-19 00:50:32.919 | 2014-02-19 00:50:32 + set +o xtrace
2014-02-19 00:50:32.919 | 2014-02-19 00:50:32 [Call Trace]
2014-02-19 00:50:32.955 | 2014-02-19 00:50:32 ./stack.sh:941:create_swift_accounts
2014-02-19 00:50:32.955 | 2014-02-19 00:50:32 /opt/stack/new/devstack/lib/swift:559:die_if_not_set
2014-02-19 00:50:32.956 | 2014-02-19 00:50:32 /opt/stack/new/devstack/functions-common:212:die
2014-02-19 00:50:32.956 | 2014-02-19 00:50:32 [ERROR] /opt/stack/new/devstack/functions-common:559 Failure creating SWIFT_TENANT_TEST1
2014-02-19 00:50:37.430 | Build step 'Execute shell' marked build as failure
2014-02-19 00:50:37.712 | [SCP] Connecting to static.openstack.org

Seen in gate (http://logs.openstack.org/09/68409/9/gate/gate-tempest-dsvm-large-ops/744ff5e/console.html)

logstash query: message:"559 Failure creating SWIFT_TENANT_TEST1" AND filename:"console.html"

It looks like this is related to the switch to python-openstackclient

Revision history for this message
Joe Gordon (jogo) wrote :

note: no keystone logs were collected on this failure

Revision history for this message
Terry Howe (thowe-g) wrote :

I don't see anything in there that looks to me like this is an openstackclient error. If you can reproduce this problem outside of this script, that would help.

Changed in python-openstackclient:
status: New → Incomplete
Revision history for this message
Steve Martinelli (stevemar) wrote :
Download full text (3.2 KiB)

Is there anything that calls create_keystone_accounts twice?

Also, there is a heat related error, not sure if it's related.
http://logs.openstack.org/09/68409/9/gate/gate-tempest-dsvm-large-ops/744ff5e/console.html#_2014-02-19_00_54_54_075

Maybe it failed there, and didn't tear down correctly, I'll have to take a deeper look.

2014-02-19 00:54:54.063 | 2014-02-19 00:54:54 ' /etc/heat/heat.conf
2014-02-19 00:54:54.065 | 2014-02-19 00:54:54 + KS_ENDPOINT_V3=http://127.0.0.1:5000/v3
2014-02-19 00:54:54.067 | 2014-02-19 00:54:54 ++ openstack --os-token --os-url=http://127.0.0.1:5000/v3 --os-identity-api-version=3 domain show heat
2014-02-19 00:54:54.069 | 2014-02-19 00:54:54 ++ get_field 2
2014-02-19 00:54:54.071 | 2014-02-19 00:54:54 ++ grep ' id '
2014-02-19 00:54:54.073 | 2014-02-19 00:54:54 ++ read data
2014-02-19 00:54:54.075 | 2014-02-19 00:54:54 usage: openstack [--version] [-v] [--log-file LOG_FILE] [-q] [--debug]
2014-02-19 00:54:54.077 | 2014-02-19 00:54:54 [--os-auth-url <auth-url>]
2014-02-19 00:54:54.078 | 2014-02-19 00:54:54 [--os-domain-name <auth-domain-name>]
2014-02-19 00:54:54.080 | 2014-02-19 00:54:54 [--os-domain-id <auth-domain-id>]
2014-02-19 00:54:54.082 | 2014-02-19 00:54:54 [--os-project-name <auth-project-name>]
2014-02-19 00:54:54.084 | 2014-02-19 00:54:54 [--os-project-id <auth-project-id>]
2014-02-19 00:54:54.086 | 2014-02-19 00:54:54 [--os-username <auth-username>]
2014-02-19 00:54:54.088 | 2014-02-19 00:54:54 [--os-password <auth-password>]
2014-02-19 00:54:54.089 | 2014-02-19 00:54:54 [--os-user-domain-name <auth-user-domain-name>]
2014-02-19 00:54:54.092 | 2014-02-19 00:54:54 [--os-user-domain-id <auth-user-domain-id>]
2014-02-19 00:54:54.093 | 2014-02-19 00:54:54 [--os-project-domain-name <auth-project-domain-name>]
2014-02-19 00:54:54.096 | 2014-02-19 00:54:54 [--os-project-domain-id <auth-project-domain-id>]
2014-02-19 00:54:54.097 | 2014-02-19 00:54:54 [--os-region-name <auth-region-name>]
2014-02-19 00:54:54.099 | 2014-02-19 00:54:54 [--os-cacert <ca-bundle-file>] [--verify | --insecure]
2014-02-19 00:54:54.100 | 2014-02-19 00:54:54 [--os-default-domain <auth-domain>] [--os-token <token>]
2014-02-19 00:54:54.102 | 2014-02-19 00:54:54 [--os-url <url>] [--os-use-keyring]
2014-02-19 00:54:54.103 | 2014-02-19 00:54:54 [--os-identity-api-version <identity-api-version>]
2014-02-19 00:54:54.105 | 2014-02-19 00:54:54 [--os-volume-api-version <volume-api-version>]
2014-02-19 00:54:54.107 | 2014-02-19 00:54:54 [--os-image-api-version <image-api-version>]
2014-02-19 00:54:54.110 | 2014-02-19 00:54:54 [--os-compute-api-version <compute-api-version>]
2014-02-19 00:54:54.111 | 2014-02-19 00:54:54 [--os-object-api-version <object-api-version>] [-h]
2014-02-19 00:54:54.113 | 2014-02-19 00:54:54 openstack: error: argument --os-token: expected one argument
2014-02-19 00:54:54.115 | 2014-02...

Read more...

Revision history for this message
Terry Howe (thowe-g) wrote :

The logs are gone now, but as I recall the --os-token usage message was just caused by the previous error failing to make the user. Failing to make the user with some sort of "user already exists" message which would lead me to believe that..the user already exists.

Revision history for this message
Joe Gordon (jogo) wrote :
Revision history for this message
Terry Howe (thowe-g) wrote :

This error is caused by a constraint on the database, not an openstackclient issue:

https://github.com/openstack/keystone/blob/master/keystone/common/sql/migrate_repo/versions/016_normalize_domain_ids.py#L373

Looks legit to me.

Changed in python-openstackclient:
status: Incomplete → Invalid
Revision history for this message
Terry Howe (thowe-g) wrote :

Command works for me:

    (.venv)terry@brat:~/hp/python-openstackclient$ openstack project create swifttenanttest1
    +-------------+----------------------------------+
    | Field | Value |
    +-------------+----------------------------------+
    | description | None |
    | enabled | True |
    | id | 6320e1ddd0c448938baaee485d287b31 |
    | name | swifttenanttest1 |
    +-------------+----------------------------------+
    (.venv)terry@brat:~/hp/python-openstackclient$

Joe Gordon (jogo)
no longer affects: devstack
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.