Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1891034

Summary: memcached is not containerized properly: it doesn't write log files and pollutes podman logs if debug is set
Product: Red Hat OpenStack Reporter: Alex Stupnikov <astupnik>
Component: openstack-tripleo-heat-templatesAssignee: OSP Team <rhos-maint>
Status: CLOSED ERRATA QA Contact: Joe H. Rahme <jhakimra>
Severity: medium Docs Contact:
Priority: medium    
Version: 16.2 (Train)CC: apevec, bzehrfuc, jschluet, lhh, lmiccini, mburns, mgarciac, michal.vasko, michele
Target Milestone: betaKeywords: Triaged
Target Release: 16.2 (Train on RHEL 8.4)   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: openstack-tripleo-heat-templates-11.3.2-2.20201210155742.a0330d2.el8ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-09-15 07:09:53 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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