Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1039554

Summary: Cannot resolve relative uri 'config:api-paste.ini'; no relative_to keyword argument given
Product: Red Hat OpenStack Reporter: Xavier Queralt <xqueralt>
Component: openstack-novaAssignee: Xavier Queralt <xqueralt>
Status: CLOSED ERRATA QA Contact: Ami Jeain <ajeain>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.0CC: breeler, dallan, fdinitto, ndipanov, sradvan, yeylon
Target Milestone: z2Keywords: Triaged, ZStream
Target Release: 4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-nova-2013.2.1-3.el6ost Doc Type: Bug Fix
Doc Text:
Previously, nova-api was not passing the absolute path of the configuration file to the api-paste library if a file with the same name was found in the current directory. As a result, due to api-paste library expecting an absolute path, this caused nova-api to crash on startup if a file with the same name was found in the current directory. This has been fixed so that now, if api_paste_config contains a relative path, Compute will try to find it under the configuration directories and return the absolute path to api_paste_config. Now api-paste properly handles paths and matching file names.
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-03-04 19:04:17 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Xavier Queralt 2013-12-09 12:50:50 UTC
Description of problem:

openstack-nova-api service fails to start when the configuration key 'api_paste_config' is left to its default "api-paste.ini" and the init script is invoked from a directory containing a file with the same name.

Version-Release number of selected component (if applicable):
openstack-nova-api-2013.2-9.el6ost.noarch

How reproducible:


Steps to Reproduce:
1. openstack-config --set /etc/nova/nova.conf DEFAULT api_paste_config api-paste.ini
2. cd /etc/nova
3. /etc/init.d/openstack-nova-api start

Actual results:
API service doesn't start and there is a critical message in the logs

2013-12-09 12:57:32.318 3991 CRITICAL nova [-] Cannot resolve relative uri 'config:api-paste.ini'; no relative_to keyword argument given

Expected results:


Additional info:

When a relative path is specified in the 'api_paste_config' key, if the app loader finds a file named exactly with the same name in the current directory it won't try to get the absolute path for it. On the other hand, paste.deploy expects the path to be absolute if no base directory has been specified (which is the case), failing otherwise.


See https://github.com/openstack/nova/blob/master/nova/wsgi.py#L467

Comment 3 Ami Jeain 2014-02-20 13:16:50 UTC
verified:
# rpm -qa |grep openstack-nova
openstack-nova-console-2013.2.2-2.el6ost.noarch
openstack-nova-scheduler-2013.2.2-2.el6ost.noarch
openstack-nova-common-2013.2.2-2.el6ost.noarch
openstack-nova-conductor-2013.2.2-2.el6ost.noarch
openstack-nova-novncproxy-2013.2.2-2.el6ost.noarch
openstack-nova-cert-2013.2.2-2.el6ost.noarch
openstack-nova-api-2013.2.2-2.el6ost.noarch

also, ran regression on Horizon as it uses nova-api on its queries

Comment 5 errata-xmlrpc 2014-03-04 19:04:17 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2014-0231.html