lxc_cache_preparation: Convert the LXC cache preparation to async task
openSUSE sometimes hangs when running this task. In order to debug this failure we need to fire up this task and check for it's status on a separate one. This way, we can avoid Jenkins timeouts and collect logs properly when that tasks fails to complete within a reasonable amount of time. Change-Id: I3acc4436c8b70af097de188b9de2bb9f4e093a09
This commit is contained in:
parent
d8f9887624
commit
025a800afc
@ -95,6 +95,19 @@
|
||||
- name: Prepare cached image setup commands
|
||||
shell: "chroot {{ lxc_image_cache_path }} /usr/local/bin/cache-prep-commands.sh > /var/log/lxc-cache-prep-commands.log 2>&1"
|
||||
changed_when: false
|
||||
# It should only take a couple of minutes to prepare the cache. But if network is slow it might take longer.
|
||||
# Lets be optimistic and set the limit to 10 minutes
|
||||
async: 600
|
||||
poll: 0
|
||||
register: _lxc_cache_prepare_commands
|
||||
|
||||
- name: Ensure that the LXC cache has been prepared
|
||||
async_status:
|
||||
jid: "{{ _lxc_cache_prepare_commands.ansible_job_id }}"
|
||||
register: _lxc_cache_prepare_commands_result
|
||||
until: _lxc_cache_prepare_commands_result.finished
|
||||
delay: 10
|
||||
retries: 60
|
||||
|
||||
- name: Adjust sshd configuration in container
|
||||
lineinfile:
|
||||
|
Loading…
Reference in New Issue
Block a user