Wait for aria2c to finish

We launch aria2c in async without wait and hope that it will finish
in time before we start unarchive. However it's worth checking that
image download has really finished instead of making such assumption.

Additionally ensure that ubuntu has gzip installed, as their image is
gunzip compressed.

Change-Id: I1d7dc2ff6bc1fef6d1d2e5e56b10012c7d575f5e
Closes-Bug: 1895518
This commit is contained in:
Dmitriy Rabotyagov 2020-09-14 13:07:33 +03:00
parent c21fcdb583
commit a4f917b909
3 changed files with 10 additions and 0 deletions

View File

@ -64,6 +64,14 @@
state: directory
register: create_new_dir
- name: Wait for base image download
async_status:
jid: "{{ prestage_image.ansible_job_id }}"
register: _lxc_prestage_image_result
until: _lxc_prestage_image_result.finished
delay: 5
retries: "{{ lxc_cache_prep_timeout | int // 5 }}"
- name: Unpack base image
unarchive:
src: "/tmp/{{ cache_basename }}"

View File

@ -29,6 +29,7 @@ _lxc_hosts_distro_packages:
- debootstrap
- dnsmasq-base
- git
- gzip
- ifupdown
- iptables
- irqbalance

View File

@ -29,6 +29,7 @@ _lxc_hosts_distro_packages:
- debootstrap
- dnsmasq-base
- git
- gzip
- ifupdown
- iptables
- irqbalance