From c361fae50afcbf33b949b522e67d6db9ac9cb725 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Evrard Date: Wed, 13 Apr 2016 13:39:59 +0100 Subject: [PATCH] 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 --- playbooks/memcached-install.yml | 26 +++++++++++++++++++ ...ached-logging-change-8825c2bdbcf824b9.yaml | 10 +++++++ 2 files changed, 36 insertions(+) create mode 100644 releasenotes/notes/memcached-logging-change-8825c2bdbcf824b9.yaml diff --git a/playbooks/memcached-install.yml b/playbooks/memcached-install.yml index 5355665320..9ff72a1405 100644 --- a/playbooks/memcached-install.yml +++ b/playbooks/memcached-install.yml @@ -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) }}" diff --git a/releasenotes/notes/memcached-logging-change-8825c2bdbcf824b9.yaml b/releasenotes/notes/memcached-logging-change-8825c2bdbcf824b9.yaml new file mode 100644 index 0000000000..ab25ff7c31 --- /dev/null +++ b/releasenotes/notes/memcached-logging-change-8825c2bdbcf824b9.yaml @@ -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.