e7ab963ae3
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (push) Successful in 1s
CI/CD Pipeline / Check push changed paths (push) Successful in 6s
CI/CD Pipeline / Build Staging Web Image (push) Successful in 31s
CI/CD Pipeline / Build Staging API Image (push) Successful in 34s
CI/CD Pipeline / Build Staging Worker Image (push) Successful in 42s
CI/CD Pipeline / Validate - Python (mypy + alembic) (push) Successful in 2m3s
CI/CD Pipeline / Integration Tests (push) Successful in 2m29s
CI/CD Pipeline / Validate - Style (push) Successful in 3m19s
CI/CD Pipeline / Frontend Unit Tests (push) Successful in 3m45s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Successful in 1m53s
CI/CD Pipeline / ACR Image Cleanup (push) Successful in 1m53s
CI/CD Pipeline / Staging E2E Tests (push) Failing after 3m1s
CI/CD Pipeline / Staging API Integration Tests (push) Successful in 4m14s
CI/CD Pipeline / Unit Tests (push) Successful in 9m15s
CI/CD Pipeline / Validate - Security (push) Successful in 9m34s
CI/CD Pipeline / Production Browser E2E (push) Has been skipped
CI/CD Pipeline / Deploy Production (push) Failing after 124h2m20s
CI/CD Pipeline / Build Production Web Image (push) Failing after 124h2m24s
CI/CD Pipeline / Retag skipped Staging Web Image (push) Failing after 124h9m10s
CI/CD Pipeline / PR Build Web Image (push) Failing after 124h11m57s
CI/CD Pipeline / PR Build API Image (push) Failing after 124h11m42s
CI/CD Pipeline / Build Production API Image (push) Failing after 124h2m9s
CI/CD Pipeline / CI Gate (push) Failing after 124h2m9s
CI/CD Pipeline / Build Production Worker Image (push) Failing after 124h2m9s
CI/CD Pipeline / Canary Release to Production (push) Failing after 124h2m5s
CI/CD Pipeline / Retag skipped Staging Worker Image (push) Failing after 124h8m54s
CI/CD Pipeline / Retag skipped Staging API Image (push) Failing after 124h8m55s
CI/CD Pipeline / PR Build Worker Image (push) Failing after 124h11m41s
CI/CD Pipeline / Frontend Lint (push) Failing after 124h11m42s
CI/CD Pipeline / Check if frontend-only change (push) Failing after 124h11m47s
Co-authored-by: xiaoxia <dev@xiaoxiajianji.com> Co-committed-by: xiaoxia <dev@xiaoxiajianji.com>
61 lines
2.6 KiB
YAML
61 lines
2.6 KiB
YAML
name: "Debug: Web container v2 (mount conflict)"
|
|
on:
|
|
push:
|
|
branches: [debug/web-crash-v2]
|
|
workflow_dispatch:
|
|
jobs:
|
|
web-diag:
|
|
runs-on: runtime-builder
|
|
timeout-minutes: 10
|
|
steps:
|
|
- name: Setup SSH and diagnose
|
|
shell: bash
|
|
env:
|
|
STAGING_SSH_KEY: ${{ secrets.PREVIEW_SSH_KEY }}
|
|
run: |
|
|
set -x
|
|
which ssh || (apt-get update -qq && apt-get install -y -qq openssh-client)
|
|
mkdir -p ~/.ssh && chmod 700 ~/.ssh
|
|
printf "%s" "$STAGING_SSH_KEY" > ~/.ssh/id_rsa
|
|
chmod 600 ~/.ssh/id_rsa
|
|
H=47.98.113.167; P=22222
|
|
ssh-keyscan -p $P -H $H >> ~/.ssh/known_hosts 2>/dev/null
|
|
ssh -p $P -i ~/.ssh/id_rsa -o StrictHostKeyChecking=no root@$H 'bash -s' <<'REMOTE'
|
|
set -x
|
|
echo "=== Current staging containers ==="
|
|
docker ps -a --filter name=xiaoxia-*-staging --format "table {{.Names}}\t{{.Status}}\t{{.Image}}"
|
|
echo ""
|
|
echo "=== Web container logs (current/current-rolledback) ==="
|
|
docker logs xiaoxia-web-staging 2>&1 | tail -40
|
|
echo ""
|
|
echo "=== Web inspect: env & mounts ==="
|
|
docker inspect xiaoxia-web-staging --format 'Entrypoint: {{.Config.Entrypoint}} Cmd: {{.Config.Cmd}}'
|
|
docker inspect xiaoxia-web-staging --format '{{range .Config.Env}}{{.}}{{"\n"}}{{end}}' | grep -E "APP_ENV|VERSION"
|
|
echo "Mounts:"
|
|
docker inspect xiaoxia-web-staging --format '{{range .Mounts}}{{.Type}} {{.Source}} -> {{.Destination}} (rw={{.RW}}){{"\n"}}{{end}}'
|
|
echo ""
|
|
echo "=== Reproduce: rm on read-only bind mount ==="
|
|
docker run --rm --name nginx-ro-test \
|
|
-v /var/lib/xiaoxia-saas-staging/nginx-staging.conf:/etc/nginx/conf.d/default.conf:ro \
|
|
git.xiaoxiajianji.com/xiaoxia/xiaoxia-saas/xiaoxia-saas-web:387514c \
|
|
sh -c '
|
|
set -x
|
|
echo "Before:"
|
|
ls -la /etc/nginx/conf.d/
|
|
echo "Try rm (as entrypoint does):"
|
|
rm -f /etc/nginx/conf.d/default.conf
|
|
echo "rm exitcode=$?"
|
|
echo "After rm:"
|
|
ls -la /etc/nginx/conf.d/
|
|
echo "Test ln:"
|
|
ln -s /etc/nginx/nginx-staging.conf /etc/nginx/conf.d/default.conf
|
|
echo "ln exitcode=$?"
|
|
ls -la /etc/nginx/conf.d/
|
|
echo "nginx -t:"
|
|
nginx -t 2>&1
|
|
' 2>&1
|
|
echo ""
|
|
echo "=== Also test with NEW fixed image (9c0d4b1 if present) ==="
|
|
docker images | grep xiaoxia-saas-web | head -5
|
|
REMOTE
|