← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1712226] [NEW] can not find glance-api-paste.ini in a case

 

Public bug reported:

Test case step:

1. Enable the option "config_file" in section "paste_deploy" from configuration file glance-api.conf
2. Start the glance-api with command "glance-api --config-dir /etc/glance --log-dir /var/log/glance"
   in console

Result:

If the current directory is not in the /etc/glance, the configuration
file 'glance-api-paste.ini' file will not be found. and the IOError is
not been catched.


I run the command in directory  /var/log/glance/, and the error info in log shows as:

2017-08-22 09:13:49.727 22012 DEBUG glance.common.config [-] Loading glance-api-keystone from /var/log/glance/glance-api-paste.ini load_paste_app /usr/local/lib/python2.7/dist-packages/glance/common/config.py:806
2017-08-22 09:13:49.728 22012 CRITICAL glance [-] Unhandled error: IOError: [Errno 2] No such file or directory: '/var/log/glance/glance-api-paste.ini'
2017-08-22 09:13:49.728 22012 ERROR glance Traceback (most recent call last):
2017-08-22 09:13:49.728 22012 ERROR glance   File "/usr/local/bin/glance-api", line 10, in <module>
2017-08-22 09:13:49.728 22012 ERROR glance     sys.exit(main())
2017-08-22 09:13:49.728 22012 ERROR glance   File "/usr/local/lib/python2.7/dist-packages/glance/cmd/api.py", line 88, in main
2017-08-22 09:13:49.728 22012 ERROR glance     server.start(config.load_paste_app('glance-api'), default_port=9292)
2017-08-22 09:13:49.728 22012 ERROR glance   File "/usr/local/lib/python2.7/dist-packages/glance/common/config.py", line 808, in load_paste_app
2017-08-22 09:13:49.728 22012 ERROR glance     app = deploy.loadapp("config:%s" % conf_file, name=app_name)
2017-08-22 09:13:49.728 22012 ERROR glance   File "/usr/local/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 247, in loadapp
2017-08-22 09:13:49.728 22012 ERROR glance     return loadobj(APP, uri, name=name, **kw)
2017-08-22 09:13:49.728 22012 ERROR glance   File "/usr/local/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 271, in loadobj
2017-08-22 09:13:49.728 22012 ERROR glance     global_conf=global_conf)
2017-08-22 09:13:49.728 22012 ERROR glance   File "/usr/local/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 296, in loadcontext
2017-08-22 09:13:49.728 22012 ERROR glance     global_conf=global_conf)
2017-08-22 09:13:49.728 22012 ERROR glance   File "/usr/local/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 317, in _loadconfig
2017-08-22 09:13:49.728 22012 ERROR glance     loader = ConfigLoader(path)
2017-08-22 09:13:49.728 22012 ERROR glance   File "/usr/local/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 393, in __init__
2017-08-22 09:13:49.728 22012 ERROR glance     with open(filename) as f:
2017-08-22 09:13:49.728 22012 ERROR glance IOError: [Errno 2] No such file or directory: '/var/log/glance/glance-api-paste.ini'
2017-08-22 09:13:49.728 22012 ERROR glance

** Affects: glance
     Importance: Undecided
     Assignee: zhiguo.li (zhiguo)
         Status: New

** Description changed:

  Test case step:
  
- 1. Enable the option "config_file" in section "paste_deploy" from configuration file glance-api.conf 
- 2. Start the glance-api with command "glance-api --config-dir /etc/glance --log-dir /var/log/glance"        
-    in console
+ 1. Enable the option "config_file" in section "paste_deploy" from configuration file glance-api.conf
+ 2. Start the glance-api with command "glance-api --config-dir /etc/glance --log-dir /var/log/glance"
+    in console
  
  Result:
  
  If the current directory is not in the /etc/glance, the configuration
  file 'glance-api-paste.ini' file will not be found. and the IOError is
  not been catched.
  
