Bug 983631

Summary: The memory_limit parameter in /etc/openshift/resource_limits.conf cannot be set a human readable format such as ' <#memoryLimit>GB' or '<#memoryLimit>MB'
Product: OKD Reporter: Brenton Leanhardt <bleanhar>
Component: ContainersAssignee: Abhishek Gupta <abhgupta>
Status: CLOSED WONTFIX QA Contact: libra bugs <libra-bugs>
Severity: low Docs Contact:
Priority: low    
Version: 2.xCC: jhonce, libra-onpremise-devel, pep, vnarayan
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 976607 Environment:
Last Closed: 2017-05-31 18:22:11 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:
Bug Depends On:    
Bug Blocks: 976607    

Description Brenton Leanhardt 2013-07-11 15:10:30 UTC
This is an RFE.  Upstream is already planning to overhaul /etc/openshift/resource_limits.conf so I cloned this for tracking purposes.
  
+++ This bug was initially created as a clone of Bug #976607 +++

Description of problem:
Setting the memory limit in /etc/openshift/resolve.conf is restricted to memory limit in bytes ('memory_limit_in_bytes' parameter). There is no support to take format '<Limit>' GB or '<Limit> MB'. 

Version-Release number of selected component (if applicable):
rubygem-openshift-origin-node-1.10.1-1.git.130.7e5622d.el6op.noarch


Steps to Reproduce:
1. cat /etc/openshift/resource_limits.conf


Actual results:
[9:51:12 PM] Dan Trainor: [root@qa02node01-3001 openshift]# cat resource_limits.conf
#
# Limit resources for a new OpenShift guest user on a node
#
# Standard Profile
#
node_profile=small

#
# Quotas: File system limits
#
quota_files=40000
# 1GB.  1 block = 1024byte
quota_blocks=1048576

# Gear usage limits:
# "apps" accounting used outdated logic ("git repos" not "gears"). It is being
# replaced with "gears" accounting. Logic for max_active_gears falls back to
# use max{_active,}_apps if not set, and vice versa. Gears usage/capacity/limits
# are counted according to actual gears regardless.
#
# max_active_gears is used for limiting/guiding gear placement.
# For no over-commit, should be (Total System Memory - 1G) / memory_limit_in_bytes
max_active_gears=100

# PAM - resource limits
# limits_core
#<item> can be one of the following:
# limits_core=unlimited         # limits the core file size (KB)
# limits_data=unlimited         # max data size (KB)
# limits_fsize=unlimited        # maximum filesize (KB)
# limits_memlock=unlimited      # max locked-in-memory address space (KB)
# limits_nofile=unlimited       # max number of open files
# limits_rss=unlimited          # max resident set size (KB)
# limits_stack=unlimited        # max stack size (KB)
# limits_cpu=unlimited          # max CPU time (MIN)
limits_nproc=250        # max number of processes
# limits_as=unlimited           # address space limit (KB)
# limits_maxlogins=unlimited    # max number of logins for this user
# limits_maxsyslogins=unlimited # max number of logins on the system
# limits_priority=unlimited     # the priority to run user process with
# limits_locks=unlimited        # max number of file locks the user can hold
# limits_sigpending=unlimited   # max number of pending signals
# limits_msgqueue=unlimited     # max memory used by POSIX message queues (bytes)
# limits_nice=19   # max nice priority allowed to raise to values: [-20, 19]
# limits_rtprio=19 # max realtime priority

#
# cgroups - more resource limits
#
#
# cpu
# cpu_rt_period_us=100000
# cpu_rt_runtime_us=950000
cpu_shares=128
cpu_cfs_quota_us=30000
#
# memory
# 1024 * 1024 * 512 = 536870912 = 512MB
memory_limit_in_bytes=1536870912
memory_memsw_limit_in_bytes=641728512 # 512M + 100M (100M swap)
# memory_soft_limit_in_bytes=-1
# memory_swappiness=60

#
# Apache bandwidth limit
#
apache_bandwidth="all 500000"
apache_maxconnection="all 20"
apache_bandwidtherror="510"
#
# Apache rotatelogs tuning
rotatelogs_interval=86400
rotatelogs_format="-%Y%m%d-%H%M%S-%Z"


Expected results:
A parameter to take memory limit in GB or MB

Additional info:

--- Additional comment from RHEL Product and Program Management on 2013-06-20 22:06:34 EDT ---

Since this issue was entered in bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

Comment 2 Eric Paris 2017-05-31 18:22:11 UTC
We apologize, however, we do not plan to address this report at this time. The majority of our active development is for the v3 version of OpenShift. If you would like for Red Hat to reconsider this decision, please reach out to your support representative. We are very sorry for any inconvenience this may cause.