no downgrade in db sync

Bug #993284 reported by Vincent Hou
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Glance
Fix Released
Wishlist
Sathish Nagappan
Grizzly
Fix Released
Wishlist
Sathish Nagappan

Bug Description

db_sync method within glance/registry/db/migration.py has only upgrade specified, and no downgrade, which is unlike the db_sync in keystone and nova. They both check the version and the current version, and do upgrade and downgrade according to the result of the version contrast.

Revision history for this message
Brian Waldon (bcwaldon) wrote :

What would you like to see to fix your bug report? At this point, you've just documented a difference.

Changed in glance:
status: New → Incomplete
Revision history for this message
Vincent Hou (houshengbo) wrote :

1. If the current version is older than the version to be installed, then the method upgrade will be called until the target version is reached.
2. If the current version is newer than the version to be installed, downgrade should be called.
So far in the code of glance, the second circumstance is not available. Please refer to db_sync method in /glance/glance/registry/db/migration.py. Only upgrade method is called in the end.
I suggest we make the second circumstance possible.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance (master)

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

Changed in glance:
assignee: nobody → Vincent Hou (houshengbo)
status: Incomplete → In Progress
Brian Waldon (bcwaldon)
Changed in glance:
importance: Undecided → Wishlist
Brian Waldon (bcwaldon)
Changed in glance:
assignee: Vincent Hou (houshengbo) → nobody
status: In Progress → Triaged
Revision history for this message
Brian Waldon (bcwaldon) wrote :

We support glance-manage upgrade, downgrade, and db_sync. This might be a side-effect of our method naming but we definitely *can* downgrade a database. It would still be nice for db_sync to support downgrade, though.

koolhead17 (koolhead17)
Changed in glance:
status: Triaged → Confirmed
Changed in glance:
assignee: nobody → Sathish Nagappan (sathish-nagappan)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

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

Reviewed: https://review.openstack.org/14114
Committed: http://github.com/openstack/glance/commit/a88b8d8dcbbdfc1ddcda29bbffbaa44fd149b93a
Submitter: Jenkins
Branch: master

commit a88b8d8dcbbdfc1ddcda29bbffbaa44fd149b93a
Author: Sathish Nagappan <email address hidden>
Date: Thu Oct 4 02:27:20 2012 -0700

    implements selecting version in db sync

    Fixes Bug #993284

    db_sync compares the current version with the specified version
    and upgrades or downgrades accordingly.

    Change-Id: If0e0608ac04c264df7964f8cf6a46e9b156eee49

Changed in glance:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in glance:
milestone: none → grizzly-1
status: Fix Committed → Fix Released
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.