From 5cb69100439e16afdf94f7d9acc0160936e208d7 Mon Sep 17 00:00:00 2001 From: Riccardo Pittau Date: Wed, 12 Apr 2023 13:32:22 +0200 Subject: [PATCH] Add the option to not use tmpfs to build dib images Currently the dib images are built on tmpfs mounted partition. As the images become bigger and bigger we may want to use disk space instead of increasing the tmpfs, considering that a standard VM in CI has around 80gb disk space while only 8gb of RAM. Change-Id: Ifbb1f38700e6b57e1da7be80c27c532aa9949493 --- roles/ipa-build-dib-image/defaults/main.yaml | 1 + roles/ipa-build-dib-image/tasks/main.yaml | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/roles/ipa-build-dib-image/defaults/main.yaml b/roles/ipa-build-dib-image/defaults/main.yaml index 42a5952..3d3859e 100644 --- a/roles/ipa-build-dib-image/defaults/main.yaml +++ b/roles/ipa-build-dib-image/defaults/main.yaml @@ -8,4 +8,5 @@ ipa_raw_dir: '{{ ansible_user_dir }}/src/opendev.org/openstack/ironic-python-age ipa_tar_dir: '{{ ansible_user_dir }}/src/opendev.org/openstack/ironic-python-agent/UPLOAD_TAR' dib_extra_args: dib_from_source: true +dib_no_tmpfs: 0 extra_elements: ["dynamic-login"] diff --git a/roles/ipa-build-dib-image/tasks/main.yaml b/roles/ipa-build-dib-image/tasks/main.yaml index 06347cc..fa69413 100644 --- a/roles/ipa-build-dib-image/tasks/main.yaml +++ b/roles/ipa-build-dib-image/tasks/main.yaml @@ -35,6 +35,11 @@ environment: # Increase from the default value of 30 DIB_DHCP_TIMEOUT: 60 + # Use or not tmpfs to build the image, default to use it. + # As images become bigger and bigger, in the future we may + # decide to switch to not use it by default since we have + # enough disk space. + DIB_NO_TMPFS: '{{ dib_no_tmpfs }}' # Use repositories checked out by Zuul (combined with -b HEAD above) DIB_REPOLOCATION_ironic_python_agent: '{{ ipa_source_path }}' DIB_REPOLOCATION_requirements: '{{ requirements_path }}'