+++ This bug was initially created as a clone of Bug #1969974 +++ Description of problem: Deleting agent from one namespace causes all agents with the same name to be deleted from all namespaces Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. Create bmh/infraenv in one namespace 2. Wait for agent 3. recreate bmh/infraenv in another namespace 4. Wait for agent 5. Delete old agent Actual results: All agents with the same name will be deleted not matter in which namespace Expected results: One agent deleted and new one stays alive Additional info:
caused by https://issues.redhat.com/browse/MGMT-6006
Once https://bugzilla.redhat.com/show_bug.cgi?id=1968043 is in we can get the host by both id and namepsace and it will resolve this issue.
this is probably the problematic line https://github.com/openshift/assisted-service/blob/master/internal/controller/controllers/agent_controller.go#L215
Validated bug is fixed in OCM DS snapshot 2.3.0-DOWNSTREAM-2021-07-06-05-34-53 Validation steps: - Create cluster sno-test-vm in ns sno-test-vm - wait for agent to be created - Create cluster sno-test-vm in ns sno-test-vm-2, using the same CR values + names (aci / cd / infraenv / bmh) - Wait for sno-test-vm in sno-test-vm-2 to have agent created - Delete agent in sno-test-vm ns - Confirm agent in sno-test-vm-2 ns still exists
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