diff options
author | Juan Antonio Osorio Robles <jaosorior@redhat.com> | 2017-10-30 10:04:18 +0200 |
---|---|---|
committer | Juan Antonio Osorio Robles <jaosorior@redhat.com> | 2017-11-01 07:44:44 +0000 |
commit | 39d4fa32949686054c4b6fd375799a937285775f (patch) | |
tree | 9d5d0c4915056d0e0d52f9c2ac097ff5e73c240d /docker/services | |
parent | 06f8f2eb1c60bcbb92989880866f43fb5422d865 (diff) |
Force memcached container log to file
We were relying on the sysconfig options to set the memcached log file,
however, this is not happening, as the redirection is being taken as an
option and ends up being ignored by the memcached command. So instead,
we set the redirection in the container template.
Change-Id: Ic94e3fd7884d518eb9558c53acdc6b294823cd0a
Closes-Bug: #1720183
(cherry picked from commit ca1fc5848661aacbf14b52e33879190c133c8e48)
Diffstat (limited to 'docker/services')
-rw-r--r-- | docker/services/memcached.yaml | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/docker/services/memcached.yaml b/docker/services/memcached.yaml index 817f9ec7..67b84249 100644 --- a/docker/services/memcached.yaml +++ b/docker/services/memcached.yaml @@ -94,7 +94,15 @@ outputs: - - /var/lib/config-data/memcached/etc/sysconfig/memcached:/etc/sysconfig/memcached:ro - /var/log/containers/memcached:/var/log/ - command: ['/bin/bash', '-c', 'source /etc/sysconfig/memcached; /usr/bin/memcached -p ${PORT} -u ${USER} -m ${CACHESIZE} -c ${MAXCONN} $OPTIONS'] + # NOTE: We're adding the log redirection here, even though should + # already be part of the options. This is because the redirection + # via the options is not working and ends up being passed as a + # parameter to the memcached command (which it silently ignores). + # Thus the need for the explicit redirection here. The redirection + # will be removed from the $OPTIONS, which is done via the puppet + # module, but we'll only be able to do this once the following pull + # request merges: https://github.com/saz/puppet-memcached/pull/88 + command: ['/bin/bash', '-c', 'source /etc/sysconfig/memcached; /usr/bin/memcached -p ${PORT} -u ${USER} -m ${CACHESIZE} -c ${MAXCONN} $OPTIONS >> /var/log/memcached.log 2>&1'] upgrade_tasks: - name: Stop and disable memcached service tags: step2 |