all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: "Michael Köppl" <m.koeppl@proxmox.com>
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	[thread overview]
Message-ID: <20261201145817.894414-1-m.koeppl@proxmox.com> (raw)

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




             reply	other threads:[~2026-12-01 14:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-01 14:58 Michael Köppl [this message]
2026-12-01 14:58 ` [PATCH test-tools 1/8] readme: drop token fields from the hook config example Michael Köppl
2026-12-01 14:58 ` [PATCH test-tools 2/8] instance: ship generic hook scripts Michael Köppl
2026-12-01 14:58 ` [PATCH test-tools 3/8] instance: distinguish builtin hooks from hook files Michael Köppl
2026-12-01 14:58 ` [PATCH test-tools 4/8] instance: add hooks that run once a cluster is formed Michael Köppl
2026-12-01 14:58 ` [PATCH test-tools 5/8] instance: cli: run a script once for a whole cluster Michael Köppl
2026-12-01 14:58 ` [PATCH test-tools 6/8] instance: add a builtin hook to set up a Ceph cluster Michael Köppl
2026-12-01 14:58 ` [PATCH e2e-tests 7/8] plans: use the hook scripts shipped with proxmox-test-instance Michael Köppl
2026-12-01 14:58 ` [PATCH e2e-tests 8/8] scripts: drop the scripts now shipped by proxmox-test-instance Michael Köppl

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=20261201145817.894414-1-m.koeppl@proxmox.com \
    --to=m.koeppl@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal