Make upload-image-s3 hash timeout configurable

With larger images we might run into timeouts with the default 10min
timeout for the md5/sha256 async tasks.

Since we don't know how long the upload will take, we also need to
adjust the number of retries for the async_status task.

Change-Id: I3004766786935a4a7f32663e22ae2b103c01ace4
This commit is contained in:
Simon Westphahl
2025-10-10 10:28:47 +02:00
parent 3f62739c27
commit 191a1b2822
3 changed files with 10 additions and 4 deletions

View File

@@ -68,3 +68,8 @@ expects.
:default: `{{ zuul.build }}-{{ build_diskimage_image_name }}.{{ upload_image_s3_extension }}`
The object name to use when uploading.
.. zuul:rolevar:: upload_image_s3_hash_timeout
:default: 600
The async timeout for md5/sha256 image hash tasks.

View File

@@ -3,3 +3,4 @@ upload_image_s3_delete_after: 0
upload_image_s3_filename: '{{ build_diskimage_image_root }}/{{ build_diskimage_image_name }}.{{ upload_image_s3_extension }}'
upload_image_s3_name: '{{ zuul.build }}-{{ build_diskimage_image_name }}.{{ upload_image_s3_extension }}'
upload_image_s3_extension: '{{ upload_image_s3_format }}'
upload_image_s3_hash_timeout: 600

View File

@@ -3,7 +3,7 @@
stat:
path: '{{ upload_image_s3_filename }}'
checksum_algorithm: sha256
async: 600
async: '{{ upload_image_s3_hash_timeout }}'
poll: 0
register: sha256_task
@@ -11,7 +11,7 @@
stat:
path: '{{ upload_image_s3_filename }}'
checksum_algorithm: md5
async: 600
async: '{{ upload_image_s3_hash_timeout }}'
poll: 0
register: md5_task
@@ -58,7 +58,7 @@
jid: "{{ sha256_task.ansible_job_id }}"
register: sha256
until: sha256.finished
retries: 1
retries: "{{ (upload_image_s3_hash_timeout > 10) | ternary(upload_image_s3_hash_timeout // 10, 10) }}"
delay: 10
- name: Wait for md5
@@ -66,7 +66,7 @@
jid: "{{ md5_task.ansible_job_id }}"
register: md5
until: md5.finished
retries: 1
retries: "{{ (upload_image_s3_hash_timeout > 10) | ternary(upload_image_s3_hash_timeout // 10, 10) }}"
delay: 10
- name: Return artifact to Zuul