Bug 2068893

Summary: Unable to delete assisted-service operator
Product: Red Hat Advanced Cluster Management for Kubernetes Reporter: Michael Filanov <mfilanov>
Component: Infrastructure OperatorAssignee: Sarah Lavie <slavie>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: urgent Docs Contact: Derek <dcadzow>
Priority: urgent    
Version: rhacm-2.4CC: ccrum, trwest, yfirst
Target Milestone: ---   
Target Release: rhacm-2.5   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-10-03 20:22:34 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: 2055333    
Bug Blocks:    

Description Michael Filanov 2022-03-27 10:51:18 UTC
Description of the problem:
I am following the steps to clean up or remove the assisted-service operator according to the destroy script in the assisted-service repo.
https://github.com/openshift/assisted-service/blob/master/deploy/operator/destroy.sh

the steps consist of deleting the namespace as the first step.  Unfortunately it's not cleaning up an API service.  The agentinstall api service is hanging around and preventing the operator to delete.  The ns sits in a terminating state.  This also affects cleanup or destroying RHACM bundled with AI.

workaround before deleting namespace is to delete api service.
oc delete apiservice v1.admission.agentinstall.openshift.io

Release version:
rhacm 2.5 + upstream operator
Operator snapshot version:

OCP version:

Browser Info:

Steps to reproduce:
1. Deploy assisted service operator with hive
2. Remove hive
3. try to remove assisted service operator namespace

Actual results:
Sits in terminating state
Expected results:
to remove all resources
Additional info:
work around:  Issue this command before trying to delete namespace
oc delete apiservice v1.admission.agentinstall.openshift.io

Comment 1 Yona First 2022-04-07 15:33:35 UTC
Verified with ACM snapshot 2.5.0-DOWNSTREAM-2022-04-07-07-21-43