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

A --dry-run option in oc-mirror version 2 deletes yaml resources in the ocp_mirror/working-dir/cluster-resources/ directory

XMLWordPrintable

    • Quality / Stability / Reliability
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • None
    • Done
    • Bug Fix
    • Hide
      * Previously, when using oc-mirror plugin v2 with the `--dry-run` flag, the `cluster-resources` folder inside the working directory was cleared. As a result, previously generated files such as `idms-oc-mirror.yaml` and `itms-oc-mirror.yaml` were deleted. With this release, the `cluster-resources` folder is no longer cleared during dry-run operations, preserving any previously generated configuration files. (link:https://issues.redhat.com/browse/OCPBUGS-50963[OCPBUGS-50963])
      Show
      * Previously, when using oc-mirror plugin v2 with the `--dry-run` flag, the `cluster-resources` folder inside the working directory was cleared. As a result, previously generated files such as `idms-oc-mirror.yaml` and `itms-oc-mirror.yaml` were deleted. With this release, the `cluster-resources` folder is no longer cleared during dry-run operations, preserving any previously generated configuration files. (link: https://issues.redhat.com/browse/OCPBUGS-50963 [ OCPBUGS-50963 ])
    • None
    • None
    • None
    • None

      Description of problem:

          When using oc-mirror version 2, it creates idms-oc-mirror.yaml and itms-oc-mirror.yaml after a successful mirroring process(mirror to mirror). However, On a second attempt, I've added an operator in the imageset-config.yaml and then re-run the same command with a --dry-run, I noticed that these resource files got deleted. 
      
      
      

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

          

      How reproducible:

          always

      Steps to Reproduce:

          1. Create a imageset-config.yaml
          2. Run oc-mirror --v2, mirror images
          3. Run with a --dry-run option
          

      Actual results:

          the existing yaml in the ocp_mirror/working-dir/cluster-resources/ directory when running with a --dry-run option

      Expected results:

          --dry-run supposed not to delete files

      Additional info:

          tested with 4.17 oc-mirror version

              rdossant Rafael Fonseca dos Santos
              rhn-support-dchong Daniel Chong
              None
              None
              Ying Zhou Ying Zhou
              None
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: