Bug 1891034 - memcached is not containerized properly: it doesn't write log files and pollutes podman logs if debug is set
Summary: memcached is not containerized properly: it doesn't write log files and pollu...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-tripleo-heat-templates
Version: 16.2 (Train)
Hardware: All
OS: All
medium
medium
Target Milestone: beta
: 16.2 (Train on RHEL 8.4)
Assignee: OSP Team
QA Contact: Joe H. Rahme
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-10-23 15:38 UTC by Alex Stupnikov
Modified: 2024-10-01 16:59 UTC (History)
9 users (show)

Fixed In Version: openstack-tripleo-heat-templates-11.3.2-2.20201210155742.a0330d2.el8ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-09-15 07:09:53 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1902922 0 None None None 2020-11-04 17:52:47 UTC
OpenStack gerrit 761715 0 None MERGED Fix memcached logging 2021-02-16 14:16:27 UTC
Red Hat Issue Tracker OSP-3028 0 None None None 2024-06-13 23:23:12 UTC
Red Hat Product Errata RHEA-2021:3483 0 None None None 2021-09-15 07:10:12 UTC

Description Alex Stupnikov 2020-10-23 15:38:07 UTC
Description of problem:

In RHOSP 16.1 memcached doesn't write anything to log files, /var/log/containers/memcached/ folder is empty.

memcached doesn't create any log files when I try to turn on debug for memcached by replacing "-v" with -vv" in /var/lib/config-data/puppet-generated/memcached/etc/sysconfig/memcached [1] and restart memcached container. At the same time after this change memcached starts flooding container logs with debug outputs and I can see them using "podman logs memcached".

When I tried to adjust memcached options to redirect all output to log file [2] I still get the same outcome: log files are not created, container logs are flooded with debug outputs.

However I got different outcome when I tried to manually run memcached command with proper arguments and redirect its output to proper log file on the OS itself: logs are redirected properly.

I tried to understand the difference using ps outputs and it looks like this issue occurs because memcached is not initiated properly inside container:

- memcached called from CLI (part of the command that contains redirect is not displayed in ps output):
   ()[memcached@controller-0 /]$ /usr/bin/memcached -p 11211 -u memcached -vv -l 127.0.0.1 2> /var/log/memcached/memcached.log
   
   # ps aux | grep memcache | grep 127
   42457     377657  0.0  0.0 446284  4500 pts/0    Sl+  15:34   0:00 /usr/bin/memcached -p 11211 -u memcached -vv -l 127.0.0.1

- ps output for memcached inside podman container (full command is displayed, redirect is included):
  
    [root@controller-0 ~]# ps aux | grep memcache | grep -v containers
    42457     358189  0.0  0.0 744088 10960 ?        Sl   15:21   0:00 /usr/bin/memcached -p 11211 -u memcached -m 16000 -c 8192 -vv -l 172.17.1.138 -U 0 -X -t 8 >> /var/log/memcached/memcached.log 2>&1
    [root@controller-0 ~]# podman exec -it memcached ps aux | grep memcache
    memcach+       7  0.0  0.0 744088 10960 ?        Sl   15:21   0:00 /usr/bin/memcached -p 11211 -u memcached -m 16000 -c 8192 -vv -l 172.17.1.138 -U 0 -X -t 8 >> /var/log/




[1]
#OPTIONS="-v -l 172.17.1.138 -U 0 -X -t 8 >> /var/log/memcached/memcached.log 2>&1"
OPTIONS="-vv -l 172.17.1.138 -U 0 -X -t 8 >> /var/log/memcached/memcached.log 2>&1"

[2]
OPTIONS="-vv -l 172.17.1.138 -U 0 -X -t 8 &>> /var/log/memcached/memcached.log"

Comment 9 errata-xmlrpc 2021-09-15 07:09:53 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Red Hat OpenStack Platform (RHOSP) 16.2 enhancement advisory), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2021:3483


Note You need to log in before you can comment on or make changes to this bug.