Merge mysql service_config_settings for nova

The hieradata from the nova-base.yaml service template needs to be available to
the role running mysql, which isn't necessarily the same role as nova.

nova-base.yaml isn't an actual service template though that is included in any
ServiceChain resources, it's outputs need to be merged with an actual nova
service template, such as nova-api.yaml.

As nova-api.yaml already provides some hieradata for the mysql service in
service_config_settings, this patch uses map_merge to combine the 2 values.

Change-Id: I4dc684b3611b13f177f9499e69468d3f6ef6fa76
Closes-Bug: #1654058
This commit is contained in:
James Slagle 2017-01-04 15:16:01 -05:00
parent 4a02aeb22e
commit 81b0d79bb6
1 changed files with 17 additions and 15 deletions

View File

@ -137,6 +137,23 @@ outputs:
step_config: |
include tripleo::profile::base::nova::api
service_config_settings:
mysql:
map_merge:
- {get_attr: [NovaBase, role_data, service_config_settings, mysql]}
- nova::db::mysql::password: {get_param: NovaPassword}
nova::db::mysql::user: nova
nova::db::mysql::host: {get_param: [EndpointMap, MysqlInternal, host_nobrackets]}
nova::db::mysql::dbname: nova
nova::db::mysql::allowed_hosts:
- '%'
- "%{hiera('mysql_bind_host')}"
nova::db::mysql_api::password: {get_param: NovaPassword}
nova::db::mysql_api::user: nova_api
nova::db::mysql_api::host: {get_param: [EndpointMap, MysqlInternal, host_nobrackets]}
nova::db::mysql_api::dbname: nova_api
nova::db::mysql_api::allowed_hosts:
- '%'
- "%{hiera('mysql_bind_host')}"
keystone:
nova::keystone::auth::tenant: 'service'
nova::keystone::auth::public_url: {get_param: [EndpointMap, NovaPublic, uri]}
@ -144,18 +161,3 @@ outputs:
nova::keystone::auth::admin_url: {get_param: [EndpointMap, NovaAdmin, uri]}
nova::keystone::auth::password: {get_param: NovaPassword}
nova::keystone::auth::region: {get_param: KeystoneRegion}
mysql:
nova::db::mysql::password: {get_param: NovaPassword}
nova::db::mysql::user: nova
nova::db::mysql::host: {get_param: [EndpointMap, MysqlInternal, host_nobrackets]}
nova::db::mysql::dbname: nova
nova::db::mysql::allowed_hosts:
- '%'
- "%{hiera('mysql_bind_host')}"
nova::db::mysql_api::password: {get_param: NovaPassword}
nova::db::mysql_api::user: nova_api
nova::db::mysql_api::host: {get_param: [EndpointMap, MysqlInternal, host_nobrackets]}
nova::db::mysql_api::dbname: nova_api
nova::db::mysql_api::allowed_hosts:
- '%'
- "%{hiera('mysql_bind_host')}"