Bug 2042838 - 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...
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 4.10
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: 4.11.0
Assignee: Jakub Hadvig
QA Contact: Xiyun Zhao
Depends On:
Blocks: 2059800
TreeView+ depends on / blocked
Reported: 2022-01-20 08:42 UTC by Xiyun Zhao
Modified: 2022-08-10 10:43 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Last Closed: 2022-08-10 10:43:03 UTC
Target Upstream Version:

Attachments (Terms of Use)
container(upon)_vs_pod(under)_state (47.93 KB, image/png)
2022-01-20 08:42 UTC, Xiyun Zhao
no flags Details

System ID Private Priority Status Summary Last Updated
Github openshift console pull 11031 0 None open Bug 2042838: the status of container is not consistent on Container details and pod details page 2022-02-10 11:16:21 UTC
Red Hat Product Errata RHSA-2022:5069 0 None None None 2022-08-10 10:43:25 UTC

Description Xiyun Zhao 2022-01-20 08:42:04 UTC
Created attachment 1852109 [details]

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):

How reproducible:

Steps to Reproduce:
1. Create a resource as below shown
   apiVersion: v1
   kind: Pod
    name: crash-pod
       - 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:

Comment 1 Jakub Hadvig 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 4 Xiyun Zhao 2022-03-09 07:21:36 UTC
This bug has been verified on payload 4.11.0-0.nightly-2022-03-04-063157

Follow the 'Steps to Reproduce' on comment1 to do the verification.

The state of container could consistent on Container details page and pod details -> containers section -> state column

Comment 7 errata-xmlrpc 2022-08-10 10:43:03 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 (Important: OpenShift Container Platform 4.11.0 bug fix and security update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


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