Bug 1972526 - [4.8.0] clusterDeployments controller should send an event to InfraEnv for backend cluster registration
Summary: [4.8.0] clusterDeployments controller should send an event to InfraEnv for ba...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: assisted-installer
Version: 4.8
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 4.8.0
Assignee: Nir Magnezi
QA Contact: Yuri Obshansky
URL:
Whiteboard: AI-Team-Hive KNI-EDGE-4.8
Depends On: 1972525
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-06-16 06:48 UTC by Michael Filanov
Modified: 2021-07-27 23:13 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1972525
Environment:
Last Closed: 2021-07-27 23:12:54 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift assisted-service pull 2059 0 None open [ocm-2.3] Bug 1972526: CD controller to notify InfraEnv for backend cluster registration 2021-06-23 11:46:33 UTC
Red Hat Bugzilla 1972525 1 high CLOSED [master] clusterDeployments controller should send an event to InfraEnv for backend cluster registration 2021-10-18 17:34:59 UTC
Red Hat Product Errata RHSA-2021:2438 0 None None None 2021-07-27 23:13:35 UTC

Description Michael Filanov 2021-06-16 06:48:34 UTC
+++ This bug was initially created as a clone of Bug #1972525 +++

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 3 nshidlin 2021-06-29 17:37:20 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 4 nshidlin 2021-07-06 07:00:05 UTC
Verified with 2.3.0-DOWNSTREAM-2021-07-02-22-02-33

Infraenv isodownloadurl and createdtime with original agentclusterinstall:
oc get infraenvs.agent-install.openshift.io sno-0 -o json | jq '.status.isoDownloadURL, .status.createdTime'
"https://assisted-service-rhacm.apps.ocp-edge-cluster-assisted-0.qe.lab.redhat.com/api/assisted-install/v1/clusters/8ef139b8-1056-4d42-bc23-60760902f0bb/downloads/image?api_key=eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJjbHVzdGVyX2lkIjoiOGVmMTM5YjgtMTA1Ni00ZDQyLWJjMjMtNjA3NjA5MDJmMGJiIn0.i3e1TPw6J9IvWtNu4KxVpNeQYdjBAQZVwoSJjbiAZA3u3jHkg-0dD2p8YK3J4XptkyVu4SP145ocbJKNuCgVuQ"
"2021-07-06T06:39:17Z"

clusterid changes in isodownloadurl to new clusterid and the createdtime changes accordingly after deleting and recreating the agent cluster install:
oc get infraenvs.agent-install.openshift.io sno-0 -o json | jq '.status.isoDownloadURL, .status.createdTime'
"https://assisted-service-rhacm.apps.ocp-edge-cluster-assisted-0.qe.lab.redhat.com/api/assisted-install/v1/clusters/d9b1678f-42da-4329-afaf-1be3d89ef8a7/downloads/image?api_key=eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJjbHVzdGVyX2lkIjoiZDliMTY3OGYtNDJkYS00MzI5LWFmYWYtMWJlM2Q4OWVmOGE3In0.lqvv5cjAaq1RJp5UDoADeteur85zhKTXJGYS1H5TrJvKGPqqHMNBp-gCQiYsnhEEv8NLaRlEzgh0H0V4z_0YRw"
"2021-07-06T06:57:04Z"

log in assisted service reflecting the ISO change:

time="2021-07-06T06:57:05Z" level=info msg="ISODownloadURL changed from https://assisted-service-rhacm.apps.ocp-edge-cluster-assisted-0.qe.lab.redhat.com/api/assisted-insta$
l/v1/clusters/8ef139b8-1056-4d42-bc23-60760902f0bb/downloads/image?api_key=eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJjbHVzdGVyX2lkIjoiOGVmMTM5YjgtMTA1Ni00ZDQyLWJjMjMtNjA3NjA5M
DJmMGJiIn0.i3e1TPw6J9IvWtNu4KxVpNeQYdjBAQZVwoSJjbiAZA3u3jHkg-0dD2p8YK3J4XptkyVu4SP145ocbJKNuCgVuQ to https://assisted-service-rhacm.apps.ocp-edge-cluster-assisted-0.qe.lab.r
edhat.com/api/assisted-install/v1/clusters/d9b1678f-42da-4329-afaf-1be3d89ef8a7/downloads/image?api_key=eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJjbHVzdGVyX2lkIjoiZDliMTY3OGY$
NDJkYS00MzI5LWFmYWYtMWJlM2Q4OWVmOGE3In0.lqvv5cjAaq1RJp5UDoADeteur85zhKTXJGYS1H5TrJvKGPqqHMNBp-gCQiYsnhEEv8NLaRlEzgh0H0V4z_0YRw" func="github.com/openshift/assisted-service/i
nternal/controller/controllers.(*InfraEnvReconciler).updateEnsureISOSuccess" file="/remote-source/assisted-service/app/internal/controller/controllers/infraenv_controller.go
:328" go-id=828 infra_env=sno-0 infra_env_namespace=sno-0 request_id=de83e8c9-1a6f-46fd-868a-e48ab79b3b93

Comment 6 errata-xmlrpc 2021-07-27 23:12:54 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.