hypervisor not registered on xena+

Bug #1982071 reported by Liam Young
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Nova Cell Controller Charm
Fix Committed
Undecided
Unassigned

Bug Description

Cells hypervisors are not being registered when deploying xena (and probably later).

$ openstack compute service list --service nova-compute

$

This appears to be due to the charm not putting the database url in the correct place in config which causes the nova code to think its an api conductor.

The fix seems to remove the old sql_connection from the default section and add:

[database]
connection = mysql+pymysql://nova:dzMXxxHRXxzmBfY4YF7cYw8bz7pF5Sfc@127.0.0.1:3316/nova

Revision history for this message
Liam Young (gnuoy) wrote :

This is the upstream code https://opendev.org/openstack/nova/src/branch/master/nova/utils.py#L1060

Using sql_connection appears to populate CONF.api_database.connection behind the scenes

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-nova-cell-controller (master)
Changed in charm-nova-cell-controller:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-nova-cell-controller (master)

Reviewed: https://review.opendev.org/c/openstack/charm-nova-cell-controller/+/850275
Committed: https://opendev.org/openstack/charm-nova-cell-controller/commit/d668de8aa5bba642015d817f3272df43a955a1ff
Submitter: "Zuul (22348)"
Branch: master

commit d668de8aa5bba642015d817f3272df43a955a1ff
Author: Liam Young <email address hidden>
Date: Tue Jul 19 06:30:46 2022 +0000

    Fix database connection section

    Using the sql_connection option in the default section appears to
    cause CONF.api_database.connection to be populated with the
    connection uri. This in turn causes nova to think this is an
    api cell and to do an api lookup *1 which fails. This change moves
    the database connection string into its own section as per *2

    *1 https://opendev.org/openstack/nova/src/branch/master/nova/utils.py#L1060
    *2 https://docs.openstack.org/nova/latest/admin/cells.html

    Closes-Bug: #1982071
    Change-Id: I49859235d408598535173c8bb87ce65f66fb3ca8

Changed in charm-nova-cell-controller:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-nova-cell-controller (stable/yoga)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-nova-cell-controller (stable/xena)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-nova-cell-controller (stable/xena)

Reviewed: https://review.opendev.org/c/openstack/charm-nova-cell-controller/+/850466
Committed: https://opendev.org/openstack/charm-nova-cell-controller/commit/c097dc38234e0972b7082a539730c004b6c86b13
Submitter: "Zuul (22348)"
Branch: stable/xena

commit c097dc38234e0972b7082a539730c004b6c86b13
Author: Liam Young <email address hidden>
Date: Tue Jul 19 06:30:46 2022 +0000

    Fix database connection section

    Using the sql_connection option in the default section appears to
    cause CONF.api_database.connection to be populated with the
    connection uri. This in turn causes nova to think this is an
    api cell and to do an api lookup *1 which fails. This change moves
    the database connection string into its own section as per *2

    *1 https://opendev.org/openstack/nova/src/branch/master/nova/utils.py#L1060
    *2 https://docs.openstack.org/nova/latest/admin/cells.html

    Closes-Bug: #1982071
    Change-Id: I49859235d408598535173c8bb87ce65f66fb3ca8
    (cherry picked from commit d668de8aa5bba642015d817f3272df43a955a1ff)

tags: added: in-stable-xena
tags: added: in-stable-yoga
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-nova-cell-controller (stable/yoga)

Reviewed: https://review.opendev.org/c/openstack/charm-nova-cell-controller/+/850465
Committed: https://opendev.org/openstack/charm-nova-cell-controller/commit/55a00b4a1356a3679bedf6c7d9b93496e8466b3e
Submitter: "Zuul (22348)"
Branch: stable/yoga

commit 55a00b4a1356a3679bedf6c7d9b93496e8466b3e
Author: Liam Young <email address hidden>
Date: Tue Jul 19 06:30:46 2022 +0000

    Fix database connection section

    Using the sql_connection option in the default section appears to
    cause CONF.api_database.connection to be populated with the
    connection uri. This in turn causes nova to think this is an
    api cell and to do an api lookup *1 which fails. This change moves
    the database connection string into its own section as per *2

    *1 https://opendev.org/openstack/nova/src/branch/master/nova/utils.py#L1060
    *2 https://docs.openstack.org/nova/latest/admin/cells.html

    Closes-Bug: #1982071
    Change-Id: I49859235d408598535173c8bb87ce65f66fb3ca8
    (cherry picked from commit d668de8aa5bba642015d817f3272df43a955a1ff)

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.