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
This commit is contained in:
Jean-Philippe Evrard 2016-04-13 13:39:59 +01:00
parent 99a190be9b
commit c361fae50a
2 changed files with 36 additions and 0 deletions

View File

@ -42,10 +42,36 @@
retries: 3
tags:
- ssh-wait
- name: Create log dir
file:
path: "/openstack/log/{{ inventory_hostname }}-memcached"
state: directory
when: is_metal | bool
tags:
- memcached-logs
- memcached-log-dirs
- name: Create log aggregation links
file:
src: "/openstack/log/{{ inventory_hostname }}-memcached"
dest: "/var/log/memcached"
state: "link"
force: "yes"
when: is_metal | bool
tags:
- memcached-logs
roles:
- { role: "memcached_server", tags: [ "memcached-server" ] }
- role: "system_crontab_coordination"
tags:
- "system-crontab-coordination"
- role: "rsyslog_client"
rsyslog_client_log_rotate_file: memcached_log_rotate
rsyslog_client_log_dir: "/var/log/memcached"
rsyslog_client_config_name: "99-memcached-rsyslog-client.conf"
tags:
- "memcached-rsyslog-client"
- "rsyslog-client"
vars:
is_metal: "{{ properties.is_metal|default(false) }}"

View File

@ -0,0 +1,10 @@
---
features:
- |
memcached now logs with multiple levels of verbosity, depending on
the user variables. Setting ``debug: True`` enables maximum verbosity while
setting ``verbose: True`` logs with an intermediate level.
upgrade:
- The memcached log is removed from /var/log/memcached.log and is now
stored in the /var/log/memcached folder.