test: the boot test asserts the database hooks and the cluster after first boot #17
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Keel-Linux/keel-postgresql!17
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "test/cluster-active-after-first-boot"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
On the step 12 image (2026-10-09),
postgresql@17-mainstarted beforekeel-host-keysmade the snakeoil certificate and stopped (FATAL: could not load server certificate file "/etc/ssl/certs/ssl-cert-snakeoil.pem").35pgsqlpassand36pgsqlverifyfailed. Then36pgsqlverifystarted the cluster again, so the cluster was active at the end, and the boot test failed only later, on the declared password.Reproduced on the published layer in LXC, with
keel-host-keysmade 10 s slower: the same FATAL, the same two hook failures, the cluster active at the end. The cluster waits only fornetwork.target, so it is a race between the network andkeel-host-keys.Change
After the first boot,
tests/boot-test.shnow checks:bt_db_hooks_verdict:35pgsqlpassand36pgsqlverifycompleted, from/var/log/inithooks.log. A cluster that is active at the end is not sufficient (see above).bt_cluster_verdict: there is a cluster unit (systemctl list-units --all postgresql@*.service), and every cluster isactive (running).Seven new tests in
tests/boot-test.bats;tests/lib/boot-test-lib.shstays at 100 percent (173/173). This change is to tests only, so there is no changelog entry and no version bump.Fix
Keel-Linux/inithooks#45 orders every
postgresql@.serviceinstance afterkeel-host-keys.service. With that drop-in in the same slow rootfs, both hooks complete and the cluster starts after the certificate exists. Theappliance / boot-published-layercheck boots the published layer upgraded from trixie-testing. Thus it fails until inithooks 2.3.6+keel26 is in the archive. It fails on main now for the same cause.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.