Running db_sync --check against new installs fails

Bug #1663627 reported by Jimmy McCrory
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
Medium
Richard

Bug Description

If 'keystone-manage db_sync --check' is run against a new install, prior to any DB migrations, it will raise an exception.

DBMigrationError: Invalid version : 66

http://logs.openstack.org/34/432134/1/check/gate-openstack-ansible-os_keystone-ansible-func-ubuntu-xenial/5920564/logs/openstack/keystone1/keystone/keystone.log.txt.gz#_2017-02-10_06_43_08_956

Revision history for this message
Lance Bragstad (lbragstad) wrote :

I was able to recreate by doing the following based on the latest patch in master [0].

1.) update tox environments using `tox -er --notest`
2.) drop and recreated the keystone database
3.) ran `keystone-manage db_sync --check`

The issues is that the code is looking for a database version [1] but it's not finding it because the database is actually empty [2].

[0] https://github.com/openstack/keystone/tree/d5ce8ea0ed6a3b9f748427d1b552fb88ad738545
[1] http://cdn.pasteraw.com/renjlmlq3ui14jtnzh4b4iuklo23xc9
[2] http://cdn.pasteraw.com/i0wqp6za9cayx6n1igr6hjgo7hzs29s

Changed in keystone:
status: New → Confirmed
importance: Undecided → Medium
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/432376

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

Reviewed: https://review.openstack.org/432376
Committed: https://git.openstack.org/cgit/openstack/keystone/commit/?id=99db3c83e09b8c1df25ec06fe99530aa088c325f
Submitter: Jenkins
Branch: master

commit 99db3c83e09b8c1df25ec06fe99530aa088c325f
Author: Richard Avelar <email address hidden>
Date: Fri Feb 10 16:33:33 2017 +0000

    Address db_sync check against new install

    This patch fixes a bug and causes a log message along with an exit
    code to be returned when a DBMigration error is raised.

    Change-Id: Iba7aff606937561ad98e2ef551ca4005bd4f337d
    Closes-Bug: #1663627

Changed in keystone:
status: In Progress → Fix Released
Changed in keystone:
milestone: none → pike-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/keystone 12.0.0.0b1

This issue was fixed in the openstack/keystone 12.0.0.0b1 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.