Repository navigation
test: the boot test asserts the database hooks and the cluster after first boot - #17
Open
marcos-mendez wants to merge 1 commit into
Open
marcos-mendez wants to merge 1 commit into
marcos-mendez wants to merge 1 commit into
Conversation
…first boot On the step 12 image of 2026-10-09, postgresql@17-main started before keel-host-keys made the snakeoil certificate and stopped. 35pgsqlpass and 36pgsqlverify failed, then 36pgsqlverify started the cluster again, so the cluster was active at the end. The boot test failed only later, on the declared password. Reproduced on the published layer with keel-host-keys made 10 s slower. tests/boot-test.sh now checks, after the first boot: - bt_db_hooks_verdict: 35pgsqlpass and 36pgsqlverify completed, from /var/log/inithooks.log; - bt_cluster_verdict: there is a cluster unit (systemctl list-units postgresql@*.service) and every cluster is active (running). Seven new tests in tests/boot-test.bats; tests/lib/boot-test-lib.sh stays at 100 percent. The fix is Keel-Linux/inithooks#45.
marcos-mendez
force-pushed
the
test/cluster-active-after-first-boot
branch
from
October 10, 2026 19:26
7d134e0 to
df7b21f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
[email protected]instance 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.