Bug 1876853 - pod logs don't show a last line without a newline character (\n) at the end
Summary: pod logs don't show a last line without a newline character (\n) at the end
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 4.5
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: 4.6.0
Assignee: Jon Jackson
QA Contact: Siva Reddy
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-09-08 11:16 UTC by Filip Krepinsky
Modified: 2020-10-27 16:38 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: If the final line of a log was not newline-terminated, it was not displayed in the resource log view. Consequence: Single line logs or logs that ended without newline termination would be missing content in the log view. Fix: Update log view to include the final log line even when it is not newline-terminated. Result: Log view shows entire log content, even when final line is not terminated with a newline.
Clone Of:
Environment:
Last Closed: 2020-10-27 16:38:34 UTC
Target Upstream Version:


Attachments (Terms of Use)
pod.yaml (198 bytes, text/plain)
2020-09-08 11:16 UTC, Filip Krepinsky
no flags Details
Screen shot with pod logs (55.93 KB, image/png)
2020-10-06 09:19 UTC, Siva Reddy
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github openshift console pull 6770 0 None closed Bug 1876853: Fix resource log not showing last line 2020-10-14 16:31:59 UTC
Red Hat Product Errata RHBA-2020:4196 0 None None None 2020-10-27 16:38:47 UTC

Description Filip Krepinsky 2020-09-08 11:16:31 UTC
Created attachment 1714074 [details]
pod.yaml

Description of problem:
pod logs don't show a last line without a newline character (\n) at the end


Steps to Reproduce:
1. Create attached pod.yaml
2. Pod Logs does not show "hello" output


Expected results:
Pod Logs should show the output

Comment 3 Yadan Pei 2020-09-30 05:52:11 UTC
We need newer nightly to test the fix, 4.6.0-0.nightly-2020-09-29-170625 doesn't include the fix yet

Changing QA Contact to Siva then he can verify the bug when there is new build during Chinese holiday

Comment 4 Siva Reddy 2020-10-06 09:16:37 UTC
The pod logs now show the output. Hence moving this bug to verified.

Version:
  4.6.0-0.nightly-2020-10-03-032912

Steps to verify:
1. Create a new project and the create a pod with the pod.yaml attached.
   oc create new-project
   oc create -f pod.yaml
2. Log in to the web console as kube admin
3. Navigate to PageSideBar>Workloads>Pods
4. Select the created project from the drop down
5. Click on the newly created pod in the page displayed.
6. click on the logs tab
7. Note that the "Hello" output is displayed.

attached the screenshot of the page.

Comment 5 Siva Reddy 2020-10-06 09:19:24 UTC
Created attachment 1719311 [details]
Screen shot with pod logs

Comment 8 errata-xmlrpc 2020-10-27 16:38:34 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 (OpenShift Container Platform 4.6 GA Images), 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-2020:4196


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