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

Running the same mirroring command twice generates two different ImageContentSourcePolicy files

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not a Bug
    • Icon: Undefined Undefined
    • None
    • 4.11
    • oc-mirror
    • None
    • False
    • Hide

      None

      Show
      None

      Description of problem:

      When I run the same mirroring command twice it generates different 'ImageContentSourcePolicy' for first and second invocation.

      Version-Release number of selected component (if applicable):
      oc mirror version
      Client Version: version.Info

      {Major:"", Minor:"", GitVersion:"4.11.0-202208031306.p0.g3c1c80c.assembly.stream-3c1c80c", GitCommit:"3c1c80ca6a5a22b5826c88897e7a9e5acd7c1a96", GitTreeState:"clean", BuildDate:"2022-08-03T14:23:35Z", GoVersion:"go1.18.4", Compiler:"gc", Platform:"linux/amd64"}

      How reproducible:
      Always
      Steps to Reproduce:
      1. get attached ImageSetConfiguration
      2. run 'oc mirror --config=./image-set.yaml docker://<yourRegistry> --continue-on-error'
      3. check generated oc-mirror-workspace/results-1661420326/imageContentSourcePolicy.yaml
      4. run command from step 2 again
      5. check generated oc-mirror-workspace/results-1661435345/imageContentSourcePolicy.yaml

      Actual results:
      Step 3:

      cat oc-mirror-workspace/results-1661420326/imageContentSourcePolicy.yaml
      ---
      apiVersion: operator.openshift.io/v1alpha1
      kind: ImageContentSourcePolicy
      metadata:
        name: generic-0
      spec:
        repositoryDigestMirrors:
        - mirrors:
          - bastion.fbr-disc-411-01-2.maistra.upshift.redhat.com:55555/ubi8
          source: registry.redhat.io/ubi8
      ---
      apiVersion: operator.openshift.io/v1alpha1
      kind: ImageContentSourcePolicy
      metadata:
        labels:
          operators.openshift.org/catalog: "true"
        name: operator-0
      spec:
        repositoryDigestMirrors:
        - mirrors:
          - bastion.fbr-disc-411-01-2.maistra.upshift.redhat.com:55555/openshift-istio
          source: registry.redhat.io/openshift-istio
        - mirrors:
          - bastion.fbr-disc-411-01-2.maistra.upshift.redhat.com:55555/openshift-logging
          source: registry.redhat.io/openshift-logging
        - mirrors:
          - bastion.fbr-disc-411-01-2.maistra.upshift.redhat.com:55555/openshift-service-mesh
          source: registry.redhat.io/openshift-service-mesh
        - mirrors:
          - bastion.fbr-disc-411-01-2.maistra.upshift.redhat.com:55555/rhosdt
          source: registry.redhat.io/rhosdt
        - mirrors:
          - bastion.fbr-disc-411-01-2.maistra.upshift.redhat.com:55555/redhat
          source: registry.redhat.io/redhat
        - mirrors:
          - bastion.fbr-disc-411-01-2.maistra.upshift.redhat.com:55555/openshift4
          source: registry.redhat.io/openshift4
      

      Step 5:

      cat oc-mirror-workspace/results-1661435345/imageContentSourcePolicy.yaml 
      ---
      apiVersion: operator.openshift.io/v1alpha1
      kind: ImageContentSourcePolicy
      metadata:
        labels:
          operators.openshift.org/catalog: "true"
        name: operator-0
      spec:
        repositoryDigestMirrors:
        - mirrors:
          - bastion.fbr-disc-411-01-2.maistra.upshift.redhat.com:55555/redhat
          source: registry.redhat.io/redhat
        - mirrors:
          - bastion.fbr-disc-411-01-2.maistra.upshift.redhat.com:55555/openshift-service-mesh
          source: registry.redhat.io/openshift-service-mesh
      

      Expected results:
      It should generate always the same ImageContentSourcePolicy
      Additional info:
      Full output for steps 2 and 4 attached

        1. image-set.yaml
          0.8 kB
        2. step2-out.txt
          229 kB
        3. step4-out.txt
          16 kB

              rpeoples@redhat.com Ross Peoples (Inactive)
              fbrychta@redhat.com Filip Brychta
              ying zhou ying zhou
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: