Bug 1835137

Summary: When a pod is Pending and no container is running pod->pod dtails->log is crashing
Product: OpenShift Container Platform Reporter: Yaacov Zamir <yzamir>
Component: Management ConsoleAssignee: Yadan Pei <yapei>
Status: CLOSED ERRATA QA Contact: Yadan Pei <yapei>
Severity: low Docs Contact:
Priority: low    
Version: 4.5CC: aos-bugs, jokerman, yapei
Target Milestone: ---   
Target Release: 4.6.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-10-27 15:59:18 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:
Attachments:
Description Flags
the crashing logs page
none
Log page for failing pod
none
Logs tab loading successfully for Pending pod none

Description Yaacov Zamir 2020-05-13 08:34:28 UTC
Created attachment 1687989 [details]
the crashing logs page

Description of problem:
When a pod is Pending and no container is running pod->pod dtails->log is crashing

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. Create a pod with bad image
2. what for it to become "pending"
3. browse to "pod->pod dtails->log" for that pod.

Actual results:
Oh no! Something went wrong.

Expected results:
Empty logs page

Additional info:

Comment 1 Zac Herman 2020-05-29 15:41:03 UTC
Actively working this bug, but will most likely continue into upcoming sprint.

Comment 2 Zac Herman 2020-06-03 23:16:11 UTC
yzamir - can you please provide a "bad image" that I can use to test this.  Thanks.

Comment 3 Yaacov Zamir 2020-06-04 03:51:11 UTC
> can you please provide a "bad image" that I can use to test this.  Thanks.

This is a Pod YAML that can create this issue:

apiVersion: v1
kind: Pod
metadata:
  name: example
  labels:
    app: hello-openshift
spec:
  nodeSelector:
    disktype: none-existing-node
  containers:
    - name: hello-openshift
      image: openshift/hello-openshift
      ports:
        - containerPort: 8080

Comment 4 Zac Herman 2020-06-25 00:42:19 UTC
Created attachment 1698733 [details]
Log page for failing pod

Comment 5 Zac Herman 2020-06-25 00:44:16 UTC
yzamir - Can you see if this is still failing?  I can not reproduce on the current build.  See attached image.

version 4.6.0-0.ci-2020-06-23-063142

Comment 6 Yaacov Zamir 2020-06-25 05:47:09 UTC
>  Can you see if this is still failing? 

+1

No, fixed for me on master too, ok to move to qe from my side

Comment 7 Yadan Pei 2020-06-29 08:32:59 UTC
Created attachment 1699092 [details]
Logs tab loading successfully for Pending pod

1. Create a pod using the YAML in comment 3
2. Visit Logs tab for the Pending pod, the Logs tab is opened successfully and no crash

Verified on 4.6.0-0.nightly-2020-06-26-035408

Comment 10 errata-xmlrpc 2020-10-27 15:59:18 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