WPTIN-23156 Take over stale JDK download locks and fall back on wait timeout

This commit is contained in:
Geoff Jacobs
2026-11-09 13:36:36 +11:00
parent 70b9b542d9
commit 973740dea8

View File

@@ -27,6 +27,19 @@
path: "{{ atl_product_home_shared_download_dir }}/temurin-{{ java_major_version }}-jdk_download_completed" path: "{{ atl_product_home_shared_download_dir }}/temurin-{{ java_major_version }}-jdk_download_completed"
register: jdk_download_completed_lock register: jdk_download_completed_lock
- name: Check if jdk_downloading lock directory exists
ansible.builtin.stat:
path: "{{ atl_product_home_shared_download_dir }}/temurin-{{ java_major_version }}-jdk_downloading"
register: jdk_downloading_lock_stat
- name: Remove stale jdk_downloading lock directory
ansible.builtin.file:
path: "{{ atl_product_home_shared_download_dir }}/temurin-{{ java_major_version }}-jdk_downloading"
state: absent
when:
- jdk_downloading_lock_stat.stat.exists
- now().timestamp() - jdk_downloading_lock_stat.stat.mtime > atl_jdk_download_lock_timeout | int
- name: create jdk_downloading lock directory - name: create jdk_downloading lock directory
ansible.builtin.file: ansible.builtin.file:
path: "{{ atl_product_home_shared_download_dir }}/temurin-{{ java_major_version }}-jdk_downloading" path: "{{ atl_product_home_shared_download_dir }}/temurin-{{ java_major_version }}-jdk_downloading"
@@ -79,7 +92,8 @@
timeout: "{{ atl_jdk_download_lock_timeout }}" timeout: "{{ atl_jdk_download_lock_timeout }}"
msg: >- msg: >-
{{ atl_product_home_shared_download_dir }}/temurin-{{ java_major_version }}-jdk_downloading {{ atl_product_home_shared_download_dir }}/temurin-{{ java_major_version }}-jdk_downloading
still exists after {{ atl_jdk_download_lock_timeout }}s; remove it if no node is downloading the JDK still exists after {{ atl_jdk_download_lock_timeout }}s; installing the JDK without the shared download cache
ignore_errors: true
when: not jdk_download_completed_lock.stat.exists when: not jdk_download_completed_lock.stat.exists
- name: Check if jdk_download_completed lock directory exists after waiting - name: Check if jdk_download_completed lock directory exists after waiting