keystone sometime fails to come up during provisioning due to log file permission

Bug #1404789 reported by Vedamurthy Joshi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Fix Released
High
Senthilnathan Murugappan
R2.0
New
High
Senthilnathan Murugappan

Bug Description

3.0 3.0-2507~icehouse.el6 (Centos 6.5) Multi-node setup

In this sanity run, keystone failed to come up : http://anamika.englab.juniper.net:8080/job/centos65_icehouse_Multi_Node_Sanity/104/console

On restart of keystone, it came up fine.

keystone.log :
=============
Traceback (most recent call last):
  File "/usr/bin/keystone-all", line 107, in <module>
    config.setup_logging()
  File "/usr/lib/python2.6/site-packages/keystone/config.py", line 56, in setup_logging
    log.setup('keystone')
  File "/usr/lib/python2.6/site-packages/keystone/openstack/common/log.py", line 461, in setup
    _setup_logging_from_conf(product_name, version)
  File "/usr/lib/python2.6/site-packages/keystone/openstack/common/log.py", line 525, in _setup_logging_from_conf
    filelog = logging.handlers.WatchedFileHandler(logpath)
  File "/usr/lib64/python2.6/logging/handlers.py", line 377, in __init__
    logging.FileHandler.__init__(self, filename, mode, encoding, delay)
  File "/usr/lib64/python2.6/logging/__init__.py", line 827, in __init__
    StreamHandler.__init__(self, self._open())
  File "/usr/lib64/python2.6/logging/__init__.py", line 846, in _open
    stream = open(self.baseFilename, self.mode)
IOError: [Errno 13] Permission denied: '/var/log/keystone/keystone.log'

[root@a6s44 ~]# ls -l /var/log/ |grep keystone
drwxr-x--- 2 keystone keystone 4096 Dec 21 20:57 keystone
[root@a6s44 ~]# ls -l /var/log/keystone/
total 8
-rw-r--r-- 1 keystone keystone 6030 Dec 19 17:07 keystone.log
[root@a6s44 ~]#

[root@a6s44 ~]# service keystone restart
keystone: ERROR (not running)
keystone: started
[root@a6s44 ~]# service keystone status
keystone RUNNING pid 22333, uptime 0:00:03
[root@a6s44 ~]#

Tags: provisioning
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/5872
Committed: http://github.org/Juniper/contrail-packaging/commit/fcafd0238cd1efa90250d217b44468e058f02fa9
Submitter: Zuul
Branch: master

commit fcafd0238cd1efa90250d217b44468e058f02fa9
Author: Senthilnathan Murugappan <email address hidden>
Date: Mon Dec 22 16:37:43 2014 -0800

Fixing permission denied issue for openstack comp. log files

Issue:
When openstack components were started we observe permission denied issue
for /var/log/<comp>/<comp>.log

Reason:
On certain supervisor ini file for openstack components we have configured
the stdout and stderr to be redirected to the same /var/log/<comp>/<comp>.log
file used by the process. Due to which the logfiles were created with root uid
where as the components were started using their own uid hence they didnt have
permission to write to the logfile

Change-Id: I6f6260fa68e9a69463293b1246281477cd2170fe
Closes-Bug: #1404789

Changed in juniperopenstack:
status: New → Fix Committed
Changed in juniperopenstack:
assignee: Ignatious Johnson Christopher (ijohnson-x) → Senthilnathan Murugappan (msenthil)
Changed in juniperopenstack:
status: Fix Committed → Fix Released
Revision history for this message
shajuvk (shajuvk) wrote :

Fix also need in cento65 R2.0 branch

Sanity failed for the same issue

http://anamika.englab.juniper.net:8080/job/centos65_icehouse_Multi_Node_Sanity/156/consoleFull

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.