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 841AE1FF09F for ; Tue, 01 Dec 2026 15:59:12 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 021E321777; Tue, 01 Dec 2026 15:58:32 +0100 (CET) From: =?UTF-8?q?Michael=20K=C3=B6ppl?= To: pve-devel@lists.proxmox.com Subject: [PATCH e2e-tests/test-tools 0/8] instance: rework hooks and set up Ceph as a cluster hook Date: Tue, 1 Dec 2026 15:58:09 +0100 Message-ID: <20261201145817.894414-1-m.koeppl@proxmox.com> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1796137099043 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.172 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: IM3JCCUOXYOH3JFV5HT3BQ3Q5RMXOGOD X-Message-ID-Hash: IM3JCCUOXYOH3JFV5HT3BQ3Q5RMXOGOD X-MailFrom: m.koeppl@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 VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: So far, post_setup hooks were plain command lines resolved against the current dir of proxmox-test-instance. Under proxmox-test-scheduler, that is the home dir of the SSH user, so plans only found their scripts if they happened to be placed there. The scripts also lived in proxmox-e2e-tests, even though nothing in them is specific to E2E tests. 1/8 drops the outdated token fields from the hook config example in the README. 2/8, 3/8 ship the generic scripts with proxmox-test-instance and let a hook either name such a builtin, as in Builtin("update-packages pve staging"), or a script of its own, as in File("../scripts/setup-ldap.sh"), resolved relative to the plan file. 4/8 adds post_cluster hooks, which run once for a whole cluster after it has been formed, with all of its nodes in $CONFIG_PATH. 5/8 adds `run-script --cluster`, which does the same for clusters formed manually with create-cluster. 6/8 adds the setup-ceph builtin, a cluster hook that installs Ceph on all nodes, configures the Ceph networks on a spare NIC and creates a monitor, a manager and OSDs on every node, optionally with a pool and an RBD storage: post_cluster: [ Builtin("setup-ceph --pool rbd"), ], As a hook, it needs no Ceph-specific plan options, and it works for manually formed clusters through `run-script --cluster` as well. Plain string hooks are no longer accepted. 7/8 converts the plans in proxmox-e2e-tests to Builtin(...) and File(...), and 8/8 removes the scripts moved to proxmox-test-instance. The Ceph tests keep setting up Ceph themselves, so their plan only uses the install-ceph builtin rather than setup-ceph. Tested with a 3-node plan using Builtin("setup-ceph --pool rbd"). Also tested setup --no-cluster, create-cluster and run-script --cluster with the same plan. Also installed the patched packages on one of the e2e test hosts and had it do a couple of runs, which all worked as expected. Dependency note: The proxmox-e2e-tests changes require a versioned dependency on the new proxmox-test-instance version. test-tools: Michael Köppl (6): readme: drop token fields from the hook config example instance: ship generic hook scripts instance: distinguish builtin hooks from hook files instance: add hooks that run once a cluster is formed instance: cli: run a script once for a whole cluster instance: add a builtin hook to set up a Ceph cluster Makefile | 2 +- README.md | 98 +++++++- debian/proxmox-test-instance.install | 1 + proxmox-test-instance/src/cli.rs | 41 ++- proxmox-test-instance/src/config.rs | 56 ++++- .../src/instance_manager/mod.rs | 202 +++++++++++++-- scripts/download-cloud-image.sh | 21 ++ scripts/download-container-image.sh | 22 ++ scripts/install-ceph.sh | 13 + scripts/setup-ceph.sh | 234 ++++++++++++++++++ scripts/setup-frr.sh | 18 ++ scripts/setup-zfs-storage.sh | 64 +++++ scripts/update-packages.sh | 69 ++++++ 13 files changed, 812 insertions(+), 29 deletions(-) create mode 100755 scripts/download-cloud-image.sh create mode 100755 scripts/download-container-image.sh create mode 100755 scripts/install-ceph.sh create mode 100755 scripts/setup-ceph.sh create mode 100755 scripts/setup-frr.sh create mode 100755 scripts/setup-zfs-storage.sh create mode 100755 scripts/update-packages.sh e2e-tests: Michael Köppl (2): plans: use the hook scripts shipped with proxmox-test-instance scripts: drop the scripts now shipped by proxmox-test-instance plans/complete.ron | 46 +++++++++---------- plans/pbs.ron | 6 +-- plans/sdn.ron | 18 ++++---- scripts/download-cloud-image.sh | 21 --------- scripts/download-container-image.sh | 22 --------- scripts/install-ceph.sh | 13 ------ scripts/setup-frr.sh | 18 -------- scripts/setup-zfs-storage.sh | 65 --------------------------- scripts/update-packages.sh | 69 ----------------------------- tests/pve_replication.pl | 2 +- 10 files changed, 36 insertions(+), 244 deletions(-) delete mode 100755 scripts/download-cloud-image.sh delete mode 100755 scripts/download-container-image.sh delete mode 100755 scripts/install-ceph.sh delete mode 100755 scripts/setup-frr.sh delete mode 100755 scripts/setup-zfs-storage.sh delete mode 100755 scripts/update-packages.sh Summary over all repositories: 23 files changed, 848 insertions(+), 273 deletions(-) -- Generated by murpp 0.12.1