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

hostedcluster version history causes resource to be invalid

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • 4.20.0
    • 4.16.z
    • HyperShift / ROSA
    • None
    • Quality / Stability / Reliability
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • None
    • None
    • In Progress
    • Bug Fix
    • Hide
      Cause – When a hosted cluster undergoes multiple version upgrades over time, the version history in the HostedCluster resource could exceed 10 entries. The API had a strict validation limit of 10 items maximum for the version history field.

      Consequence – Users could not edit or update their HostedCluster resources when the version history exceeded 10 entries. Operations such as adding annotations (e.g., for cluster size overrides) or performing maintenance tasks like resizing request serving nodes would fail with a validation error: "status.version.history: Too many: 11: must have at most 10 items". This prevented ROSA SREs from performing critical maintenance operations that could impact customer API access.

      Fix – The maximum items validation constraint has been removed from the version history field in the HostedCluster API, allowing the history to grow beyond 10 entries without triggering validation errors.

      Result – HostedCluster resources can now be edited and updated regardless of how many entries exist in the version history, allowing administrators to perform necessary maintenance operations on clusters that have undergone multiple version upgrades.
      Show
      Cause – When a hosted cluster undergoes multiple version upgrades over time, the version history in the HostedCluster resource could exceed 10 entries. The API had a strict validation limit of 10 items maximum for the version history field. Consequence – Users could not edit or update their HostedCluster resources when the version history exceeded 10 entries. Operations such as adding annotations (e.g., for cluster size overrides) or performing maintenance tasks like resizing request serving nodes would fail with a validation error: "status.version.history: Too many: 11: must have at most 10 items". This prevented ROSA SREs from performing critical maintenance operations that could impact customer API access. Fix – The maximum items validation constraint has been removed from the version history field in the HostedCluster API, allowing the history to grow beyond 10 entries without triggering validation errors. Result – HostedCluster resources can now be edited and updated regardless of how many entries exist in the version history, allowing administrators to perform necessary maintenance operations on clusters that have undergone multiple version upgrades.
    • None
    • None
    • None
    • None

      Description of problem:

      The version history of a hostedcluster object has 11 entries, which prevents validation of the resources:

       

       oc get hostedcluster -n ocm-production-2bmkek5hcuhjaspiq6vi17nrti95mf9l dalh-p-tk-mp16 -ojson | jq '.status.version.history'
      --> has 11 entries

       

      I can no longer edit the hostedcluster resource with that:

       

      oc annotate hostedcluster -n ocm-production-2bmkek5hcuhjaspiq6vi17nrti95mf9l dalh-p-tk-mp16 hypershift.openshift.io/cluster-size-override=m52xl
      The HostedCluster "dalh-p-tk-mp16" is invalid: 
      * status.version.history: Too many: 11: must have at most 10 items
      * <nil>: Invalid value: "null": some validation rules were not checked because the object was invalid; correct the existing errors to complete validation
      

       

      This prevents me from running maintenance on the request serving nodes, which could potentially prevent ROSA SRE's from resizing request serving nodes in future in order to ensure customer API access.

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

      image of the hypershift operator: quay.io/acm-d/rhtap-hypershift-operator:4b581cd3f37c5a3d90cca5c3c683b6b01240f30c

      Additional info:

      Management cluster ID: b6ae92fe-0f8c-441e-85c0-5e7c0295ae5a

      The limit of 10 entries is set here:

      https://github.com/openshift/hypershift/blob/89543c44147c4c764058cb0f27432e10d1ebf185/api/hypershift/v1beta1/hostedcluster_types.go#L1634

              agarcial@redhat.com Alberto Garcia Lamela
              rkunkel.openshift Roland Kunkel
              None
              None
              He Liu He Liu
              None
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated: