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

error generating diff when updating the local mirror directory generated using oc-mirror

XMLWordPrintable

    • Low
    • No
    • False
    • Hide

      None

      Show
      None

      Description of problem:

      After mirroring the ansible-automation-platform-operator and ansible-cloud-addons-operator images using an ImageSetConfiguration with oc-mirror, attempts to update the local copy using the same workspace at a later date fail with the following error:
      
      error: error generating diff: error including items:
      [[package="ansible-automation-platform-operator" channel="stable-2.4-cluster-scoped"] bundles do not exist in channel: versions=["0.0.0"], [package="ansible-cloud-addons-operator" channel="stable-2.4-cluster-scoped"] bundles do not exist in channel: versions=["0.0.0"]]
      
      Looking up the error message in the oc-mirror source, it was noted a recent change was made to handle version strings that contain a hyphen as part of OCPBUGS-588, however as the minVersion appears to be working in this issues case, it could be a new/different bug.
      
      Having said that, the affected images do have a hyphenated version:
      
      $ oc-mirror list operators --catalog registry.redhat.io/redhat/redhat-operator-index:v4.12 --package ansible-automation-platform-operator
      NAME                                  DISPLAY NAME                 DEFAULT CHANNEL  
      ansible-automation-platform-operator  Ansible Automation Platform  stable-2.4-cluster-scoped  
        
      PACKAGE                               CHANNEL                    HEAD
      ansible-automation-platform-operator  stable-2.3                 aap-operator.v2.3.0-0.1694717818
      ansible-automation-platform-operator  stable-2.3-cluster-scoped  aap-operator.v2.3.0-0.1694718064
      ansible-automation-platform-operator  stable-2.4                 aap-operator.v2.4.0-0.1695086513
      ansible-automation-platform-operator  stable-2.4-cluster-scoped  aap-operator.v2.4.0-0.1695086882  
        
      $ oc-mirror list operators --catalog registry.redhat.io/redhat/redhat-operator-index:v4.12 --package ansible-cloud-addons-operator
      NAME                           DISPLAY NAME          DEFAULT CHANNEL
      ansible-cloud-addons-operator  Ansible Cloud Addons  stable-2.4-cluster-scoped  
        
      PACKAGE                        CHANNEL                    HEAD
      ansible-cloud-addons-operator  stable-2.3-cluster-scoped  aca-operator.v2.3.0-0.1689662666
      ansible-cloud-addons-operator  stable-2.4-cluster-scoped  aca-operator.v2.4.0-0.1695086173
      
      Specifying a new local mirror location while running from the same workspace directory still encounters the issue. It was also noted that the .metadata.json file created in the workspace directory modifies the version string, replacing the hyphen with a plus, ie the aap-operator version "2.4.0-0.1695086882" "2.4.0+0.1695086882"

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

      4.12

      How reproducible:

      The customer can reliably reproduce using their workspace, independently of where they are mirroring to, or whether they use the --ignore-history or --skip-metadata-check arguments

      Steps to Reproduce:

      1. Use oc-mirror with an imagesetconfig that contains the ansible operators to create a mirror 
      2. Wait a few days
      3. Run the same oc-mirror commands with the same imagesetconfig in the same workspace to update the mirror
      

      Actual results:

      oc-mirror fails to update the mirror, with the error:
      
      
      error: error generating diff: error including items:
      [[package="ansible-automation-platform-operator" channel="stable-2.4-cluster-scoped"] bundles do not exist in channel: versions=["0.0.0"], [package="ansible-cloud-addons-operator" channel="stable-2.4-cluster-scoped"] bundles do not exist in channel: versions=["0.0.0"]]

      Expected results:

      oc-mirror updates the local directory which can then be used to update the disconnected mirror

      Additional info:

      A workaround for the issue was found by specifying a minVersion for the impacted images in the ImageSetConfiguration, however this is not an immediately obvious solution to users.

       

            luzuccar@redhat.com Luigi Mario Zuccarelli
            rhn-support-pauwebst Paul Webster
            ying zhou ying zhou
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: