Bug 1938467 - The default cluster-autoscaler should get default cpu and memory requests if user omits them
Summary: The default cluster-autoscaler should get default cpu and memory requests if ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Cloud Compute
Version: 4.8
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: 4.8.0
Assignee: Danil Grigorev
QA Contact: sunzhaohua
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-03-13 17:39 UTC by Clayton Coleman
Modified: 2021-07-27 22:53 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-07-27 22:53:17 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift cluster-autoscaler-operator pull 197 0 None open Bug 1938467: The default cluster-autoscaler should get default cpu and memory requests if user omits them 2021-04-06 16:03:19 UTC
Github openshift cluster-autoscaler-operator pull 201 0 None open Bug 1938467: Fix cluster autoscaler pod requests 2021-04-16 10:09:19 UTC
Github openshift origin pull 26087 0 None open Bug 1938467: test/extended/operators/resources: Autoscaler sets requests 2021-04-17 02:43:00 UTC
Red Hat Product Errata RHSA-2021:2438 0 None None None 2021-07-27 22:53:36 UTC

Description Clayton Coleman 2021-03-13 17:39:43 UTC
All payload components should request a reasonable minimum CPU and p90 memory usage

https://github.com/openshift/enhancements/blob/master/CONVENTIONS.md#resources-and-limits

The cluster-autoscaler-default deploys by default without such CPU and memory.  A reasonable default must be provided when the autoscaler is created if user does not provide one (this causes the autoscaler to be in best-effort).

Referenced from the new e2e test which gates components without resource requests and enforces the resource conventions.

Comment 2 sunzhaohua 2021-04-16 03:41:50 UTC
Failed to verify, autoscaler po stuck in pending status.

clusterversion: 4.8.0-0.nightly-2021-04-15-202330

steps:
1. create clusterautoscaler
apiVersion: "autoscaling.openshift.io/v1"
kind: "ClusterAutoscaler"
metadata:
  name: "default"
spec:
  resourceLimits:
    maxNodesTotal: 10
  scaleDown:
    enabled: true
    delayAfterAdd: 10s
    delayAfterDelete: 10s
    delayAfterFailure: 10s
    unneededTime: 10s
2.check autoscaler pod, stuck in pending
$ oc get po
NAME                                           READY   STATUS    RESTARTS   AGE
cluster-autoscaler-default-56659849fc-b49rk    0/1     Pending   0          5m46s
cluster-autoscaler-default-74f84d9957-dp8xk    1/1     Running   0          5m37s
cluster-autoscaler-operator-844d8f7b96-srq2v   2/2     Running   0          8m28s
cluster-baremetal-operator-84f7c56bbc-j9v52    2/2     Running   0          79m
machine-api-controllers-685988fb5d-2k5tf       7/7     Running   0          85m
machine-api-operator-6cbcdcd4cd-l27jd          2/2     Running   0          85m

$ oc describe po cluster-autoscaler-default-56659849fc-b49rk
    Requests:
      cpu:     20Mi
      memory:  10m


maybe should:
        cpu: 10m
        memory: 20Mi

Comment 3 sunzhaohua 2021-04-16 03:42:53 UTC
$ oc describe po cluster-autoscaler-default-56659849fc-b49rk
Events:
  Type     Reason             Age                   From                Message
  ----     ------             ----                  ----                -------
  Warning  FailedScheduling   6m12s                 default-scheduler   0/6 nodes are available: 3 Insufficient cpu, 3 node(s) didn't match Pod's node affinity/selector.
  Warning  FailedScheduling   6m11s                 default-scheduler   0/6 nodes are available: 3 Insufficient cpu, 3 node(s) didn't match Pod's node affinity/selector.

Comment 5 W. Trevor King 2021-04-17 02:40:36 UTC
Moving back to POST so I can attach PR removing the test-suite exception too.

Comment 7 sunzhaohua 2021-04-21 09:27:49 UTC
Verified
clusterversion: 4.8.0-0.nightly-2021-04-20-195442

# oc get po
NAME                                           READY   STATUS    RESTARTS   AGE
cluster-autoscaler-default-56fc5bc88c-zqqtf    1/1     Running   0          2m41s

    resources:
      requests:
        cpu: 10m
        memory: 20Mi

Comment 10 errata-xmlrpc 2021-07-27 22:53:17 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: OpenShift Container Platform 4.8.2 bug fix and security update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2021:2438


Note You need to log in before you can comment on or make changes to this bug.