Created
May 14, 2016 01:06
-
-
Save euank/4eaa63150d898e1469d4783fa8e7b687 to your computer and use it in GitHub Desktop.
git bisect for a rkt issue
This file contains hidden or 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
| #!/bin/bash | |
| set -x | |
| shopt -s globstar | |
| shopt -s extglob | |
| ./autogen.sh | |
| ./configure --with-stage1-default-flavor=coreos --with-stage1-flavors=coreos | |
| make || exit 125 | |
| sleep 1 | |
| newest_rkt=$(pwd)/$(ls -t build-rkt*/**/bin/rkt | head -n 1) | |
| stage1=$(dirname $newest_rkt)/stage1-coreos.aci | |
| uuid=/tmp/uuid | |
| sudo $newest_rkt run --uuid-file-save=$uuid --insecure-options=image --stage1-path=$stage1 docker://gcr.io/google_containers/mounttest-user:0.3 -- --fs_type=/ --file_mode=/ --file_owner=/ | |
| sleep 1 | |
| uuidnum=$(sudo cat $uuid | sed 's/-//g') | |
| sudo rm -f $uuid | |
| sudo journalctl -m _MACHINE_ID=$uuidnum -u mounttest-user -o json | cat | |
| count=$(sudo journalctl -m _MACHINE_ID=$uuidnum -u mounttest-user -o json | wc -l) | |
| # 1 because -- No entries -- is the error output of journalctl in this case | |
| if [[ "$count" -eq "1" ]]; then | |
| echo "=========" | |
| echo "Bad version!" | |
| $newest_rkt version | |
| echo -e "=========\n\n\n\n\n" | |
| exit 1 | |
| fi | |
| echo "+++++++++" | |
| echo "Good version!" | |
| $newest_rkt version | |
| echo -e "+++++++++\n\n\n\n\n" | |
| exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment