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

Failed to create the catalog source pod with error: Pod is invalid: metadata.labels must be no more than 63 characters

XMLWordPrintable

    • Important
    • CLID Sprint 252
    • 1
    • Rejected
    • False
    • Hide

      None

      Show
      None
    • N/A
    • Release Note Not Required
    • In Progress
    • Customer Facing

      Description of problem:

      Mirror OCI catalog with v2, after create catalog source , the pod is not present, check the catalog see error info :
      
      oc describe catalogsource cs-redhat-operator-index-8bfb449c24d03d6ddbd05d3de9fe7a7dae4a2ecdb8f84487f28d24d6ca2d175c
      Name:         cs-redhat-operator-index-8bfb449c24d03d6ddbd05d3de9fe7a7dae4a2ecdb8f84487f28d24d6ca2d175c
      Namespace:    openshift-marketplace
      Labels:       <none>
      Annotations:  <none>
      API Version:  operators.coreos.com/v1alpha1
      Kind:         CatalogSource
      Metadata:
        Creation Timestamp:  2024-03-29T02:49:47Z
        Generation:          1
        Resource Version:    53264
        UID:                 69a39693-b29b-4fa4-a6da-de31dc3d521c
      Spec:
        Image:        ec2-3-139-239-15.us-east-2.compute.amazonaws.com:5000/multi/redhat-operator-index:8bfb449c24d03d6ddbd05d3de9fe7a7dae4a2ecdb8f84487f28d24d6ca2d175c
        Source Type:  grpc
      Status:
        Message:  couldn't ensure registry server - error ensuring pod: : error creating new pod: cs-redhat-operator-index-8bfb449c24d03d6ddbd05d3de9fe7a7dae4a2ecdb8f84487f28d24d6ca2d175c-: Pod "cs-redhat-operator-index-8bfb449c24d03d6ddbd05d3de9fe7a7da785sd" is invalid: metadata.labels: Invalid value: "cs-redhat-operator-index-8bfb449c24d03d6ddbd05d3de9fe7a7dae4a2ecdb8f84487f28d24d6ca2d175c": must be no more than 63 characters
        Reason:   RegistryServerError
      Events:     <none>

       

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

      oc-mirror version 
      WARNING: This version information is deprecated and will be replaced with the output from --short. Use --output=yaml|json to get the full version.
      Client Version: version.Info{Major:"", Minor:"", GitVersion:"4.16.0-202403251146.p0.g03ce0ca.assembly.stream.el9-03ce0ca", GitCommit:"03ce0ca797e73b6762fd3e24100ce043199519e9", GitTreeState:"clean", BuildDate:"2024-03-25T16:34:33Z", GoVersion:"go1.21.7 (Red Hat 1.21.7-1.el9) X:strictfipsruntime", Compiler:"gc", Platform:"linux/amd64"}

      How reproducible:

      always

      Steps to Reproduce:

      1)  Copy the operator as OCI format to localhost:
      `skopeo copy --all docker://registry.redhat.io/redhat/redhat-operator-index:v4.15 oci:///app1/noo/redhat-operator-index --remove-signatures`
      
      2)  Use following imagesetconfigure for mirror: cat config-multi-op.yaml 
      kind: ImageSetConfiguration
      apiVersion: mirror.openshift.io/v1alpha2
      mirror:
        operators:
          - catalog: oci:///app1/noo/redhat-operator-index
            packages:
              - name: odf-operator
      `oc-mirror --config config-multi-op.yaml file://outmulitop   --v2`
      
      
      3) Do diskTomirror :
      `oc-mirror --config config-multi-op.yaml --from file://outmulitop  --v2 docker://ec2-3-139-239-15.us-east-2.compute.amazonaws.com:5000/multi`
      
      4) Create cluster resource with file: itms-oc-mirror.yaml
         `oc create -f cs-redhat-operator-index-8bfb449c24d03d6ddbd05d3de9fe7a7dae4a2ecdb8f84487f28d24d6ca2d175c.yaml`

      Actual results: 

      4) The pod for catalogsource not present 
      
      oc describe catalogsource cs-redhat-operator-index-8bfb449c24d03d6ddbd05d3de9fe7a7dae4a2ecdb8f84487f28d24d6ca2d175c
      Name:         cs-redhat-operator-index-8bfb449c24d03d6ddbd05d3de9fe7a7dae4a2ecdb8f84487f28d24d6ca2d175c
      Namespace:    openshift-marketplace
      Labels:       <none>
      Annotations:  <none>
      API Version:  operators.coreos.com/v1alpha1
      Kind:         CatalogSource
      Metadata:
        Creation Timestamp:  2024-03-29T02:49:47Z
        Generation:          1
        Resource Version:    53264
        UID:                 69a39693-b29b-4fa4-a6da-de31dc3d521c
      Spec:
        Image:        ec2-3-139-239-15.us-east-2.compute.amazonaws.com:5000/multi/redhat-operator-index:8bfb449c24d03d6ddbd05d3de9fe7a7dae4a2ecdb8f84487f28d24d6ca2d175c
        Source Type:  grpc
      Status:
        Message:  couldn't ensure registry server - error ensuring pod: : error creating new pod: cs-redhat-operator-index-8bfb449c24d03d6ddbd05d3de9fe7a7dae4a2ecdb8f84487f28d24d6ca2d175c-: Pod "cs-redhat-operator-index-8bfb449c24d03d6ddbd05d3de9fe7a7da785sd" is invalid: metadata.labels: Invalid value: "cs-redhat-operator-index-8bfb449c24d03d6ddbd05d3de9fe7a7dae4a2ecdb8f84487f28d24d6ca2d175c": must be no more than 63 characters
        Reason:   RegistryServerError
      Events:     <none>
      
      cat cs-redhat-operator-index-8bfb449c24d03d6ddbd05d3de9fe7a7dae4a2ecdb8f84487f28d24d6ca2d175c.yaml 
      apiVersion: operators.coreos.com/v1alpha1
      kind: CatalogSource
      metadata:
        creationTimestamp: null
        name: cs-redhat-operator-index-8bfb449c24d03d6ddbd05d3de9fe7a7dae4a2ecdb8f84487f28d24d6ca2d175c
        namespace: openshift-marketplace
      spec:
        image: ec2-3-139-239-15.us-east-2.compute.amazonaws.com:5000/multi/redhat-operator-index:8bfb449c24d03d6ddbd05d3de9fe7a7dae4a2ecdb8f84487f28d24d6ca2d175c
        sourceType: grpc
      status: {} 

      Expected results:

      4) catalog source pod running well.

            skhoury@redhat.com Sherine Khoury
            yinzhou@redhat.com ying zhou
            ying zhou ying zhou
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: