Add nova-api database setup for Mitaka
Mitaka requires the use of a separate nova-api database; ensure that this is setup on the shared-db relation and add a new [api_database] section to the mitaka nova.conf file. Add a new NovaAPISharedDBContext wrapper to prefix the key names for the nova-api database with 'nova_api_' so that we can present two database connections to the same configuration file. Ensure that 'nova-manage api_db sync' is called for database setup for >= mitaka release. For upgrades, ensure that the database migration and service start is deferred until the nova_api database has been setup by the related mysql service. Closes-Bug: #1556896 Change-Id: If1c9a037b1e0745a486a57fddf885e26aa7e313d
This commit is contained in:
@@ -129,6 +129,8 @@ volume_api_class=nova.volume.cinder.API
|
||||
|
||||
{% include "parts/database-v2" %}
|
||||
|
||||
{% include "parts/database-api" %}
|
||||
|
||||
{% if glance_api_servers -%}
|
||||
[glance]
|
||||
api_servers = {{ glance_api_servers }}
|
||||
|
||||
12
templates/parts/database-api
Normal file
12
templates/parts/database-api
Normal file
@@ -0,0 +1,12 @@
|
||||
[api_database]
|
||||
{% if nova_api_database_host -%}
|
||||
connection = {{ nova_api_database_type }}://{{ nova_api_database_user }}:{{ nova_api_database_password }}@{{ nova_api_database_host }}/{{ nova_api_database }}{% if nova_api_database_ssl_ca %}?ssl_ca={{ nova_api_database_ssl_ca }}{% if nova_api_database_ssl_cert %}&ssl_cert={{ nova_api_database_ssl_cert }}&ssl_key={{ nova_api_database_ssl_key }}{% endif %}{% endif %}
|
||||
{% endif -%}
|
||||
{% if not nova_alchemy_flags or 'max_pool_size' not in nova_alchemy_flags.iterkeys() -%}
|
||||
max_pool_size = {{ workers }}
|
||||
{% endif -%}
|
||||
{% if nova_alchemy_flags -%}
|
||||
{% for key, value in nova_alchemy_flags.iteritems() -%}
|
||||
{{ key }} = {{ value }}
|
||||
{% endfor -%}
|
||||
{% endif -%}
|
||||
Reference in New Issue
Block a user