keystone messages no being written to syslog even when use-syslog=true

Bug #1554871 reported by Leonardo Borda
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
keystone (Juju Charms Collection)
Fix Released
Medium
Leonardo Borda

Bug Description

When setting use-syslog=true the [handler_production] and [logger_root] do not get modified hence no logs are written to the syslogd daemon.

How to reproduce
1. deploy openstack from /openstack-charm-testing
 juju-deployer -c default.yaml -d trusty-kilo
 juju deploy rsyslog rsyslog-primary
 juju deploy rsyslog rsyslog-secondary
 juju deploy rsyslog rsyslog-forwarder-ha
# make the relations
 juju add-relation rsyslog-forwarder-ha rsyslog-primary
 juju add-relation rsyslog-forwarder-ha rsyslog-secondary

2. juju service set keystone use-syslog=true

Solution
Change the following sections in charm-keystone/templates/kilo/logging.conf
Change the following sections in charm-keystone/templates/icehouse/logging.conf

to
[logger_root]
{% if root_level -%}
level={{ root_level }}
{% else -%}
level=WARNING
{% endif -%}
handlers=file,production

[handler_production]
class=handlers.SysLogHandler
level=WARNING
formatter=normal_with_name
args=(('/dev/log'), handlers.SysLogHandler.LOG_USER)

This covers the case where you have a local syslog daemon as well as a remote syslog daemon.

Leonardo Borda (lborda)
Changed in keystone (Juju Charms Collection):
assignee: nobody → Leonardo Borda (lborda)
Leonardo Borda (lborda)
Changed in keystone (Juju Charms Collection):
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-keystone (master)

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

Leonardo Borda (lborda)
summary: - charm-keystone doesn't log messages to syslog even when use-syslog=true
+ Ensure log-level config option is applied consistently in charm-keystone
Leonardo Borda (lborda)
summary: - Ensure log-level config option is applied consistently in charm-keystone
+ keystone messages no being written to syslog even when use-syslog=true
description: updated
Changed in keystone (Juju Charms Collection):
importance: Undecided → Medium
milestone: none → 16.04
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-keystone (master)

Reviewed: https://review.openstack.org/290632
Committed: https://git.openstack.org/cgit/openstack/charm-keystone/commit/?id=6ac015b6d3eca4f3102cf615d978f4ca9a8d551a
Submitter: Jenkins
Branch: master

commit 6ac015b6d3eca4f3102cf615d978f4ca9a8d551a
Author: Leonardo Borda <email address hidden>
Date: Wed Mar 9 11:03:34 2016 -0500

    Fix log handlers to work for both syslog and rsyslog

    Update the [handler_production] and [logger_root] parameters in
    logging.conf in order to ensure the logs are written to the
    syslogd daemon.

    Update to use the /dev/log socket from the syslogd daemon so that
    the logging works for both rsyslog and syslog.

    Change-Id: I841f856637b9ca90b446025be6ddaadff7ae06cd
    Closes-Bug: #1554871
    Signed-off-by: Leonardo Borda <email address hidden>

Changed in keystone (Juju Charms Collection):
status: In Progress → Fix Released
Changed in keystone (Juju Charms Collection):
status: Fix Released → Fix Committed
James Page (james-page)
Changed in keystone (Juju Charms Collection):
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.