Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1969367

Summary: [4.8.0] BMAC should wait for an ISO to exist for 1 minute before using it
Product: OpenShift Container Platform Reporter: Ronnie Lazar <alazar>
Component: assisted-installerAssignee: Mat Kowalski <mko>
assisted-installer sub component: assisted-service QA Contact: Yuri Obshansky <yobshans>
Status: CLOSED ERRATA Docs Contact:
Severity: high    
Priority: urgent CC: alazar, aos-bugs, fpercoco, mfilanov, mhrivnak, nshidlin
Version: 4.8Keywords: Triaged
Target Milestone: ---   
Target Release: 4.8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: AI-Team-Platform KNI-EDGE-4.8 KNI-EDGE-JUKE-4.8
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: 1968552 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: 1968552    
Bug Blocks:    

Description Ronnie Lazar 2021-06-08 09:58:44 UTC
+++ This bug was initially created as a clone of Bug #1968552 +++

Description of problem:

In case of gitops we don't have control over the order of creation between different resources, because nmstate is marked by a label we it could take few seconds before all the configurations are created, so it will help to wait some time before BMAC is using the ISO, this will make sure that all configuration is applied. 
related to https://bugzilla.redhat.com/show_bug.cgi?id=1968542


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

--- Additional comment from mhrivnak on 20210607T14:43:12

We should make it obvious why nothing is happening for that period of time. An easy option is to just ensure that the BMAC logs a clear message. Something like: "ISO for host %s is %d seconds old; waiting %d more seconds before booting host." Then RequeueAfter the calculated time period.

Comment 4 nshidlin 2021-07-07 15:33:27 UTC
Verified with 2.3.0-DOWNSTREAM-2021-07-06-21-29-18

Logs show BMH reconcile re-queue due to recent image: 

time="2021-07-07T15:23:26Z" level=info msg="Requeuing reconcileBMH: InfraEnv image is too recent. Requeuing and retrying again soon." func="github.com/openshift/assisted-service/internal/controller/controllers.(*BMACReconciler).reconcileBMH" file="/remote-source/assisted-service/app/internal/controller/controllers/bmh_agent_controller.go:589" bare_metal_host=sno-0-bmh bare_metal_host_namespace=sno-0 go-id=827 request_id=195282aa-609d-4ff6-a38b-c34fc74d60a2                                                           
time="2021-07-07T15:23:26Z" level=info msg="BareMetalHost Reconcile ended" func="github.com/openshift/assisted-service/internal/controller/controllers.(*BMACReconciler).Reconcile.func1" file="/remote-source/assisted-service/app/internal/controller/controllers/bmh_agent_controller.go:161" bare_metal_host=sno-0-bmh bare_metal_host_namespace=sno-0 go-id=827 request_id=195282aa-609d-4ff6-a38b-c34fc74d60a2                                                                                                                   
time="2021-07-07T15:23:57Z" level=info msg="BareMetalHost Reconcile started" func="github.com/openshift/assisted-service/internal/controller/controllers.(*BMACReconciler).Reconcile" file="/remote-source/assisted-service/app/internal/controller/controllers/bmh_agent_controller.go:164" bare_metal_host=sno-0-bmh bare_metal_host_namespace=sno-0 go-id=827 request_id=7201e2cc-cf0c-45d5-a366-69cb340b37e2                                                                                                                       
time="2021-07-07T15:23:57Z" level=info msg="Image URL has been set in the BareMetalHost  sno-0/sno-0-bmh" func="github.com/openshift/assisted-service/internal/controller/controllers.(*BMACReconciler).reconcileBMH" file="/remote-source/assisted-service/app/internal/controller/controllers/bmh_agent_controller.go:629"

Comment 6 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