- The error info in log shows as:
+ 
+ I run the command in directory  /var/log/glance/, and the error info in log shows as:
  
  2017-08-22 09:13:49.727 22012 DEBUG glance.common.config [-] Loading glance-api-keystone from /var/log/glance/glance-api-paste.ini load_paste_app /usr/local/lib/python2.7/dist-packages/glance/common/config.py:806
  2017-08-22 09:13:49.728 22012 CRITICAL glance [-] Unhandled error: IOError: [Errno 2] No such file or directory: '/var/log/glance/glance-api-paste.ini'
  2017-08-22 09:13:49.728 22012 ERROR glance Traceback (most recent call last):
  2017-08-22 09:13:49.728 22012 ERROR glance   File "/usr/local/bin/glance-api", line 10, in <module>
  2017-08-22 09:13:49.728 22012 ERROR glance     sys.exit(main())
  2017-08-22 09:13:49.728 22012 ERROR glance   File "/usr/local/lib/python2.7/dist-packages/glance/cmd/api.py", line 88, in main
  2017-08-22 09:13:49.728 22012 ERROR glance     server.start(config.load_paste_app('glance-api'), default_port=9292)
  2017-08-22 09:13:49.728 22012 ERROR glance   File "/usr/local/lib/python2.7/dist-packages/glance/common/config.py", line 808, in load_paste_app
  2017-08-22 09:13:49.728 22012 ERROR glance     app = deploy.loadapp("config:%s" % conf_file, name=app_name)
  2017-08-22 09:13:49.728 22012 ERROR glance   File "/usr/local/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 247, in loadapp
  2017-08-22 09:13:49.728 22012 ERROR glance     return loadobj(APP, uri, name=name, **kw)
  2017-08-22 09:13:49.728 22012 ERROR glance   File "/usr/local/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 271, in loadobj
  2017-08-22 09:13:49.728 22012 ERROR glance     global_conf=global_conf)
  2017-08-22 09:13:49.728 22012 ERROR glance   File "/usr/local/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 296, in loadcontext
  2017-08-22 09:13:49.728 22012 ERROR glance     global_conf=global_conf)
  2017-08-22 09:13:49.728 22012 ERROR glance   File "/usr/local/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 317, in _loadconfig
  2017-08-22 09:13:49.728 22012 ERROR glance     loader = ConfigLoader(path)
  2017-08-22 09:13:49.728 22012 ERROR glance   File "/usr/local/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 393, in __init__
  2017-08-22 09:13:49.728 22012 ERROR glance     with open(filename) as f:
  2017-08-22 09:13:49.728 22012 ERROR glance IOError: [Errno 2] No such file or directory: '/var/log/glance/glance-api-paste.ini'
  2017-08-22 09:13:49.728 22012 ERROR glance

** Changed in: glance
     Assignee: (unassigned) => zhiguo.li (zhiguo)

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

Title:
  can not find glance-api-paste.ini in a  case

Status in Glance:
  New

Bug description:
  Test case step:

  1. Enable the option "config_file" in section "paste_deploy" from configuration file glance-api.conf
  2. Start the glance-api with command "glance-api --config-dir /etc/glance --log-dir /var/log/glance"
     in console

  Result:

  If the current directory is not in the /etc/glance, the configuration
  file 'glance-api-paste.ini' file will not be found. and the IOError is
  not been catched.

  
  I run the command in directory  /var/log/glance/, and the error info in log shows as:

  2017-08-22 09:13:49.727 22012 DEBUG glance.common.config [-] Loading glance-api-keystone from /var/log/glance/glance-api-paste.ini load_paste_app /usr/local/lib/python2.7/dist-packages/glance/common/config.py:806
  2017-08-22 09:13:49.728 22012 CRITICAL glance [-] Unhandled error: IOError: [Errno 2] No such file or directory: '/var/log/glance/glance-api-paste.ini'
  2017-08-22 09:13:49.728 22012 ERROR glance Traceback (most recent call last):
  2017-08-22 09:13:49.728 22012 ERROR glance   File "/usr/local/bin/glance-api", line 10, in <module>
  2017-08-22 09:13:49.728 22012 ERROR glance     sys.exit(main())
  2017-08-22 09:13:49.728 22012 ERROR glance   File "/usr/local/lib/python2.7/dist-packages/glance/cmd/api.py", line 88, in main
  2017-08-22 09:13:49.728 22012 ERROR glance     server.start(config.load_paste_app('glance-api'), default_port=9292)
  2017-08-22 09:13:49.728 22012 ERROR glance   File "/usr/local/lib/python2.7/dist-packages/glance/common/config.py", line 808, in load_paste_app
  2017-08-22 09:13:49.728 22012 ERROR glance     app = deploy.loadapp("config:%s" % conf_file, name=app_name)
  2017-08-22 09:13:49.728 22012 ERROR glance   File "/usr/local/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 247, in loadapp
  2017-08-22 09:13:49.728 22012 ERROR glance     return loadobj(APP, uri, name=name, **kw)
  2017-08-22 09:13:49.728 22012 ERROR glance   File "/usr/local/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 271, in loadobj
  2017-08-22 09:13:49.728 22012 ERROR glance     global_conf=global_conf)
  2017-08-22 09:13:49.728 22012 ERROR glance   File "/usr/local/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 296, in loadcontext
  2017-08-22 09:13:49.728 22012 ERROR glance     global_conf=global_conf)
  2017-08-22 09:13:49.728 22012 ERROR glance   File "/usr/local/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 317, in _loadconfig
  2017-08-22 09:13:49.728 22012 ERROR glance     loader = ConfigLoader(path)
  2017-08-22 09:13:49.728 22012 ERROR glance   File "/usr/local/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 393, in __init__
  2017-08-22 09:13:49.728 22012 ERROR glance     with open(filename) as f:
  2017-08-22 09:13:49.728 22012 ERROR glance IOError: [Errno 2] No such file or directory: '/var/log/glance/glance-api-paste.ini'
  2017-08-22 09:13:49.728 22012 ERROR glance

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


Follow ups