Add flavor tables to API database + online data migration

Registered by Vineet Menon

Cellsv2 need to store flavor information for booting an instance. Since this
information will live at the cell API, tables related to flavors need to be
created in API DB.

There also needs to be an online data migration on flavor access from the cell DB to the API DB.

Blueprint information

John Garbutt
Vineet Menon
Dan Smith
Series goal:
Accepted for newton
Milestone target:
milestone icon newton-1
Started by
John Garbutt
Completed by
Matt Riedemann

Related branches



Still too much to resolve for these to merge today. --johnthetubaguy 2nd September 2015

Addressed by:
    Add flavor tables to API database

Addressed by:
    Add flavor tables to API database; resubmitted for mitaka

Pending patches

Gerrit topic:,topic:bp/flavor-cell-api,n,z

Addressed by:
    Add flavor* tables to API database

Addressed by:
    Flavor object which support both DB with active migration

Marked as partially implemented --johnthetubaguy 2nd March 2016

Addressed by:
    Use the api database fixture in tests

This isn't complete in mitaka, we got the new flavor tables in the API DB schema but not the online data migration or nova-manage CLI, we need to continue working on that new Newton. -- mriedem 20160116

Addressed by:
    Re-propose: Add Flavor tables to API Database

Addressed by:
    Make Flavor.get operations prefer the API database

Addressed by:
    Make FlavorList.get_all() return results from the API and main DBs

Addressed by:
    Make Flavor access routines work against API database

Addressed by:
    Make flavor extra_specs operations work against the API DB

Addressed by:
    Make Flavor create() and destroy() work against API DB

Addressed by:
    Add flavor migration routine

Addressed by:
    Block flavor creation until main database is empty

Addressed by:
    Objectify test_instance_type_extra_specs

Addressed by:
    Objectify some tests in test_compute and test_flavors

Addressed by:
    Objectify test_flavors and test_flavors_extra_specs

Addressed by:
    Further hack up the nova.tests.unit.db.fakes module of horribleness

Addressed by:
    Add a DatabasePoisonFixture

Addressed by:
    DNM: Canary to sniff out what postgres' problem is

Addressed by:
    Handle pre-migration flavor creation failures in the crusty old API

Gerrit topic:,topic:sins-of-the-father,n,z


Work Items

This blueprint contains Public information 
Everyone can see this information.