Disable cloud-init rootfs resize to prserve disk size configured by MAAS
Prod-Related: PROD-36317
Change-Id: I7319bd3f00ea66c0663a26087bee20558990026a
diff --git a/README.rst b/README.rst
index 57ac725..7490b79 100644
--- a/README.rst
+++ b/README.rst
@@ -538,6 +538,9 @@
kernel_package:
enabled: true
value 'linux-image-virtual-hwe-16.04'
+ # disable cloud-init rootfs resize to prserve disk size configured by MAAS
+ rootfs_resize:
+ disabled: true
Single MAAS cluster service [multiple racks]
diff --git a/maas/files/curtin_userdata_amd64_generic_xenial b/maas/files/curtin_userdata_amd64_generic_xenial
index afc18a5..45395b5 100644
--- a/maas/files/curtin_userdata_amd64_generic_xenial
+++ b/maas/files/curtin_userdata_amd64_generic_xenial
@@ -48,6 +48,10 @@
salt_10_recon_max: ["curtin", "in-target", "--", "sh", "-c", "echo 'recon_max: 60000' >> /etc/salt/minion.d/minion.conf"]
salt_11_recon_randomize: ["curtin", "in-target", "--", "sh", "-c", "echo 'recon_randomize: True' >> /etc/salt/minion.d/minion.conf"]
salt_12_auth_timeout: ["curtin", "in-target", "--", "sh", "-c", "echo 'auth_timeout: 60' >> /etc/salt/minion.d/minion.conf"]
+{%- if salt['pillar.get']('maas:cluster:curtin_vars:amd64:xenial:rootfs_resize:disabled')|default(false) %}
+
+ cloudinit_01_disable_rootfs_resize: ["curtin", "in-target", "--", "sh", "-c", "echo 'resize_rootfs: false' > /etc/cloud/cloud.cfg.d/02_resizeroot.cfg"]
+{% endif %}
{% raw %}
{{if third_party_drivers and driver}}