Files
computer-playbook/scripts/tests/workspace/swarm/02_zombie.sh
kevinveenbirkenbachandClaude Opus 5 3d93c81f70 fix(workspace): give the swarm track the teardown boundaries the old suite had
The split left the swarm track without any teardown: a `base swarm` run
started the development stack in base/04_bootstrap.sh and never brought it
down, so it leaked AppArmor, dev DNS and IPv6 state onto the host and ran
the swarm cluster alongside a live dev stack the old suite had already
released.

The old single job ran `make compose-down` + `make environment-teardown`
as step 10, immediately before 12_swarm.sh and 13_roundtrip.sh. The swarm
track now reproduces exactly that: 01_teardown releases the stack before
02_zombie and 03_roundtrip (which are byte-identical to the old steps apart
from their source path), and 04_teardown leaves the host clean — something
the old suite never did, since it ended on the roundtrip's restarted stack.

Both closing steps and the new leading one share utils/teardown.sh so the
teardown cannot drift between tracks.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-10 23:44:11 +02:00

22 lines
880 B
Bash
Executable File

#!/usr/bin/env bash
# Swarm-specific deploy of the MariaDB database role (svc-db-mariadb) via the swarm-* make targets.
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# shellcheck source=scripts/tests/workspace/utils/common.sh
source "${SCRIPT_DIR}/../utils/common.sh"
cd "${REPO_ROOT}"
node_image="$(bash scripts/meta/resolve/image/local.sh):${INFINITO_IMAGE_TAG:?}"
docker image inspect "${node_image}" >/dev/null 2>&1 || {
echo "FAILURE: ${node_image} is missing. 03_build.sh builds it for ${INFINITO_DISTRO:?}; the swarm nodes must run that image, not a published one." >&2
exit 1
}
echo "Deploying the MariaDB database role ${MARIADB_APP} on a throwaway swarm cluster."
make swarm-zombie app="${MARIADB_APP}" disable="$(variable_services mariadb node nfs-server)"
echo "Releasing the swarm cluster."
make swarm-down name="${MARIADB_APP}"