From 8c088d17f10d7ccdc502e260d5efdbea05ef64a5 Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Tue, 26 Mar 2024 15:10:36 -0700 Subject: [PATCH] Enable nodepool delete after upload option This enables the nodepool delete-after-upload option with keep-formats set to qcow2 on x86 image builders. This should clear out vhd and raw files after uploads for those formats are completed keeping only qcow2 longer term. This should reduce disk space overhead while still enabling us to convert from qcow2 to the other formats if that becomes necessary. Note that we do not enable this for arm64 before arm64 builders currently build raw images only and we still want at least one copy of the image to be kept even if it is raw (and not qcow2). Change-Id: I6cf481e0f9a5eaff35b5d961a084ae34a49ea6c6 --- nodepool/nb04.opendev.org.yaml | 3 +++ nodepool/nodepool.yaml | 3 +++ 2 files changed, 6 insertions(+) diff --git a/nodepool/nb04.opendev.org.yaml b/nodepool/nb04.opendev.org.yaml index 7443c5904a..802c7074f7 100644 --- a/nodepool/nb04.opendev.org.yaml +++ b/nodepool/nb04.opendev.org.yaml @@ -104,6 +104,9 @@ diskimages: - name: base abstract: True rebuild-age: 604800 # 7 days + # No delete after upload for arm64 images because we only + # build raw images for arm. In that case we don't want to delete + # anything because there is only one copy. elements: - block-device-efi - vm diff --git a/nodepool/nodepool.yaml b/nodepool/nodepool.yaml index ccb0ad21f5..adeb3a60ba 100644 --- a/nodepool/nodepool.yaml +++ b/nodepool/nodepool.yaml @@ -128,6 +128,9 @@ diskimages: - name: base abstract: True rebuild-age: 604800 # 7 days + delete-after-upload: true + keep-formats: + - qcow2 elements: - vm - simple-init