Bug 2009670 - Calling 'supported-platforms' just after the cluster creation causes a panic.
Summary: Calling 'supported-platforms' just after the cluster creation causes a panic.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: assisted-installer
Version: 4.8
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 4.9.0
Assignee: Elior Erez
QA Contact: Yuri Obshansky
URL:
Whiteboard: AI-Team-Core
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-10-01 08:38 UTC by Miguel Martin
Modified: 2021-11-10 21:02 UTC (History)
3 users (show)

Fixed In Version: OCP-Metal-v1.0.27.0
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-11-10 21:01:58 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2021:4119 0 None None None 2021-11-10 21:02:11 UTC

Internal Links: 2034582

Description Miguel Martin 2021-10-01 08:38:59 UTC
Description of problem:

Assisted service panics after creating a cluster and call the 'supported-platforms' endpoint 

Version-Release number of selected component (if applicable):
All since API version 2 was introduced.

How reproducible:
Always


Steps to Reproduce:
1. Create a cluster
2. Register a host with no inventory
3. Call '/v2/clusters/{cluster_id}/supported-platforms' endpoint

Actual results:
The assisted service panics because 'cluster.HighAvailabilityMode' field has not been correctly initialized at cluster creation time even when the specification describes it should be initialized to 'Full' by default.


Expected results:
The actual response with the supported platforms list.


Additional info:

Comment 1 Michael Filanov 2021-10-05 07:50:06 UTC
if it's related to https://github.com/openshift/assisted-service/blob/042afb35e346cb0c35ac942fd79871bbd2a98f5a/internal/bminventory/inventory.go#L1967  
Them it may happen if the pointer is nil, so probably need top check if pointer is nil before accessing it.

Comment 8 Yuri Obshansky 2021-11-04 11:59:25 UTC
@eerez Please specify which version of Assisted Service contains that fix.

Comment 9 Yuri Obshansky 2021-11-05 17:42:31 UTC
Verified on Staging v1.0.27.0
Request:
GET https://api.stage.openshift.com/api/assisted-install/v2/clusters/4dafb0a1-da44-431d-8e38-fffb9e9c96f7/supported-platforms
Response:
[
    "baremetal"
]

Comment 11 errata-xmlrpc 2021-11-10 21:01:58 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.9.6 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-2021:4119


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