CellsV2 - Instance Groups API DB migrations¶
Instance group tables that currently reside in the cell database must be migrated to the API database. Instance groups are exposed in the API and generally accessed in the scheduler.
Users wish to create instance groups that operate globally across deployments without worrying about cells implementation.
instance_group_member tables will be created in the API database. The
models for these will closely match the existing models in the nova database
but they will no longer have soft delete.
Methods currently located in
db/sqalchemy/api.py will be mirrored in
objects/instance_group.py and modified to access the API database. The
InstanceGroupList objects will be modified to
access the API database initially and the fall-back to the cell database
InstanceGroupList methods will return items from both
the cell and API databases. These methods will, if-neccessary remove duplicates
from the returned items.
Migration methods will be created to move data from the cell to API database.
These migration methods will be added to the
nova manage command.
Flavor tables have already been migrated to the API db. In general
the proposed changes will follow those methods. 
It may be possible to leave the
instance_group_member table in the
cell database as this table will grow with the number of instances.
get_hosts accesses the
instance_group_member table. It is used in both the scheduler and the
compute manager for affinity. As this table is generally accessed outside
of the cells it is likely that there would be a greater performance hit
from placing this in the cell database.
Data model impact¶
There will be a large data model impact as many new tables will be created in the API database. The data models have been omitted as they are essentially unchanged from those currently in the cell database.
REST API impact¶
Other end user impact¶
Other deployer impact¶
Deployers must be aware of the
nova-manage command that will perform
one time data migration for the tables mentioned.
- Primary assignee:
- Other contributors:
Create a new database table and database migration for
Modify functions in
InstanceGroupListto access the API database.
Create migration functions for the affected tables and add these to
Unit tests for API database access functions.
Functional tests for data migration of instance group tables.
Documentation must mention the one time data migration tool in
nova-manage command and the data that is migrated.