Skip to content

Instantly share code, notes, and snippets.

@liweinan
Created January 29, 2026 15:11
Show Gist options
  • Select an option

  • Save liweinan/9d65abf9759370f141d4eec93fa7de17 to your computer and use it in GitHub Desktop.

Select an option

Save liweinan/9d65abf9759370f141d4eec93fa7de17 to your computer and use it in GitHub Desktop.
quick-test.sh
#!/bin/bash
# Quick test script for OCPBUGS-69923
# Usage: ./quick-test.sh [pull-secret-file] [iterations]
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PULL_SECRET="${1:-$HOME/works/oc-swarm/openshift-versions/auth.json}"
ITERATIONS="${2:-5}"
echo "Quick Zone Consistency Test"
echo "============================"
echo "Installer: $SCRIPT_DIR/openshift-install"
echo "Pull Secret: $PULL_SECRET"
echo "Iterations: $ITERATIONS"
echo ""
exec "$SCRIPT_DIR/test-zone-consistency-local.sh" \
"$SCRIPT_DIR/openshift-install" \
"$PULL_SECRET" \
"qe.devcluster.openshift.com" \
"us-east-1" \
"$ITERATIONS"
@liweinan
Copy link
Author

weli@tower ~/works/oc-swarm/installer/bin (release-4.20) 
❯ cd /Users/weli/works/oc-swarm/installer/bin && ./quick-test.sh ~/works/oc-swarm/openshift-versions/auth.json 2
Quick Zone Consistency Test
============================
Installer: /Users/weli/works/oc-swarm/installer/bin/openshift-install
Pull Secret: /Users/weli/works/oc-swarm/openshift-versions/auth.json
Iterations: 2

==========================================
OCPBUGS-69923 Zone Consistency Test
==========================================
Installer: /Users/weli/works/oc-swarm/installer/bin/openshift-install
/Users/weli/works/oc-swarm/installer/bin/openshift-install unreleased-master-12138-g4068682841f807383c1ada67691f53cd1f2022bc-dirty
built from commit 4068682841f807383c1ada67691f53cd1f2022bc
release image registry.ci.openshift.org/origin/release:4.20
release architecture unknown
default architecture amd64

Region: us-east-1
Base Domain: qe.devcluster.openshift.com
Iterations: 2
Work directory: /tmp/test-zone-consistency
Artifact directory: /tmp/test-zone-consistency-artifacts
==========================================

==========================================
Iteration 1/2
==========================================
  Generating manifests...
WARNING Release Image Architecture not detected. Release Image Architecture is unknown 
INFO Credentials loaded from the "default" profile in file "/Users/weli/.aws/credentials" 
INFO Credentials loaded from the AWS config using "SharedConfigCredentials: /Users/weli/.aws/credentials" provider 
INFO Consuming Install Config from target directory 
INFO Successfully populated MCS CA cert information: root-ca 2036-01-27T15:00:04Z 2026-01-29T15:00:04Z 
INFO Successfully populated MCS TLS cert information: root-ca 2036-01-27T15:00:04Z 2026-01-29T15:00:04Z 
INFO Adding clusters...                           
INFO Manifests created in: /tmp/test-zone-consistency/cluster-api, /tmp/test-zone-consistency/manifests and /tmp/test-zone-consistency/openshift 
  CAPI zones (from cluster-api/machines/10_inframachine_*): us-east-1f us-east-1a us-east-1b
  MAPI zones (from ControlPlaneMachineSet failureDomains): us-east-1c us-east-1d us-east-1f
  ✗ FAIL: zones mismatch - CAPI and MAPI have different zone assignments
  ERROR DETAILS:
    Position 1: CAPI has 'us-east-1f' but MAPI has 'us-east-1c'
    Position 2: CAPI has 'us-east-1a' but MAPI has 'us-east-1d'
    Position 3: CAPI has 'us-east-1b' but MAPI has 'us-east-1f'
  Saving manifests to /tmp/test-zone-consistency-artifacts/iteration-1 for debugging...

==========================================
Iteration 2/2
==========================================
  Generating manifests...
WARNING Release Image Architecture not detected. Release Image Architecture is unknown 
INFO Credentials loaded from the "default" profile in file "/Users/weli/.aws/credentials" 
INFO Credentials loaded from the AWS config using "SharedConfigCredentials: /Users/weli/.aws/credentials" provider 
INFO Consuming Install Config from target directory 
INFO Successfully populated MCS CA cert information: root-ca 2036-01-27T15:00:19Z 2026-01-29T15:00:19Z 
INFO Successfully populated MCS TLS cert information: root-ca 2036-01-27T15:00:19Z 2026-01-29T15:00:19Z 
INFO Adding clusters...                           
INFO Manifests created in: /tmp/test-zone-consistency/cluster-api, /tmp/test-zone-consistency/manifests and /tmp/test-zone-consistency/openshift 
  CAPI zones (from cluster-api/machines/10_inframachine_*): us-east-1b us-east-1c us-east-1d
  MAPI zones (from ControlPlaneMachineSet failureDomains): us-east-1f us-east-1a us-east-1b
  ✗ FAIL: zones mismatch - CAPI and MAPI have different zone assignments
  ERROR DETAILS:
    Position 1: CAPI has 'us-east-1b' but MAPI has 'us-east-1f'
    Position 2: CAPI has 'us-east-1c' but MAPI has 'us-east-1a'
    Position 3: CAPI has 'us-east-1d' but MAPI has 'us-east-1b'
  Saving manifests to /tmp/test-zone-consistency-artifacts/iteration-2 for debugging...


==========================================
Final Result: 2 iterations completed
FAIL: 2/2 iterations had zone mismatches (OCPBUGS-69923)
Failure rate: 100.00%

Manifest artifacts saved to /tmp/test-zone-consistency-artifacts for debugging

To inspect failed manifests:
  ls -la /tmp/test-zone-consistency-artifacts/iteration-*/
  cat /tmp/test-zone-consistency-artifacts/iteration-*/control-plane-machine-set.yaml
  ls /tmp/test-zone-consistency-artifacts/iteration-*/capi-machines/
==========================================

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment