From 865bb6223b3155634035673572bfa5255d41556a Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Tue, 7 Feb 2023 02:27:14 +0100 Subject: [PATCH] Apparently that stupid 'In use' bug is a glitch and can be temporarily solved by restarting the LXD daemon :| --- lib/lxc.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/lxc.sh b/lib/lxc.sh index 7dead88..b52bd79 100644 --- a/lib/lxc.sh +++ b/lib/lxc.sh @@ -91,6 +91,10 @@ LOAD_LXC_SNAPSHOT () { LXC_STOP $LXC_NAME || true lxc restore $LXC_NAME $snapname && break || retry_lxc=$(($retry_lxc+1)) log_warning "Failed to restore snapshot? Retrying in 20 sec ..." + if [[ ${retry_lxc} -ge 3 ]] + then + log_error "If this keeps happening, restarting the LXD daemon might help :| ..." + fi sleep 20 done