services uuid migration is not so good

Bug #1721837 reported by John Griffith
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Undecided
John Griffith

Bug Description

It was pointed out during some db migration additions that we're probably not really doing things the way we should. For example:
    https://github.com/openstack/cinder/commit/2becd847fb01777eb991e88c95c4453809ea2398

Doing the data migration in the python migration file is probably not the best approach. It works for things like Cinder because we don't have the same magnitude in terms of number of services that projects like Nova have, but still we should be using things like the data-migration api.

We should rework the submitted migration to not do the data updates in the migration file and go ahead an update the Service object as well as finish and use the framework we have for the online_data_migration API.

Changed in cinder:
assignee: nobody → John Griffith (john-griffith)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

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

Changed in cinder:
status: New → In Progress
Changed in cinder:
assignee: John Griffith (john-griffith) → Ildiko Vancsa (ildiko-vancsa)
assignee: Ildiko Vancsa (ildiko-vancsa) → John Griffith (john-griffith)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/510201
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=e88d3b2c8205a4865d64419623de10d9159eeea2
Submitter: Zuul
Branch: master

commit e88d3b2c8205a4865d64419623de10d9159eeea2
Author: John Griffith <email address hidden>
Date: Fri Oct 6 17:56:52 2017 +0000

    Fix migration 112 to use live_data_migration API

    In the 112 db migration I was being lazy and generating and
    updating the newly added UUID column. I also didn't update
    the Service object (left that for the follow on patch).

    Turns out we're going to want/need the online_data_migration
    pieces for some follow up work and we might as well do this at
    least a little bit more efficiently/correctly now.

    This patch modifies the db migration to NOT try and populate
    the newly added UUID fields in the Service table, and it
    updates the Service object properly including adding the gen UUID
    components to service.create()

    This also fixes up what we had in place for the online_data_migration
    code in cmd/manage.py; note that we had a framework there/started but
    it wasn't being used up to this point.

    Change-Id: I6696a15cd2c8fbf851a59b8d6d60ae1981bb1b89
    Closes-Bug: #1721837

Changed in cinder:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/cinder 12.0.0.0b2

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