Two node boot test in the gate, before replication ships #4
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/tracker#4
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
The appliance gate boots one container. Replication cannot be proved that way,
and handbook decision 0013 says plainly that if this cannot be tested in the
gate then the replication work should not be built: an untested replication
feature in an appliance people trust with data is worse than no feature.
Today
test-appliance.ymlinKeel-Linux/.githubpulls a published layer,assembles it, boots one container on the self hosted runner and runs the
repository's
tests/boot-test.sh. What is needed is the same for twocontainers on the same bridge, with each one's role given to it, and a way for
the test to wait for the second to be reachable from the first over IPv6
without either of them being configured by hand.
Closes when a gate run boots two containers from the same published layer,
configures one as primary and one as replica, writes on the primary, reads the
same row on the replica, and tears both down whatever the outcome. Galera later
needs three, so the shape must not assume exactly two.
Touches
Keel-Linux/.github(the reusable workflow), the runner's sudo policyon the public services VM, and each database appliance's boot test.
Depends on nothing. Blocks the console modes on all three database engines.
Done. The gate boots as many containers as a caller declares, and replication
between two of them is proved in it.
Keel-Linux/.github#9, merged: therolesinput ontest-appliance.ymland
lib/boot-test-nodes.sh, the shared topology logic, at 100 percent(164/164 lines, 39 new bats tests).
tests/coverage.shthere now measureslib/besidebin/.Keel-Linux/keel-mariadb#7, merged:roles: primary replicain the caller,the boot test running its whole check set on every node, and the replication
phase. Its library stays at 100 percent (248/248, 24 new tests).
it (2026-09-27)".
The interface
roles, a space separated list of role names, one per node, in the caller'sown workflow beside
applianceandparent. The count is the number of names,so
galera galera galerais three for phase 4 and nothing assumes two;repeats are allowed because Galera nodes share a role.
A node learns which one it is from
/etc/keel/node.envin its own rootfs, andgets
/etc/keel/peers.envwith every node's literal IPv6 address once thebridge has handed them out. A file in its own filesystem, which is how every
other appliance setting arrives, and the seam the console modes take over when
the instance description carries the role. The test addresses another node by
literal IPv6 address and never by a name, because on Debian a name resolves to
IPv4 alone.
The run
keel-mariadb run 36314204371,
appliance / build-and-boot1m18s: twocontainers from the published
mariadblayer (0adca434oncore7acf2c53), assembled in 16s and 14s, both addressed fromlxcbr06s afterstart, both first boots done 16s after start. On each node: the declared
password authenticated,
webmin-mysqlinstalled, Webmin 200,keel diff6same and 0 drift. Then each node's 3306 answered from the other over IPv6,
Slave_running ON, and the row written on the primary read back from thereplica from the primary container by an account whose password the
description declared.
What is hand configuration
All of the phase, deliberately. The table in keel-mariadb's
tests/README.mdputs each piece next to the console screen of 0013 that will own it: the role
file against the instance description of phase 2; the MariaDB drop-in
(
server_id, the bind address gaining this node's own literal global address,log_binon the primary alone) against the Primary and Replica screens; thereplication account against the Primary screen;
CHANGE MASTER TO ... MASTER_USE_GTID=slave_posagainst the Replica screen. Accounts are authorisedfor the peer's /64 rather than one address, which is what 0013 already recorded
about credentials between nodes.
The sudo policy needed no widening
keel-ci-cleanuptakes one container and one tree and does both in one call,so calling it per node would delete the configuration of the nodes not stopped
yet. The teardown therefore stops every container LXC reports in the run's own
lxcpath with
lxc-stopandlxc-destroy, which are already in/etc/sudoers.d/runner, and then makes the onekeel-ci-cleanupcall thatremoves the tree. Nothing on the public services VM was changed.
Teardown runs on a cancelled run too: the boot test traps
INTandTERMaswell as
EXIT, and the workflow step isif: always(). It reports how manycontainer monitors of the run are still alive; both runs reported 0.
Cancellation, measured rather than asserted
On a throwaway branch, run 36315031422 was cancelled with both containers up
and the boot test mid check. The
always()step stopped and destroyed both,keel-ci-cleanupremoved the tree, and 0 container monitors were left, fourseconds after the cancellation; watched from outside the job at the same time,
2 monitors and 1 tree at 11:14:09, 0 monitors at 11:14:25, 0 trees at 11:14:30.
That check corrected something worth knowing: the boot test's own traps do
not fire on a cancelled job. It runs as root through
sudo keel-ci-boot-test, and the unprivilegedrunneruser cannot signal a rootchild, so the workflow step is what does the work. The traps still matter for a
run started by hand, where the signal reaches the process.
One note for whoever picks up phase 3 for PostgreSQL: the digest in this issue,
d5220c56, is the postgresql layer. The publishedmariadblayer is0adca434on the same parentcore7acf2c53, and that is what was used.PostgreSQL's own two node phase is the next step and is still waiting on its
rebuilt layer being published.