placement/releasenotes/notes/placement-database-2e087f379273535d.yaml
Chris Dent 1429760d65 Optional separate database for placement API
If 'connection' is set in the 'placement_database' conf group use
that as the connection URL for the placement database. Otherwise if
it is None, the default, then use the entire api_database conf group
to configure a database connection.

When placement_database.connection is not None a replica of the
structure of the API database is used, using the same migrations
used for the API database.

A placement_context_manager is added and used by the OVO objects in
nova.api.openstack.placement.objects.*. If there is no separate
placement database, this is still used, but points to the API
database.

nova.test and nova.test.fixtures are adjusted to add awareness of
the placement database.

This functionality is being provided to allow deployers to choose
between establishing a new database now or requiring a migration
later. The default is migration later. A reno is added to explain
the existence of the configuration setting.

This change returns the behavior removed by the revert in commit
39fb302fd9c8fc57d3e4bea1c60a02ad5067163f but done in a more
appropriate way.

Note that with the advent of the nova-status command, which checks
to see if placement is "ready" the tests here had to be adjusted.
If we do allow a separate database the code will now check the
separate database (if configured), but nothing is done with regard
to migrating from the api to placement database or checking that.

blueprint placement-extract

Change-Id: I7e1e89cd66397883453935dcf7172d977bf82e84
Implements: blueprint optional-placement-database
Co-Authored-By: Roman Podoliaka <rpodolyaka@mirantis.com>
2018-06-15 13:01:50 +01:00

24 lines
1.1 KiB
YAML

---
features:
- |
An optional configuration group ``placement_database`` can be used in
nova.conf to configure a separate database for use with the placement
API.
If ``placement_database.connection`` has a value then the
``placement_database`` configuration group will be used to configure a
separate placement database, including using ``connection`` to identify the
target database. That database will have a schema that is a replica of all
the tables used in the API database. The new database will be created and
synchronized when the ``nova-manage api_db sync`` command is run.
When the ``placement_database.connection`` setting is omitted the existing
settings for the ``api_database`` will be used for hosting placement data.
Setting ``placement_database.connection`` and calling
``nova-manage api_db sync`` will only create tables. No data will be
migrated. In an existing OpenStack deployment, if there is existing
placement data in the ``nova_api`` database this will not be copied. It is
up to the deployment to manually replicate that data in a fashion that
works best for the environment.