Bug 1196783
Summary: | OPENSHIFT_GEAR_MEMORY_MB is not updated when resource limits change | ||
---|---|---|---|
Product: | OpenShift Container Platform | Reporter: | Josep 'Pep' Turro Mauri <pep> |
Component: | Containers | Assignee: | Rory Thrasher <rthrashe> |
Status: | CLOSED ERRATA | QA Contact: | libra bugs <libra-bugs> |
Severity: | low | Docs Contact: | |
Priority: | low | ||
Version: | 2.2.0 | CC: | anli, erich, jialiu, jokerman, libra-onpremise-devel, mmccomas, pep, tiwillia |
Target Milestone: | --- | Keywords: | EasyFix |
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | rubygem-openshift-origin-node-1.38.6.3-1.el6op.noarch.rpm | Doc Type: | Bug Fix |
Doc Text: |
Cause: When updating memory_limit_in_bytes in /etc/openshift/resource_limits.conf, the new memory limit does not update the OPENSHIFT_GEAR_MEMORY_MB env var for current gears.
Consequence: Even when the memory limit was updated, current gears would have the same memory limit.
Fix: Comments have been added to the resource_limits.conf file to provide instructions to anyone updating the memory_limit_in_bytes variable. The workaround is to run `for i in /var/lib/openshift/*/.env/OPENSHIFT_GEAR_MEMORY_MB; do echo 512 > "$i"; done` with 512 being replaced by the new memory limit in MEGABYTES (note that the two variables have different units).
Result: Users changing the file should now have instructions on how to properly apply the change to current gears.
|
Story Points: | --- |
Clone Of: | Environment: | ||
Last Closed: | 2016-08-24 19:42:58 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: | 1354609 | ||
Bug Blocks: |
Description
Josep 'Pep' Turro Mauri
2015-02-26 17:57:12 UTC
*** Bug 1202466 has been marked as a duplicate of this bug. *** So in order to make this workaround more visible, we're going to add the it to both the instructions at the beginning of resource_limits.conf, as well as to the Administrative guide <https://access.redhat.com/documentation/en-US/OpenShift_Enterprise/2/html-single/Administration_Guide/index.html#Adding_New_Gear_Profiles>. We're also recommending using the following command instead of the sed command currently recommended in the workaround, where 512 should be replaced with the new value in megabytes. for i in /var/lib/openshift/*/.env/OPENSHIFT_GEAR_MEMORY_MB; do echo 512 > "$i"; done I'll be opening a PR shortly with the change the resource_limits.conf file. A docs bug for the admin guide has been opened here: https://bugzilla.redhat.com/show_bug.cgi?id=1354609 Commit pushed to master at https://github.com/openshift/origin-server https://github.com/openshift/origin-server/commit/505b7922fe1d5f8a69e2537e535bdb035d2e3933 resource_limits.conf: adds new update instruction Bug 1196783 https://bugzilla.redhat.com/show_bug.cgi?id=1196783 When the memory_limit_in_bytes variable in resource_limits.conf is updated, the OPENSHIFT_GEAR_MEMORY_MB env variable does not get updated for existing gears. Now there is an additional note for users to run a workaround to update that variable for existing gears. Re-test this bug with rubygem-openshift-origin-node-1.38.6.3-1.el6op.noarch in 2.2/2016-08-08.1 puddle, seem like the PR is not merged into the RPM package. Installer script - openshift.sh has the following logic: node_profile="${CONF_NODE_PROFILE:-small}" node && node_profile_name="${CONF_NODE_PROFILE_NAME:-$node_profile}" node && node_host_type="${CONF_NODE_HOST_TYPE:-m3.xlarge}" configure_node() { local resrc='/etc/openshift/resource_limits.conf' if [[ -f "${resrc}.${node_profile}.${node_host_type}" ]] then cp "${resrc}.${node_profile}.${node_host_type}" "$resrc" elif [[ -f "${resrc}.${node_profile}" ]] then cp "${resrc}.${node_profile}" "$resrc" fi ... } Though this fix is present in resource_limits.conf, not in resource_limits.conf.large.m3.xlarge, resource_limits.conf.medium.m3.xlarge, resource_limits.conf.small.m3.xlarge, resource_limits.conf.xpaas.m3.xlarge, when running installation using openshift.sh, /etc/openshift/resource_limits.conf will be overwritten, then the fix will be lost, we also need add the fix for the other resource_limits template conf file to avoid such issue. Commit pushed to master at https://github.com/openshift/origin-server https://github.com/openshift/origin-server/commit/1c18dea308cf2e58d81736288de352f1eea1e5be Add new update instruction for different gear types conf When the memory_limit_in_bytes variable in resource_limits.conf is updated, the OPENSHIFT_GEAR_MEMORY_MB env variable does not get updated for existing gears. Now there is an additional note for users to run a workaround to update that variable for existing gears. Bug 1196783 Link https://bugzilla.redhat.com/show_bug.cgi?id=1196783 Signed-off-by: Vu Dinh <vdinh> Verified this bug with rubygem-openshift-origin-node-1.38.6.4-1.el6op.noarch in 2.2/2016-08-11.1, and PASS. Now the workaround comments are added into /etc/openshift/resource_limits.conf. 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://rhn.redhat.com/errata/RHSA-2016-1773.html |