db_sync with oauth1 extension fails

Bug #1284740 reported by Brant Knudson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
Medium
Brant Knudson

Bug Description

When running with DB2, migration 4 for the oauth1 extension fails with an error:

2014-02-25 11:23:40.185 CRITICAL keystone [-] ProgrammingError: (ProgrammingError) ibm_db_dbi::ProgrammingError: Statement Execute Failed: [IBM][CLI Driver][DB2/LINUXX8664] SQL0205N Column, attribute, or period "REQUESTED_ROLES" is not defined in "KEYSTONE.REQUEST_TOKEN". SQLSTATE=42703 SQLCODE=-205 '\nALTER TABLE request_token ALTER COLUMN requested_roles DROP NOT NULL' ()

So it's saying the column doesn't exist for the alter table when making the column nullable.

Here's the code:

    request_token_table.c.requested_roles.alter(name="role_ids", nullable=True)

It looks like what's happening is that sqlalchemy is doing the name change first and then doing the "nullable=True" change with the original name and not the new one.

Brant Knudson (blk-u)
Changed in keystone:
assignee: nobody → Brant Knudson (blk-u)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to keystone (master)

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

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

Reviewed: https://review.openstack.org/76271
Committed: https://git.openstack.org/cgit/openstack/keystone/commit/?id=009182380640f62daf8bc2163297c1e9e2899240
Submitter: Jenkins
Branch: master

commit 009182380640f62daf8bc2163297c1e9e2899240
Author: Brant Knudson <email address hidden>
Date: Tue Feb 25 11:29:50 2014 -0600

    oauth1 extension migration fails with DB2

    Running keystone-manage db_sync --extension oauth1 would fail when
    using DB2 with an error that the REQUESTED_ROLES column isn't
    defined on the REQUEST_TOKEN table.

    This problem is worked around by dropping the NULL constraint
    first and then renaming the column.

    Change-Id: I58438cad4d645c553da5710455e8a219b8fd3014
    Closes-Bug: #1284740

Changed in keystone:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in keystone:
milestone: none → icehouse-3
status: Fix Committed → Fix Released
Dolph Mathews (dolph)
Changed in keystone:
importance: Undecided → Medium
Thierry Carrez (ttx)
Changed in keystone:
milestone: icehouse-3 → 2014.1
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.