mirror of
https://github.com/YunoHost/package_check.git
synced 2024-09-03 20:06:20 +02:00
Try to add some --debug during lxc restore snapshot to understand what the fucking hell is 'in use' T_T
This commit is contained in:
parent
3cd3e0abd0
commit
964d95966c
1 changed files with 6 additions and 1 deletions
|
@ -86,10 +86,15 @@ LOAD_LXC_SNAPSHOT () {
|
||||||
CLEAN_SWAPFILES
|
CLEAN_SWAPFILES
|
||||||
|
|
||||||
local retry_lxc=0
|
local retry_lxc=0
|
||||||
|
local debug=""
|
||||||
while [[ ${retry_lxc} -lt 10 ]]
|
while [[ ${retry_lxc} -lt 10 ]]
|
||||||
do
|
do
|
||||||
LXC_STOP $LXC_NAME || true
|
LXC_STOP $LXC_NAME || true
|
||||||
lxc restore $LXC_NAME $snapname && break || retry_lxc=$(($retry_lxc+1))
|
if [[ ${retry_lxc} -ge 2 ]]
|
||||||
|
then
|
||||||
|
debug="--debug"
|
||||||
|
fi
|
||||||
|
lxc restore $LXC_NAME $snapname $debug && break || retry_lxc=$(($retry_lxc+1))
|
||||||
log_warning "Failed to restore snapshot? Retrying in 20 sec ..."
|
log_warning "Failed to restore snapshot? Retrying in 20 sec ..."
|
||||||
sleep 20
|
sleep 20
|
||||||
done
|
done
|
||||||
|
|
Loading…
Add table
Reference in a new issue