Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-30835

ConfigurationPolicy generated by ACM Policy Generator Plugin crashes hub cluster.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • 4.14.0, 4.15.0, 4.16.0
    • TALM Operator
    • Important
    • No
    • CNF RAN Sprint 250, CNF RAN Sprint 251, CNF Ran Sprint 252
    • 3
    • Proposed
    • False
    • Hide

      None

      Show
      None

      This is a clone of issue OCPBUGS-29208. The following is the description of the original issue:

      Description of problem:

      When using ACM Gen templates, for ConfigurationPolicy kinds, the name of the object and the inner template names are the same.
      In comparison the PGT plugin, adds "-config" to the name of the inner template. This leads to overloaded keys in the
      clusterGroupUpgrade.Status.SafeResourceNames map.
      As a result, TALM uses a wrongly cached safe name which is longer than the maximum length of 62 for the policy name and namespace. When this happens policies are created in the ztp-install namespace but never deleted, leading to the hub cluster becoming unreacheable.
        

      Version-Release number of selected component (if applicable):

      4.15

      How reproducible:

      100%

      Steps to Reproduce:

      1- Deploy a ZTP spoke cluster using ACM templates
      
      2- verify that the name of the root policy is the same as the inner template inside the policy:
      apiVersion: policy.open-cluster-management.io/v1
      kind: Policy
      metadata:   
        name: group-du-sno-v4.14-config-policy  ------------------------
        namespace: ztp-group                                           |
      spec:                                                            |
        disabled: false                                                |
        policy-templates:                                              |
        - objectDefinition:                                            =
            apiVersion: policy.open-cluster-management.io/v1           |
            kind: ConfigurationPolicy                                  |
            metadata:                                                  |
              name: group-du-sno-v4.14-config-policy--------------------
            spec:
         

      Actual results:

      TALM creates policies in the ztp-install namespace that until the cluster crashes due to lack of resources

      Expected results:

      TALM starts remediating policies

      Additional info:

       

       

       

              jche@redhat.com Jun Chen
              openshift-crt-jira-prow OpenShift Prow Bot
              Joshua Clark Joshua Clark
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated: