multicloud-operators-subscription icon indicating copy to clipboard operation
multicloud-operators-subscription copied to clipboard

The ReportType cluster(appsubreport) still exists, even though the application ReportType has been removed

Open yanmxa opened this issue 2 years ago • 2 comments

Describe the bug When I deploy a subscription on OCM hub, I can see the below appsubreport on hub:

» oc get appsubreport -A
NAMESPACE            NAME                 REPORTTYPE    DEPLOYED   INPROGRESS   FAILED   PROPAGATIONFAILED   CLUSTERS   AGE
helloworld           helloworld-appsub    Application   1          0            0        0                   1          5m20s
kind-hub1-cluster1   kind-hub1-cluster1   Cluster       n/a        n/a          n/a      n/a                 n/a        7s

Then I delete the subscription, and see that the appsubreport helloworld(Application) is gone, but the other appsubreport(Cluster) created by the subscription is still there.

» oc get appsubreport -A
NAMESPACE            NAME                 REPORTTYPE   DEPLOYED   INPROGRESS   FAILED   PROPAGATIONFAILED   CLUSTERS   AGE
kind-hub1-cluster1   kind-hub1-cluster1   Cluster      n/a        n/a          n/a      n/a                 n/a        32m

Expected behavior I understand that deleting subscribtion should delete all AppSubreports related to it, but now some reports of cluster type are still retained. Is this the intention?

Environment ie: Kubernetes version:

» oc version                                                         
Client Version: 4.8.11
Kubernetes Version: v1.23.6

yanmxa avatar Mar 22 '23 03:03 yanmxa

@philipwu08 @lennysgarage do you guys know what was the reason of leaving the cluster report behind?

I guess it's to avoid unnecessary writes and deletes since it's the cluster report type so there is always only one per managed cluster.

mikeshng avatar Mar 22 '23 15:03 mikeshng

If there's no more appsubs on that cluster I think we should remove the report. I don't think we need to keep it around.

philipwu08 avatar Mar 24 '23 14:03 philipwu08