diff options
author | Sofer Athlan-Guyot <sathlang@redhat.com> | 2017-03-23 12:10:48 +0100 |
---|---|---|
committer | Sofer Athlan-Guyot <sathlang@redhat.com> | 2017-03-23 17:58:03 +0100 |
commit | 4883e8b229c7fa3b8fe828bd3e06aa16e852d95c (patch) | |
tree | 60243c10d121c19aa05e35ba2c450987b11d887d /puppet | |
parent | ab4adb9fb1b1ba003a8045ce4c3879f88ea243b3 (diff) |
[N->O] Fix wrong database connection for cell0 during upgrade.
During upgrade the cell0 database has the connection pointing to
mysql+pymysql://nova:c2cdagE8PyAbnpers3AD88Hge@10.0.0.19/nova_cell0?bind_address=10.0.0.20
where 10.0.0.20 was the ip of the bootstrap node. This makes the
nova-api fails on 2/3 node at the end of the
major-upgrade-composable-steps.yaml step.
We do have the right value in the hiera database so make sure we use
it for cell0 creation and not the nova.conf file which hasn't been
updated yet.
Change-Id: I09775206cb8fc5e15934f7e4475506a7fe17271e
Closes-Bug: #1675359
Diffstat (limited to 'puppet')
-rw-r--r-- | puppet/services/nova-api.yaml | 2 | ||||
-rw-r--r-- | puppet/services/nova-base.yaml | 10 |
2 files changed, 11 insertions, 1 deletions
diff --git a/puppet/services/nova-api.yaml b/puppet/services/nova-api.yaml index b0ba0cd6..6d31cf4f 100644 --- a/puppet/services/nova-api.yaml +++ b/puppet/services/nova-api.yaml @@ -227,7 +227,7 @@ outputs: - name: Setup cell_v2 (map cell0) tags: step5 when: is_bootstrap_node - command: nova-manage cell_v2 map_cell0 + shell: nova-manage cell_v2 map_cell0 --database_connection=$(hiera nova::cell0_database_connection) - name: Setup cell_v2 (create default cell) tags: step5 when: is_bootstrap_node diff --git a/puppet/services/nova-base.yaml b/puppet/services/nova-base.yaml index ceacb0b2..42de40ff 100644 --- a/puppet/services/nova-base.yaml +++ b/puppet/services/nova-base.yaml @@ -151,6 +151,16 @@ outputs: - {get_param: [EndpointMap, MysqlInternal, host]} - '/nova' - '?read_default_file=/etc/my.cnf.d/tripleo.cnf&read_default_group=tripleo' + nova::cell0_database_connection: + list_join: + - '' + - - {get_param: [EndpointMap, MysqlInternal, protocol]} + - '://nova:' + - {get_param: NovaPassword} + - '@' + - {get_param: [EndpointMap, MysqlInternal, host]} + - '/nova_cell0' + - '?read_default_file=/etc/my.cnf.d/tripleo.cnf&read_default_group=tripleo' nova::api_database_connection: list_join: - '' |