mirror of
https://github.com/YunoHost/package_check.git
synced 2024-09-03 20:06:20 +02:00
Actually ... ci-apps is still using lxd 4.10 which has empty status when the LXC is stopped
This commit is contained in:
parent
0e62de7b6b
commit
8144a1fac0
1 changed files with 1 additions and 5 deletions
|
@ -140,14 +140,10 @@ LXC_STOP () {
|
||||||
while [[ ${retry_stop_lxc} -lt 5 ]]
|
while [[ ${retry_stop_lxc} -lt 5 ]]
|
||||||
do
|
do
|
||||||
local status="$(lxc list $container_to_stop --format json | jq -r '.[].state.status')"
|
local status="$(lxc list $container_to_stop --format json | jq -r '.[].state.status')"
|
||||||
if [[ -z "$status" ]] || [[ "$status" == "Stopped" ]]
|
if [[ -z "$status" ]] || [[ "$status" == "Stopped" ]] || [[ "$status" == "null" ]]
|
||||||
then
|
then
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
if [[ ${retry_stop_lxc} -ge 3 ]]
|
|
||||||
then
|
|
||||||
log_warning "Failed to stop LXC (status=$status) ? Retrying in 10 sec ..."
|
|
||||||
fi
|
|
||||||
retry_stop_lxc="$(($retry_stop_lxc+1))"
|
retry_stop_lxc="$(($retry_stop_lxc+1))"
|
||||||
sleep 10
|
sleep 10
|
||||||
timeout 30 lxc stop --timeout 15 $container_to_stop 2>/dev/null
|
timeout 30 lxc stop --timeout 15 $container_to_stop 2>/dev/null
|
||||||
|
|
Loading…
Add table
Reference in a new issue