-
-
Save stbenjam/9305bb31db4c1754e3e84ddcd354ebbe to your computer and use it in GitHub Desktop.
debug oc crash
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -e | |
set -x | |
source $CONFIG | |
export GOTRACEBACK=crash | |
function get_core { | |
coredumpctl -o core.oc dump /usr/local/bin/oc | |
} | |
function clean { | |
rm -f "${pullsecret_file}" | |
rm -rf "${extract_dir}" | |
} | |
pullsecret_file=$(mktemp "oc-debug--XXXXXXXXXX") | |
extract_dir=$(mktemp -d "oc-debug--XXXXXXXXXX") | |
trap clean EXIT | |
trap get_core ERR | |
echo $PULL_SECRET > $pullsecret_file | |
for i in `seq 1 100` | |
do | |
echo "****** Trying to oc extract $i/100" | |
oc adm release extract --registry-config "$pullsecret_file" --command='openshift-baremetal-install' --to "${extract_dir}" registry.svc.ci.openshift.org/ocp/release:4.2 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment