Reviewed: https://review.openstack.org/641021 Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=38f2ce549ce4b21d5085824df701f9d2392b5604 Submitter: Zuul Branch: master
commit 38f2ce549ce4b21d5085824df701f9d2392b5604 Author: Matt Riedemann <mriedem...@gmail.com> Date: Tue Mar 5 09:00:20 2019 -0500 Handle templated cell mappings in nova-status The nova-status upgrade check code is intentionally written to not use versioned objects and just work with the data model directly. However, CellMapping database_connection template support was added in Rocky and the template URL is only formatted when using the object on read from the database, which means if you are using a template for the database_connection nova-status will break since the get_engine() code is getting a template string rather than a properly formatted URL. This change fixes the bug by using the CellMapping object code to pull the mappings from the database which will format the database connection URL. Note that we cannot simply update the sqlalchemy RowProxy objects we get normally since those are read-only, and because of how the mappings are used as objects with attribute access rather than as a dict we cannot just convert the RowProxy to a dict - we would have to put it in some kind of object for attribute access and if we are going to do that we might as well just use the CellMapping objects we have so that's what we do in this change. Change-Id: I5ce175517f6feb6e82ba507078a565b71427a4b0 Closes-Bug: #1818047 ** Changed in: nova Status: In Progress => Fix Released -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to OpenStack Compute (nova). https://bugs.launchpad.net/bugs/1818047 Title: nova-status doesn't render cell DB connection strings before use Status in OpenStack Compute (nova): Fix Released Status in OpenStack Compute (nova) rocky series: Triaged Bug description: Description =========== I've been working on introducing basic upgrade check calls in TripleO but have encountered the following issue now template based db connection strings are being used by TripleO in support of cellsv2: $ nova-status upgrade check [..] ArgumentError: Could not parse rfc1738 URL from string '{scheme}://{username}:{password}@{hostname}/nova?{query}' http://logs.openstack.org/39/635139/2/check/tripleo-ci- centos-7-standalone/91d4b45/logs/undercloud/home/zuul/standalone_deploy.log.txt.gz#_2019-02-26_22_04_00 Steps to reproduce ================== http://logs.openstack.org/39/635139/2/check/tripleo-ci- centos-7-standalone/91d4b45/logs/reproducer-quickstart.sh Expected result =============== Connection string is formatted correctly before use. Actual result ============= Connection string is not formatted before use leading to `nova-status` errors. Environment =========== 1. Exact version of OpenStack you are running. See the following list for all releases: http://docs.openstack.org/releases/ Master / Stein 2. Which hypervisor did you use? (For example: Libvirt + KVM, Libvirt + XEN, Hyper-V, PowerKVM, ...) What's the version of that? N/A 2. Which storage type did you use? (For example: Ceph, LVM, GPFS, ...) What's the version of that? N/A 3. Which networking type did you use? (For example: nova-network, Neutron with OpenVSwitch, ...) N/A Logs & Configs ============== See above. To manage notifications about this bug go to: https://bugs.launchpad.net/nova/+bug/1818047/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : yahoo-eng-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp