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

[TALM] ClusterVersion policy fails when using templates

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done-Errata
    • Icon: Undefined Undefined
    • None
    • 4.13.z, 4.12.z, 4.14.0
    • TALM Operator
    • Low
    • No
    • CNF RAN Sprint 239, CNF RAN Sprint 240
    • 2
    • False
    • Hide

      None

      Show
      None

      Description of problem:

      
      Using the policy ClusterVersion with Templates does not work.
      
      Policy configured:
      
          - fileName: ClusterVersion.yaml 
            policyName: "config-policy"
            metadata:
              name: version
              annotations:
                ran.openshift.io/ztp-deploy-wave: "100"
            spec:
              channel: '{{hub fromConfigMap "" "site-data" (printf "%s-ocp-channel" .ManagedClusterName) hub}}'
              desiredUpdate:
                version: '{{hub fromConfigMap "" "site-data" (printf "%s-ocp-version" .ManagedClusterName) hub}}'
            status:
              history:
              - version: '{{hub fromConfigMap "" "site-data" (printf "%s-ocp-version" .ManagedClusterName) hub}}'
                state: "Completed"
      
      
      With the config-map:
      
        cloudransno-site8-ocp-channel: "stable-4.10"
        cloudransno-site8-ocp-version: "4.10.54"
      
      The CGU fails with the following message:
      
      oc get cgu -A
      NAMESPACE     NAME                AGE     STATE                  DETAILS
      ztp-install   cloudransno-site8   3m34s   InvalidPlatformImage   error response from update graph url https://api.openshift.com/api/upgrades_info/v1/graph?channel={{hub fromConfigMap "" "site-data" (printf "%s-ocp-channel" .ManagedClusterName) hub}}: 400
      
      

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

      
      ZTP rhel generator image:4.12
      
      

      How reproducible:

      
      100%
      
      

      Steps to Reproduce:

      1. Create the describe ClusterVersion policy using templates to set the OCP version and channel
      2. Deploy SNO cluster
      3. CGU created automatically during installation applies the policy
      

      Actual results:

      
      Policy not applied
      
      

      Expected results:

      
      Policy applied or error message more clear
      
      

      Additional info:

      
      System impact: Low, the value cannot be templates and must be hardcoded into the policy. It can affect production deployments when using group policies.
      
      

            jche@redhat.com Jun Chen
            rlopezma@redhat.com Rodrigo Lopez Manrique
            Joshua Clark Joshua Clark
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: