From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
Christoph Heiss <c.heiss@proxmox.com>
Subject: [pve-devel] applied: [PATCH installer v4 00/12] fix #5536: implement post-(auto-)installation notification mechanism
Date: Mon, 11 Nov 2024 18:41:15 +0100 [thread overview]
Message-ID: <00019f8d-e4f2-420e-892a-b89e8b886748@proxmox.com> (raw)
In-Reply-To: <20241111131519.867887-1-c.heiss@proxmox.com>
Am 11.11.24 um 14:14 schrieb Christoph Heiss:
> This implements a mechanism for post-installation "notifications" via a
> POST request [0] when using the auto-installer.
>
> It's implemented as a separate, small utility to facilitate separation
> of concerns and make the information gathering easier by having it
> isolated in one place.
>
> Patches #1 through #5 are simply clean-ups, refactors, etc. that were
> done along the way and can be applied independently.
>
> Most interesting here will be patch #16, which adds the actual
> implementation of the post-hook. (Bind-)mounting the installed host
> system is done using the existing `proxmox-chroot` utility, and the HTTP
> POST functionality can fortunately be re-used 1:1 from
> `proxmox-fetch-answer`.
>
> I've also included an example of how the JSON body (pretty-printed and
> reduced some things for readability) of such a post-installation request
> would look like below, for reference.
> Where applicable (and sensible), I have tried to align the format as
> much as possible with 1) the format as used in the `fetch-answer` POST
> request and 2) PVE's /nodes/<host>/status API endpoint.
>
> Feedback on the post-hook information schema is of course also very much
> appreciated!
What about adding an X.Y format version? So that we can expand this nicely or
even rework completely. Here the semantic meaning of the two tuples would
be
X: major version, increased if existing keys vanish or get renamed or
restructured, i.e. a breaking change.
Y: minor version, increased if new information gets added.
A patch level does not make much sense here IMO, so I left that out.
This way consumers could decide if they can cope with the current format
version and e.g. take different actions or what not.
One naturally can use the product version for deriving the format version,
but in the long run that needs more client side handling and mapping than
a separate format version.
>
> It should be noted that some information like DMI is generally very
> depended on the motherboard/firmware, on what information is actually
> available and filled-in. So the contents are expected to vary wildly
> between machines and may also be empty, as in the example below from a
> VM.
Can we also dump the schema so that this can be added to the docs, or
at least (linked to) in the wiki of the automated installer?
Also, I figure you already planned to document this in the wiki for the
next ISO release? Just asking to be sure it won't be overlooked.
>
> Diffstat
> ========
>
> Christoph Heiss (12):
> debian: strip unused library dependencies
> fetch-answer: move http-related code to gated module in
> installer-common
> tree-wide: convert some more crates to use workspace dependencies
> auto-install-assistant: replace `PathBuf` parameters with
> `AsRef<Path>`
^- this one would have done well with some short commit message body,
even if obvious it will never hurt to state the intention of the commit.
> auto-installer: tests: simplify empty disks check
> auto-installer: tests: replace `PathBuf` parameters with `AsRef<Path>`
^- same here w.r.t. the lack of a short commit message body
> auto-installer: move `SystemDMI` struct to common crate
> auto-installer: answer: factor out answer file reading into function
> auto-installer: udevinfo: introduce type alias for udev properties
> fix #5536: auto-installer: answer: add `posthook` section
> fix #5536: post-hook: add utility for sending notifications after
> auto-install
^- above two might have been better off squashed, but I can get how you
wanted to separate them, so I kept them as is.
> unconfigured.sh: run proxmox-post-hook after successful auto-install
applied series, thanks!
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
next prev parent reply other threads:[~2024-11-11 17:41 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-11 13:14 [pve-devel] " Christoph Heiss
2024-11-11 13:14 ` [pve-devel] [PATCH installer v4 01/12] debian: strip unused library dependencies Christoph Heiss
2024-11-11 13:14 ` [pve-devel] [PATCH installer v4 02/12] fetch-answer: move http-related code to gated module in installer-common Christoph Heiss
2024-11-11 13:14 ` [pve-devel] [PATCH installer v4 03/12] tree-wide: convert some more crates to use workspace dependencies Christoph Heiss
2024-11-11 13:15 ` [pve-devel] [PATCH installer v4 04/12] auto-install-assistant: replace `PathBuf` parameters with `AsRef<Path>` Christoph Heiss
2024-11-11 13:15 ` [pve-devel] [PATCH installer v4 05/12] auto-installer: tests: simplify empty disks check Christoph Heiss
2024-11-11 13:15 ` [pve-devel] [PATCH installer v4 06/12] auto-installer: tests: replace `PathBuf` parameters with `AsRef<Path>` Christoph Heiss
2024-11-11 13:15 ` [pve-devel] [PATCH installer v4 07/12] auto-installer: move `SystemDMI` struct to common crate Christoph Heiss
2024-11-11 13:15 ` [pve-devel] [PATCH installer v4 08/12] auto-installer: answer: factor out answer file reading into function Christoph Heiss
2024-11-11 13:15 ` [pve-devel] [PATCH installer v4 09/12] auto-installer: udevinfo: introduce type alias for udev properties Christoph Heiss
2024-11-11 13:15 ` [pve-devel] [PATCH installer v4 10/12] fix #5536: auto-installer: answer: add `posthook` section Christoph Heiss
2024-11-11 13:15 ` [pve-devel] [PATCH installer v4 11/12] fix #5536: post-hook: add utility for sending notifications after auto-install Christoph Heiss
2024-11-11 13:15 ` [pve-devel] [PATCH installer v4 12/12] unconfigured.sh: run proxmox-post-hook after successful auto-install Christoph Heiss
2024-11-11 17:41 ` Thomas Lamprecht [this message]
2024-11-12 10:33 ` [pve-devel] applied: [PATCH installer v4 00/12] fix #5536: implement post-(auto-)installation notification mechanism Christoph Heiss
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=00019f8d-e4f2-420e-892a-b89e8b886748@proxmox.com \
--to=t.lamprecht@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