Bug 1364167

Summary: [ceph-ansible] role ceph-common disables swap by default
Product: [Red Hat Storage] Red Hat Storage Console Reporter: Martin Bukatovic <mbukatov>
Component: ceph-ansibleAssignee: Andrew Schoen <aschoen>
Status: CLOSED ERRATA QA Contact: ceph-qe-bugs <ceph-qe-bugs>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 2CC: adeza, aschoen, ceph-eng-bugs, dahorak, edonnell, flucifre, hnallurv, kdreyer, nthomas, sankarshan, tchandra
Target Milestone: ---   
Target Release: 2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ceph-ansible-2.1.1-1.el7scon Doc Type: Bug Fix
Doc Text:
Previously, the ceph-ansible utility permanently disabled the swap partition. With this update, ceph-ansible can no longer disable swap.
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-03-14 15:50:39 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:

Description Martin Bukatovic 2016-08-04 15:16:41 UTC
Description of problem
======================

Right now, `ceph-common` role disables swap by default and I believe that this
should no be there because swap configuration is out of scope for ceph-ansible.

Version-Release
===============

ceph-ansible-1.0.5-31.el7scon.noarch

How reproducible
================

100 %

Steps to Reproduce
==================

1. Install RHSC 2.0 following the documentation.
2. Accept few nodes *with swap enabled* for the ceph cluster.
3. Create new ceph cluster named 'alpha'.
4. Check swap status on all machines of the cluster.

Actual results
==============

Swap has been disabled on all OSD machines:

~~~
$ ansible -i mbukatov-usm1.hosts -m shell -a 'free -m | grep Swap' all
mbukatov-usm1-mon1.example.com | SUCCESS | rc=0 >>
Swap:          2047           0        2047

mbukatov-usm1-mon2.example.com | SUCCESS | rc=0 >>
Swap:          2047           0        2047

mbukatov-usm1-node1.example.com | SUCCESS | rc=0 >>
Swap:             0           0           0

mbukatov-usm1-node4.example.com | SUCCESS | rc=0 >>
Swap:             0           0           0

mbukatov-usm1-node3.example.com | SUCCESS | rc=0 >>
Swap:             0           0           0

mbukatov-usm1-node2.example.com | SUCCESS | rc=0 >>
Swap:             0           0           0

mbukatov-usm1-server.example.com | SUCCESS | rc=0 >>
Swap:          2047           0        2047

mbukatov-usm1-mon3.example.com | SUCCESS | rc=0 >>
Swap:          2047           0        2047
~~~

When I reboot the machines, the swap is enabled again.

Expected results
================

The swap configuration is not changed by ceph-ansible.

Additional info
===============

Swap is usually configured by admin when the system is installed/deployed
(since you need to create and enable swap partition), so when admin decides to
deploy machines with swap, it doesn't make sense to override this decision in
ceph-common role. When one needs to disable swap, it should be done on a
deployment level, not in ceph-ansible. Moreover I'm not familiar with any ceph
recommendations not to use swap.

I noticed that this has been introduced in this commit:

https://github.com/ceph/ceph-ansible/commit/c246d8dc806f7b9a713b30010e436fac5a79ad71

The the defauls was fixed in:

https://github.com/ceph/ceph-ansible/commit/4dad21c481de9f73f2f8308db0e00906b59f35b1

Comment 2 Martin Bukatovic 2016-08-08 10:56:50 UTC
Additional info
===============

After discussing this issue upstream, my pull request removing the feature
was merged, see: https://github.com/ceph/ceph-ansible/issues/919

Comment 4 Federico Lucifredi 2016-10-07 17:05:04 UTC
This will ship concurrently with RHCS 2.1.

Comment 8 Christina Meno 2017-01-20 19:30:24 UTC
Andrew, would you please fill out the doc type and doc text field to give the Docs team some input?

Comment 9 Tejas 2017-02-07 03:42:48 UTC
Verified this in version:
ceph-ansible-2.1.6-1.el7scon.noarch

I enabled swap on few nodes before running ansible playbook.
Even after the swap space was not affected.

Comment 11 errata-xmlrpc 2017-03-14 15:50:39 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-2017:0515