nova-cpu.conf shouldn't have database config in it

Bug #1797413 reported by Matt Riedemann
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
devstack
Fix Released
Medium
Dan Smith

Bug Description

I noticed this locally but confirmed in a CI run on both stein and queens, the nova-cpu.conf generated by devstack contains database configuration in it, which is mostly harmless since we don't have "local conductor" in nova anymore (nova-compute can't reach the database directly), but it's confusing nonetheless:

http://logs.openstack.org/87/604687/6/check/tempest-full/5e2a539/controller/logs/etc/nova/nova-cpu_conf.txt.gz

[database]
connection = mysql+pymysql://root:secretdatabase@127.0.0.1/nova_cell0?charset=utf8

[api_database]
connection = mysql+pymysql://root:secretdatabase@127.0.0.1/nova_api?charset=utf8

The nova_cell1.conf looks good:

http://logs.openstack.org/55/606155/1/check/tempest-full/dcd0005/controller/logs/etc/nova/nova_cell1_conf.txt.gz

[database]
connection = mysql+pymysql://root:secretdatabase@127.0.0.1/nova_cell1?charset=utf8

I think the problem is here:

https://github.com/openstack-dev/devstack/blob/5da7e4a22ede5f3049e7607a54a0f5ca2b413a29/lib/nova#L918

Because if you're not running cells v1 we set this variable above:

local compute_cell_conf=$NOVA_CONF

Which is the nova.conf that the controller services (nova-api, nova-scheduler, etc) use which configures the API database and the cell database is pointed at cell0. So we copy that to create nova-cpu.conf which is convenient but also kind of wrong and confusing because of the DB setup.

An easy fix would be to just remove the nova-cpu.conf ini group entries for the database.

Matt Riedemann (mriedem)
tags: added: low-hanging-fruit
Changed in devstack:
importance: Low → Medium
Changed in devstack:
assignee: nobody → Matt Riedemann (mriedem)
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to devstack (master)

Reviewed: https://review.openstack.org/609755
Committed: https://git.openstack.org/cgit/openstack-dev/devstack/commit/?id=7d0003ef7ed2c2609ffe6782e0ce6147f9c9a3bf
Submitter: Zuul
Branch: master

commit 7d0003ef7ed2c2609ffe6782e0ce6147f9c9a3bf
Author: Dan Smith <email address hidden>
Date: Thu Oct 11 08:59:26 2018 -0700

    Make sure nova-compute is not configured with database access

    Apparently we're inheriting some database config from the main file,
    which should not be set for nova-compute. If we're properly in superconductor
    mode where we have a dedicated config for compute, remove those lines
    if present.

    Closes-Bug: #1797413

    Change-Id: I4820abe57a023050dd8d067c77e26028801ff288

Changed in devstack:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to devstack (stable/rocky)

Fix proposed to branch: stable/rocky
Review: https://review.openstack.org/625039

Matt Riedemann (mriedem)
Changed in devstack:
assignee: Matt Riedemann (mriedem) → Dan Smith (danms)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to devstack (stable/queens)

Fix proposed to branch: stable/queens
Review: https://review.openstack.org/625131

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to devstack (stable/rocky)

Reviewed: https://review.openstack.org/625039
Committed: https://git.openstack.org/cgit/openstack-dev/devstack/commit/?id=f165ad49206f520e8fc3aac535e77f82ea410ea4
Submitter: Zuul
Branch: stable/rocky

commit f165ad49206f520e8fc3aac535e77f82ea410ea4
Author: Dan Smith <email address hidden>
Date: Thu Oct 11 08:59:26 2018 -0700

    Make sure nova-compute is not configured with database access

    Apparently we're inheriting some database config from the main file,
    which should not be set for nova-compute. If we're properly in superconductor
    mode where we have a dedicated config for compute, remove those lines
    if present.

    Closes-Bug: #1797413

    Change-Id: I4820abe57a023050dd8d067c77e26028801ff288
    (cherry picked from commit 7d0003ef7ed2c2609ffe6782e0ce6147f9c9a3bf)

tags: added: in-stable-rocky
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to devstack (stable/queens)

Reviewed: https://review.openstack.org/625131
Committed: https://git.openstack.org/cgit/openstack-dev/devstack/commit/?id=ffb6cf7b4a221d957ba697ad81216d9b75bd53de
Submitter: Zuul
Branch: stable/queens

commit ffb6cf7b4a221d957ba697ad81216d9b75bd53de
Author: Dan Smith <email address hidden>
Date: Thu Oct 11 08:59:26 2018 -0700

    Make sure nova-compute is not configured with database access

    Apparently we're inheriting some database config from the main file,
    which should not be set for nova-compute. If we're properly in superconductor
    mode where we have a dedicated config for compute, remove those lines
    if present.

    Closes-Bug: #1797413

    Change-Id: I4820abe57a023050dd8d067c77e26028801ff288
    (cherry picked from commit 7d0003ef7ed2c2609ffe6782e0ce6147f9c9a3bf)

tags: added: in-stable-queens
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.