Hide Forgot
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
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