Skip to content

helios/deploy: Wait for inventory collection #8650

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

Merged
merged 2 commits into from
Jul 22, 2025
Merged
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
16 changes: 16 additions & 0 deletions .github/buildomat/jobs/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,22 @@ until grep "Handoff to Nexus is complete" /var/svc/log/oxide-sled-agent:default.
done
echo "Waited for handoff: ${retry}s"

# Wait for at least one collection. We check for "greater than 1" line of output
# because we always get the table header; 2 or more lines indicate 1 or more
# collections.
retry=0
INVENTORY_COLLECTION_COUNT=$(pfexec zlogin oxz_switch /opt/oxide/omdb/bin/omdb db inventory collections list | wc -l)
until [[ "${INVENTORY_COLLECTION_COUNT}" -gt 1 ]]; do
if [[ $retry -gt 300 ]]; then
echo "Failed to wait for inventory collection after 300 seconds"
exit 1
fi
sleep 1
retry=$((retry + 1))
INVENTORY_COLLECTION_COUNT=$(pfexec zlogin oxz_switch /opt/oxide/omdb/bin/omdb db inventory collections list | wc -l)
done
echo "Waited for inventory collection: ${retry}s"

# Wait for the number of expected U2 zpools
retry=0
ACTUAL_ZPOOL_COUNT=$(pfexec zlogin oxz_switch /opt/oxide/omdb/bin/omdb db zpool list -i | wc -l)
Expand Down
Loading