Make upload-image-swift 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: Icc86f896d25b923a323ade8643fb5855a2d4ff0a
Co-Authored-By: Simon Westphahl <simon.westphahl@bmw.de>
This commit is contained in:
James E. Blair
2025-10-10 09:23:33 -07:00
parent 7874eaf857
commit 1104215546
3 changed files with 10 additions and 4 deletions

View File

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

View File

@@ -3,3 +3,4 @@ upload_image_swift_delete_after: 0
upload_image_swift_filename: '{{ build_diskimage_image_root }}/{{ build_diskimage_image_name }}.{{ upload_image_swift_extension }}' upload_image_swift_filename: '{{ build_diskimage_image_root }}/{{ build_diskimage_image_name }}.{{ upload_image_swift_extension }}'
upload_image_swift_name: '{{ zuul.build }}-{{ build_diskimage_image_name }}.{{ upload_image_swift_extension }}' upload_image_swift_name: '{{ zuul.build }}-{{ build_diskimage_image_name }}.{{ upload_image_swift_extension }}'
upload_image_swift_extension: '{{ upload_image_swift_format }}' upload_image_swift_extension: '{{ upload_image_swift_format }}'
upload_image_swift_hash_timeout: 600

View File

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