Description of problem: Set `LOGGING_FILE_PATH=console` in rsyslog env var, then run `oc exec $rsyslog-pod -- logs` to view pod logs, the output shows: ls: cannot access ./rsyslog*: No such file or directory $ oc exec rsyslog-5mbjh env |grep LOGGING_FILE Defaulting container name to rsyslog. Use 'oc describe pod/rsyslog-5mbjh -n openshift-logging' to see all of the containers in this pod. LOGGING_FILE_PATH=console $ oc exec rsyslog-5mbjh -- logs Defaulting container name to rsyslog. Use 'oc describe pod/rsyslog-5mbjh -n openshift-logging' to see all of the containers in this pod. ls: cannot access ./rsyslog*: No such file or directory Version-Release number of selected component (if applicable): ose-logging-rsyslog-v4.2.0-201907232219 How reproducible: Always Steps to Reproduce: 1. Deploy logging using rsyslog as log collector 2. oc set env ds/rsyslog LOGGING_FILE_PATH=console 3. oc exec $rsyslog-pod -- logs Actual results: oc exec $rsyslog-pod -- logs shows: ls: cannot access ./rsyslog*: No such file or directory Expected results: when executing `oc exec $rsyslog-pod -- logs`: no log show up, should show some messages to tell user that the correct command to view the pod log is `oc logs -c rsyslog $rsyslog-pod` Additional info:
https://github.com/openshift/origin-aggregated-logging/pull/1685
Verified with ose-logging-rsyslog-v4.2.0-201907251819.
Sorry, @Qiaoling. I found my fix caused a regression... :( I've opened a pr. https://github.com/openshift/origin-aggregated-logging/pull/1710
PR https://github.com/openshift/origin-aggregated-logging/pull/1710 was merged but the following error was reported: An error was encountered searching the Bugzilla server at https://bugzilla.redhat.com for external trackers on bug 1733011: could not parse external identifier "#1685" as pull: invalid pull identifier with 7 parts: "#1685" Please contact an administrator to resolve this issue, then request a bug refresh with /bugzilla refresh. In response to this: Bug 1733011: Inappropriate message when view rsyslog pod logs by `oc… Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. Manually changing the bz status from POST to MODIFIED.
The fix work on openshift/ose-logging-rsyslog/images/v4.2.0-201907311819"
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