Bug 1968454 - [4.8.0] backend events generated with wrong namespace for agent
Summary: [4.8.0] backend events generated with wrong namespace for agent
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: assisted-installer
Version: 4.8
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: ---
: 4.8.0
Assignee: Daniel Erez
QA Contact: Chad Crum
URL:
Whiteboard: AI-Team-Hive KNI-EDGE-4.8 KNI-EDGE-JU...
Depends On: 1968043
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-06-07 12:49 UTC by Ronnie Lazar
Modified: 2021-07-27 23:12 UTC (History)
4 users (show)

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


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift assisted-service pull 1991 0 None open Bug 1968454: host namespace on agent update notification 2021-06-21 10:43:40 UTC
Red Hat Bugzilla 1968043 1 urgent CLOSED [master] backend events generated with wrong namespace for agent 2021-10-18 17:33:12 UTC
Red Hat Product Errata RHSA-2021:2438 0 None None None 2021-07-27 23:12:04 UTC

Description Ronnie Lazar 2021-06-07 12:49:26 UTC
+++ This bug was initially created as a clone of Bug #1968043 +++

Description of problem:

The assisted-service is logging errors similar to below, where it is failing to find Agents. This is because the backend is generating events with the wrong namespace. Recently Agents started being created in the InfraEnv namespace instead of in the ClusterDeployment namespace, but this bit of code apparently was not updated.

time="2021-06-03T15:33:07Z" level=error msg="Failed to get resource clusters-hs0/d81d73b5-ffcc-4f26-8317-37944201256a" func="github.com/openshift/assisted-service/internal/controller/controllers.(*AgentReconciler).Reconcile" file="/go/src/github.com/openshift/origin/internal/controller/controllers/agent_controller.go:93" agent=d81d73b5-ffcc-4f26-8317-37944201256a agent_namespace=clusters-hs0 error="Agent.agent-install.openshift.io \"d81d73b5-ffcc-4f26-8317-37944201256a\" not found" go-id=1025 request_id=22c327ac-dc67-4d87-b2c1-d54665eebaa0


Code: https://github.com/openshift/assisted-service/blob/989d3b7/internal/controller/controllers/controller_event_wrapper.go#L42


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


How reproducible:
always


Steps to Reproduce:
1. Use the k8s API workflow to create an Agent (boot-it-yourself is fine)
2. look in the container logs

Comment 3 Chad Crum 2021-07-07 17:51:37 UTC
Validated this is fixed in 2.3.0-DOWNSTREAM-2021-07-06-15-17-20.

Steps to validate:
- Deploy hub cluster / acm 2.3.0-DOWNSTREAM-2021-07-06-15-17-20 / assisted service
- Deploy SNO spoke cluster via assisted api method (And store all CRs in a separate namespace)
- Ensured no logs consisting of the below message showed up
level=error msg="Failed to get resource clusters-hs0/d81d73b5-ffcc-4f26-8317-37944201256a"

Comment 5 errata-xmlrpc 2021-07-27 23:11:49 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.