Description of problem: Deploy logging, set log collector to rsyslog, then wait until rsyslog pod start, check pod logs by `oc exec $rsyslog-pod -- logs`, no logs show, but check the log file in rsyslog pod, there has some lines in it. $ oc exec rsyslog-cpznd env |grep LOGGING_FILE_PATH Defaulting container name to rsyslog. Use 'oc describe pod/rsyslog-cpznd -n openshift-logging' to see all of the containers in this pod. $ oc exec rsyslog-cpznd -- logs Defaulting container name to rsyslog. Use 'oc describe pod/rsyslog-cpznd -n openshift-logging' to see all of the containers in this pod. $ oc exec rsyslog-cpznd -- ls /var/log/rsyslog/ -l Defaulting container name to rsyslog. Use 'oc describe pod/rsyslog-cpznd -n openshift-logging' to see all of the containers in this pod. total 8 -rw-r--r--. 1 root root 5544 Jul 26 02:53 rsyslog.log same phenomenon when set LOGGING_FILE_PATH=/another/dir Version-Release number of selected component (if applicable): ose-logging-rsyslog-v4.2.0-201907251819 How reproducible: Always Steps to Reproduce: 1. Deploy logging using rsyslog as log collector 2. check rsyslog pod logs by `oc exec $rsyslog-pod -- logs` 3. Actual results: can't view rsyslog pod logs by executing `oc exec $rsyslog -- logs` when set `LOGGING_FILE_PATH` to file Expected results: should be able to view rsyslog pod logs by executing `oc exec $rsyslog -- logs` when set `LOGGING_FILE_PATH` to file Additional info: When use `oc exec $rsyslog-pod -- logs -f`, I'm able to view the rsyslog pod logs. $ oc exec rsyslog-cpznd -- logs -f Defaulting container name to rsyslog. Use 'oc describe pod/rsyslog-cpznd -n openshift-logging' to see all of the containers in this pod. {"@timestamp":"2019-07-26T02:14:51.174860+00:00", "host":"rsyslog-4c5pp", "level":"warning", "facility":"syslog", "syslog-tag":"rsyslogd-2007:", "source":"rsyslogd-2007", "procid":"-", "msgid":"-", "message":"omelasticsearch: checkConn failed after 1 attempts. [v8.37.0-9.el7 try http:\/\/www.rsyslog.com\/e\/2007 ]"} {"@timestamp":"2019-07-26T02:15:21.247592+00:00", "host":"rsyslog-4c5pp", "level":"info", "facility":"syslog", "syslog-tag":"rsyslogd-2359:", "source":"rsyslogd-2359", "procid":"-", "msgid":"-", "message":"action 'elasticsearch' resumed (module 'omelasticsearch') [v8.37.0-9.el7 try http:\/\/www.rsyslog.com\/e\/2359 ]"} {"@timestamp":"2019-07-26T02:24:42.595751+00:00", "host":"rsyslog-4c5pp", "level":"info", "facility":"syslog", "syslog-tag":"rsyslogd:", "source":"rsyslogd", "procid":"-", "msgid":"-", "message":" [origin software=\"rsyslogd\" swVersion=\"8.37.0-9.el7\" x-pid=\"13\" x-info=\"http:\/\/www.rsyslog.com\"] exiting on signal 15."} INFO: Disabling Prometheus endpoint {"@timestamp":"2019-07-26T02:36:03.403188+00:00", "host":"rsyslog-cjwbv", "level":"warning", "facility":"syslog", "syslog-tag":"rsyslogd-2442:", "source":"rsyslogd-2442", "procid":"-", "msgid":"-", "message":"environment variable TZ is not set, auto correcting this to TZ=\/etc\/localtime [v8.37.0-9.el7 try http:\/\/www.rsyslog.com\/e\/2442 ]"} {"@timestamp":"2019-07-26T02:36:03.415159+00:00", "host":"rsyslog-cjwbv", "level":"info", "facility":"syslog", "syslog-tag":"rsyslogd:", "source":"rsyslogd", "procid":"-", "msgid":"-", "message":" [origin software=\"rsyslogd\" swVersion=\"8.37.0-9.el7\" x-pid=\"12\" x-info=\"http:\/\/www.rsyslog.com\"] start"} {"@timestamp":"2019-07-26T02:53:50.072728+00:00", "host":"rsyslog-cjwbv", "level":"info", "facility":"syslog", "syslog-tag":"rsyslogd:", "source":"rsyslogd", "procid":"-", "msgid":"-", "message":" [origin software=\"rsyslogd\" swVersion=\"8.37.0-9.el7\" x-pid=\"12\" x-info=\"http:\/\/www.rsyslog.com\"] exiting on signal 15."} INFO: Disabling Prometheus endpoint {"@timestamp":"2019-07-26T02:53:55.068168+00:00", "host":"rsyslog-cpznd", "level":"warning", "facility":"syslog", "syslog-tag":"rsyslogd-2442:", "source":"rsyslogd-2442", "procid":"-", "msgid":"-", "message":"environment variable TZ is not set, auto correcting this to TZ=\/etc\/localtime [v8.37.0-9.el7 try http:\/\/www.rsyslog.com\/e\/2442 ]"} {"@timestamp":"2019-07-26T02:53:55.080558+00:00", "host":"rsyslog-cpznd", "level":"info", "facility":"syslog", "syslog-tag":"rsyslogd:", "source":"rsyslogd", "procid":"-", "msgid":"-", "message":" [origin software=\"rsyslogd\" swVersion=\"8.37.0-9.el7\" x-pid=\"14\" x-info=\"http:\/\/www.rsyslog.com\"] start"} Thought this may be a regression of https://bugzilla.redhat.com/show_bug.cgi?id=1733011
> Thought this may be a regression of https://bugzilla.redhat.com/show_bug.cgi?id=1733011 At this moment, this PR [1] has not been merged yet. Once it's merged, it fixes some issues described in #c0, but not all. For instance, if you set LOGGING_FILE_PATH=/tmp/my_rsyslog.log (please note that LOGGING_FILE_PATH is a full path including the file name.), then it does not work even with [1] merged. I'm going to fix that part in this bug. [1] - https://github.com/openshift/origin-aggregated-logging/pull/1710
Verified with ose-logging-rsyslog-v4.2.0-201908011419
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, 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/RHBA-2019:2922