Reviewed: https://review.openstack.org/611094 Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=133d6b3bcc26bb2e66ef303011280e38add00702 Submitter: Zuul Branch: master
commit 133d6b3bcc26bb2e66ef303011280e38add00702 Author: Dan Smith <dansm...@redhat.com> Date: Tue Oct 16 09:58:29 2018 -0700 Fix formatting non-templated cell URLs with no config If transport_url or connection are unset in config, we will fail to format even non-templated cell mapping URLs due to an overly specific check in the format routines. This fixes it by always bailing on templating if the config is unset, and keeping the error message if we were unable to format a template as a result. Change-Id: I760580b8e6594be2bee99a5b825a690b07ab9deb Closes-Bug: #1798158 ** 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/1798158 Title: Non-templated transport_url will fail if not defined in config Status in OpenStack Compute (nova): Fix Released Status in OpenStack Compute (nova) rocky series: Triaged Bug description: If transport_url is not defined in the config, we will fail to format a non-templated transport_url in the database like this: ERROR nova.objects.cell_mapping [None req-34831485-adf4-4a0d-bb20-e1736d93a451 None None] Failed to parse [DEFAULT]/transport_url to format cell mapping: AttributeError: 'NoneType' object has no attribute 'find' ERROR nova.objects.cell_mapping Traceback (most recent call last): ERROR nova.objects.cell_mapping File "/opt/stack/nova/nova/objects/cell_mapping.py", line 150, in _format_mq_url ERROR nova.objects.cell_mapping return CellMapping._format_url(url, CONF.transport_url) ERROR nova.objects.cell_mapping File "/opt/stack/nova/nova/objects/cell_mapping.py", line 101, in _format_url ERROR nova.objects.cell_mapping default_url = urlparse.urlparse(default) ERROR nova.objects.cell_mapping File "/usr/lib/python2.7/urlparse.py", line 143, in urlparse ERROR nova.objects.cell_mapping tuple = urlsplit(url, scheme, allow_fragments) ERROR nova.objects.cell_mapping File "/usr/lib/python2.7/urlparse.py", line 182, in urlsplit ERROR nova.objects.cell_mapping i = url.find(':') ERROR nova.objects.cell_mapping AttributeError: 'NoneType' object has no attribute 'find' ERROR nova.objects.cell_mapping To manage notifications about this bug go to: https://bugs.launchpad.net/nova/+bug/1798158/+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