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

Failed to prune images/operators during publishing it to a mirror registry in disconnected network

XMLWordPrintable

    • Important
    • No
    • CLID Sprint 247, CLID Sprint 248
    • 2
    • Rejected
    • False
    • Hide

      None

      Show
      None

      Description of problem:

      Images are pruned automatically from the target mirror registry if they are no longer included in the latest image set that was generated and mirrored.
      Moreover, the customer can use oc-mirror plug-in as an one tool for mirror-registry management such as updating contents or pruning contents.

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

      "4.13.0-202305171615.p0.gaee430b.assembly.stream-aee430b"

      How reproducible:

      0. Install a mirror registry with the command starting with "/mirror-registry install -v --quayStorage /opt/quay/quay-storage --pgStorage /opt/quay/pg-storage ..."
      
      1. mirror and publish A operator and B operator with a ImageSetConfiguration file to a mirror registry which is in disconnected environment.
      
      2. mirror and publish A operator and C operator with a new ImageSetConfiguration file to the mirror registry.
      
      3. At the end of step 2, there is "MANIFEST_UNKNOWN: manifest unknown; map[]" error and no imageContentSourcePolicy.yaml and no catalogSource-*.yaml are generated.
      
      [1] Refer Doc: https://docs.openshift.com/container-platform/4.13/installing/disconnected_install/installing-mirroring-disconnected.html#mirroring-image-set-full

      Steps to Reproduce:

      - I'm just sharing command that I ran in my lab.
      
      1. Mirroring from mirror to disk
      # oc-mirror --config=test1-imageset.yaml file:///tmp/ubi-image
      
      2. Mirroring from disk to mirror
      # oc-mirror --from=/tmp/ubi-image/mirror_seq1_000000.tar docker://mirror.ocp-svc.hyupark.com:8443
      
      3. Mirroring of a new operator to disk
      # oc-mirror --config=test2-imageset.yaml file:///tmp/ubi-image
      
      4. Mirroring from disk to mirror
      # oc-mirror --from=/tmp/ubi-image/mirror_seq2_000000.tar docker://mirror.ocp-svc.hyupark.com:8443

      Actual results:

      1. There is 'MANIFEST_UNKNOWN' log at the end of publishing.
      
      Deleting manifest sha256:fa36283092c27cd60761703d1eee07b92358dfe1157273b51b37b583a6060b35 from repo openshift-logging/elasticsearch-rhel8-operator
      Deleting manifest sha256:d3df7e62f2b1893b4f4879b91531b92652547aa4453fd1bfdc9558ff5a720a84 from repo openshift-logging/logging-curator5-rhel8
      Deleting manifest sha256:d65d8fba95e2313eb97a925c2d4f2a76d3616626c492803d19dcc3548753ecfa from repo openshift-logging/logging-curator5-rhel8
      ...
      repo "openshift-logging/elasticsearch-rhel8-operator" manifest sha256:fa36283092c27cd60761703d1eee07b92358dfe1157273b51b37b583a6060b35: DELETE https://mirror.ocp-svc.hyupark.com:8443/v2/openshift-logging/elasticsearch-rhel8-operator/manifests/sha256:fa36283092c27cd60761703d1eee07b92358dfe1157273b51b37b583a6060b35: MANIFEST_UNKNOWN: manifest unknown; map[]
      repo "openshift-logging/logging-curator5-rhel8" manifest sha256:d3df7e62f2b1893b4f4879b91531b92652547aa4453fd1bfdc9558ff5a720a84: DELETE https://mirror.ocp-svc.hyupark.com:8443/v2/openshift-logging/logging-curator5-rhel8/manifests/sha256:d3df7e62f2b1893b4f4879b91531b92652547aa4453fd1bfdc9558ff5a720a84: MANIFEST_UNKNOWN: manifest unknown; map[]
      repo "openshift-logging/logging-curator5-rhel8" manifest sha256:d65d8fba95e2313eb97a925c2d4f2a76d3616626c492803d19dcc3548753ecfa: DELETE https://mirror.ocp-svc.hyupark.com:8443/v2/openshift-logging/logging-curator5-rhel8/manifests/sha256:d65d8fba95e2313eb97a925c2d4f2a76d3616626c492803d19dcc3548753ecfa: MANIFEST_UNKNOWN: manifest unknown; map[]
      
      
      
      2. The imageContentSourcePolicy.yaml and catalogSource-*.yaml were not generated.

      Expected results:

      - A previous package 'elasticsearch-operator' should be successfully pruned from the mirror-registry..
      
      - Updated an imageContentSourcePolicy.yaml and an catalogSource-*.yaml should be generated under the path '~/oc-mirror-workspace/'

      Additional info:

      - These are the ImageSetConfiguration files that I used for the test.
      
      # cat test1-imageset.yaml
      kind: ImageSetConfiguration
      apiVersion: mirror.openshift.io/v1alpha2
      storageConfig:
        local:
          path: /root/olm-mirror/olm412
      mirror:
        operators:
        - catalog: registry.redhat.io/redhat/redhat-operator-index:v4.12
          packages:
          - name: cluster-logging
            channels:
            - name: stable
          - name: elasticsearch-operator
            channels:
            - name: stable
      
      
      
      # cat test2-imageset.yaml
      kind: ImageSetConfiguration
      apiVersion: mirror.openshift.io/v1alpha2
      storageConfig:
        local:
          path: /root/olm-mirror/olm412
      mirror:
        operators:
        - catalog: registry.redhat.io/redhat/redhat-operator-index:v4.12
          packages:
          - name: cluster-logging
            channels:
            - name: stable
          - name: file-integrity-operator
            channels:
            - name: stable

            luzuccar@redhat.com Luigi Mario Zuccarelli
            rhn-support-hyupark HyunYick Park
            ying zhou ying zhou
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: