Bug 2059800 - The status of container is not consistent on Container details and pod details page
Summary: The status of container is not consistent on Container details and pod detail...
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 4.10
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: 4.10.0
Assignee: Jakub Hadvig
QA Contact: Yadan Pei
URL:
Whiteboard:
Depends On: 2042838
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-03-02 03:19 UTC by OpenShift BugZilla Robot
Modified: 2022-08-01 11:12 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-08-01 11:12:39 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description OpenShift BugZilla Robot 2022-03-02 03:19:43 UTC
+++ This bug was initially created as a clone of Bug #2042838 +++

Created attachment 1852109 [details]
container(upon)_vs_pod(under)_state

Description of problem:
The status of container is not consistent on Container details and pod details page

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

How reproducible:
Always

Steps to Reproduce:
1. Create a resource as below shown
   apiVersion: v1
   kind: Pod
   metadata:
    name: crash-pod
   spec:
     containers:
       - name: crash-app
         image: quay.io/openshifttest/crashpod
     restartPolicy: Always
2. Login OCP, navigate to Pods details page, check the state that shown under containers section
3. Click on the name of the container
4. Check the status that behind the name, verify if it is as same as the state that shown on Step 2

Actual results:
Status text and icon is showing Running on container details page while pod details page shows container state ‘waiting`

Expected results:
The status of container could consistent on Container details and pod details page

Additional info:

--- Additional comment from jhadvig on 2022-01-24 12:33:33 UTC ---

Looks like we are using different methods to get the status of the container in it's details page PageHeading vs the ContainerDetails components. Thats why we see the inconsistency.
We should be passing custom 'getResourceStatus' function to the 'PageHeading' component in https://github.com/openshift/console/blob/master/frontend/public/components/container.tsx#L396-L408
otherwise the 'PageHeading' components goes with the default 'status.phase' field, based on https://github.com/openshift/console/blob/master/frontend/public/components/utils/headings.tsx#L106
I think we should be using 'getContainerStatus' instead https://github.com/openshift/console/blob/master/frontend/public/module/k8s/container.ts#L29

Tim let me know if you have any questions.

Comment 3 Jakub Hadvig 2022-08-01 11:12:39 UTC
Closing this one since its just a low severity issue.


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