Fedora Account System
Red Hat Associate
Red Hat Customer
Description of the problem: I have a clusterpool created, and I try to claim the cluster from this clusterpool by creating a clusterclaim resources. then I can see the clusterdeployment created and imported in my hub cluster. below was the labels of the managedclusters: ``` hchenxa@huichen-mac clc-ui-e2e % oc get managedcluster acmqe-clc-auto-pool-aws-b6h6t --show-labels NAME HUB ACCEPTED MANAGED CLUSTER URLS JOINED AVAILABLE AGE LABELS acmqe-clc-auto-pool-aws-b6h6t true https://api.acmqe-clc-auto-pool-aws-b6h6t.dev09.red-chesterfield.com:6443 True True 10h cloud=Amazon,cluster.open-cluster-management.io/clusterset=clc-automation-pools,clusterID=b56941a9-4711-4bb2-ae8b-d9ff7a6f9e2c,feature.open-cluster-management.io/addon-application-manager=available,feature.open-cluster-management.io/addon-cert-policy-controller=available,feature.open-cluster-management.io/addon-iam-policy-controller=available,feature.open-cluster-management.io/addon-observability-controller=available,feature.open-cluster-management.io/addon-policy-controller=available,feature.open-cluster-management.io/addon-search-collector=available,feature.open-cluster-management.io/addon-work-manager=available,name=acmqe-clc-auto-pool-awsclaim,openshiftVersion=4.9.4,region=us-east-2,vendor=OpenShift ``` we can see the current value of name label is `acmqe-clc-auto-pool-awsclaim` then from the UI part, I delete the name label by mistake, but seems it can be added back by controller. but the value changed to the cluster name like below: ``` hchenxa@huichen-mac clc-ui-e2e % oc get managedcluster acmqe-clc-auto-pool-aws-b6h6t --show-labels NAME HUB ACCEPTED MANAGED CLUSTER URLS JOINED AVAILABLE AGE LABELS acmqe-clc-auto-pool-aws-b6h6t true https://api.acmqe-clc-auto-pool-aws-b6h6t.dev09.red-chesterfield.com:6443 True True 10h cloud=Amazon,cluster.open-cluster-management.io/clusterset=clc-automation-pools,clusterID=b56941a9-4711-4bb2-ae8b-d9ff7a6f9e2c,feature.open-cluster-management.io/addon-application-manager=available,feature.open-cluster-management.io/addon-cert-policy-controller=available,feature.open-cluster-management.io/addon-iam-policy-controller=available,feature.open-cluster-management.io/addon-observability-controller=available,feature.open-cluster-management.io/addon-policy-controller=available,feature.open-cluster-management.io/addon-search-collector=available,feature.open-cluster-management.io/addon-work-manager=available,name=acmqe-clc-auto-pool-aws-b6h6t,openshiftVersion=4.9.4,region=us-east-2,vendor=OpenShift ``` we can see the value of name label changed to `acmqe-clc-auto-pool-aws-b6h6t` now. Release version: 2.4 Operator snapshot version: OCP version: 4.9 Browser Info: Steps to reproduce: 1.Create a clusterpool 2.Claim the cluster from the clusterpool 3.Check the cluster labels 4.Delete the name label 5.Recheck the cluster labels. Actual results: The labels was changed Expected results: I think the name should be the cluster name here, if we want to add clusterclaim /clusterpool info in managedcluster resources, may be we can introduce other label name here like clusterclaimref="xxxxx", clusterpoolref="xxxxx". Additional info:
I have some concern in upgrade scenario. we have one cluster claimed from cluster pool in ACM 2.3, after after upgrade the ACM hub to 2.4 version, the name label was using the clustername. I am not quite sure about the behavior in ACM 2.3 for the cluster labels of clusters which claimed from the cluster pool, but I think it's better to make the behavior consistent after upgrade.
and there have another case will be impact like: if I have a new cluster claimed from the clusterpool, the label of name will be the clusterclaim name first, then I tried to detach the cluster and re-import the cluster, the label of name will be use the clusterdeployment name.
since the issue still have some problem and dev team was under discussion on this one, remark the status to Assigned
Validated on v2.4.3RC2 and on v2.5.0-DOWNSTREAM-2022-04-03-10-21-01. I deleted the name label off a cluster claim and i can see it reconcile with the same label coming back using the managed cluster's name before and after delete label.
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: Red Hat Advanced Cluster Management 2.4.3 security updates 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:1476