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

[release-4.19] OLMv1: faulty parsing of olm.maxOpenShiftVersion allows cluster upgrades when they should be blocked

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 4.18, 4.19.0, 4.20.0
    • OLM
    • None
    • Lillipup Sprint 272
    • 1
    • Rejected
    • False
    • Hide

      None

      Show
      None
    • Hide
      *Cause*: Use of OLMv1 to install operators with `olm.maxOpenShiftVersion: 4.19`
      *Consequence*: OLMv1 will not prevent upgrades to 4.20, even though it should.
      *Fix*: Changes to OLMv1's parsing logic for floating point-formated `olm.maxOpenShiftVersion` values.
      *Result*: OLMv1 will now correctly prevent upgrades to 4.20 when operators with `olm.maxOpenShiftVersion: 4.19` are installed.
      Show
      *Cause*: Use of OLMv1 to install operators with `olm.maxOpenShiftVersion: 4.19` *Consequence*: OLMv1 will not prevent upgrades to 4.20, even though it should. *Fix*: Changes to OLMv1's parsing logic for floating point-formated `olm.maxOpenShiftVersion` values. *Result*: OLMv1 will now correctly prevent upgrades to 4.20 when operators with `olm.maxOpenShiftVersion: 4.19` are installed.
    • Bug Fix
    • In Progress

      Our float parsing logic for olm.maxOpenShiftVersion has a bug related to floating-point math. For example:

      • 4.18 (float) parsed to 4.18.0 (semver), but
      • 4.19 (float) parsed to 4.20.0 (semver)

      This PR resolves that bug, adds regression tests, and also does some slight refactoring to make the overall max OCP version logic easier to understand for maintainers.

      This is reproducible on 4.19 using cluster-logging 6.2.2

       

       

              rh-ee-cchantse Catherine Chan-Tse
              openshift-crt-jira-prow OpenShift Prow Bot
              Xia Zhao Xia Zhao
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated: