|
91 | 91 |
|
92 | 92 | exit $? |
93 | 93 |
|
| 94 | + - name: debug pgstac-eoapiuser-permissions-upgrade job failure |
| 95 | + if: steps.helm-render-install-eoapi-templates.outcome == 'failure' |
| 96 | + continue-on-error: true |
| 97 | + run: | |
| 98 | + echo "Extracting pgstac-eoapiuser-permissions-upgrade job info and logs for debugging..." |
| 99 | + |
| 100 | + # Get job details |
| 101 | + echo "===== pgstac-eoapiuser-permissions-upgrade Job Details =====" |
| 102 | + kubectl get job pgstac-eoapiuser-permissions-upgrade -o yaml || echo "Could not get job details" |
| 103 | + |
| 104 | + # Get pod details |
| 105 | + echo "===== Pod Details =====" |
| 106 | + kubectl get pods --selector=app=pgstac-eoapiuser-permissions-upgrade -o wide || echo "Could not find pods" |
| 107 | + |
| 108 | + # Extract logs from pods |
| 109 | + echo "===== Pod Logs =====" |
| 110 | + PODS=$(kubectl get pods --selector=app=pgstac-eoapiuser-permissions-upgrade -o jsonpath='{.items[*].metadata.name}' 2>/dev/null) |
| 111 | + if [ -n "$PODS" ]; then |
| 112 | + for POD in $PODS; do |
| 113 | + echo "--- Logs from pod $POD ---" |
| 114 | + kubectl logs $POD --previous || true # Get logs from previous container if it exists |
| 115 | + kubectl logs $POD || echo "Could not get logs from pod $POD" |
| 116 | + done |
| 117 | + else |
| 118 | + echo "No pods found for pgstac-eoapiuser-permissions-upgrade job" |
| 119 | + fi |
| 120 | + |
| 121 | + # Get pod descriptions for more details |
| 122 | + echo "===== Pod Descriptions =====" |
| 123 | + kubectl describe pods --selector=app=pgstac-eoapiuser-permissions-upgrade || echo "Could not describe pods" |
| 124 | + |
| 125 | + # Check the configmap contents |
| 126 | + echo "===== initdb ConfigMap Contents =====" |
| 127 | + kubectl get configmap initdb -o yaml || echo "Could not get initdb configmap" |
| 128 | + |
| 129 | + # Check for any related events |
| 130 | + echo "===== Related Kubernetes Events =====" |
| 131 | + kubectl get events | grep -E "pgstac-eoapiuser-permissions-upgrade|initdb" || echo "No relevant events found" |
| 132 | +
|
94 | 133 | - name: debug pgstac-migrate job failure |
95 | 134 | if: steps.helm-render-install-eoapi-templates.outcome == 'failure' |
96 | 135 | continue-on-error: true |
|
0 commit comments