From 3624da26f5774730c853459e5ddf6fa0d8a214fb Mon Sep 17 00:00:00 2001 From: Phil Sphicas Date: Sun, 31 May 2020 18:56:50 +0000 Subject: [PATCH] Disable creation of swap file By default, curtin creates a swap file of up to 8GB. When swap is later disabled, there is still a /swap.img file left hanging around that needs to be cleaned up. This change sets the size to 0 to disable the creation of the swap file in the first place. https://curtin.readthedocs.io/en/latest/topics/config.html#swap Change-Id: I9e1e5f67007ae3c49617525e989b27e123b69d53 --- charts/maas/templates/etc/_curtin_userdata.tpl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/charts/maas/templates/etc/_curtin_userdata.tpl b/charts/maas/templates/etc/_curtin_userdata.tpl index 640cbef..414ea72 100644 --- a/charts/maas/templates/etc/_curtin_userdata.tpl +++ b/charts/maas/templates/etc/_curtin_userdata.tpl @@ -72,6 +72,8 @@ def find_ba_key(n): driver_07_update_initramfs: ["curtin", "in-target", "--", "update-initramfs", "-u"] {{ "{{" }}endif{{ "}}" }} showtrace: true +swap: + size: 0 verbosity: 2 {{- if not (empty .Values.conf.maas.system_user) }} {{- if not (empty .Values.conf.maas.system_passwd) }}