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

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

XMLWordPrintable

    • None
    • False
    • Hide

      None

      Show
      None
    • Hide
      * Previously, when using the `dry-run` argument with the oc-mirror v2 command, the `cluster-resources` directory was cleared in error. As a result, files that were generated from a previous mirroring operation, such as `idms-oc-mirror.yaml` and `itms-oc-mirror.yaml`, were deleted.With this release, the `cluster-resources` directory is no longer cleared when you add the `dry-run` argument to the oc-mirror v2 command. (link:https://issues.redhat.com/browse/OCPBUGS-51185[*OCPBUGS-51185*])
      Show
      * Previously, when using the `dry-run` argument with the oc-mirror v2 command, the `cluster-resources` directory was cleared in error. As a result, files that were generated from a previous mirroring operation, such as `idms-oc-mirror.yaml` and `itms-oc-mirror.yaml`, were deleted.With this release, the `cluster-resources` directory is no longer cleared when you add the `dry-run` argument to the oc-mirror v2 command. (link: https://issues.redhat.com/browse/OCPBUGS-51185 [* OCPBUGS-51185 *])
    • Bug Fix
    • Done

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

      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
              openshift-crt-jira-prow OpenShift Prow Bot
              ying zhou ying zhou
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: