Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: fix false deploy successes #1507

Merged
merged 5 commits into from
Jul 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 0 additions & 30 deletions .github/buildomat/jobs/check-omicron-deployment.sh

This file was deleted.

78 changes: 42 additions & 36 deletions .github/buildomat/jobs/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
3 changes: 1 addition & 2 deletions .github/buildomat/jobs/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down