HomeDevCentral

Create swap file if no swap partition exist

Description

Create swap file if no swap partition exist

Summary:
Eglide has consumed all memory 2020-02-11 around 17:32. After investigation,
no swap partition exists on this server.

This scenario will most certainly occur on Scaleway nodes, where no
partition are available, and the image is mounted on /.

This change so fixes this situation by generating a swap file.

Fixes T1590.

Reference: https://devconnected.com/how-to-add-swap-space-on-debian-10-buster/
Signed-off-by: Nidal Iguer <nidal.iguer@gmail.com>

Test Plan:
Deploy on Eglide with
salt eglide state.sls roles/core/memory

Check swap with free or swapon

Reviewers: jokerozen, dereckson

Reviewed By: dereckson

Maniphest Tasks: T1590

Differential Revision: https://devcentral.nasqueron.org/D2204

Details

Provenance
derecksonAuthored on Feb 12 2020, 02:32
derecksonPushed on Feb 12 2020, 14:05
Reviewer
dereckson
Differential Revision
D2204: Create swap file if no swap partition exist
Parents
rOPS75f1094b5679: Configure periodic tasks on FreeBSD
Branches
Unknown
Tags
Unknown
Tasks
T1590: Eglide SWAP is very low