Bug 2129679 - clusters belong to global clusterset is not selected by placement when rescheduling
Summary: clusters belong to global clusterset is not selected by placement when resche...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Advanced Cluster Management for Kubernetes
Classification: Red Hat
Component: Cluster Lifecycle
Version: rhacm-2.6
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: rhacm-2.6.2
Assignee: qhao
QA Contact: Song Lai
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-09-26 02:43 UTC by qhao
Modified: 2022-12-14 22:40 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-12-14 22:40:31 UTC
Target Upstream Version:
Embargoed:
slai: qe_test_coverage+
cbynum: rhacm-2.6+
bot-tracker-sync: rhacm-2.6.z+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github stolostron backlog issues 25966 0 None None None 2022-09-26 06:42:17 UTC
Red Hat Product Errata RHSA-2022:9040 0 None None None 2022-12-14 22:40:51 UTC

Description qhao 2022-09-26 02:43:21 UTC
Description of the problem:

The env has 1 managedclusters, belongs to both global clustersets, and global clustersets binds to namespace open-cluster-management-global-set.
```
$ clusteradm get clusters
NAME       ACCEPTED   AVAILABLE   CLUSTERSET   CPU   MEMORY       KUBERNETES VERSION
cluster1   true       True        default      24    49265492Ki   v1.23.4

$ clusteradm get clustersets
NAME      BOUND NAMESPACES                     STATUS
default                                        1 ManagedClusters selected
global    open-cluster-management-global-set   1 ManagedClusters selected
```

Create placement under namespace open-cluster-management-global-set, 1 cluster selected.
```
$ cat placement.yaml
apiVersion: cluster.open-cluster-management.io/v1beta1
kind: Placement
metadata:
  name: demo-placement
  namespace: open-cluster-management-global-set
spec:
  predicates:
  - requiredClusterSelector:
      labelSelector:
        matchExpressions:
        - key: name
          operator: NotIn
          values:
          - local-clusterr
  tolerations:
  - key: cluster.open-cluster-management.io/unreachable
    operator: Exists

$ oc create -f placement.yaml
placement.cluster.open-cluster-management.io/demo-placement created

$ oc get placement -A
NAMESPACE                            NAME             SUCCEEDED   REASON                  SELECTEDCLUSTERS
open-cluster-management-global-set   demo-placement   True        AllDecisionsScheduled   1
```

Add new cluster cluster2, it also belongs to global clusterset.
```
$ cat cluster2.yaml
apiVersion: cluster.open-cluster-management.io/v1
kind: ManagedCluster
metadata:
  name: cluster2
spec:
  hubAcceptsClient: true
  leaseDurationSeconds: 60
$ oc create -f cluster2.yaml
managedcluster.cluster.open-cluster-management.io/cluster2 created

$ clusteradm get clusters
NAME       ACCEPTED   AVAILABLE   CLUSTERSET   CPU   MEMORY       KUBERNETES VERSION
cluster1   true       True        default      24    49265492Ki   v1.23.4
cluster2   true       Unknown     default

$ clusteradm get clustersets
NAME      BOUND NAMESPACES                     STATUS
default                                        2 ManagedClusters selected
global    open-cluster-management-global-set   2 ManagedClusters selected
```

However, the placement decision didn't update, and only 1 cluster was selected.
```
$ oc get placement -A
NAMESPACE                            NAME             SUCCEEDED   REASON                  SELECTEDCLUSTERS
open-cluster-management-global-set   demo-placement   True        AllDecisionsScheduled   1
```

Release version:
2.6

Operator snapshot version:

OCP version:

Browser Info:

Steps to reproduce:
1.
2.
3.

Actual results:

Expected results:
Both of the 2 clusters were selected.
```
$ oc get placement -A
NAMESPACE                            NAME             SUCCEEDED   REASON                  SELECTEDCLUSTERS
open-cluster-management-global-set   demo-placement   True        AllDecisionsScheduled   2
```

Additional info:

Comment 5 errata-xmlrpc 2022-12-14 22:40:31 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.6.3 security update), 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:9040


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