User column restraints does not equal Keystone for user ID

Bug #1655207 reported by Joshua Slater
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
senlin
Fix Released
High
Qiming Teng

Bug Description

Ran into the following error while attempting to run the senlin build-info command after just deploying the service.

2017-01-10 01:30:52.687 25341 ERROR oslo_messaging.rpc.server DBDataError: (_mysql_exceptions.DataError) (1406, "Data too long for column 'user' at row 1") [SQL: u'INSERT INTO credential (user, project, cred, data) VALUES (%s, %s, %s, %s)'] [parameters: ('605a9128919a3a5cbd3fbbf58f86affc1b7e66c17652880988ebc22f
e9224a27', '9464996ed59b437ba4de558aa23cac04', '{"openstack": {"trust": "a6728b430cd842b4af5e7c7b4517345d"}}', 'null')]

We suspect that it was caused by the user column being set to varchar(32) while the user_id column in keystone is set to varchar(64).

Senlin definition: https://github.com/openstack/senlin/blob/master/senlin/db/sqlalchemy/migrate_repo/versions/001_first_version.py#L29

Keystone definition: https://github.com/openstack/keystone/blob/fab399e26cdbe7cffba895f99d7247896ec6cb82/keystone/common/sql/migrate_repo/versions/067_kilo.py#L43

We believe the 64-character user ID in our environment is caused by our LDAP back-end, as local users have 32-character IDs.

Qiming Teng (tengqim)
Changed in senlin:
status: New → Triaged
importance: Undecided → High
assignee: nobody → Qiming Teng (tengqim)
milestone: none → ocata-3
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to senlin (master)

Fix proposed to branch: master
Review: https://review.openstack.org/418199

Changed in senlin:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to senlin (master)

Reviewed: https://review.openstack.org/418199
Committed: https://git.openstack.org/cgit/openstack/senlin/commit/?id=cf1de30510a5b2de3b5a07b360c8d8d84bb031cf
Submitter: Jenkins
Branch: master

commit cf1de30510a5b2de3b5a07b360c8d8d84bb031cf
Author: tengqm <email address hidden>
Date: Mon Jan 9 23:34:16 2017 -0500

    Fix user, project, domain columns in sqlalchemy

    This patch fixes the 'user', 'project' and 'domain' columns in
    sqlalchemy database. We have been using varchar(32) for these
    fields, however, Keystone is modeling them as varchar(64) for
    use with other backends, e.g. LDAP.

    Closes-Bug: #1655207
    Change-Id: I4432ac9838cdeed9344f2f43dd77d58479d2a69a

Changed in senlin:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/senlin 3.0.0.0b3

This issue was fixed in the openstack/senlin 3.0.0.0b3 development milestone.

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.