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

[v2] oc mirror - error when mirroring image name ends with the word 'delete'

XMLWordPrintable

    • None
    • CLID Sprint 271, CLID Sprint 272
    • 2
    • False
    • Hide

      None

      Show
      None
    • Hide
      What: oc-mirror v2 rejected valid ImageSetConfigurations just because they contained the words "mirror" or "delete"
      Fix: oc-mirror v2 now properly validates the words "delete" and "mirror" and only rejects invalid configurations.
      Show
      What: oc-mirror v2 rejected valid ImageSetConfigurations just because they contained the words "mirror" or "delete" Fix: oc-mirror v2 now properly validates the words "delete" and "mirror" and only rejects invalid configurations.
    • Bug Fix
    • In Progress

      This is a clone of issue OCPBUGS-56486. The following is the description of the original issue:

      Description of problem:

      While mirroring using v2, If I change the name of the image so that it ends with the word "delete",
      $ cat imageset.yaml 
      kind: ImageSetConfiguration
      apiVersion: mirror.openshift.io/v2alpha1
      mirror:
        additionalImages:
         - name: xxxdeleteme:1
      
      It fails with below  delete: is not allowed in ImageSetConfigurationKind    Do i need to file a bug for this?
      ~~~
      $ oc-mirror -c imageset.yaml --workspace file://`pwd` docker://`hostname`:8443 --v2
      
      2025/05/19 08:17:18  [INFO]   : :wave: Hello, welcome to oc-mirror
      2025/05/19 08:17:18  [INFO]   : :gear:  setting up the environment for you...
      2025/05/19 08:17:18  [ERROR]  :  delete: is not allowed in ImageSetConfigurationKind 
      ~~~
      
      Why is this only a reserved keyword for the last part of the image name? I would have expected that the keyword should be reserved at the version field too if it was rated as a "dangerous" keyword.
      
      ~~~
      kind: ImageSetConfiguration
      apiVersion: mirror.openshift.io/v2alpha1
      mirror:
        additionalImages:
         - name: delete.delete/delete/delete/delete1:delete
      ~~~

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

          

      How reproducible:

       

      Steps to Reproduce:

          1.
          2.
          3.
          

      Actual results:

          

      Expected results:

          

      Additional info:

          

              rdossant Rafael Fonseca dos Santos
              openshift-crt-jira-prow OpenShift Prow Bot
              Nidan Gavali Nidan Gavali
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: