Avoid apt race condition
This race can arise when cloud-init is still running when the join runs. Change-Id: I01b22132081e20050dc7b74556f74f82576e8c1e
This commit is contained in:
parent
3b3f2baf4b
commit
8bb62520a3
|
@ -48,7 +48,6 @@ log
|
|||
log === Installing system packages ===
|
||||
set -x
|
||||
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
end=$(($(date +%s) + 600))
|
||||
while true; do
|
||||
if ! apt-get update; then
|
||||
|
@ -65,7 +64,7 @@ done
|
|||
|
||||
end=$(($(date +%s) + 600))
|
||||
while true; do
|
||||
if ! apt-get install -y --no-install-recommends \
|
||||
if ! DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
||||
{%- for package in config['HostSystem:packages.additional'] | default([]) %}
|
||||
{{ package }} \
|
||||
{%- endfor %}
|
||||
|
@ -76,6 +75,7 @@ while true; do
|
|||
log Failed to install apt packages.
|
||||
exit 1
|
||||
fi
|
||||
sleep 10
|
||||
else
|
||||
break
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue