public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: "Christoph Heiss" <c.heiss@proxmox.com>
To: "Daniel Kral" <d.kral@proxmox.com>
Cc: Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Subject: Re: [pve-devel] [PATCH installer] fix #5984: unconfigured: do not reboot if auto-installer fails by default
Date: Tue, 17 Dec 2024 11:26:01 +0100	[thread overview]
Message-ID: <D6DWJ7ZFFZO7.2P2Y42U1UBIBK@proxmox.com> (raw)
In-Reply-To: <20241211161402.236144-1-d.kral@proxmox.com>

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.


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


      reply	other threads:[~2024-12-17 10:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-11 16:14 Daniel Kral
2024-12-17 10:26 ` Christoph Heiss [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=D6DWJ7ZFFZO7.2P2Y42U1UBIBK@proxmox.com \
    --to=c.heiss@proxmox.com \
    --cc=d.kral@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal