migration 17: user_project_membership has no column 'project_id'

Bug #1131590 reported by Yaguang Tang
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Invalid
Low
Unassigned

Bug Description

yaguang@yaguang-ThinkPad-X230:~/working/openstack/keystone# keystone-manage db_sync
/usr/lib/python2.7/dist-packages/migrate/versioning/repository.py:9: UserWarning: Module keystone was already imported from /home/yaguang/working/openstack/keystone/keystone/__init__.pyc, but /usr/lib/python2.7/dist-packages is being added to sys.path
  from pkg_resources import resource_filename
Traceback (most recent call last):
  File "/usr/bin/keystone-manage", line 28, in <module>
    cli.main(argv=sys.argv, config_files=config_files)
  File "/home/yaguang/working/openstack/keystone/keystone/cli.py", line 172, in main
    CONF.command.cmd_class.main()
  File "/home/yaguang/working/openstack/keystone/keystone/cli.py", line 53, in main
    driver.db_sync()
  File "/home/yaguang/working/openstack/keystone/keystone/identity/backends/sql.py", line 171, in db_sync
    migration.db_sync()
  File "/home/yaguang/working/openstack/keystone/keystone/common/sql/migration.py", line 52, in db_sync
    return versioning_api.upgrade(CONF.sql.connection, repo_path, version)
  File "/usr/lib/python2.7/dist-packages/migrate/versioning/api.py", line 186, in upgrade
    return _migrate(url, repository, version, upgrade=True, err=err, **opts)
  File "<string>", line 2, in _migrate
  File "/usr/lib/python2.7/dist-packages/migrate/versioning/util/__init__.py", line 159, in with_engine
    return f(*a, **kw)
  File "/usr/lib/python2.7/dist-packages/migrate/versioning/api.py", line 366, in _migrate
    schema.runchange(ver, change, changeset.step)
  File "/usr/lib/python2.7/dist-packages/migrate/versioning/schema.py", line 91, in runchange
    change.run(self.engine, step)
  File "/usr/lib/python2.7/dist-packages/migrate/versioning/script/py.py", line 145, in run
    script_func(engine)
  File "/home/yaguang/working/openstack/keystone/keystone/common/sql/migrate_repo/versions/017_membership_role.py", line 51, in upgrade
    project_id=membership.project_id,
AttributeError: 'NamedTuple' object has no attribute 'project_id'

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/22665

Changed in keystone:
assignee: nobody → Yaguang Tang (heut2008)
status: New → In Progress
Revision history for this message
Sina Sadeghi (sina-sa) wrote : Re: the folsom keystone database schema can't upgrade to latest version

How come the patch for this fix was abandoned?

Changed in keystone:
status: In Progress → Confirmed
tags: added: cloud-archive
Revision history for this message
Dolph Mathews (dolph) wrote :

This looks like a valid issue. +1 for restoring the patch!

Changed in keystone:
importance: Undecided → High
Revision history for this message
Dolph Mathews (dolph) wrote :

Targeting this to Havana RC1... this should be re-investigated & closed if it's no longer an issue (or fixed!)

Changed in keystone:
milestone: none → havana-rc1
Revision history for this message
Dolph Mathews (dolph) wrote :

Lowering priority as I'm unable to reproduce (the fix in the above review appears to have already been applied to master, I assume in another patch?), but I can't find a test for this particular condition.

Changed in keystone:
assignee: Yaguang Tang (heut2008) → Dolph Mathews (dolph)
importance: High → Low
milestone: havana-rc1 → none
Dolph Mathews (dolph)
summary: - the folsom keystone database schema can't upgrade to latest version
+ migration 17: user_project_membership has no column 'project_id'
Revision history for this message
Dolph Mathews (dolph) wrote :

Unassigning due to inactivity.

Changed in keystone:
assignee: Dolph Mathews (dolph) → nobody
Revision history for this message
Dolph Mathews (dolph) wrote :

This migration is no longer supported.

Changed in keystone:
status: Confirmed → Invalid
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.