nova/releasenotes/notes/request-spec-api-db-b9cc6e0624d563c5.yaml
Andrew Laski 8e8e839ef7 Persist the request spec during an instance boot
The request spec that is used for scheduling the instance should be
persisted early in the boot process.

This is to support cellsv2 where the instance is not going to be created
in the db until scheduling has occurred.  The persisted request spec is
one of the pieces needed to respond to api list/show requests for
unscheduled instances.

The persisted request spec will also be used by
resize/migration/live-migrate operations to ensure that the instance is
scheduled to a host that fulfills the same constraints as the current
host.

Because there are a lot of tests that execute the boot path and are
backed by a database a new fixture was added to test.TestCase to
instantiate the api db if USE_DB is true.  With this change the api db
will be more frequently needed.

NB: The request spec will not be persisted within a v1 cell and
therefore not be available for later resize/migration operations when
using cellsv1.

Finally, a releasenote is being added explaining that the nova_api
database needs to be setup at this point.  RequestSpec.create() is the
first piece of code, outside of nova-manage commands, that uses the api
database.

Partially-implements: bp cells-scheduling-interaction
Change-Id: Idd4bbbe8eea68b9e538fa1567efd304e9115a02a
2016-01-28 06:27:51 -05:00

20 lines
915 B
YAML

---
upgrade:
- |
The commit with change-id Idd4bbbe8eea68b9e538fa1567efd304e9115a02a
requires that the nova_api database is setup and Nova is configured to use
it. Instructions on doing that are provided below.
Nova now requires that two databases are available and configured. The
existing nova database needs no changes, but a new nova_api database needs
to be setup. It is configured and managed very similarly to the nova
database. A new connection string configuration option is available in the
api_database group. An example::
[api_database]
connection = mysql+pymysql://user:secret@127.0.0.1/nova_api?charset=utf8
And a new nova-manage command has been added to manage db migrations for
this database. "nova-manage api_db sync" and "nova-manage api_db version"
are available and function like the parallel "nova-manage db ..." version.