← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1133198] Re: Startup failed if logdir doesn't exist

 

The user running keystone should (in *most* cases) not be capable of
creating and properly assigning permissions to the non-existant
directory.

I'd also argue that the currently provided error message is fairly
explicit in indicating that the directory is not writable (No such file
or directory: '/var/tmp/keystone/keystone.log').

** Changed in: keystone
       Status: New => Won't Fix

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

Title:
  Startup failed if logdir doesn't exist

Status in OpenStack Identity (Keystone):
  Won't Fix

Bug description:
  The startup of keystone-all fails if the configured log_dir doesn't
  exist.

  ---8<----
  Traceback (most recent call last):
    File "/usr/bin/keystone-all", line 5, in <module>
      pkg_resources.run_script('keystone==2013.1.a195.gac2fb0f', 'keystone-all')
    File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 499, in run_script
      self.require(requires)[0].run_script(script_name, ns)
    File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 1239, in run_script
      execfile(script_filename, namespace, namespace)
    File "/usr/lib/python2.7/site-packages/keystone-2013.1.a195.gac2fb0f-py2.7.egg/EGG-INFO/scripts/keystone-all", line 82, in <module>
      config.setup_logging(CONF)
    File "/usr/lib/python2.7/site-packages/keystone-2013.1.a195.gac2fb0f-py2.7.egg/keystone/config.py", line 119, in setup_logging
      handler = logging.WatchedFileHandler(logfile)
    File "/usr/lib64/python2.7/logging/handlers.py", line 386, in __init__
      logging.FileHandler.__init__(self, filename, mode, encoding, delay)
    File "/usr/lib64/python2.7/logging/__init__.py", line 897, in __init__
      StreamHandler.__init__(self, self._open())
    File "/usr/lib64/python2.7/logging/__init__.py", line 916, in _open
      stream = open(self.baseFilename, self.mode)
  IOError: [Errno 2] No such file or directory: '/var/tmp/keystone/keystone.log'
  ---->8----

  options:
  - create the directory struture
  - catch the error and report the missing directory

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