From d668de8aa5bba642015d817f3272df43a955a1ff Mon Sep 17 00:00:00 2001 From: Liam Young Date: Tue, 19 Jul 2022 06:30:46 +0000 Subject: [PATCH] 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 --- src/templates/xena/nova.conf | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 src/templates/xena/nova.conf diff --git a/src/templates/xena/nova.conf b/src/templates/xena/nova.conf new file mode 100644 index 0000000..98dbade --- /dev/null +++ b/src/templates/xena/nova.conf @@ -0,0 +1,26 @@ +# train +############################################################################### +# [ WARNING ] +# Configuration file maintained by Juju. Local changes may be overwritten. +############################################################################### +[DEFAULT] +verbose={{ options.verbose }} +debug={{ options.debug }} +logdir=/var/log/nova +state_path=/var/lib/nova +root_helper=sudo nova-rootwrap /etc/nova/rootwrap.conf + +{% include "parts/section-transport-url" %} + +[conductor] +workers = {{ options.workers }} + +{% include "parts/section-oslo-messaging-rabbit" %} + +{% include "parts/section-placement" %} + +[database] +{% if shared_db.host -%} +connection = {{ shared_db.uri }} +{% endif -%} +