Bug 2059669

Summary: [DR] Application namespace left behind in managed clusters after deleting the application
Product: [Red Hat Storage] Red Hat OpenShift Data Foundation Reporter: Sidhant Agrawal <sagrawal>
Component: odf-drAssignee: Shyamsundar <srangana>
odf-dr sub component: ramen QA Contact: Elad <ebenahar>
Status: CLOSED WONTFIX Docs Contact:
Severity: high    
Priority: unspecified CC: jpacker, madam, mmuench, muagarwa, ocs-bugs, odf-bz-bot, olakra, prsurve, srangana
Version: 4.10   
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Known Issue
Doc Text:
.Creating an application namespace for the managed clusters Application namespace needs to exist on Red Hat Advanced Cluster Management (RHACM) managed clusters for disaster recovery related pre-deployment actions and hence is pre-created when an application is deployed at the RHACM hub cluster. However, if an application is deleted at the RHACM hub cluster and its corresponding namespace is deleted on the managed clusters, they reappear on the managed cluster. Workaround: `openshift-dr` maintains a namespace `manifestwork` resource in the managed cluster namespace at the ACM hub, these resources need to be deleted post the application deletion. For example, as cluster administrator execute the following command on the RHACM hub cluster, `oc delete manifestwork -n <managedCluster namespace> <drPlacementControl name>-<namespace>-ns-mw`.
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-07-19 13:26:28 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:    
Bug Blocks: 2056571    

Description Sidhant Agrawal 2022-03-01 17:03:04 UTC
Description of problem (please be detailed as possible and provide log
snippests):
Application namespace or project doesn't get deleted from managed clusters after deleting the application.
Other resources such as pods,pvc and backend rbd image gets deleted but leave the namespace behind.
Manual deletion also doesn't work as namespace is re-created in few seconds.

Version of all relevant components (if applicable):
OCP:  4.10.0-0.nightly-2022-02-26-230022
ODF: 4.10.0-171
ACM: 2.4.1

Does this issue impact your ability to continue to work with the product
(please explain in detail what is the user impact)?
User impact: User will be unable to remove the namespace completely from the cluster

Is there any workaround available to the best of your knowledge?
NA

Rate from 1 - 5 the complexity of the scenario you performed that caused this
bug (1 - very simple, 5 - very complex)?
2

Can this issue reproducible?
Yes

Can this issue reproduce from the UI?
Yes

If this is a regression, please provide more details to justify this:

Steps to Reproduce:
1. Configure RDR setup
2. Deploy workload
3. Do failover from C1 to C2
4. Delete the application using steps documented in [1]
5. Observe that the namespace or project doesn't get deleted

[1] https://access.redhat.com/documentation/en-us/red_hat_openshift_data_foundation/4.9/html-single/configuring_openshift_data_foundation_for_regional-dr_with_advanced_cluster_management#deleting-sample-application_rhodf


Actual results:
Application namespace left behind after deleting application.

Expected results:
Application namespace should be removed completely from the cluster.

Additional info:

Comment 7 Mudit Agarwal 2022-03-31 15:05:07 UTC
Please add doc text

Comment 8 Shyamsundar 2022-04-05 16:29:58 UTC
Provided required doc-text.