From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id D77E51FF0DF for ; Fri, 28 Aug 2026 13:47:48 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 92CCC2156E; Fri, 28 Aug 2026 13:47:48 +0200 (CEST) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Fri, 28 Aug 2026 13:47:43 +0200 Message-Id: To: Subject: Re: [PATCH datacenter-manager/installer/proxmox v2 00/16] auto-installer: add installed target systems as new remotes From: "Christoph Heiss" X-Mailer: aerc 0.22.0 References: <20260826110504.1339934-1-c.heiss@proxmox.com> In-Reply-To: <20260826110504.1339934-1-c.heiss@proxmox.com> X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1787917654026 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.444 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: SEWLBZRWAQXBR6XVX2X3OB5ZR5PKM5VT X-Message-ID-Hash: SEWLBZRWAQXBR6XVX2X3OB5ZR5PKM5VT X-MailFrom: c.heiss@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox Datacenter Manager development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Small N.B.: This series depends on a small fixup-series [0], which must be applied beforehand - to adapt to a changed API in the `proxmox-installer-types` crate. Thanks to @t.ellmenreich for making me aware of that! Slipped through on my end. [0] https://lore.proxmox.com/pve-devel/20260817125907.878237-1-c.heiss@prox= mox.com/ On Wed Aug 26, 2026 at 1:04 PM CEST, Christoph Heiss wrote: > Adds a new checkbox to the "Authentication" tab of the wizard for > creating/editing prepared auto-installer answers. > > When checked, the installer (in the post-hook) will create a new API > token on the freshly installed system - akin to how PDM does it when > creating a new token - and adds it a remote. > > Of course; only supported when installing PVE or PBS, as these are the > supported targets of PDM. > > The post-hook information schema (which is sent back to the answer > server) is expanded a bit to accommodate that with two new fields: > > - `cert-fingerprint`: The SHA256 fingerprint for the API, needed due to > the default self-signed certificates. > - `api-token`: Holds the ID of the created token and its secret. > > Apply order > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > Same as the repo order in the patch series, i.e. the `proxmox` part > first, then `pve-installer` and `proxmox-datacenter-manager` need their > dependency on `proxmox-installer-types` bumped accordingly. > > Testing > =3D=3D=3D=3D=3D=3D=3D > > I've tested both following combinations; each with all products as > possible: > > - Current PDM (1.1.7) with patched ISOs (i.e. w/ patches from this > series) > - Patched PDM (i.e. w/ patches from this series) with current ISOs > (PVE 9.2-1, PBS 4.2-1, PMG 9.1-1, PDM 1.1-1) > - Patched PDM w/ patched ISOs > > History > =3D=3D=3D=3D=3D=3D=3D > > v1: https://lore.proxmox.com/pdm-devel/20260731143910.936881-1-c.heiss@pr= oxmox.com/ > > Notable changes v1 -> v2: > * rebased all on latest masters > * addressed review comments from Lukas > > Diffstat > =3D=3D=3D=3D=3D=3D=3D=3D > > proxmox: > > Christoph Heiss (5): > installer-types: drop unnecessary clippy attribute > installer-types: post-hook: factor schema version into proper struct > installer-types: post-hook: allow additional properties on api schema > installer-types: post-hook: add api-token and cert-fingerprint options > installer-types: systeminfo: add check for API token creation > capability > > proxmox-installer-types/Cargo.toml | 1 + > proxmox-installer-types/debian/control | 4 ++ > proxmox-installer-types/src/answer.rs | 65 +++++++++++++++-- > proxmox-installer-types/src/lib.rs | 89 +++++++++++++++++++++++- > proxmox-installer-types/src/post_hook.rs | 50 +++++++++++-- > 5 files changed, 196 insertions(+), 13 deletions(-) > > pve-installer: > > Christoph Heiss (6): > chroot: print full error if bind-mounting fails > post-hook: re-use low-level config retrieval from proxmox-chroot > post-hook: generate and retrieve node certificate fingerprint > post-hook: support creating API token if requested in answer file > auto: enforce https for post hook when generating an API token > assistant: validate-answer: also verify post-hook settings if set > > Cargo.toml | 6 +- > debian/control | 1 + > proxmox-auto-install-assistant/src/main.rs | 7 +- > proxmox-auto-installer/src/utils.rs | 16 +- > proxmox-chroot/src/main.rs | 16 +- > proxmox-installer-common/Cargo.toml | 4 +- > proxmox-installer-common/src/setup.rs | 12 + > proxmox-post-hook/Cargo.toml | 5 +- > proxmox-post-hook/src/main.rs | 291 ++++++++++++++++++++- > 9 files changed, 327 insertions(+), 31 deletions(-) > > proxmox-datacenter-manager: > > Christoph Heiss (5): > ui: auto-installer: spell out Proxmox Datacenter Manager > config: auto-install: add optional `post-hook-add-as-remote` field > api: auto-installer: add option for adding new remotes to PDM > ui: auto-installer: wizard: add checkbox to add target as new remote > docs: auto-installer: document adding targets as remotes afterwards > > docs/automated-installations.rst | 39 ++++- > lib/pdm-api-types/src/auto_installer.rs | 10 ++ > lib/pdm-config/src/auto_install.rs | 14 ++ > server/src/api/auto_installer/mod.rs | 157 +++++++++++++++--- > .../prepared_answer_add_wizard.rs | 1 + > .../auto_installer/prepared_answer_form.rs | 9 +- > 6 files changed, 205 insertions(+), 25 deletions(-)