Bug 1739155 - keepalived container does not log on file
Summary: keepalived container does not log on file
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-tripleo-heat-templates
Version: 16.0 (Train)
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: z2
: 16.0 (Train on RHEL 8.1)
Assignee: Michele Baldessari
QA Contact:
URL:
Whiteboard:
: 1795559 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-08-08 16:05 UTC by Michele Baldessari
Modified: 2020-10-15 08:19 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-10-15 08:19:59 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1861169 0 None None None 2020-01-28 16:03:17 UTC
OpenStack gerrit 704917 0 None MERGED Fix keepalived logging on disk 2020-10-15 08:13:25 UTC

Description Michele Baldessari 2019-08-08 16:05:59 UTC
Description of problem:
Seems to me that keepalived is meant to log on file to /var/log/containers/keepalived

Because we:
A) do bind mount /var/log/ from the container to /var/log/containers/keepalived
 [root@undercloud-0 ~]# podman inspect keepalived |grep var/log|grep -e destination -e source\"
                "destination": "/var/log/",
                "source": "/var/log/containers/keepalived/",

B) We do run | tee inside the container
 [root@undercloud-0 ~]# podman exec -it keepalived sh -c 'ps -ax'
    PID TTY      STAT   TIME COMMAND
      1 ?        Ss     0:00 dumb-init --single-child -- /usr/local/bin/kolla_start
      8 ?        S      0:00 /usr/sbin/keepalived -nldD | tee -a /var/log/keepalived.log
     12 ?        S      2:18 /usr/sbin/keepalived -nldD | tee -a /var/log/keepalived.log


But the file on the host is always empty and nothing is logged there:
 [root@undercloud-0 ~]# ls -la /var/log/containers/keepalived/
total 0
drwxr-xr-x.  2 root root   6 Aug  4 09:43 .
drwxr-xr-x. 19 root root 259 Aug  4 09:46 ..


We do instead see output being logged on the stdout:
 [root@undercloud-0 ~]# ls -la /var/log/containers/stdouts/keepalived.log*
-rw-------. 1 root root 48606 Aug  8 16:02 /var/log/containers/stdouts/keepalived.log
-rw-------. 1 root root 72708 Aug  8 00:00 /var/log/containers/stdouts/keepalived.log.1
-rw-------. 1 root root  6362 Aug  7 00:00 /var/log/containers/stdouts/keepalived.log.2.gz
-rw-------. 1 root root  6373 Aug  6 00:00 /var/log/containers/stdouts/keepalived.log.3.gz
-rw-------. 1 root root  7468 Aug  5 00:00 /var/log/containers/stdouts/keepalived.log.4.gz


So I guess we either just leave it on stdout and remove the tee or we make both stdout and the log file work.

Comment 2 Alex Schultz 2020-01-29 22:22:49 UTC
*** Bug 1795559 has been marked as a duplicate of this bug. ***

Comment 3 Michele Baldessari 2020-02-01 15:09:55 UTC
704917


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