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

OLM CRD compatibility check logic is incorrect

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done-Errata
    • Critical
    • 4.15.0
    • 4.13
    • OLM
    • No
    • Happy 242, INKEY$ (OPRUN 243), Joe Lanford 244
    • 3
    • Rejected
    • False
    • Hide

      None

      Show
      None
    • Hide
      * With this update, OLM performs a best-effort verification that existing custom resources (CRs) are not invalidated when you install an updated custom resource definition (CRD). (link:https://issues.redhat.com/browse/OCPBUGS-18948[*OCPBUGS-18948*])
      Show
      * With this update, OLM performs a best-effort verification that existing custom resources (CRs) are not invalidated when you install an updated custom resource definition (CRD). (link: https://issues.redhat.com/browse/OCPBUGS-18948 [* OCPBUGS-18948 *])
    • Bug Fix
    • Done

    Description

      Description of problem:

      OLM is supposed to verify that an update to a CRD does not introduce validation that is more restrictive than what is currently in effect. The logic for this only works if a CRD uses a single spec.validation entry, but this is unlikely to ever be the case. Instead, most CRDs use per-version validation schemas.

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

       

      How reproducible:

      100%

      Steps to Reproduce:

      1. Create an operator that has a CRD with an entry in spec.versions along with spec.versions[].schema populated with some validation schema.
      2. Create a CR
      3. Attempt to upgrade to a newer version of the operator, where the CRD is updated to add a new version whose schema validation is more restrictive and will fail against the CR that was previously created
      

      Actual results:

      Upgrade succeeds

      Expected results:

      Upgrade fails

      Additional info:

       

      Attachments

        Activity

          People

            rh-ee-dfranz Daniel Franz
            angoldst@redhat.com Andy Goldstein
            bruno andrade bruno andrade
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: