remove swap from elasticsearch servers
Closed, ResolvedPublic

Description

Saddly, during the reimage of all elasticsearch servers, we did not use a no swappartman configuration. We should disable swap nonetheless (to make elasticsearch happy about memory locking configuration) and ensure that the next reimage will not use swap.

Gehel created this task.Feb 23 2017, 6:22 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptFeb 23 2017, 6:22 PM
Gehel added a subscriber: RobH.Tue, Mar 7, 6:16 PM

The following should be sufficient:

swapoff -a
sed -i.bak '/swap/d' fstab

This does not recover the 1Go of the swap partition (but we don't really care about 1Go). We do not manage swap via puppet, so it does not seem to make sense to apply that change via puppet.

The partitioning should be updated to use raid1-lvm-ext4-srv-noswap.cfg for the next reinstall.

@RobH do you have an opinion on the above plan?

RobH added a comment.Tue, Mar 7, 8:05 PM

The following should be sufficient:

swapoff -a
sed -i.bak '/swap/d' fstab

This does not recover the 1Go of the swap partition (but we don't really care about 1Go). We do not manage swap via puppet, so it does not seem to make sense to apply that change via puppet.

The partitioning should be updated to use raid1-lvm-ext4-srv-noswap.cfg for the next reinstall.

@RobH do you have an opinion on the above plan?

This all makes sense to me. I agree that implementing the swap removal via puppet is likely overkill, since this is a clean up and not expected to be an ongoing item to be managed by puppet. Removing the swap but not re-gaining the 1GB seems better than just leaving it in place, and simplifies fleet wide partitioning.

Deskana triaged this task as "Normal" priority.Tue, Mar 14, 5:29 PM

Change 342662 had a related patch set uploaded (by Gehel):
[operations/puppet] elasticsearch - no need to use swap

https://gerrit.wikimedia.org/r/342662

Mentioned in SAL (#wikimedia-operations) [2017-03-14T18:39:28Z] <gehel> removing swap from elasticsearch servers - T158884

Swap is now disabled on all elasticsearch servers. A patch still needs to be merged to ensure that no swap at all is created at next reimage.

Change 342662 merged by Gehel:
[operations/puppet] elasticsearch - no need to use swap

https://gerrit.wikimedia.org/r/342662

Swap is now disabled on all elasticsearch servers. A patch still needs to be merged to ensure that no swap at all is created at next reimage.

Given this patch is merged, I will assume this task is done. Feel free to reopen if I am mistaken.

Deskana closed this task as "Resolved".
Gehel added a comment.Fri, Mar 17, 1:42 PM

Correct! Thanks for the cleanup!