diff --git a/.github/buildomat/jobs/check-omicron-deployment.sh b/.github/buildomat/jobs/check-omicron-deployment.sh deleted file mode 100644 index ea519cbcb1..0000000000 --- a/.github/buildomat/jobs/check-omicron-deployment.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash -#: -#: name = "check-omicron-deployment (helios)" -#: variety = "basic" -#: target = "helios-latest" -#: rust_toolchain = "nightly-2022-04-27" -#: output_rules = [] -#: - -set -o errexit -set -o pipefail -set -o xtrace - -cargo --version -rustc --version - -# -# Put "./cockroachdb/bin" and "./clickhouse" on the PATH for the test -# suite. -# -export PATH="$PATH:$PWD/out/cockroachdb/bin:$PWD/out/clickhouse" - -banner prerequisites -ptime -m bash ./tools/install_builder_prerequisites.sh -y - -# -# Check that building individual packages as when deploying Omicron succeeds -# -banner deploy-check -ptime -m cargo run --bin omicron-package -- check diff --git a/.github/buildomat/jobs/deploy.sh b/.github/buildomat/jobs/deploy.sh index 2d4d6d3271..a12da12dbe 100644 --- a/.github/buildomat/jobs/deploy.sh +++ b/.github/buildomat/jobs/deploy.sh @@ -17,6 +17,43 @@ set -o errexit set -o pipefail set -o xtrace +# +# If we fail, try to collect some debugging information +# +_exit_trap() { + local status=$? + [[ $status -eq 0 ]] && exit 0 + + set +o errexit + set -o xtrace + banner evidence + zoneadm list -civ + pfexec dladm show-phys -m + pfexec dladm show-link + pfexec dladm show-vnic + pfexec ipadm + pfexec netstat -rncva + pfexec netstat -anu + pfexec arp -an + pfexec zfs list + pfexec zpool list + pfexec fmdump -eVp + pfexec ptree -z global + pfexec svcs -xv + for z in $(zoneadm list -n); do + banner "${z/oxz_/}" + pfexec svcs -xv -z "$z" + pfexec ptree -z "$z" + pfexec zlogin "$z" ipadm + pfexec zlogin "$z" netstat -rncva + pfexec zlogin "$z" netstat -anu + pfexec zlogin "$z" arp -an + done + + exit $status +} +trap _exit_trap EXIT + # # XXX work around 14537 (UFS should not allow directories to be unlinked) which # is probably not yet fixed in xde branch? Once the xde branch merges from @@ -102,48 +139,17 @@ set +o xtrace start=$SECONDS while :; do - if (( $SECONDS - $start > 60 )); then + if (( SECONDS - start > 60 )); then printf 'FAILURE: NEXUS DID NOT BECOME AVAILABLE\n' >&2 - break + exit 1 fi - # - # XXX This is an extremely basic test, which should be replaced with - # something more complete. - # - if curl --fail-with-body -i http://192.168.1.20/spoof_login; then + if curl --max-time 1 --fail-with-body -i http://192.168.1.20/spoof_login; then printf 'ok; nexus became available!\n' - exit 0 + break fi - - sleep 1 done # -# Try to collect some debugging information: +# XXX add tests here! # -set +o errexit -set -o xtrace -banner evidence -zoneadm list -civ -pfexec dladm show-phys -m -pfexec dladm show-link -pfexec dladm show-vnic -pfexec ipadm -pfexec netstat -rncva -pfexec netstat -anu -pfexec arp -an -pfexec zfs list -pfexec zpool list -pfexec fmdump -eVp -pfexec ptree -z global -pfexec svcs -xv -for z in $(zoneadm list -n); do - banner "${z/oxz_/}" - pfexec svcs -xv -z $z - pfexec ptree -z $z - pfexec zlogin $z ipadm - pfexec zlogin $z netstat -rncva - pfexec zlogin $z netstat -anu - pfexec zlogin $z arp -an -done diff --git a/.github/buildomat/jobs/package.sh b/.github/buildomat/jobs/package.sh index 198b7998d7..39d7badb8b 100644 --- a/.github/buildomat/jobs/package.sh +++ b/.github/buildomat/jobs/package.sh @@ -16,8 +16,7 @@ set -o xtrace cargo --version rustc --version -sed -i -e 's^pfexec ./tools/install_opte.sh^true^' ./tools/install_prerequisites.sh -ptime -m ./tools/install_prerequisites.sh -yp +ptime -m ./tools/install_builder_prerequisites.sh -yp ptime -m cargo run --locked --release --bin omicron-package -- package