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

[v2] blockedImages behavior is different

XMLWordPrintable

    • Quality / Stability / Reliability
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Description of problem:

          See OSDOCS-13419
      When the collection contains image quay.io/second-image@sha256:1234535341312343 , and blockedImages contains quay.io/second-image:v1.0, even if this digest corresponds to the tag, the image will not be excluded from the mirror set.

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

          4.18

      How reproducible:

          Always

      Steps to Reproduce:

          1.
          2.
          3.
          

      Actual results:

          

      Expected results:

          Allow regex in the blockedImages

      Additional info:

      blockedImages is a list of image references for images to exclude. These references can be by digest or by tag.
      
      See https://github.com/openshift/oc-mirror/blob/main/v2%2Finternal%2Fpkg%2Fcli%2Fexecutor.go#L1226.
      
      What the OSDOCS-13419 bug reporter is trying to say, I think, is that blockedImages cannot be a pattern as it used to be in v1 (where a regex was also acceptable).
      
      Therefore, at the moment, the v2 user needs to provide an image reference for an image that exists and is in the mirroring set.
      
      According to the current code, the blockedImages could also be without tag nor digest, since the code will look for a contains the blockedImages reference ... 
      Examples:  
        blockedImages:
        - name: quay.io/first-image@sha256:1234535341312343
        - name: quay.io/second-image:v1.0
        - name: quay.io/third-image # matches the "contains" scenario
      With the above example,
      * any image quay.io/third-image, whatever its tag or digest will be excluded.
      * only digest sha256:1234535341312343 for quay.io/first-image will be excluded
      * only tag quay.io/second-image:v1.0 will be excluded
      
      A final word about what we mean by "image reference for an image that exists and is in the mirroring set":
      The imageSetConfig instructs oc-mirror to mirror a set of images, that we call the mirror set.
      Let's say the mirror set contains quay.io/second-image@sha256:1234535341312343, but the blockedImages contains name: quay.io/second-image:v1.0, the second-image@sha256:1234535341312343 will not be excluded from the mirroring.

              rhn-support-stk Subhashini T K (Inactive)
              skhoury@redhat.com Sherine Khoury
              None
              None
              Nidan Gavali Nidan Gavali
              None
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: