mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-06 10:59:59 +00:00
routine/08_cleanup.sh becomes utils/clean/teardown.sh and topology/ becomes utils/topology/ so routine/ holds only the sequenced flow; all consumers (workflow steps, compose/swarm.yml env guards, relative sources, README) follow. The shell rescue collector and its lint are gone: utils/diagnostics/container.py covers compose and swarm identically. extend_inventory gains the backup-host placements the DR drill deploys. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
19 lines
594 B
Bash
Executable File
19 lines
594 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
# shellcheck source=scripts/tests/deploy/swarm/utils/topology/base.sh
|
|
. "$(dirname "$0")/../swarm/utils/topology/base.sh"
|
|
|
|
node="${node:-${MGR}}"
|
|
|
|
if ! docker inspect --format '{{.State.Running}}' "${node}" 2>/dev/null | grep -q '^true$'; then
|
|
echo "ERROR: container '${node}' is not running." >&2
|
|
echo "Available swarm-test containers (if any):" >&2
|
|
docker ps --format ' {{.Names}}\t{{.Status}}' |
|
|
grep -E 'swarm-|nfs-server' >&2 ||
|
|
echo " (none — run \`make swarm-zombie app=<id>\` first)" >&2
|
|
exit 1
|
|
fi
|
|
|
|
exec docker exec -it "${node}" bash
|