Bug 1597297
| Summary: | non-integer values for MaxLimitRequestRatio are converted to millicore values | ||||||
|---|---|---|---|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | jrmorgan | ||||
| Component: | Node | Assignee: | ravig <rgudimet> | ||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | DeShuai Ma <dma> | ||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 3.9.0 | CC: | aos-bugs, jokerman, mburke, mmccomas, sjenning, wjiang | ||||
| Target Milestone: | --- | ||||||
| Target Release: | 3.11.0 | ||||||
| Hardware: | All | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2018-08-10 01:08:33 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: | |||||||
| Attachments: |
|
||||||
Forgot the reference to OCP docs covering maxLimitRequestRatio: [1] https://docs.openshift.com/container-platform/3.9/admin_guide/limits.html#container-limits Openshift docs PR: https://github.com/openshift/openshift-docs/pull/11161 Changes are live: https://docs.openshift.com/container-platform/3.10/admin_guide/limits.html#container-limits The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days |
Created attachment 1455968 [details] failed/incorrect validation from the dashboard following implicit conversion to millicore value. Description of problem: Using the following decimal values defined in a LimitRange object for maxLimitRequestRatio: spec: limits: - type: Container maxLimitRequestRatio: cpu: "1.5" memory: "1.5" default: cpu: 150m memory: 1Gi defaultRequest: cpu: 50m memory: 1Gi max: cpu: "4" memory: 4Gi min: cpu: 50m memory: 32Mi Will result in implicit conversion of the "1.5" ratio value to "1500m" for both memory and CPU, causing incorrect enforcement of maxLimitRequestRatio when a tenant specifies request/limit values that should be valid. Version-Release number of selected component (if applicable): 3.9 3.7 3.4 How reproducible: Always Steps to Reproduce: 1. Define a LimitRange object (as above) with maxLimitRequestRatio containing non-integer values. 2. Attempt to configure container resource limits/requests within the expected, allowable range of maxLimitRequestRatio values. 3. Observe failure to enforce maxLimitRequestRatio due to implicit conversion of non-integer value (for both memory and CPU) to "millicores." 4. Change maxLimitRequestRatio to a non-negative integer > 1 to confirm proper enforcement. Actual results: Expected results: Specifying a non-integer value, such as "1.5", for memory/CPU maxLimitRequestRatio should prevent a tenant from specifying a limit >= to (1.5 x request). With the limitRange example above, a tenant specifying a CPU request of 50m and a limit of 150m would encounter a validation error with 150m >= (50m x 1.5 = 75m). If the tenant specified a CPU request of 50m and a limit of 75m, validation should succeed. The same should hold true for memory. If a tenant specifies a memory request of 64MiB and a limit of 128MiB, validation would fail: 128Mib >= (64MiB x 1.5 = 96MiB). Validation would succeed if they specified a memory request of 64MiB and a limit of 96MiB. Additional info: Documentation [1] makes no mention of the integer values being required, but a stopgap measure may be noting that only integer values > 1 are required. A screenshot of failed/incorrect validation from the dashboard has been provided.