Logging not enabled for memcached

Bug #1569171 reported by Melvin Hillsman
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack-Ansible
Fix Released
Wishlist
Jean-Philippe Evrard

Bug Description

When attempting to troubleshoot a monitoring alert regarding memcached being offline/unavailable, checking the service it shows it is online and there are no logs to determine if there was indeed an issue at the time of the alert. Logging for memcached is not on even though there is a logfile directive in the configuration file /etc/memcached.conf

/etc/memcached.conf
# Ansible managed: /etc/ansible/roles/memcached_server/templates/memcached.conf modified on 2016-03-15 11:46:36 by root on infra01

-d
logfile /var/log/memcached.log
-m 1995
-p 11211
-u memcache
-l 172.29.237.146
-c 1024
-t 4

/etc/ansible/roles/memcached_server/templates/memcached.conf
# {{ ansible_managed }}

-d
logfile {{ memcached_log }}
-m {{ memcached_memory }}
-p {{ memcached_port }}
-u {{ memcached_user }}
-l {{ memcached_listen }}
-c {{ memcached_connections }}
-t {{ memcached_threads }}

Looking at the code, I believe memcached_log should be memcached_log_file and memcached_log_level should be added with '-v' as the default. Confirmation regarding the logging not being available with simply using logfile can be found here: https://docs.oracle.com/cd/E17952_01/refman-5.6-en/ha-memcached-using-logs.html

If you enable verbose mode, using the -v, -vv, or -vvv options, then the information output by memcached includes details of the operations being performed.
Without the verbose options, memcached normally produces no output during normal operating.
Output when using -v
The lowest verbosity level shows you:
Errors and warnings
Transient errors
Protocol and socket errors, including exhausting available connections
Each registered client connection, including the socket descriptor number and the protocol used.

Revision history for this message
Jesse Pretorius (jesse-pretorius) wrote :

Logg rotation and rsyslog redirection should also be implemented.

Changed in openstack-ansible:
status: New → Confirmed
importance: Undecided → Wishlist
Changed in openstack-ansible:
assignee: nobody → Jean-Philippe Evrard (jean-philippe-evrard)
Changed in openstack-ansible:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstack-ansible-memcached_server (master)

Reviewed: https://review.openstack.org/305161
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible-memcached_server/commit/?id=2d937511d63002ec730da36fa5e89424017c4299
Submitter: Jenkins
Branch: master

commit 2d937511d63002ec730da36fa5e89424017c4299
Author: Jean-Philippe Evrard <email address hidden>
Date: Wed Apr 13 13:36:28 2016 +0100

    Improved logging for memcached

    - Moved to the right folder to get it accessed on bare metal
      when containerized
    - Making it work for rsyslog and logrotation's existing
      roles
    - Changed the gate tests to reflect path change

    Closes-Bug: #1569171

    Change-Id: I3a1c2f50ab63b55b39318ba40c0921f6b738cafb

Changed in openstack-ansible:
status: In Progress → Fix Released
Changed in openstack-ansible:
status: Fix Released → Fix Committed
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstack-ansible (master)

Reviewed: https://review.openstack.org/305165
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible/commit/?id=c361fae50afcbf33b949b522e67d6db9ac9cb725
Submitter: Jenkins
Branch: master

commit c361fae50afcbf33b949b522e67d6db9ac9cb725
Author: Jean-Philippe Evrard <email address hidden>
Date: Wed Apr 13 13:39:59 2016 +0100

    Improved logging for memcached (OSA calling part)

    - Moved to the right folder to get it accessed on bare metal
      when containerized
    - Prepared the logging when on metal
    - Rsyslog and logrotation implemented

    Closes-Bug: #1569171

    Depends-On: I3a1c2f50ab63b55b39318ba40c0921f6b738cafb
    Change-Id: I61b526334929349f9b10bda5d62b76459ebcf534

Changed in openstack-ansible:
milestone: none → newton-1
Revision history for this message
Thierry Carrez (ttx) wrote : Fix included in openstack/openstack-ansible 14.0.0.0b1

This issue was fixed in the openstack/openstack-ansible 14.0.0.0b1 development milestone.

Revision history for this message
Thierry Carrez (ttx) wrote : Fix included in openstack/openstack-ansible-memcached_server 14.0.0.0b1

This issue was fixed in the openstack/openstack-ansible-memcached_server 14.0.0.0b1 development milestone.

Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/openstack-ansible 14.0.0.0b2

This issue was fixed in the openstack/openstack-ansible 14.0.0.0b2 development milestone.

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.