From f290a925339abe3ce3bee0a7800bcceb70f4f240 Mon Sep 17 00:00:00 2001
From: Martin Schuppert <mschuppert@redhat.com>
Date: Wed, 10 Oct 2018 15:28:52 +0200
Subject: [PATCH] Use nova_api DB for [placement_database] -> connection

With OOO we configure a separate DB for placement for the undercloud and
overcloud since the beginning.
But the placement_database config options were reverted with
https://review.openstack.org/#/c/442762/1 , which means so far even if
the config option was set, it was not used. With rocky the options were
introduced again which is not a problem on a fresh installed env, but on
upgrades from queens to rocky.
We should use the same DB for both fresh deployments on and upgrades to
rocky before we switch to the new DB as part of the extraction of placement.

Closes-Bug: #1797119

Change-Id: I6eb8cb62d337fa4f6e6542391de251519e246923
---
 puppet/services/nova-base.yaml                       |  4 ++--
 ...e_nova_api_db_for_placement-eea44dd48c768f04.yaml | 12 ++++++++++++
 2 files changed, 14 insertions(+), 2 deletions(-)
 create mode 100644 releasenotes/notes/nova_use_nova_api_db_for_placement-eea44dd48c768f04.yaml

diff --git a/puppet/services/nova-base.yaml b/puppet/services/nova-base.yaml
index e716d7c2a2..ee76558040 100644
--- a/puppet/services/nova-base.yaml
+++ b/puppet/services/nova-base.yaml
@@ -295,10 +295,10 @@ outputs:
           nova::placement_database_connection:
             make_url:
               scheme: {get_param: [EndpointMap, MysqlInternal, protocol]}
-              username: nova_placement
+              username: nova_api
               password: {get_param: NovaPassword}
               host: {get_param: [EndpointMap, MysqlInternal, host]}
-              path: /nova_placement
+              path: /nova_api
               query:
                 read_default_file: /etc/my.cnf.d/tripleo.cnf
                 read_default_group: tripleo
diff --git a/releasenotes/notes/nova_use_nova_api_db_for_placement-eea44dd48c768f04.yaml b/releasenotes/notes/nova_use_nova_api_db_for_placement-eea44dd48c768f04.yaml
new file mode 100644
index 0000000000..24bb1745e5
--- /dev/null
+++ b/releasenotes/notes/nova_use_nova_api_db_for_placement-eea44dd48c768f04.yaml
@@ -0,0 +1,12 @@
+---
+fixes:
+  - |
+    With OOO we configure a separate DB for placement for the undercloud and
+    overcloud since the beginning.
+    But the placement_database config options were reverted with
+    https://review.openstack.org/#/c/442762/1 , which means so far even if
+    the config option was set, it was not used. With rocky the options were
+    introduced again which is not a problem on a fresh installed env, but on
+    upgrades from queens to rocky.
+    We should use the same DB for both fresh deployments on and upgrades to
+    rocky before we switch to the new DB as part of the extraction of placement.