Bug 2209364

Summary: ODF dashboard crashes when OCP and ODF are upgraded
Product: [Red Hat Storage] Red Hat OpenShift Data Foundation Reporter: Aman Agrawal <amagrawa>
Component: management-consoleAssignee: Bipul Adhikari <badhikar>
Status: CLOSED ERRATA QA Contact: Aman Agrawal <amagrawa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.13CC: badhikar, branto, muagarwa, ocs-bugs, odf-bz-bot, skatiyar
Target Milestone: ---Keywords: Automation, Regression
Target Release: ODF 4.13.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 4.13.0-214 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of:
: 2214575 (view as bug list) Environment:
Last Closed: 2023-06-21 15:25:39 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:
Bug Depends On:    
Bug Blocks: 2157887, 2214575    

Comment 3 Bipul Adhikari 2023-05-24 07:20:30 UTC
A simple refresh should do the trick. Bringing down the severity to high.

Comment 4 Bipul Adhikari 2023-05-24 13:49:08 UTC
We have made changes on the ODF build side to add version details. But looks like the build steps are not passing the correct ODF version as an environment variable to the odf build step. 
The change required is as follows:
While running `yarn build` step an additional environment variable needs to be passed. 
`PLUGIN_VERSION=x.y.z` The version should match the ODF version after this is done console will be able to pickup changes in version and trigger the pop-up for refresh. Moving this to the build team.

Comment 5 Boris Ranto 2023-05-25 10:15:35 UTC
We are already setting the variables correctly, see e.g. here in the build log:

https://download.eng.bos.redhat.com/brewroot/packages/odf-console-container/v4.13.0/80/data/logs/x86_64.log

We were using lowercase `env` command to set it in this build so I fixed it (that is unrelated to the error, it is just a recommendation to use uppercase commands in Dockerfiles) in this commit:

https://gitlab.cee.redhat.com/ceph/rhodf/-/commit/90e12fe88bb3f5b60a0b4c0435731eb6518c6384

Setting back to management-console component.

Comment 6 Bipul Adhikari 2023-05-26 08:14:13 UTC
When inspecting the builds the version is being set to default (0.0.0) and not to the correct version. Even if the env variable is being set it's not being passed to the child process. Needs to fixed on the build side. Moving it to build.

Comment 7 Boris Ranto 2023-05-27 07:09:02 UTC
That is not the issue, we are setting the variable correctly. I have actually added `env` output in the RUN command that also runs `yarn build` to confirm in the following build (env command only lists exported env variables). Hence, there must be something in the code that is failing to set the version, the variable is set and exported properly as can be seen here:

https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=52899334

or e.g. directly in the x86_64 log:

https://download.eng.bos.redhat.com/brewroot/work/tasks/9334/52899334/x86_64.log

However, when you go inside that container

# podman run --pull always -it --entrypoint /bin/sh registry-proxy.engineering.redhat.com/rh-osbs/odf4-odf-console-rhel9:rhodf-4.13-rhel-9-containers-candidate-36079-20230526154811
sh-5.1$ head -3 plugin-manifest.json 
{
  "name": "odf-console",
  "version": "0.0.0",
sh-5.1$ 

you can see that the version is not really updated.

Comment 8 Bipul Adhikari 2023-05-30 10:13:35 UTC
There indeed was an issue in the ODF console code base. Sending a patch on our side.

Comment 13 Bipul Adhikari 2023-06-13 08:32:10 UTC
It is a good candidate for back-port.

Comment 15 errata-xmlrpc 2023-06-21 15:25:39 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 (Red Hat OpenShift Data Foundation 4.13.0 enhancement and bug fix 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.

https://access.redhat.com/errata/RHBA-2023:3742