m7_smoke_runner.sh 1013 B

1234567891011121314151617181920212223242526272829
  1. #!/usr/bin/env bash
  2. # M7 smoke runner: stops the archiverd service first to release the
  3. # advisory lock, then runs the canonical 4-step M7 smoke.
  4. #
  5. # This wrapper exists because:
  6. # - The archiverd compose service runs in an hourly loop with first-run
  7. # immediate, so it would race the smoke's one-shot exec for the
  8. # pg_try_advisory_lock(0xBA21B0DA). Only one wins per cycle, and the
  9. # smoke needs the deterministic one.
  10. # - The canonical smoke (scripts/m7_smoke.sh) hardcodes the project
  11. # prefix `broad-announce-` and uses `docker exec` + `curl localhost`
  12. # which all resolve correctly on a remote host that has the stack up
  13. # under that compose project name.
  14. #
  15. # Usage:
  16. # cd /root/broad-announce
  17. # bash scripts/m7_smoke_runner.sh
  18. #
  19. # Exits with the smoke's exit code.
  20. set -e
  21. cd "$(dirname "$0")/.."
  22. echo "=== pre-smoke: stop archiverd (release the advisory lock) ==="
  23. docker compose stop archiverd 2>&1 | tail -3
  24. echo
  25. echo "=== run the M7 smoke ==="
  26. bash scripts/m7_smoke.sh