Prove the distributions, and ask the runtime question at the right time

install-local now passes on Debian 13, Ubuntu 24.04, Fedora 43, Rocky 9 and
Arch: twenty checks each, ending with a sign-in to the webmail the installer
put there. Two of those five have no docker at all and went through podman,
with the same compose file and the same plugin.

The case had a bug the first four runs could not show. It chose between
docker and podman once, at the top of the script -- on a machine that starts
with neither and installs one halfway through. Debian passed because that run
predates the helper; Fedora and Rocky passed because podman was the right
answer anyway; Ubuntu was the first machine where the answer changed
underneath it, and it drove compose at a podman socket that was never going
to exist. The question is asked at each call now.

Worth keeping in mind for the installer proper, which had the same shape of
bug a day earlier: anything learned before dependencies are installed is
learned too early.
This commit is contained in:
2026-09-24 08:11:57 -07:00
parent c78847440d
commit b6bc126651
2 changed files with 24 additions and 18 deletions
+12 -9
View File
@@ -30,16 +30,19 @@ DIR=/var/lib/inbuxa
# Whichever runtime this machine has. The installer picks docker where there
# is one and podman on the Red Hat family; a case that says "docker" only
# tests half the distributions it is run on.
if command -v docker >/dev/null 2>&1; then
RT=docker
compose() { docker compose -f "$DIR/compose.yaml" "$@"; }
else
RT=podman
compose() {
#
# Asked at each call, not once at the top: these cases start on a machine
# with no runtime at all and install one along the way, so anything decided
# up here is decided before the answer exists.
rt() { command -v docker >/dev/null 2>&1 && echo docker || echo podman; }
compose() {
if [ "$(rt)" = docker ]; then
docker compose -f "$DIR/compose.yaml" "$@"
else
DOCKER_HOST=unix:///run/podman/podman.sock \
/usr/local/lib/docker/cli-plugins/docker-compose -f "$DIR/compose.yaml" "$@"
}
fi
fi
}
WORK=/tmp/lab
LABNET=inbuxa-e2e
LABSUBNET=172.31.254.0/24
@@ -159,7 +162,7 @@ CODE=$(curl -s -o /dev/null -w '%{http_code}' --cacert "$WORK/chain.pem" --resol
echo
echo "==> and nothing was left behind that should not be"
ENVOUT="$($RT inspect --format '{{range .Config.Env}}{{println .}}{{end}}' "$(compose ps -q server)")"
ENVOUT="$("$(rt)" inspect --format '{{range .Config.Env}}{{println .}}{{end}}' "$(compose ps -q server)")"
grep -q "RECOVERY_ADMIN" <<<"$ENVOUT" && bad "the server still carries a recovery admin" || ok "no recovery admin on the server"
echo