Bug 1473584 - Decimal memory limits sometimes converted to millibyte form which docs state should not be used [NEEDINFO]
Decimal memory limits sometimes converted to millibyte form which docs state ...
Status: NEW
Product: OpenShift Container Platform
Classification: Red Hat
Component: Pod (Show other bugs)
3.5.0
Unspecified Unspecified
unspecified Severity low
: ---
: 3.7.z
Assigned To: Avesh Agarwal
DeShuai Ma
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-07-21 04:13 EDT by Brendan Mchugh
Modified: 2018-04-11 16:57 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
erich: needinfo? (avagarwa)


Attachments (Terms of Use)

  None (edit)
Description Brendan Mchugh 2017-07-21 04:13:28 EDT
Description of problem:

Sometimes when setting a memory limit in a DeploymentConfig such as 1.8G, it gets converted to a millibyte value.

          limits:
            cpu: 490m
            memory: 1932735283200m

The following docs change removed the "m" suffix as it is useless because we cannot manage memory at millibyte granularity, so
do not list the suffix as allowed.


The value that gets converted in the DeploymentConfig should match those listed as valid in the docs. [2]

[1] https://github.com/openshift/openshift-docs/commit/1f7090ffc2f9d4ab6d362965bf4999a0b1809e2d
[2] https://docs.openshift.com/container-platform/3.5/dev_guide/compute_resources.html#dev-compute-resources

Version-Release number of selected component (if applicable):
openshift v3.5.5.26
kubernetes v1.5.2+43a9be4
etcd 3.1.0


How reproducible:
Sometimes. it may depend on the value being entered.

Steps to Reproduce:
1. oc edit dc <dc>
2. Set 
  resources:
    limits: 
      memory: 1.8G

3. oc get dc <dc> -o yaml | grep memory
      memory: 1932735283200m


Actual results:
memory: 1932735283200m

Expected results:
If it must be converted to a non decimal value, then it should be the next logical suffix.

memory: 1800M

Additional info:
Customer see this in 3.2 but it is reproducible in 3.5
Comment 1 Avesh Agarwal 2017-07-27 14:46:40 EDT
I have sent this PR https://github.com/kubernetes/kubernetes/pull/49732 to address this issue.
Comment 4 Seth Jennings 2017-09-12 14:31:52 EDT
Still being discussed upstream for fix
Comment 5 Seth Jennings 2017-09-29 17:46:18 EDT
I'm lowering the severity on this since it doesn't cause a functional issue, just an aesthetic issue when reading the spec back out.

The workarounds are trivial: either use BinarySI units (Gi,Mi,Ki) or don't use decimal quantities when using DecimalSI unit (G, M, K).

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