Bug 1336692
| Summary: | should not apply a value greater than 100 for CPU utilization targetPercentage by oc edit hpa $name | ||
|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Weihua Meng <wmeng> |
| Component: | Node | Assignee: | Solly Ross <sross> |
| Status: | CLOSED ERRATA | QA Contact: | DeShuai Ma <dma> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 3.2.0 | CC: | agoldste, aos-bugs, jokerman, mmccomas, tdawson |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: |
The Horizontal Pod Autoscaler scales based on CPU usages as a percentage of the requested CPU for a pod. It is possible that the desired percentage be over 100 (if the user wants to scale only when the CPU usage of a pod is higher than the amount requested for the pod, but below the limit for the pod).
Previously, the CLI would prevent the user from setting such values. Now, it allows setting a target CPU percentage of over 100.
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2016-09-27 09:32:42 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
It's technically valid to specify a target CPU over 100%, since the target is a percentage of requests, and not limits, so it's quite possible for CPU to go over 100% of the requests (see a discussion here for more information: https://github.com/kubernetes/kubernetes/pull/18294). While you generally don't want a value over 100%, there are valid cases where you might. It is confusing, however, that `kubectl autoscale` prevents you from setting a value higher than 100, instead of just warning about it. I've opened an upstream issue to discuss: https://github.com/kubernetes/kubernetes/issues/25815 https://github.com/kubernetes/kubernetes/pull/26162 fixes this and it has merged upstream. It's not in origin or ose yet. This is in origin and should be in the 3.3 builds Fixed. openshift v3.3.0.9 kubernetes v1.3.0+57fb9ac etcd 2.3.0+git Agree that targetPercentage can exceed 100%. Since CLI and oc edit are consistent, It is OK. 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, 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/RHBA-2016:1933 |
Description of problem: should not apply a value greater than 100 for CPU utilization targetPercentage by oc edit hpa $name Version-Release number of selected component (if applicable): oc v3.2.0.44 kubernetes v1.2.0-36-g4a3f9c5 How reproducible: Always Steps to Reproduce: 1. create hpa 2. oc edit hpa $name spec: cpuUtilization: targetPercentage: 23456 save and quit horizontalpodautoscaler "$name" edited 3. oc get hpa $name NAME REFERENCE TARGET CURRENT MINPODS MAXPODS AGE hello-openshift02 ReplicationController/hello-openshift02/scale 23456% <waiting> 4 9 44m Actual results: TARGET 23456% greater than 100% Expected results: should not accept when save and quit Additional info: # oc autoscale rc php-apache --max=5 --cpu-percent=150 CPU utilization (%) cannot exceed 100