Bug 1972525

Summary: [master] clusterDeployments controller should send an event to InfraEnv for backend cluster registration
Product: OpenShift Container Platform Reporter: Nir Magnezi <nmagnezi>
Component: assisted-installerAssignee: Nir Magnezi <nmagnezi>
assisted-installer sub component: assisted-service QA Contact: Yuri Obshansky <yobshans>
Status: CLOSED ERRATA Docs Contact:
Severity: high    
Priority: high CC: aos-bugs
Version: 4.8Keywords: Triaged
Target Milestone: ---   
Target Release: 4.9.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: AI-Team-Hive KNI-EDGE-4.8
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1972526 (view as bug list) Environment:
Last Closed: 2021-10-18 17:34:35 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:
Bug Depends On:    
Bug Blocks: 1972526    

Description Nir Magnezi 2021-06-16 06:44:19 UTC
Description of problem:
=======================
When an AgentClusterInstall is changed, the related InfraEnv resource should reconcile.

for example: if the user deletes and recreates the AgentClusterInstall resource, the backend cluster ID will change (essentially deregister and register a new backend cluster), and the InfraEnv image URL points to an an image that no longer exists.

Version-Release number of selected component (if applicable):
=============================================================
current git head 403985c8d95b5bef173a11326b3de7aec3fdef18

How reproducible:
=================
1/1

Steps to Reproduce:
===================
1. Create all resources to register a cluster and have an image for it: CD, ACI, ClusterImageSet, PullSecret, InfraEnv
2. Inspect the Image URL in InfraEnv
3. Delete and create ACI 

Actual results:
===============
Image URL unchanged

Expected results:
=================
Image URL should change to point to the new backend cluster ID and image.

Additional info:
================
SVC log from recreating ACI, note that InfraEnv does not reconcile: https://gist.github.com/nmagnezi/271ac9f1e4fdd0bd34253608ce6fdcfa

InfraEnv currently watches for CD, which should stay (to catch changes in pullSecret).
To optimize this, it can check if the pullSecret has changed in the CD and only reconcile in that case.
All the other Relevant changes should be caught from within ACI.

Comment 1 Michael Filanov 2021-06-16 07:13:19 UTC
How about instead of watching agent cluster install we can send event only when creating a cluster, this will reduce the generation events.
In 4.9 when we will have streaming we can replace it to watch agent cluster install.

Comment 2 Nir Magnezi 2021-06-16 09:41:25 UTC
(In reply to Michael Filanov from comment #1)
> How about instead of watching agent cluster install we can send event only
> when creating a cluster, this will reduce the generation events.
> In 4.9 when we will have streaming we can replace it to watch agent cluster
> install.

Yup. makes sense. will change the bug topic

Comment 6 errata-xmlrpc 2021-10-18 17:34:35 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.9.0 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:3759