Bug 2055333 - Unable to delete assisted-service operator
Summary: Unable to delete assisted-service operator
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Advanced Cluster Management for Kubernetes
Classification: Red Hat
Component: Infrastructure Operator
Version: rhacm-2.5
Hardware: All
OS: Unspecified
low
high
Target Milestone: ---
: rhacm-2.6
Assignee: Sarah Lavie
QA Contact:
Derek
URL:
Whiteboard:
: 2060134 (view as bug list)
Depends On:
Blocks: 2068893
TreeView+ depends on / blocked
 
Reported: 2022-02-16 17:50 UTC by bjacot
Modified: 2023-06-30 08:48 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-06-09 02:11:10 UTC
Target Upstream Version:
Embargoed:
bjacot: rhacm-2.5+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift assisted-service pull 3532 0 None open Bug 2055333: gc api server when controller is done 2022-03-23 08:51:22 UTC
Github stolostron backlog issues 20020 0 None None None 2022-02-16 20:54:56 UTC
Red Hat Issue Tracker MGMTBUGSM-99 0 None None None 2022-02-16 17:51:30 UTC
Red Hat Product Errata RHSA-2022:4956 0 None None None 2022-06-09 02:11:22 UTC

Description bjacot 2022-02-16 17:50:07 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 Michael Filanov 2022-02-17 08:18:43 UTC
Are there any finalizers that you see on the resources?

Comment 2 Yuanyuan He 2022-03-01 08:41:22 UTC
Any update on the issue?

Comment 3 Michael Filanov 2022-03-01 14:26:15 UTC
@bjacot any updates? Are there any finalizers that you see on the resources?

Comment 4 bjacot 2022-03-03 20:37:12 UTC
I see the traditional kubernetes finalizer.  When i delete the operator shouldnt it clean up apiservice v1.admission.agentinstall.openshift.io?  Its not doing that.  If i manually remove that then i can delete.

Comment 5 Michael Filanov 2022-03-06 07:23:51 UTC
Is it created on a default namespace or in the same namespace as the other components? 
If it's in a different namespace then it will make sense, after all you deleted the namespace that the operator is running on.|
I don't see that the operator have any finalizers so it means that it doesn't handle cleanup, most of the resources are inside the namespace but if we put something in the a default namespace then it will not be removed.
@mhrivnak maybe you know what should be the standard in this situation? Does an operator responsible for cleanup as well?

Comment 7 Michael Filanov 2022-03-16 11:07:43 UTC
*** Bug 2060134 has been marked as a duplicate of this bug. ***

Comment 12 errata-xmlrpc 2022-06-09 02:11:10 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 (Important: Red Hat Advanced Cluster Management 2.5 security updates, images, and bug fixes), 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-2022:4956

Comment 13 jems 2023-01-06 06:42:48 UTC Comment hidden (spam)
Comment 14 jeneka ron 2023-06-30 08:48:07 UTC Comment hidden (spam)

Note You need to log in before you can comment on or make changes to this bug.