From b7fa1115f34eb90c6447325177c766e0354bf5cd Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Thu, 21 Nov 2024 08:10:22 -0800 Subject: [PATCH] Move dib image output to /opt In some clouds we don't have enough space on / to store a raw image, so tell dib to write the image output to /opt. Change-Id: Ia3d13ed811f705a450030a2046b2cd1ffd5a22b3 --- playbooks/opendev-build-diskimage-base/post.yaml | 2 +- roles/image-upload-swift/tasks/main.yaml | 4 ++-- zuul.d/jobs.yaml | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/playbooks/opendev-build-diskimage-base/post.yaml b/playbooks/opendev-build-diskimage-base/post.yaml index 7129dad..ed5d076 100644 --- a/playbooks/opendev-build-diskimage-base/post.yaml +++ b/playbooks/opendev-build-diskimage-base/post.yaml @@ -17,6 +17,6 @@ application_credential_secret: '{{ image_upload_secret.application_credential_secret }}' user_domain_name: rackspace_cloud_domain container: images-1f49951f5beb - filename: '{{ ansible_user_dir }}/dib-images/{{ build_diskimage_image_name }}.{{ upload_image_format }}' + filename: '{{ build_diskimage_image_root }}/{{ build_diskimage_image_name }}.{{ upload_image_format }}' name: '{{ zuul.build }}-{{ build_diskimage_image_name }}.{{ upload_image_format }}' delete_after: 259200 diff --git a/roles/image-upload-swift/tasks/main.yaml b/roles/image-upload-swift/tasks/main.yaml index 2e661de..c7fe4e4 100644 --- a/roles/image-upload-swift/tasks/main.yaml +++ b/roles/image-upload-swift/tasks/main.yaml @@ -1,7 +1,7 @@ # Run the checksums in the background while we're uploading - name: Get sha256 hash stat: - path: '{{ ansible_user_dir }}/dib-images/{{ build_diskimage_image_name }}.{{ upload_image_format }}' + path: '{{ filename }}' checksum_algorithm: sha256 async: 600 poll: 0 @@ -9,7 +9,7 @@ - name: Get md5 hash stat: - path: '{{ ansible_user_dir }}/dib-images/{{ build_diskimage_image_name }}.{{ upload_image_format }}' + path: '{{ filename }}' checksum_algorithm: md5 async: 600 poll: 0 diff --git a/zuul.d/jobs.yaml b/zuul.d/jobs.yaml index c04a974..947e7fa 100644 --- a/zuul.d/jobs.yaml +++ b/zuul.d/jobs.yaml @@ -34,6 +34,8 @@ build_diskimage_formats: - qcow2 - raw + # /opt/dib_tmp is an ephemeral disk if present + build_diskimage_image_root: "/opt/dib_tmp/dib-images" build_diskimage_elements: &base_elements - vm - simple-init