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:
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.
@eerez Please specify which version of Assisted Service contains that fix.
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" ]
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