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

HPA Form View in RHOCP Web Console Incorrectly Requires Both CPU and Memory Metrics

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • 4.21.0
    • 4.18.z
    • Management Console
    • None
    • Quality / Stability / Reliability
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • None
    • None
    • In Progress
    • Bug Fix
    • Hide
      Cause: The Horizontal Pod Autoscaler (HPA) form in the web console incorrectly required users to provide values for both CPU and Memory utilization, even though the API allows for HPAs to be created with a single metric or with no metrics (to use the API's default).

      Consequence: Users were unable to use the form to create single-metric HPAs (e.g., Memory-only) or HPAs that rely on the API default (80% CPU). This forced users to use the YAML view for these common configurations.

      Fix: The HPA form logic has been updated to align with the API. The UI no longer requires both fields to be filled. Leaving a utilization field empty will now correctly omit that metric from the HPA manifest, allowing the API to apply its default behavior or create a single-metric HPA.

      Result: Users can now use the HPA form to create single-metric HPAs (e.g., CPU-only or Memory-only). If both fields are left empty, the HPA will be created and will correctly fall back to the API default of 80% CPU utilization.
      Show
      Cause: The Horizontal Pod Autoscaler (HPA) form in the web console incorrectly required users to provide values for both CPU and Memory utilization, even though the API allows for HPAs to be created with a single metric or with no metrics (to use the API's default). Consequence: Users were unable to use the form to create single-metric HPAs (e.g., Memory-only) or HPAs that rely on the API default (80% CPU). This forced users to use the YAML view for these common configurations. Fix: The HPA form logic has been updated to align with the API. The UI no longer requires both fields to be filled. Leaving a utilization field empty will now correctly omit that metric from the HPA manifest, allowing the API to apply its default behavior or create a single-metric HPA. Result: Users can now use the HPA form to create single-metric HPAs (e.g., CPU-only or Memory-only). If both fields are left empty, the HPA will be created and will correctly fall back to the API default of 80% CPU utilization.
    • None
    • None
    • None
    • None

      This is a clone of issue OCPBUGS-63339. The following is the description of the original issue:

      Description of problem:

          Horizontal Pod Autoscaler (HPA) section incorrectly mandates that both CPU Utilization and Memory Utilization metrics be specified. Users are not able to configure an HPA with only one of these resource metrics. F
      urthermore, if a user removes one of the metrics via the YAML view, the form view repopulates both fields upon re-editing, ignoring the actual configuration.
      
      YAML config works fine however, Web Console Form View does not refelect the YAML config correctly if any of the metrics is skipped.

       

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

          

      How reproducible:

          Always

      Steps to Reproduce:

      1. Workloads > Deployment/DeploymentConfig > Create Deployment/DeploymentConfig
      2. From Deployment/DeploymentConfig -> Add HorizontalPodAutoscaler -> Form View -> Both CPU Utilization and Memory Utilization are mandatory.
      
      No way to skip using either of the resource metric.when setting the utilization value to 0, it gives following message:
      
      Error "Invalid value: 0: must be greater than 0" for field "spec.metrics[1].resource.target.averageUtilization".
      
      Same with Edit edit option.

      Actual results:

          Gives error and no way to skip.

      Expected results:

          HPA form view should allow the user to configure an HPA based on a single resource metric (either CPU or Memory) without requiring the other.

      Additional info:

          

              cajieh Cyril Ajieh
              rhn-support-ssardar Sameer Sardar
              Yanping Zhang
              None
              Yanping Zhang Yanping Zhang
              None
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated: