← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1184588] Re: Glance uses wrong path for config file

 

You can set the path explicitly in glance-api.conf under:

[paste_deploy]
config_file = <path>

If no value is specified it will look for the file in the same directory
as the glance-api-conf file.  If a relative path is specified it will
look for it relative to the CWD.  An absolute path will resolve as
expected.

** Changed in: glance
       Status: New => Invalid

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/1184588

Title:
  Glance uses wrong path for config file

Status in OpenStack Image Registry and Delivery Service (Glance):
  Invalid

Bug description:
  Hi, I found this bug while trying to set up openstack-grizzly testing
  setup.

  OS: CentOS 6.4
  Glance version: 2013.1-2.el6 (installed from the package)

  When attempting to start it (applied both to glance-apie and glance-
  registry) shows as "started", but immediately quits, here's what's in
  the log file:

  2013-05-27 14:34:16.817 10267 DEBUG glance.common.config [-] Loading glance-api-keystone from /root/glance-api-paste.ini load_paste_app /usr/lib/python2.6/site-packages/glance/common/config.py:203
  2013-05-27 14:34:16.817 10267 CRITICAL glance [-] [Errno 13] Permission denied: '/root/glance-api-paste.ini'
  2013-05-27 14:34:16.817 10267 TRACE glance Traceback (most recent call last):
  2013-05-27 14:34:16.817 10267 TRACE glance   File "/usr/bin/glance-api", line 60, in <module>
  2013-05-27 14:34:16.817 10267 TRACE glance     server.start(config.load_paste_app(), default_port=9292)
  2013-05-27 14:34:16.817 10267 TRACE glance   File "/usr/lib/python2.6/site-packages/glance/common/config.py", line 205, in load_paste_app
  2013-05-27 14:34:16.817 10267 TRACE glance     app = deploy.loadapp("config:%s" % conf_file, name=app_name)
  2013-05-27 14:34:16.817 10267 TRACE glance   File "/usr/lib/python2.6/site-packages/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/loadwsgi.py", line 247, in loadapp
  2013-05-27 14:34:16.817 10267 TRACE glance     return loadobj(APP, uri, name=name, **kw)
  2013-05-27 14:34:16.817 10267 TRACE glance   File "/usr/lib/python2.6/site-packages/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/loadwsgi.py", line 271, in loadobj
  2013-05-27 14:34:16.817 10267 TRACE glance     global_conf=global_conf)
  2013-05-27 14:34:16.817 10267 TRACE glance   File "/usr/lib/python2.6/site-packages/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/loadwsgi.py", line 296, in loadcontext
  2013-05-27 14:34:16.817 10267 TRACE glance     global_conf=global_conf)
  2013-05-27 14:34:16.817 10267 TRACE glance   File "/usr/lib/python2.6/site-packages/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/loadwsgi.py", line 317, in _loadconfig
  2013-05-27 14:34:16.817 10267 TRACE glance     loader = ConfigLoader(path)
  2013-05-27 14:34:16.817 10267 TRACE glance   File "/usr/lib/python2.6/site-packages/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/loadwsgi.py", line 393, in __init__
  2013-05-27 14:34:16.817 10267 TRACE glance     with open(filename) as f:
  2013-05-27 14:34:16.817 10267 TRACE glance IOError: [Errno 13] Permission denied: '/root/glance-api-paste.ini'

  
  As you see, it uses relative path for the config file (I was in /root/ when I invoked the startup script). If I cd to /etc/glance/ and then run the startup script, it works, so, for now, I just modified the startup script to cd to that directory and then cd back.

To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1184588/+subscriptions