public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
	Christoph Heiss <c.heiss@proxmox.com>,
	Aaron Lauterer <a.lauterer@proxmox.com>
Subject: Re: [pve-devel] [RFC installer 2/6] add proxmox-auto-installer
Date: Thu, 21 Sep 2023 13:30:33 +0200	[thread overview]
Message-ID: <539fc219-86cc-43e7-b2c6-470c068169fb@proxmox.com> (raw)
In-Reply-To: <dimfclycvcnhz6gesfhg7zvjwcotiikmrwv76srsh5kb2ysb56@grj673rcy4nu>

Am 21/09/2023 um 13:16 schrieb Christoph Heiss:
> 
> Some general notes:
> 
> - The overall approach seems fine too me. Did some cursory testing too,
>   worked fine - although I did not really test out the
>   filtering/matching much.
> 
> - Probably just due to it being still a bit early, but all these
>   `.unwrap()/.expect()` should be replaced with proper error handling in
>   the end.
> 
> - Continuing on the thought of error handling:
>   We should come up with some way to properly report and (persistently)
>   log errors, such that an user can see them. It's really not helpful if
>   the machine is just boot-looping without any indication what went
>   wrong. Any `.expect()`/`.unwrap()` will just panic the auto-installer,
>   which will ultimately result in a reboot.
> 
>   Especially in this case, where everything runs headless, it's IMO
>   important to have /some/ way to know what went wrong.
> 
>   Sending simple JSON-formatted logs to an HTTP endpoint or even using
>   the rsyslog protocol come to mind and would be a good solution for
>   this, I think.
>   Or, if the answer file is read from an (USB drive) partition, write
>   the log there?

I think this should be added to the config as option and default to
"stop-and-wait-for-human-intervention", i.e., show error in a prompt
and wait.

We can then add other reporting mechanisms in the future, possibly
dependent on where the config is pulled from.

> 
>   At the very least, I would log everything to a tmpfile, such that an
>   administrator can e.g. upload that file somewhere using a post-install
>   command.
> 
>   Maybe even /disable/ auto-reboot in case of an error, so that
>   administrators can investigate the machine directly?
> 
> - For the most part I did a rather in-depth review, just as things
>   caught my eye. Still trimmed down things as much as possible.
> 
> On Tue, Sep 05, 2023 at 03:28:28PM +0200, Aaron Lauterer wrote:
>> [..]
>>
>> It supports basic globbing/wildcard is supported at the beginning and
>> end of the search string. The matching is implemented by us as it isn't
>> that difficult and we can avoid additional crates.
> If we ever want more extensive matching in the future, we could use the
> `glob` crate, which provides a `Pattern` struct for using it directly.
> It's actively maintained and does not have any non-dev dependencies, so
> from my side it would be fine.

yes, IIRC, we mentioned that crate too when we discussed the general
strategy and matching in-person some months ago; would be fine for me
too.


> [..]
>
> Further, a way to run commands in the finished installation chroot could
> be pretty useful too, e.g. to create some files in /etc comes to mind.

I would like to avoid having such things from the start, let's keep
it simple for now and collect feedback when this is then released.
As then, we can decide which mechanism make sense as native feature
and if we really want such a general hook that can allow users to
break lots off stuff and assumptions and still say "well I used the
official installer", i.e., cause support overhead.




  reply	other threads:[~2023-09-21 11:30 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-05 13:28 [pve-devel] [RFC installer 0/6] add automated installation Aaron Lauterer
2023-09-05 13:28 ` [pve-devel] [RFC installer 1/6] low level: sys: fetch udev properties Aaron Lauterer
2023-09-05 13:28 ` [pve-devel] [RFC installer 2/6] add proxmox-auto-installer Aaron Lauterer
2023-09-21 11:16   ` Christoph Heiss
2023-09-21 11:30     ` Thomas Lamprecht [this message]
2023-09-21 11:39       ` Christoph Heiss
2023-09-05 13:28 ` [pve-devel] [RFC installer 3/6] add answer file fetch script Aaron Lauterer
2023-09-20  9:52   ` Christoph Heiss
2023-09-05 13:28 ` [pve-devel] [PATCH installer 4/6] makefile: fix handling of multiple usr_bin files Aaron Lauterer
2023-09-05 13:28 ` [pve-devel] [RFC installer 5/6] makefile: add auto installer Aaron Lauterer
2023-09-05 13:28 ` [pve-devel] [RFC docs 6/6] installation: add unattended documentation Aaron Lauterer

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=539fc219-86cc-43e7-b2c6-470c068169fb@proxmox.com \
    --to=t.lamprecht@proxmox.com \
    --cc=a.lauterer@proxmox.com \
    --cc=c.heiss@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