Bug 1969367 - [4.8.0] BMAC should wait for an ISO to exist for 1 minute before using it
Summary: [4.8.0] BMAC should wait for an ISO to exist for 1 minute before using it
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: assisted-installer
Version: 4.8
Hardware: Unspecified
OS: Unspecified
urgent
high
Target Milestone: ---
: 4.8.0
Assignee: Mat Kowalski
QA Contact: Yuri Obshansky
URL:
Whiteboard: AI-Team-Platform KNI-EDGE-4.8 KNI-EDG...
Depends On: 1968552
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-06-08 09:58 UTC by Ronnie Lazar
Modified: 2021-07-27 23:12 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of: 1968552
Environment:
Last Closed: 2021-07-27 23:12:04 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift assisted-service pull 2093 0 None open Bug 1969367: Wait for ISO for 1 minute before using it 2021-06-28 09:51:45 UTC
Red Hat Bugzilla 1968542 1 urgent CLOSED [master] Infra env should show the time that ISO was generated. 2022-08-28 08:47:34 UTC
Red Hat Bugzilla 1968552 1 urgent CLOSED [master] BMAC should wait for an ISO to exist for 1 minute before using it 2021-10-18 17:33:23 UTC
Red Hat Product Errata RHSA-2021:2438 0 None None None 2021-07-27 23:12:17 UTC

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


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