Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1336692 - should not apply a value greater than 100 for CPU utilization targetPercentage by oc edit hpa $name
should not apply a value greater than 100 for CPU utilization targetPercentag...
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Pod (Show other bugs)
3.2.0
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Solly Ross
DeShuai Ma
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-05-17 04:40 EDT by Weihua Meng
Modified: 2017-03-08 13 EST (History)
5 users (show)

See Also:
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 05:32:42 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1933 normal SHIPPED_LIVE Red Hat OpenShift Container Platform 3.3 Release Advisory 2016-09-27 09:24:36 EDT

  None (edit)
Description Weihua Meng 2016-05-17 04:40:15 EDT
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
Comment 1 Solly Ross 2016-05-18 11:31:02 EDT
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.
Comment 2 Solly Ross 2016-05-18 11:41:24 EDT
I've opened an upstream issue to discuss: https://github.com/kubernetes/kubernetes/issues/25815
Comment 3 Andy Goldstein 2016-06-22 06:54:26 EDT
https://github.com/kubernetes/kubernetes/pull/26162 fixes this and it has merged upstream. It's not in origin or ose yet.
Comment 4 Andy Goldstein 2016-07-22 14:34:50 EDT
This is in origin and should be in the 3.3 builds
Comment 5 Weihua Meng 2016-07-24 23:15:32 EDT
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.
Comment 7 errata-xmlrpc 2016-09-27 05:32:42 EDT
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

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