From ae7519f988a99722600d26ce27ad80a69eebe565 Mon Sep 17 00:00:00 2001 From: Alex-Welsh Date: Mon, 23 Jun 2025 10:04:06 +0100 Subject: [PATCH] Fix deployment image checksum validation This change fixes checksum validation for newly downloaded deployment images. Previously, the check would always fail, even if the checksum matched. Closes-Bug: #2115188 Change-Id: I8ddfad37ec97c13bd6d37cd4d62d5b3bc089b9ac (cherry picked from commit f9f2f6830556eb85f1cc85c76a7f5d4c1aed9973) --- .../tasks/download_deployment_image.yml | 2 +- .../notes/fix-deploy-image-checksum-2e40b08a049bd425.yaml | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/fix-deploy-image-checksum-2e40b08a049bd425.yaml diff --git a/playbooks/roles/bifrost-ironic-install/tasks/download_deployment_image.yml b/playbooks/roles/bifrost-ironic-install/tasks/download_deployment_image.yml index 1aad4a2b..20d74446 100644 --- a/playbooks/roles/bifrost-ironic-install/tasks/download_deployment_image.yml +++ b/playbooks/roles/bifrost-ironic-install/tasks/download_deployment_image.yml @@ -73,4 +73,4 @@ The deployment image checksum does not match the file that has been downloaded. Ensure that deploy_image_upstream_url, deploy_image_checksum_url, and deploy_image_checksum_algorithm are set correctly. To ignore the checksum, set deploy_image_checksum_algorithm to none. - when: deploy_image_checksum_algorithm != 'none' and downloaded_image_stat.stat.checksum != parsed_deployment_image_checksum + when: deploy_image_checksum_algorithm != 'none' and downloaded_image_stat.stat.checksum not in deployment_image_checksum diff --git a/releasenotes/notes/fix-deploy-image-checksum-2e40b08a049bd425.yaml b/releasenotes/notes/fix-deploy-image-checksum-2e40b08a049bd425.yaml new file mode 100644 index 00000000..9f6ea7b1 --- /dev/null +++ b/releasenotes/notes/fix-deploy-image-checksum-2e40b08a049bd425.yaml @@ -0,0 +1,6 @@ +--- +fixes: + - | + Fixes an issue checksum vaidation would fail when a deployment image is + downloaded, even if the checksum matched. See `LP#2115188 + `__ for more details.