start of keystone not possible when use_syslog=True but syslog is not accessible/running

Bug #1328501 reported by Christian Berendt
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
Medium
Unassigned
oslo.log
Fix Released
Undecided
Lance Bragstad

Bug Description

[ 101s] msg: Traceback (most recent call last):
[ 101s] File "/usr/bin/keystone-manage", line 51, in <module>
[ 101s] cli.main(argv=sys.argv, config_files=config_files)
[ 101s] File "/usr/lib64/python2.6/site-packages/keystone/cli.py", line 190, in main
[ 101s] config.setup_logging()
[ 101s] File "/usr/lib64/python2.6/site-packages/keystone/config.py", line 56, in setup_logging
[ 101s] log.setup('keystone')
[ 101s] File "/usr/lib64/python2.6/site-packages/keystone/openstack/common/log.py", line 461, in setup
[ 101s] _setup_logging_from_conf(product_name, version)
[ 101s] File "/usr/lib64/python2.6/site-packages/keystone/openstack/common/log.py", line 520, in _setup_logging_from_conf
[ 101s] facility=facility)
[ 101s] File "/usr/lib64/python2.6/logging/handlers.py", line 715, in __init__
[ 101s] self._connect_unixsocket(address)
[ 101s] File "/usr/lib64/python2.6/logging/handlers.py", line 730, in _connect_unixsocket
[ 101s] self.socket.connect(address)
[ 101s] File "<string>", line 1, in connect
[ 101s] socket.error: [Errno 2] No such file or directory

Dolph Mathews (dolph)
Changed in keystone:
importance: Undecided → Medium
Dolph Mathews (dolph)
Changed in keystone:
status: New → Triaged
Revision history for this message
Lance Bragstad (lbragstad) wrote :

Looks like this is happening in oslo-incubator/openstack/common/log.py:

https://github.com/openstack/oslo-incubator/blob/36e5c2d26719d58aa31e4f0f4dccc50d6d996b8f/openstack/common/log.py#L486-L495

This should be fixed in oslo-incubator and moved over to Keystone in the next sync.

Working on a patch.

Revision history for this message
Lance Bragstad (lbragstad) wrote :

Steps to reproduce

1.) set use_syslog=true in keystone.conf
2.) make sure rsyslog(syslog) process is not running
3.) restart Keystone

http://paste.openstack.org/show/89191/

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to oslo-incubator (master)

Fix proposed to branch: master
Review: https://review.openstack.org/110753

Changed in oslo:
assignee: nobody → Lance Bragstad (lbragstad)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to oslo-incubator (master)

Reviewed: https://review.openstack.org/110753
Committed: https://git.openstack.org/cgit/openstack/oslo-incubator/commit/?id=1188d88a73e75da5c143d0dfad34e10dad0daee0
Submitter: Jenkins
Branch: master

commit 1188d88a73e75da5c143d0dfad34e10dad0daee0
Author: Lance Bragstad <email address hidden>
Date: Wed Jul 30 17:31:45 2014 +0000

    Except socket.error if syslog isn't running

    When setting `use_syslog=true` and restarting the service, if syslog (or
    rsyslog) isn't running, except the error and inform the user instead
    of failing with a generic Errno 111.

    Change-Id: Ie4ce3e84dcff838b569d6e2711aee5ea21c01083
    Partial-Bug: 1328501

Revision history for this message
Lance Bragstad (lbragstad) wrote :

FIx landed in o-i, should just needed to by sync'd to Keystone.

Revision history for this message
Lance Bragstad (lbragstad) wrote :

The fix has been sync'd to Keystone:

https://review.openstack.org/#/c/114863/

Changed in keystone:
status: Triaged → In Progress
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in keystone:
milestone: none → juno-3
status: Fix Committed → Fix Released
affects: oslo-incubator → oslo.log
Thierry Carrez (ttx)
Changed in keystone:
milestone: juno-3 → 2014.2
Changed in oslo.log:
status: In Progress → Fix Committed
Changed in oslo.log:
milestone: none → 0.1.0
status: Fix Committed → Fix Released
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.