Bug 1637972 - [OSP14] use nova_api DB for [placement_database] -> connection setting instead of separate DB
Summary: [OSP14] use nova_api DB for [placement_database] -> connection setting instea...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-tripleo-heat-templates
Version: 14.0 (Rocky)
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: rc
: 14.0 (Rocky)
Assignee: Martin Schuppert
QA Contact: Gurenko Alex
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-10-10 12:34 UTC by Martin Schuppert
Modified: 2019-01-11 11:54 UTC (History)
4 users (show)

Fixed In Version: openstack-tripleo-heat-templates-9.0.1-0.20181013060863.ffbe879.el7ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-01-11 11:53:52 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1797119 0 None None None 2018-10-10 13:31:33 UTC
OpenStack gerrit 609452 0 None None None 2018-10-10 15:15:17 UTC
OpenStack gerrit 611617 0 None None None 2018-10-23 07:13:50 UTC
Red Hat Product Errata RHEA-2019:0045 0 None None None 2019-01-11 11:54:00 UTC

Description Martin Schuppert 2018-10-10 12:34:01 UTC
Description of problem:

With OOO/Director we configure a separate DB for placement for the undercloud and overcloud since the beginning.

But the placement_database config options were reverted with [1], which means so far even if 
we have the config set it was not used. 

Now with rocky/OSP14 we have the options again:

()[root@controller-0 db]# grep placement_db_group /usr/lib/python2.7/site-packages/nova/conf/database.py
placement_db_group = cfg.OptGroup('placement_database',
    conf.register_opts(placement_db_opts, group=placement_db_group)
        placement_db_group: placement_db_opts,
and therefore its being used:
(undercloud) [stack@undercloud-0 ~]$ sudo mysql -u root nova_placement -e "select * from inventories limit 1\G;"
*************************** 1. row ***************************
          created_at: 2018-09-19 09:59:03
          updated_at: 2018-09-19 10:05:10
                  id: 1
resource_provider_id: 1
   resource_class_id: 0
               total: 8
            reserved: 0
            min_unit: 1
            max_unit: 8
           step_size: 1
    allocation_ratio: 1

which is not a problem on a fresh installed OSP14 env, but on upgrades from OSP13 to 14


We should use the same DB for both fresh deployments on and upgrades to OSP 14 before we switch to the new DB in 15 as part of the extraction of placement. 


Version-Release number of selected component (if applicable):
OSP14

How reproducible:
always

Steps to Reproduce:
1. deploy undercloud/overcloud


Actual results:
-> separate placement db

Expected results:
-> nova_api db is used for placement

Additional info:

[1] https://review.openstack.org/#/c/442762/1

Comment 6 Joe H. Rahme 2018-11-23 15:30:16 UTC
Verified on the beta puddle that tripleo configured both placement db and api db as the same mysql db:


(undercloud) [stack@undercloud-0 ~]$ sudo crudini --get /var/lib/config-data/puppet-generated/nova_placement/etc/nova/nova.conf api_database connection                      
mysql+pymysql://nova_api:XsC6yR5dwP7mmoHrAuRaKZYhW.24.3/nova_api?read_default_group=tripleo&read_default_file=/etc/my.cnf.d/tripleo.cnf

(undercloud) [stack@undercloud-0 ~]$ sudo crudini --get /var/lib/config-data/puppet-generated/nova_placement/etc/nova/nova.conf placement_database connection
mysql+pymysql://nova_api:XsC6yR5dwP7mmoHrAuRaKZYhW.24.3/nova_api?read_default_group=tripleo&read_default_file=/etc/my.cnf.d/tripleo.cnf

Comment 9 errata-xmlrpc 2019-01-11 11:53:52 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2019:0045


Note You need to log in before you can comment on or make changes to this bug.