Bug 1969352

Summary: [4.8.0] Creating BareMetalHost without the "inspect.metal3.io" does not automatically add it
Product: OpenShift Container Platform Reporter: Flavio Percoco <fpercoco>
Component: assisted-installerAssignee: Flavio Percoco <fpercoco>
assisted-installer sub component: assisted-service QA Contact: bjacot
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: high CC: alazar, aos-bugs, bjacot, nshidlin
Version: 4.8Keywords: Triaged
Target Milestone: ---   
Target Release: 4.8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: AI-Team-Platform KNI-EDGE-JUKE-4.8
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-07-27 23:12:04 UTC Type: ---
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: 1968382    
Bug Blocks:    

Description Flavio Percoco 2021-06-08 09:46:58 UTC
This bug was initially created as a copy of Bug #1968382

I am copying this bug because: 



+++ Description of problem:

When creating a BMH resource without `inspect.metal3.io` annotation, the value is not being automatically set.


+++ Steps to Reproduce:

1. Create BMH without `inspect.metal3.io: disabled`

+++ Actual results:

```
# oc -n assisted-installer-bughunter-1 describe baremetalhost.metal3.io/ostest-worker-0

[...]

Name: ostest-worker-0
Namespace: assisted-installer-bughunter-1
Labels: infraenvs.agent-install.openshift.io=myinfraenv-bughunter-1
Annotations: <none>
API Version: metal3.io/v1alpha1
Kind: BareMetalHost

[...]

Provisioning:
ID: 0fada510-dd4d-40b8-ada6-07aad06d41c8
Boot Mode: UEFI
Image:
URL:
State: inspecting

[...]

Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Registered 3m23s metal3-baremetal-controller Registered new host
Normal BMCAccessValidated 3m12s metal3-baremetal-controller Verified access to BMC
Normal InspectionStarted 3m12s metal3-baremetal-controller Hardware inspection started

[...]
```

In the UI machine goes into "inspecting" state. In the serial console it can be seen that the IPA is booted.

+++ Expected results:

```
Name:         ostest-worker-0
Namespace:    assisted-installer-bughunter-1
Labels:       infraenvs.agent-install.openshift.io=myinfraenv-bughunter-1
Annotations:  inspect.metal3.io: disabled
API Version:  metal3.io/v1alpha1
Kind:         BareMetalHost

[...]

  Provisioning:
    ID:         c808b2f8-b6f3-4d36-8826-d0416a407d1a
    Boot Mode:  UEFI
    Image:
      Format:  live-iso
      URL:     https://assisted-service-assisted-installer-bughunter-1.apps.ostest.test.metalkube.org/api/assisted-install/v1/clusters/9856945c-eb2d-4758-b50f-ac478bc6d16d/downloads/image?api_key=e[...]w
    Root Device Hints:
      Device Name:  /dev/sda
    State:          provisioned

[...]

Events:
  Type    Reason                Age    From                         Message
  ----    ------                ----   ----                         -------
  Normal  Registered            8m27s  metal3-baremetal-controller  Registered new host
  Normal  InspectionSkipped     8m16s  metal3-baremetal-controller  disabled by annotation

[...]
```

Machine should go directly into "provisioned" state.

Comment 2 nshidlin 2021-06-29 17:40:56 UTC
this bug doesn't block OCP4.8.0 -release -  the fix will be delivered the the ACM channel on the AI-operator add verified then

Comment 7 errata-xmlrpc 2021-07-27 23:12:04 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 (Moderate: OpenShift Container Platform 4.8.2 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.

https://access.redhat.com/errata/RHSA-2021:2438