Bug 1588611 - swap is not disabled when running 3.9 -> 3.10 upgrade
Summary: swap is not disabled when running 3.9 -> 3.10 upgrade
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Cluster Version Operator
Version: 3.10.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 3.10.z
Assignee: Russell Teague
QA Contact: Johnny Liu
URL:
Whiteboard:
Depends On:
Blocks: 1623333
TreeView+ depends on / blocked
 
Reported: 2018-06-07 15:45 UTC by Johnny Liu
Modified: 2019-01-10 09:27 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Deprecated Functionality
Doc Text:
The ability to leave swap enabled has been removed and the openshift_disable_swap variable is deprecated. This variable was never publicly documented and was only used internally. Documentation has stated that system swap should be disabled since 3.4 and we will no longer make sure it is disabled after 3.9.
Clone Of:
: 1623333 (view as bug list)
Environment:
Last Closed: 2019-01-10 09:27:09 UTC


Attachments (Terms of Use)
upgrade log with inventory file embeded (5.04 MB, text/plain)
2018-11-09 10:43 UTC, Johnny Liu
no flags Details


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:0026 None None None 2019-01-10 09:27:16 UTC

Description Johnny Liu 2018-06-07 15:45:07 UTC
Description of problem:
See the following details.

Version-Release number of the following components:
openshift-ansible-3.10.0-0.63.0.git.0.961c60d.el7.noarch

How reproducible:
Always

Steps to Reproduce:
1. Set up 3.9 env, make sure swap is on before upgrade.
# free -m
              total        used        free      shared  buff/cache   available
Mem:          14877        1401         180           3       13296       13059
Swap:          2047           0        2047

# cat /etc/fstab
<--snip-->
/var/swapfile swap swap defaults 0 0
2. trigger upgrade
3.

Actual results:
After upgrade is completed, check swap, swap is still on.

Expected results:
According https://bugzilla.redhat.com/show_bug.cgi?id=1557200#c6, whatever openshift_disable_swap=false or not, swap should always be disabled.

Additional info:
Go through the whole upgrade log, seem like roles/openshift_node/tasks/main.yml is not called, so no "Disable swap" task happen.

Comment 3 Russell Teague 2018-11-05 19:14:08 UTC
We will stop disabling swap on every upgrade because we've required swap to be disabled since 3.4.  This PR is for removing the optional variable which was never publicly documented.

release-3.10: https://github.com/openshift/openshift-ansible/pull/10605

Comment 4 Russell Teague 2018-11-07 13:16:20 UTC
Fixed in openshift-ansible-3.10.70-1

Comment 5 Johnny Liu 2018-11-09 10:43:07 UTC
This bug is reported against 3.9 -> 3.10 upgrade, re-test this with openshift-ansible-3.10.71-1.git.0.3e9431a.el7, still reproduce, the swap is not disabled during the upgrade progress, that is because roles/openshift_node/tasks/main.yml is not called in the upgrade.

If we decide to leave the disable task out of 3.10 upgrade, but in fresh install, then I think this PR should be backport to 3.9. Am I right?

BTW, I also tried a 3.10 fresh install, even I set "openshift_disable_swap=false" in inventory file, "Disable swap" task is still called, the PR is working well as expected.

Comment 6 Johnny Liu 2018-11-09 10:43:51 UTC
Created attachment 1503598 [details]
upgrade log with inventory file embeded

Comment 7 Russell Teague 2018-11-20 15:56:23 UTC
Installs of 3.9 and upgrades to 3.9 will ensure swap is disabled.
https://github.com/openshift/openshift-ansible/pull/10607

We will leave the disable task out of the 3.10 upgrade.  If a user enables swap after installing 3.9 it is their choice to go against documented recommendations.
https://docs.openshift.com/container-platform/3.9/admin_guide/overcommit.html#disabling-swap-memory

Comment 8 Johnny Liu 2018-11-21 07:12:05 UTC
Based on comment 5 and comment 7, move to this bug to "VERIFIED".

Comment 10 errata-xmlrpc 2019-01-10 09:27:09 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/RHBA-2019:0026


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