Skip to content

tools/a-b-lxd: make sure the reboot happens when needed

When issuing the reboot command, there is no blocking mechanism that ensures the reboot was actually performed. When the host machine is under heavy load, the reboot can actually take some time, and the wait_reboot function instantly passes, because the container is still fully booted, but has already queued a reboot. When that situation happens, the rest of the script tries to keep going until it fails to run any step because the container is now really rebooting.

This patch ensures that when we want to reboot, we actually wait for it to happen, by checking that the boot_id has actually changed.

Merge request reports

Loading