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

In the operator InstallPlan while upgrading the operator getting an error.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • None
    • 4.16.z
    • OLM
    • None
    • Important
    • None
    • False
    • Hide

      None

      Show
      None

      Description of problem:

      In the operator InstallPlan while upgrading the operator getting an below error:
      ~~~
      message: 'error validating existing CRs against new CRD''s schema for "runtimeassemblies.runtimes.ibm.com":
            error validating runtimes.ibm.com/v1alpha1, Kind=RuntimeAssembly "dev/ae6630ed-f8c6-4961-a937-ca3149f49b41":
            updated validation is too restrictive: [].status.last_action.action_ts: Invalid
            value: "number": status.last_action.action_ts in body must be of type integer:
            "number"'
      ~~~ 
      
      
      

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

      OCP 4.16.12

      How reproducible:

      No

      Actual results:

      In OCP 4.16.12 Getting a below error message in the operator installplan while upgrading the operator:
      ~~~
       message: 'error validating existing CRs against new CRD''s schema for "runtimeassemblies.runtimes.ibm.com":
            error validating runtimes.ibm.com/v1alpha1, Kind=RuntimeAssembly "dev/ae6630ed-f8c6-4961-a937-ca3149f49b41":
            updated validation is too restrictive: [].status.last_action.action_ts: Invalid
            value: "number": status.last_action.action_ts in body must be of type integer:
            "number"'
      ~~~

      Expected results:

      This works fine in OCP 4.16.11 with the exact same product code but not working in OCP 4.16.12 it should work in 4.16.12.

      Additional info:

      - This works fine in OCP 4.16.11 with the exact same product code of ours. Therefore, we assume an issue with OpenAPIV3 schema validation changes in OLM from OCP 4.16.11 to 4.16.12.
      
      action_ts is defined as follows in the CRD:
      action_ts:
        format: int64
        type: integer
      
      - The field value in the CR of this test is (but we see this with any other value as well):
          action_ts: 1727713030866268346                                                                                                                                                                                                                            
      This is a valid signed int64 value.
      
      - Our minimal test is as follows:
      1. Install OCP 4.16.11, install our product using OLM, create an instance of the CR
      2. Delete the subscription and the CSV
      3. Recreate the subscription. The CSV appears, advances to "Succeeded" and everything is fine
      4. Upgrade to OCP 4.16.12, without touching our installed operator or the CR
      5. Again delete the subscription and the CSV
      6. Recreate the subscription. The CSV appears and gets stuck in "Pending". The association installplan shows the above error message
      
      - When we patch the CRD as follows before the upgrade:
      action_ts:
        type: number
      then the exact same message "must be of type integer" appears in the installplan (apparently the type change from integer to number was not picked up)
      
      - However, when we delete the action_ts entry from the OpenAPIV3 schema in the CRD, then the upgrade succeeds and the action_ts entry in the schema is restored.
      
      - It's also worth mentioning that the CRD serves a single version, v1alpha1, and the conversion strategy is set to None.
         

              lmohanty@redhat.com Lalatendu Mohanty
              rhn-support-hthakare Harshal Thakare
              Jian Zhang Jian Zhang
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: