Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1369589 - [RFE] Add vm.overcommit_memory check
Summary: [RFE] Add vm.overcommit_memory check
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Installation
Version: 6.1.9
Hardware: x86_64
OS: Linux
low
low
Target Milestone: Unspecified
Assignee: Chris Roberts
QA Contact: Daniel Lobato Garcia
URL: http://projects.theforeman.org/issues...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-23 21:03 UTC by Josh Foots
Modified: 2021-03-11 14:39 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-02-21 16:54:17 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 16300 0 None None None 2016-08-25 16:55:01 UTC

Description Josh Foots 2016-08-23 21:03:11 UTC
Description of problem:

There should be a check to ensure that the vm.overcommit_memory variable is set to 0 on Red Hat Satellite 6.X

We have two scripts to add this check into:

One is : https://access.redhat.com/solutions/1474003

The other is the pre-upgrade check preformed by the foreman-installer itself:

# foreman-rake katello:upgrade_check

Version-Release number of selected component (if applicable):


How reproducible:

Very

Steps to Reproduce:
1. Set teh vm.overcommit to 2 and the upgrade will fail every time.
2.
3.

Actual results:

Currently there is no check for this.

Expected results:

For either the healthcheck script or the preupgrade script to flag this as needing to be fixed.



Additional info:

This BZ is related to https://access.redhat.com/solutions/2548501

Comment 1 Chris Duryee 2016-08-24 14:23:07 UTC
add'l info:

If you run a java app without Xmx set, it will ask for 1/4 of physical memory. If vm.overcommit_memory is set to 0 (default) or 1, this  is fine. The OS will give the process 1/4 of memory, but will not guarantee that the full space is available. However, if vm.overcommit_memory is set to 2, it enforces that all memory allocated to processes is backed by physical memory.

To try this out, you can start a VM, use >75% of memory, then run "java -version". If overcommit is set to 2, it will fail. This is not unreasonable behavior, since Java has no idea how much mem it will need without Xmx guidance, and typically it's fine to ask for more than what it actually uses.

Some users set vm.overcommit_memory to 2 in order to avoid OOM conditions. However, any process that asks for more memory than it needs may not be able to execute.

There are two ways to "fix" this for Satellite:

 * verify that overcommit is not set to 2 during pre-upgrade check
 * ensure that all java processes have Xmx set to something reasonable, to avoid the "25% of physical mem" default.

Both of these would be good to do, but the first option is most needed. Users should not run overcommit_memory=2 on a Satellite, since it is not a tested scenario.

Comment 2 Stephen Benjamin 2016-08-25 16:54:59 UTC
Created redmine issue http://projects.theforeman.org/issues/16300 from this bug

Comment 6 Daniel Lobato Garcia 2017-08-30 13:49:12 UTC
Verified.

Tested in Satellite 6.3 - Snap 13


Some output from the CLI of what I did to verify:
---

[root@tyan-gt24-13 ~]# sysctl -n vm.overcommit_memory
2
[root@tyan-gt24-13 ~]# satellite-installer
This system has the vm.overcommit.memory flag enabled in sysctl. Please set this to 0 and then run the installer again.

Comment 7 Satellite Program 2018-02-21 16:54:17 UTC
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://access.redhat.com/errata/RHSA-2018:0336


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