From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 212181FF2CA for ; Tue, 23 Jul 2024 16:56:42 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id CD5825F5F; Tue, 23 Jul 2024 16:57:14 +0200 (CEST) Message-ID: Date: Tue, 23 Jul 2024 16:57:10 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: Proxmox VE development discussion , Christoph Heiss References: <20240718134905.1177775-1-c.heiss@proxmox.com> <20240718134905.1177775-17-c.heiss@proxmox.com> From: Aaron Lauterer In-Reply-To: <20240718134905.1177775-17-c.heiss@proxmox.com> X-SPAM-LEVEL: Spam detection results: 0 AWL -0.038 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [options.rs, http.rs, utils.rs, main.rs, udevinfo.rs, answer.rs, proxmox-auto-installer.rs, setup.rs] Subject: Re: [pve-devel] [PATCH installer v2 16/17] fix #5536: post-hook: add utility for sending notifications after auto-install X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox VE development discussion Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" There are quite a few preparation changes in other sub-crates (auto-installer, installer-common). I've only gotten through them for now and haven't looked at the actual post-hook crate stuff. Wouldn't it be nicer to split the preparation patches into their own commit? It would make the patch smaller and the history would be a bit clearer as we don't mix adding the post-hook crate with all the preparation that is needed. I plan to look at the actual post-hook stuff tomorrow On 2024-07-18 15:49, Christoph Heiss wrote: > This utility can be called with the low-level install config after a > successful installation to send a notification via a HTTP POST request, > if the user has configured an endpoint for that in the answer file. > > Signed-off-by: Christoph Heiss > --- > Changes v1 -> v2: > * squash implementation and unit tests into one patch > * simplify udev property retrieving by introducing proper helpers on > `UdevInfo` itself > * rename Answer::from_reader() -> Answer::try_from_reader to better > reflect it returns a Result<> > * improved error message in some places > * added new fields; now includes ISO version, SecureBoot state, CPU > and DMI info > * product information was split into separate fields > * boot mode information was split into separate fields > * product version is now retrieved from the package using dpkg-query > directly > * kernel version was split into separate fields, retrieving version > string from the image directly > * all disks and NICs are now included, a field indicates whether they > are boot disk or management interface, respectively > * move with_chroot() invocation out of PostHookInfo::gather() > > Signed-off-by: Christoph Heiss > --- > Cargo.toml | 1 + > Makefile | 8 +- > debian/install | 1 + > proxmox-auto-installer/src/answer.rs | 16 +- > .../src/bin/proxmox-auto-installer.rs | 13 +- > proxmox-auto-installer/src/udevinfo.rs | 8 +- > .../src/fetch_plugins/http.rs | 2 +- > proxmox-installer-common/src/http.rs | 6 +- > proxmox-installer-common/src/options.rs | 5 + > proxmox-installer-common/src/setup.rs | 2 +- > proxmox-installer-common/src/utils.rs | 2 + > proxmox-post-hook/Cargo.toml | 18 + > proxmox-post-hook/src/main.rs | 784 ++++++++++++++++++ > 13 files changed, 843 insertions(+), 23 deletions(-) > create mode 100644 proxmox-post-hook/Cargo.toml > create mode 100644 proxmox-post-hook/src/main.rs > _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel