mirror of
https://bitbucket.org/atlassian/dc-deployments-automation.git
synced 2026-11-27 10:50:46 -06:00
WPTIN-23156 Take over stale JDK download locks and fall back on wait timeout
This commit is contained in:
@@ -27,6 +27,19 @@
|
||||
path: "{{ atl_product_home_shared_download_dir }}/temurin-{{ java_major_version }}-jdk_download_completed"
|
||||
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
|
||||
ansible.builtin.file:
|
||||
path: "{{ atl_product_home_shared_download_dir }}/temurin-{{ java_major_version }}-jdk_downloading"
|
||||
@@ -79,7 +92,8 @@
|
||||
timeout: "{{ atl_jdk_download_lock_timeout }}"
|
||||
msg: >-
|
||||
{{ 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
|
||||
|
||||
- name: Check if jdk_download_completed lock directory exists after waiting
|
||||
|
||||
Reference in New Issue
Block a user