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

While mirroring nvidia operator with oc-mirror 4.13 version, ImageContentSourcePolicy is not getting created properly

    • Important
    • No
    • CFE Sprint 241
    • 1
    • Rejected
    • False
    • Hide

      None

      Show
      None

      Description of problem:

      While mirroring nvidia operator with oc-mirror 4.13 version, ImageContentSourcePolicy is not getting created properly 

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

       

      How reproducible:

       

      Steps to Reproduce:

      1. Create imageset file
      
      kind: ImageSetConfiguration
      apiVersion: mirror.openshift.io/v1alpha2
      archiveSize: 4
      storageConfig:
        local:
          path: /home/name/nvidia
      mirror:
        operators:
        - catalog: registry.redhat.io/redhat/certified-operator-index:v4.11
          packages:
          - name: nvidia-network-operator
      
      2. mirror to disk using oc-mirror 4.13
      $oc-mirror -c imageset.yaml file:///home/name/nvidia/
      ./oc-mirror version
      Client Version: version.Info{Major:"", Minor:"", GitVersion:"4.13.0-202307242035.p0.gf11a900.assembly.stream-f11a900", GitCommit:"f11a9001caad8fe146c73baf2acc38ddcf3642b5", GitTreeState:"clean", BuildDate:"2023-07-24T21:25:46Z", GoVersion:"go1.19.10 X:strictfipsruntime", Compiler:"gc", Platform:"linux/amd64"}
      
      3. Now generate the manifest
      
      $ oc-mirror --from /home/name/nvidia/ docker://registry:8443 --manifests-only
      
      - mirrors:
          - registry:8443/nvidia/cloud-native
          source: nvcr.io/nvidia
      
      However the correct mapping should be:
          - mirrors:
              - registry/nvidia
            source: nvcr.io/nvidia
      
      4. perform same step with 4.12.0 version you will not hit this issue. 
      ./oc-mirror version
      Client Version: version.Info{Major:"", Minor:"", GitVersion:"4.12.0-202304241542.p0.g5fc00fe.assembly.stream-5fc00fe", GitCommit:"5fc00fe735d8fb3b6125f358f5d6b9fe726fad10", GitTreeState:"clean", BuildDate:"2023-04-24T16:01:29Z", GoVersion:"go1.19.6", Compiler:"gc", Platform:"linux/amd64"}

       

       

      Actual results:

       

      Expected results:

       

      Additional info:

       

            [OCPBUGS-17998] While mirroring nvidia operator with oc-mirror 4.13 version, ImageContentSourcePolicy is not getting created properly

            Errata Tool added a comment -

            Since the problem described in this issue should be resolved in a recent advisory, it has been closed.

            For information on the advisory (Important: OpenShift Container Platform 4.14.0 bug fix and 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-2023:5006

            Errata Tool added a comment - Since the problem described in this issue should be resolved in a recent advisory, it has been closed. For information on the advisory (Important: OpenShift Container Platform 4.14.0 bug fix and 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-2023:5006

            Ying Zhou added a comment -

            checked with the latest code , can't reproduce the issue now :

            when do mirror2mirror test , icsp like and operator pod running well :
            cat oc-mirror-workspace/results-1692953368/imageContentSourcePolicy.yaml
            ---
            apiVersion: operator.openshift.io/v1alpha1
            kind: ImageContentSourcePolicy
            metadata:
              labels:
                operators.openshift.org/catalog: "true"
              name: operator-test
            spec:
              repositoryDigestMirrors:
              - mirrors:
                - ec2-18-119-157-208.us-east-2.compute.amazonaws.com:5000/bug/kubebuilder
                source: gcr.io/kubebuilder
              - mirrors:
                - ec2-18-119-157-208.us-east-2.compute.amazonaws.com:5000/bug/k8snetworkplumbingwg
                source: ghcr.io/k8snetworkplumbingwg
              - mirrors:
                - ec2-18-119-157-208.us-east-2.compute.amazonaws.com:5000/bug/nvidia/cloud-native
                source: nvcr.io/nvidia/cloud-native
              - mirrors:
                - ec2-18-119-157-208.us-east-2.compute.amazonaws.com:5000/bug/nvidia/mellanox
                source: nvcr.io/nvidia/mellanox
              - mirrors:
                - ec2-18-119-157-208.us-east-2.compute.amazonaws.com:5000/bug/redhat
                source: registry.redhat.io/redhat
              - mirrors:
                - ec2-18-119-157-208.us-east-2.compute.amazonaws.com:5000/bug/nvidia-network-operator
                source: registry.connect.redhat.com/nvidia-network-operator
            [root@preserve-fedora36 OCPBUGS-17998]# oc get pod
            NAME                                                          READY   STATUS    RESTARTS   AGE
            nvidia-network-operator-controller-manager-596c9bfdfd-c6rdd   2/2     Running   0          6m20s
            
            do mirror2disk + disk2mirror test , icsp like  and pod running well
            cat oc-mirror-workspace/results-1692955193/imageContentSourcePolicy.yaml 
            ---
            apiVersion: operator.openshift.io/v1alpha1
            kind: ImageContentSourcePolicy
            metadata:
              labels:
                operators.openshift.org/catalog: "true"
              name: operator-0
            spec:
              repositoryDigestMirrors:
              - mirrors:
                - ec2-18-119-157-208.us-east-2.compute.amazonaws.com:5000/disk2/redhat
                source: registry.redhat.io/redhat
              - mirrors:
                - ec2-18-119-157-208.us-east-2.compute.amazonaws.com:5000/disk2/kubebuilder
                source: gcr.io/kubebuilder
              - mirrors:
                - ec2-18-119-157-208.us-east-2.compute.amazonaws.com:5000/disk2/nvidia-network-operator
                source: registry.connect.redhat.com/nvidia-network-operator
              - mirrors:
                - ec2-18-119-157-208.us-east-2.compute.amazonaws.com:5000/disk2/nvidia
                source: nvcr.io/nvidia
              - mirrors:
                - ec2-18-119-157-208.us-east-2.compute.amazonaws.com:5000/disk2/k8snetworkplumbingwg
                source: ghcr.io/k8snetworkplumbingwg
            [root@preserve-fedora36 OCPBUGS-17998]# oc create -f oc-mirror-workspace/results-1692955193/imageContentSourcePolicy.yaml
            imagecontentsourcepolicy.operator.openshift.io/operator-0 created
            [root@preserve-fedora36 OCPBUGS-17998]# oc create -f oc-mirror-workspace/results-1692955193/catalogSource-certified-operator-index.yaml 
            catalogsource.operators.coreos.com/certified-operator-index created
            [root@preserve-fedora36 OCPBUGS-17998]# oc get pod
            NAME                                                          READY   STATUS    RESTARTS   AGE
            nvidia-network-operator-controller-manager-65fccf84f4-gjqdh   2/2     Running   0          4m24s
            
            
            

            Ying Zhou added a comment - checked with the latest code , can't reproduce the issue now : when do mirror2mirror test , icsp like and operator pod running well : cat oc-mirror-workspace/results-1692953368/imageContentSourcePolicy.yaml --- apiVersion: operator .openshift.io/v1alpha1 kind: ImageContentSourcePolicy metadata: labels: operators.openshift.org/catalog: " true " name: operator -test spec: repositoryDigestMirrors: - mirrors: - ec2-18-119-157-208.us-east-2.compute.amazonaws.com:5000/bug/kubebuilder source: gcr.io/kubebuilder - mirrors: - ec2-18-119-157-208.us-east-2.compute.amazonaws.com:5000/bug/k8snetworkplumbingwg source: ghcr.io/k8snetworkplumbingwg - mirrors: - ec2-18-119-157-208.us-east-2.compute.amazonaws.com:5000/bug/nvidia/cloud- native source: nvcr.io/nvidia/cloud- native - mirrors: - ec2-18-119-157-208.us-east-2.compute.amazonaws.com:5000/bug/nvidia/mellanox source: nvcr.io/nvidia/mellanox - mirrors: - ec2-18-119-157-208.us-east-2.compute.amazonaws.com:5000/bug/redhat source: registry.redhat.io/redhat - mirrors: - ec2-18-119-157-208.us-east-2.compute.amazonaws.com:5000/bug/nvidia-network- operator source: registry.connect.redhat.com/nvidia-network- operator [root@preserve-fedora36 OCPBUGS-17998]# oc get pod NAME READY STATUS RESTARTS AGE nvidia-network- operator -controller-manager-596c9bfdfd-c6rdd 2/2 Running 0 6m20s do mirror2disk + disk2mirror test , icsp like and pod running well cat oc-mirror-workspace/results-1692955193/imageContentSourcePolicy.yaml --- apiVersion: operator .openshift.io/v1alpha1 kind: ImageContentSourcePolicy metadata: labels: operators.openshift.org/catalog: " true " name: operator -0 spec: repositoryDigestMirrors: - mirrors: - ec2-18-119-157-208.us-east-2.compute.amazonaws.com:5000/disk2/redhat source: registry.redhat.io/redhat - mirrors: - ec2-18-119-157-208.us-east-2.compute.amazonaws.com:5000/disk2/kubebuilder source: gcr.io/kubebuilder - mirrors: - ec2-18-119-157-208.us-east-2.compute.amazonaws.com:5000/disk2/nvidia-network- operator source: registry.connect.redhat.com/nvidia-network- operator - mirrors: - ec2-18-119-157-208.us-east-2.compute.amazonaws.com:5000/disk2/nvidia source: nvcr.io/nvidia - mirrors: - ec2-18-119-157-208.us-east-2.compute.amazonaws.com:5000/disk2/k8snetworkplumbingwg source: ghcr.io/k8snetworkplumbingwg [root@preserve-fedora36 OCPBUGS-17998]# oc create -f oc-mirror-workspace/results-1692955193/imageContentSourcePolicy.yaml imagecontentsourcepolicy. operator .openshift.io/ operator -0 created [root@preserve-fedora36 OCPBUGS-17998]# oc create -f oc-mirror-workspace/results-1692955193/catalogSource-certified- operator -index.yaml catalogsource.operators.coreos.com/certified- operator -index created [root@preserve-fedora36 OCPBUGS-17998]# oc get pod NAME READY STATUS RESTARTS AGE nvidia-network- operator -controller-manager-65fccf84f4-gjqdh 2/2 Running 0 4m24s

              rh-ee-aguidi Alex Guidi
              rhn-support-bshaw Bikash Shaw
              Ying Zhou Ying Zhou
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated:
                Resolved: