Bug 1733011

Summary: Inappropriate message when view rsyslog pod logs by `oc exec $rsyslog-pod -- logs` after setting `LOGGING_FILE_PATH=console`
Product: OpenShift Container Platform Reporter: Qiaoling Tang <qitang>
Component: LoggingAssignee: Noriko Hosoi <nhosoi>
Status: CLOSED ERRATA QA Contact: Qiaoling Tang <qitang>
Severity: low Docs Contact:
Priority: unspecified    
Version: 4.2.0CC: anli, aos-bugs, jcantril, nhosoi, rmeggins
Target Milestone: ---   
Target Release: 4.2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-10-16 06:33:28 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 Qiaoling Tang 2019-07-25 01:58:43 UTC
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:

Comment 3 Qiaoling Tang 2019-07-26 02:29:34 UTC
Verified with ose-logging-rsyslog-v4.2.0-201907251819.

Comment 4 Noriko Hosoi 2019-07-26 21:58:26 UTC
Sorry, @Qiaoling.  I found my fix caused a regression... :(  I've opened a pr.

https://github.com/openshift/origin-aggregated-logging/pull/1710

Comment 5 Noriko Hosoi 2019-08-01 00:23:51 UTC
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.

Comment 7 Anping Li 2019-08-01 10:03:25 UTC
The fix work on openshift/ose-logging-rsyslog/images/v4.2.0-201907311819"

Comment 8 errata-xmlrpc 2019-10-16 06:33:28 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, 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