Bug 1473584 - Decimal memory limits sometimes converted to millibyte form which docs state should not be used
Summary: Decimal memory limits sometimes converted to millibyte form which docs state ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Node
Version: 3.5.0
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
: 3.7.z
Assignee: Seth Jennings
QA Contact: Xiaoli Tian
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-07-21 08:13 UTC by Brendan Mchugh
Modified: 2023-09-14 04:01 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-07-03 18:12:39 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Brendan Mchugh 2017-07-21 08:13:28 UTC
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 18:46:40 UTC
I have sent this PR https://github.com/kubernetes/kubernetes/pull/49732 to address this issue.

Comment 4 Seth Jennings 2017-09-12 18:31:52 UTC
Still being discussed upstream for fix

Comment 5 Seth Jennings 2017-09-29 21:46:18 UTC
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).

Comment 9 Greg Blomquist 2019-07-03 18:12:39 UTC
Customer closed their case and this likely went out with 3.7.z.  Closing as current release.  If this problem still persists please open a new bug.

Comment 10 Red Hat Bugzilla 2023-09-14 04:01:29 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days


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