Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1364167 - [ceph-ansible] role ceph-common disables swap by default
Summary: [ceph-ansible] role ceph-common disables swap by default
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Storage Console
Classification: Red Hat
Component: ceph-ansible
Version: 2
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 2
Assignee: Andrew Schoen
QA Contact: ceph-qe-bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-04 15:16 UTC by Martin Bukatovic
Modified: 2017-03-14 15:50 UTC (History)
11 users (show)

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.
Clone Of:
Environment:
Last Closed: 2017-03-14 15:50:39 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2017:0515 normal SHIPPED_LIVE Important: ansible and ceph-ansible security, bug fix, and enhancement update 2017-04-18 21:12:31 UTC

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 Gregory 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


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