Uploaded image for project: 'Red Hat OpenShift Dev Spaces (formerly CodeReady Workspaces) '
  1. Red Hat OpenShift Dev Spaces (formerly CodeReady Workspaces)
  2. CRW-4072

Dev Spaces are not compatible with Machine Auto scaler

XMLWordPrintable

    • False
    • None
    • False

      Description of problem:

      When undergoing performance testing we noticed that even though our cluster had Machine Autoscaler configured, we were never able to bring the autoscaler operator to spin up new Machines on demand.

       

      This is because whenever we filled the cluster capacity ( this was with about 170 Workspace instances), the next Workspace failed to start up  (because of cluster full capacity) but the Dev Spaces operator immediately marked it as failed and then stopped it. Part of the "stop" routine is to set Deployment replicas 1->0. This means that the Workspace pod is never kept in the "pending" status, which is required for Autoscaler to work.  

      Prerequisites (if any, like setup, operators/versions):

      MachineAutoscaler configured on your cluster

      Steps to Reproduce

      1. Create as many (N) workspaces as required to exhaust the cluster capacity. 

      Actual results:

      When Nth workspace fails to get created (due to full cluster capacity), the operator stops the deployment and sets replicas from 1 to 0, thus Auto scaler never kicks in.

       

      Expected results:

      When Nth workspace fails to get created (due to full cluster capacity), the operator keeps the Workspace pod in Pending  phase which allows AutoScaler to kick in.

      Reproducibility (Always/Intermittent/Only Once):

      Always - as soon as the Cluster capacity is exhausted, we are no longer able to create any Workspace pods even though we have Autoscaler configured for our cluster.

      Build Details:

      Dev Spaces 3.4

      Additional info (Such as Logs, Screenshots, etc):

      We see this error in the UI

       

      Which matches following OCP events (noticed the scale down to 0 which prevents autoscaler to work):

       

      We also tried following workaround with no success:

        1. autoscaler.png
          autoscaler.png
          99 kB
        2. devworkspace-config.png
          devworkspace-config.png
          70 kB
        3. error.png
          error.png
          107 kB
        4. image-2023-03-14-15-09-06-804.png
          image-2023-03-14-15-09-06-804.png
          444 kB
        5. pending.png
          pending.png
          86 kB
        6. unschedulable.png
          unschedulable.png
          146 kB

              mloriedo Mario Loriedo
              rhn-support-agiertli Anton Giertli
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: