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