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

OperatorHub.yaml is missing from the ztp source-crs

XMLWordPrintable

    • Important
    • No
    • Rejected
    • False
    • Hide

      None

      Show
      None

      Description of problem:

      gitops deployment fails - Policies are not syncing because OperatorHub.yaml is missing from the ztp source-crs.

      [kni@registry.kni-qe-27 ~]$ oc get apps -A
      NAMESPACE NAME SYNC STATUS HEALTH STATUS
      openshift-gitops clusters Synced Healthy
      openshift-gitops policies Unknown Healthy

      [kni@registry.kni-qe-27 ~]$ oc get apps -n openshift-gitops policies -o yaml
      [...]
      status:
      conditions:

      • lastTransitionTime: "2024-01-24T15:08:10Z"
        message: |-
        Failed to load target state: failed to generate manifest for source 1 of 1: rpc error: code = Unknown desc = `kustomize build <path to cached source>/policygentemplates --enable-alpha-plugins` failed exit status 1: 2024/01/24 15:08:10 Could not build the entire policy defined by /tmp/kust-plugin-config-673779590: OperatorHub.yaml is not found both in Git path: <path to cached source>/policygentemplates/source-crs/OperatorHub.yaml and in the ztp container path: /.config/kustomize/plugin/ran.openshift.io/v1/policygentemplate/source-crs/OperatorHub.yaml
        Error: failure in plugin configured via /tmp/kust-plugin-config-673779590; exit status 1: exit status 1
        type: ComparisonError
         

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

       OCP version: 4.15
      
      ztp-site-generator:v4.15.0-30

      How reproducible:

          100%

      Steps to Reproduce:

          1. Deploy 4.15 SNO 
          2. Deploy gitops-ztp
          3. Check apps
      
      [kni@registry.kni-qe-27 ~]$ oc get apps -A
      NAMESPACE          NAME       SYNC STATUS   HEALTH STATUS
      openshift-gitops   clusters   Synced        Healthy
      openshift-gitops   policies   Unknown       Healthy
      
      [kni@registry.kni-qe-27 ~]$ oc get apps -n openshift-gitops policies -o yaml 
      [...]
      status:
        conditions:
        - lastTransitionTime: "2024-01-24T15:08:10Z"
          message: |-
            Failed to load target state: failed to generate manifest for source 1 of 1: rpc error: code = Unknown desc = `kustomize build <path to cached source>/policygentemplates --enable-alpha-plugins` failed exit status 1: 2024/01/24 15:08:10 Could not build the entire policy defined by /tmp/kust-plugin-config-673779590: OperatorHub.yaml is not found both in Git path: <path to cached source>/policygentemplates/source-crs/OperatorHub.yaml and in the ztp container path: /.config/kustomize/plugin/ran.openshift.io/v1/policygentemplate/source-crs/OperatorHub.yaml
            Error: failure in plugin configured via /tmp/kust-plugin-config-673779590; exit status 1: exit status 1
          type: ComparisonError    

      Actual results:

       openshift-gitops policies Unknown Healthy  message: |- Failed to load target state: failed to generate manifest for source 1 of 1: rpc error: code = Unknown desc = `kustomize build <path to cached source>/policygentemplates --enable-alpha-plugins` failed exit status 1: 2024/01/24 15:08:10 Could not build the entire policy defined by /tmp/kust-plugin-config-673779590: OperatorHub.yaml is not found both in Git path: <path to cached source>/policygentemplates/source-crs/OperatorHub.yaml and in the ztp container path: /.config/kustomize/plugin/ran.openshift.io/v1/policygentemplate/source-crs/OperatorHub.yaml

      Expected results:

           openshift-gitops policies sync

      Additional info:

          

              sahasan@redhat.com Sabbir Hasan
              bblock@redhat.com Bonnie Block
              Periyamaruthu Mohanraj Periyamaruthu Mohanraj
              Votes:
              0 Vote for this issue
              Watchers:
              10 Start watching this issue

                Created:
                Updated:
                Resolved: