Bug 1885001

Summary: Not clear event: "Failed to register host: error creating host metadata"
Product: OpenShift Container Platform Reporter: Fred Rolland <frolland>
Component: assisted-installerAssignee: Michael Filanov <mfilanov>
assisted-installer sub component: assisted-service QA Contact: Yuri Obshansky <yobshans>
Status: CLOSED ERRATA Docs Contact:
Severity: unspecified    
Priority: urgent CC: alazar, aos-bugs, iovadia
Version: 4.6   
Target Milestone: ---   
Target Release: 4.6.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: v1.0.10.2 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-08-25 13:49:22 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:
Attachments:
Description Flags
error creating host metadata: none

Description Fred Rolland 2020-10-04 11:45:57 UTC
The event "Failed to register host: error creating host metadata" is not clear enough.

The assisted-service should create more meaningful event for the user.

Here for example, the user rebooted a Node on a failed installation before Reseting the cluster:

So the transition from "error" to Register fails with a error that is not helping the user.

time="2020-10-03T10:56:40Z" level=error msg="failed to register host <5e303c5f-6c6f-4e9d-ba1b-34dda6e3967b> cluster <8e71abc3-82e0-43e1-90e4-6c8ef1eae337>" func="github.com/openshift/assisted-service/internal/bminventory.(*bareMetalInventory).RegisterHost" file="/go/src/github.com/openshift/origin/internal/bminventory/inventory.go:1394" cluster_id=8e71abc3-82e0-43e1-90e4-6c8ef1eae337 error="no condition passed to run transition RegisterHost from state error" go-id=267412 pkg=Inventory request_id=46db0816-7cb4-46e5-

Comment 1 Michael Filanov 2020-10-04 16:21:01 UTC
https://github.com/openshift/assisted-service/pull/474

Comment 2 Michael Filanov 2020-10-06 12:55:29 UTC
cc: lalon

Comment 4 Ido Ovadia 2020-10-29 20:36:19 UTC
Failed QA
=========
"release_tag": "v1.0.10.2",
"versions": 
        "assisted-ignition-generator": "",
        "assisted-installer": "registry.stage.redhat.io/openshift4/assisted-installer-rhel8:v4.6.0-30",
        "assisted-installer-controller": "registry.stage.redhat.io/openshift4/assisted-installer-reporter-rhel8:v4.6.0-27",
        "assisted-installer-service": "quay.io/app-sre/assisted-service:d6fa3b9",
        "discovery-agent": "registry.stage.redhat.io/openshift4/assisted-installer-agent-rhel8:v4.6.0-30",
        "image-builder": "quay.io/app-sre/assisted-iso-create:d6fa3b9"


I rebooted all Node on a failed installation before Reseting the cluster, and got the same error:
Failed to register host: error creating host metadata: no condition passed to run transition RegisterHost from state error

Screenshot enclosed

Comment 5 Ido Ovadia 2020-10-29 20:37:00 UTC
Created attachment 1725151 [details]
error creating host metadata:

Comment 6 Michael Filanov 2020-11-02 07:24:09 UTC
It's not the same error but it's the right message. 
we can't allow registration of hosts in error state.

Comment 7 Michael Filanov 2020-11-12 13:36:04 UTC
https://github.com/openshift/assisted-service/pull/671

Comment 10 errata-xmlrpc 2021-08-25 13:49:22 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.6.43 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:3197