load_paste_app should raise ConfigFilesNotFoundError if api-paste.ini is not found

Bug #1236182 reported by Arata Notsu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Low
Arata Notsu

Bug Description

If the file specified by CONF.api_paste_config is not found, neutron-server dies with the message below. We can express more clearly the fact that the file is not found.

2013-10-07 15:25:52.015 CRITICAL neutron [-] 'NoneType' object has no attribute 'startswith'
2013-10-07 15:25:52.015 TRACE neutron Traceback (most recent call last):
2013-10-07 15:25:52.015 TRACE neutron File "/usr/local/bin/neutron-server", line 10, in <module>
2013-10-07 15:25:52.015 TRACE neutron sys.exit(main())
2013-10-07 15:25:52.015 TRACE neutron File "/opt/stack/neutron/neutron/server/__init__.py", line 44, in main
2013-10-07 15:25:52.015 TRACE neutron neutron_service = service.serve_wsgi(service.NeutronApiService)
2013-10-07 15:25:52.015 TRACE neutron File "/opt/stack/neutron/neutron/service.py", line 96, in serve_wsgi
2013-10-07 15:25:52.015 TRACE neutron service.start()
2013-10-07 15:25:52.015 TRACE neutron File "/opt/stack/neutron/neutron/service.py", line 65, in start
2013-10-07 15:25:52.015 TRACE neutron self.wsgi_app = _run_wsgi(self.app_name)
2013-10-07 15:25:52.015 TRACE neutron File "/opt/stack/neutron/neutron/service.py", line 109, in _run_wsgi
2013-10-07 15:25:52.015 TRACE neutron app = config.load_paste_app(app_name)
2013-10-07 15:25:52.015 TRACE neutron File "/opt/stack/neutron/neutron/common/config.py", line 140, in load_paste_app
2013-10-07 15:25:52.015 TRACE neutron cfg.CONF.api_paste_config))
2013-10-07 15:25:52.015 TRACE neutron File "/usr/lib/python2.7/posixpath.py", line 343, in abspath
2013-10-07 15:25:52.015 TRACE neutron if not isabs(path):
2013-10-07 15:25:52.015 TRACE neutron File "/usr/lib/python2.7/posixpath.py", line 53, in isabs
2013-10-07 15:25:52.015 TRACE neutron return s.startswith('/')
2013-10-07 15:25:52.015 TRACE neutron AttributeError: 'NoneType' object has no attribute 'startswith'

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

Fix proposed to branch: master
Review: https://review.openstack.org/49996

Changed in neutron:
assignee: nobody → Arata Notsu (arata776)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/49996
Committed: http://github.com/openstack/neutron/commit/2344443e36fc16a2ffd03db88d6f0440af674a45
Submitter: Jenkins
Branch: master

commit 2344443e36fc16a2ffd03db88d6f0440af674a45
Author: Arata Notsu <email address hidden>
Date: Mon Oct 7 15:51:18 2013 +0900

    Raise ConfigFilesNotFoundError if CONF.api_paste_config not found

    Otherwise it shows an incomprehensible message
    "'NoneType' object has no attribute 'startswith'."

    Change-Id: I5d87c4ceac69b26730d63727a2ec3701ccc9cecb
    Closes-bug: 1236182

Changed in neutron:
status: In Progress → Fix Committed
tags: added: neutron-core
Changed in neutron:
milestone: none → icehouse-1
importance: Undecided → Low
tags: added: havana-backport-potential
Thierry Carrez (ttx)
Changed in neutron:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: icehouse-1 → 2014.1
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.