[pve-devel] [PATCH installer] fix #5984: unconfigured: do not reboot if auto-installer fails by default
Christoph Heiss
c.heiss at proxmox.com
Tue Dec 17 11:26:01 CET 2024
Thanks for tackling this!
But this still doesn't really fix the issue by honoring the
`global.reboot_on_error` flag in any way, but just inverts the current
behaviour?
I.e. now it just always drops into the a shell, w/o ever auto-rebooting,
even if `global.reboot_on_error = true`.
This would need some sort of proper flag(-file) to indicate to
`unconfigured.sh` whether to reboot on errors in auto-installer mode or
not -- along the lines of that proxmox-auto-installer could e.g. touch
/run/proxmox-reboot-on-error if `reboot_on_error` is set and
unconfigured.sh can then just check for that files existence.
Same goes for when proxmox-post-hook fails, as the reboot is also
unconditional if that fails. Both should honor the flag set in the
answer file.
Waiting ~30s before auto-rebooting on errors is a good thing IMHO, so
I'd keep that.
On Wed Dec 11, 2024 at 5:14 PM CET, Daniel Kral wrote:
> [..]
> diff --git a/unconfigured.sh b/unconfigured.sh
> index 070cf33..f9cc9de 100755
> --- a/unconfigured.sh
> +++ b/unconfigured.sh
> @@ -260,6 +260,9 @@ elif [ $start_auto_installer -ne 0 ]; then
> echo "waiting 30s to allow gathering the error before reboot."
> sleep 30
> fi
> + else
> + # simulate a trap to `err_reboot` if the auto-installer fails
> + err_reboot
Since the function is now called here directly, the shellcheck
`disable=SC2317` directive can now be removed from the function
definition above.
More information about the pve-devel
mailing list