migrate script is not correctly called in testcase

Bug #1620230 reported by Dave Chen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
In Progress
Undecided
Unassigned

Bug Description

Keystone has contract, migrate etc repo to support online rolling grade. There is testcase test_start_version_db_init_version to make sure that repos are called in the right sequence. But when it expects to call the script from expand it calls the script from contact instead.

Here is simple debug message:

> /opt/stack/keystone/keystone/tests/unit/test_sql_upgrade.py(208)upgrade()
-> for ver, change in changeset:
(Pdb) n
> /opt/stack/keystone/keystone/tests/unit/test_sql_upgrade.py(209)upgrade()
-> self.schema_.runchange(ver, change, changeset.step)
(Pdb) p change
<migrate.versioning.script.py.PythonScript object at 0x7f25d43d4c90>
(Pdb) p change.__dict__
{'_module': <module '002_password_created_at_not_nullable' from '/opt/stack/keystone/keystone/common/sql/contract_repo/versions/002_password_created_at_not_nullable.pyc'>, 'path': '/opt/stack/keystone/keystone/common/sql/expand_repo/versions/002_password_created_at_not_nullable.py'}

It shows the module that is acutally called is from contract_repo while the path give us the correct info.

This could be found from here.
http://logs.openstack.org/91/364491/1/check/gate-keystone-python27-db-ubuntu-xenial/5d6e45e/console.html

Dave Chen (wei-d-chen)
description: updated
tamil vanan (tamilhce)
Changed in keystone:
assignee: nobody → tamil vanan (tamilhce)
Revision history for this message
Steve Martinelli (stevemar) wrote :

would be nice to get this merged in the rc period.

tamil, do you have a patch for this? normally in the keystone project we only take ownership of a bug when a patch has been uploaded to gerrit. if you include the string "Closes-Bug: #123456" in the commit message with the patch, then launchpad will automatically assign you the bug.

Revision history for this message
tamil vanan (tamilhce) wrote :

Hi steve, my setup crashes , will reproduce once again and submit the patch as soon as possbile.
Will update in meanwhile. Thank you

tamil vanan (tamilhce)
Changed in keystone:
status: New → In Progress
tamil vanan (tamilhce)
Changed in keystone:
assignee: tamil vanan (tamilhce) → nobody
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.