Skip to content

Commit

Permalink
Merge branch 'main' into oximeter-qorb
Browse files Browse the repository at this point in the history
  • Loading branch information
smklein committed Oct 15, 2024
2 parents 834ea85 + 20220b8 commit 67ee435
Show file tree
Hide file tree
Showing 334 changed files with 20,268 additions and 7,787 deletions.
15 changes: 9 additions & 6 deletions .github/buildomat/build-and-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,14 @@ set -o errexit
set -o pipefail
set -o xtrace

# Color the output for easier readability.
export CARGO_TERM_COLOR=always
#
# Set up our PATH for the test suite.
#

# shellcheck source=/dev/null
source ./env.sh
# shellcheck source=/dev/null
source .github/buildomat/ci-env.sh

target_os=$1

Expand All @@ -30,10 +36,7 @@ OUTPUT_DIR='/work'
echo "tests will store non-ephemeral output in $OUTPUT_DIR" >&2
mkdir -p "$OUTPUT_DIR"

#
# Set up our PATH for the test suite.
#
source ./env.sh


banner prerequisites
ptime -m bash ./tools/install_builder_prerequisites.sh -y
Expand Down
6 changes: 6 additions & 0 deletions .github/buildomat/ci-env.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Setup shared across Buildomat CI builds.
#
# This file contains environment variables shared across Buildomat CI jobs.

# Color the output for easier readability.
export CARGO_TERM_COLOR=always
3 changes: 3 additions & 0 deletions .github/buildomat/jobs/a4x2-deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ set -o errexit
set -o pipefail
set -o xtrace

# shellcheck source=/dev/null
source .github/buildomat/ci-env.sh

pfexec mkdir -p /out
pfexec chown "$UID" /out

Expand Down
4 changes: 3 additions & 1 deletion .github/buildomat/jobs/a4x2-prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@
#: ]
#: enable = false

# shellcheck source=/dev/null
source ./env.sh
# shellcheck source=/dev/null
source .github/buildomat/ci-env.sh

set -o errexit
set -o pipefail
Expand Down Expand Up @@ -91,4 +94,3 @@ for x in ce cr1 cr2 g0 g1 g2 g3 tools omicron-common; do
tar -czf cargo-bay-$x.tgz cargo-bay/$x
mv cargo-bay-$x.tgz /out/
done

3 changes: 3 additions & 0 deletions .github/buildomat/jobs/check-features.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ set -o errexit
set -o pipefail
set -o xtrace

# shellcheck source=/dev/null
source .github/buildomat/ci-env.sh

cargo --version
rustc --version

Expand Down
10 changes: 7 additions & 3 deletions .github/buildomat/jobs/clippy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,17 @@ set -o errexit
set -o pipefail
set -o xtrace

cargo --version
rustc --version

#
# Set up our PATH for use with this workspace.
#

# shellcheck source=/dev/null
source ./env.sh
# shellcheck source=/dev/null
source .github/buildomat/ci-env.sh

cargo --version
rustc --version

banner prerequisites
ptime -m bash ./tools/install_builder_prerequisites.sh -y
Expand Down
53 changes: 50 additions & 3 deletions .github/buildomat/jobs/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
#: "%/pool/ext/*/crypt/debug/global/oxide-sled-agent:default.log.*",
#: "%/pool/ext/*/crypt/debug/oxz_*/oxide-*.log.*",
#: "%/pool/ext/*/crypt/debug/oxz_*/system-illumos-*.log.*",
#: "!/pool/ext/*/crypt/debug/oxz_propolis-server_*/*.log.*"
#: "!/pool/ext/*/crypt/debug/oxz_propolis-server_*/*.log.*",
#: "/tmp/kstat/*.kstat"
#: ]
#: skip_clone = true
#:
Expand All @@ -32,6 +33,10 @@ _exit_trap() {
local status=$?
set +o errexit

if [[ "x$OPTE_COMMIT" != "x" ]]; then
pfexec cp /tmp/opteadm /opt/oxide/opte/bin/opteadm
fi

#
# Stop cron in all zones (to stop logadm log rotation)
#
Expand Down Expand Up @@ -65,12 +70,16 @@ _exit_trap() {

PORTS=$(pfexec /opt/oxide/opte/bin/opteadm list-ports | tail +2 | awk '{ print $1; }')
for p in $PORTS; do
pfexec /opt/oxide/opte/bin/opteadm dump-uft -p $p
LAYERS=$(pfexec /opt/oxide/opte/bin/opteadm list-layers -p $p | tail +2 | awk '{ print $1; }')
for l in $LAYERS; do
pfexec /opt/oxide/opte/bin/opteadm dump-layer -p $p $l
done
done

mkdir -p /tmp/kstat
pfexec kstat -p xde: > /tmp/kstat/xde.kstat

pfexec zfs list
pfexec zpool list
pfexec fmdump -eVp
Expand All @@ -88,9 +97,30 @@ _exit_trap() {

for z in $(zoneadm list -n | grep oxz_ntp); do
banner "${z/oxz_/}"
pfexec zlogin "$z" chronyc tracking
pfexec zlogin "$z" chronyc sources
pfexec zlogin "$z" chronyc -n tracking
pfexec zlogin "$z" chronyc -n sources -a
pfexec zlogin "$z" cat /etc/inet/chrony.conf
pfexec zlogin "$z" ping -sn oxide.computer 56 1
pfexec zlogin "$z" ping -sn 1.1.1.1 56 1
pfexec zlogin "$z" /usr/sbin/dig 0.pool.ntp.org @1.1.1.1
pfexec zlogin "$z" getent hosts time.cloudfare.com

# Attempt to get chrony to do some time sync from the CLI with
# messages being written to the terminal and with debugging
# enabled if the chrony package was built with that option.
# Since chronyd on the CLI needs to use the ports that the
# service will be using, stop it first (with -s to wait for it
# to exit).
pfexec /usr/sbin/svcadm -z "$z" disable -s oxide/ntp
# Run in dry-run one-shot mode (-Q)
pfexec zlogin "$z" /usr/sbin/chronyd -t 10 -ddQ
# Run in one-shot mode (-q) -- attempt to set the clock
pfexec zlogin "$z" /usr/sbin/chronyd -t 10 -ddq
# Run in one-shot mode (-q) but override the configuration
# to talk to an explicit external service. This command line is
# similar to that used by the pre-flight NTP checks.
pfexec zlogin "$z" /usr/sbin/chronyd -t 10 -ddq \
"'pool time.cloudflare.com iburst maxdelay 0.1'"
done

pfexec zlogin sidecar_softnpu cat /var/log/softnpu.log
Expand All @@ -104,6 +134,20 @@ z_swadm () {
pfexec zlogin oxz_switch /opt/oxide/dendrite/bin/swadm $@
}

# only set this if you want to override the version of opte/xde installed by the
# install_opte.sh script
OPTE_COMMIT="f3002b356da7d0e4ca15beb66a5566a92919baaa"
if [[ "x$OPTE_COMMIT" != "x" ]]; then
curl -sSfOL https://buildomat.eng.oxide.computer/public/file/oxidecomputer/opte/module/$OPTE_COMMIT/xde
pfexec rem_drv xde || true
pfexec mv xde /kernel/drv/amd64/xde
pfexec add_drv xde || true
curl -sSfOL https://buildomat.eng.oxide.computer/public/file/oxidecomputer/opte/release/$OPTE_COMMIT/opteadm
chmod +x opteadm
cp opteadm /tmp/opteadm
pfexec mv opteadm /opt/oxide/opte/bin/opteadm
fi

#
# 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 @@ -150,6 +194,9 @@ cd /opt/oxide/work

ptime -m tar xvzf /input/package/work/package.tar.gz

# shellcheck source=/dev/null
source .github/buildomat/ci-env.sh

# Ask buildomat for the range of extra addresses that we're allowed to use, and
# break them up into the ranges we need.

Expand Down
3 changes: 3 additions & 0 deletions .github/buildomat/jobs/omicron-common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ set -o errexit
set -o pipefail
set -o xtrace

# shellcheck source=/dev/null
source .github/buildomat/ci-env.sh

cargo --version
rustc --version

Expand Down
4 changes: 4 additions & 0 deletions .github/buildomat/jobs/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ set -o errexit
set -o pipefail
set -o xtrace

# shellcheck source=/dev/null
source .github/buildomat/ci-env.sh

cargo --version
rustc --version

Expand Down Expand Up @@ -48,6 +51,7 @@ mkdir tests
# deployment phases of buildomat.

files=(
.github/buildomat/ci-env.sh
out/target/test
out/npuzone/*
package-manifest.toml
Expand Down
3 changes: 3 additions & 0 deletions .github/buildomat/jobs/tuf-repo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ set -o errexit
set -o pipefail
set -o xtrace

# shellcheck source=/dev/null
source .github/buildomat/ci-env.sh

cargo --version
rustc --version

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-opte-ver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
check-opte-ver:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
ref: ${{ github.event.pull_request.head.sha }} # see omicron#4461
- name: Install jq
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-workspace-deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
check-workspace-deps:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
ref: ${{ github.event.pull_request.head.sha }} # see omicron#4461
- name: Check Workspace Dependencies
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/hakari.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ jobs:
env:
RUSTFLAGS: -D warnings
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4
with:
ref: ${{ github.event.pull_request.head.sha }} # see omicron#4461
- uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1
with:
toolchain: stable
- name: Install cargo-hakari
uses: taiki-e/install-action@9bef7e9c3d7c7aa986ef19933b0722880ae377e0 # v2
uses: taiki-e/install-action@42f4ec8e42bf7fe4dadd39bfc534566095a8edff # v2
with:
tool: cargo-hakari
- name: Check workspace-hack Cargo.toml is up-to-date
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
check-style:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
ref: ${{ github.event.pull_request.head.sha }} # see omicron#4461
- name: Report cargo version
Expand All @@ -37,10 +37,10 @@ jobs:
- name: Disable packages.microsoft.com repo
if: ${{ startsWith(matrix.os, 'ubuntu') }}
run: sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
ref: ${{ github.event.pull_request.head.sha }} # see omicron#4461
- uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3
- uses: Swatinem/rust-cache@82a92a6e8fbeee089604da2575dc567ae9ddeaab # v2.7.5
if: ${{ github.ref != 'refs/heads/main' }}
- name: Report cargo version
run: cargo --version
Expand All @@ -67,10 +67,10 @@ jobs:
# This repo is unstable and unnecessary: https://github.com/microsoft/linux-package-repositories/issues/34
- name: Disable packages.microsoft.com repo
run: sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
ref: ${{ github.event.pull_request.head.sha }} # see omicron#4461
- uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3
- uses: Swatinem/rust-cache@82a92a6e8fbeee089604da2575dc567ae9ddeaab # v2.7.5
if: ${{ github.ref != 'refs/heads/main' }}
- name: Report cargo version
run: cargo --version
Expand All @@ -95,10 +95,10 @@ jobs:
# This repo is unstable and unnecessary: https://github.com/microsoft/linux-package-repositories/issues/34
- name: Disable packages.microsoft.com repo
run: sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
ref: ${{ github.event.pull_request.head.sha }} # see omicron#4461
- uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3
- uses: Swatinem/rust-cache@82a92a6e8fbeee089604da2575dc567ae9ddeaab # v2.7.5
if: ${{ github.ref != 'refs/heads/main' }}
- name: Report cargo version
run: cargo --version
Expand Down Expand Up @@ -127,10 +127,10 @@ jobs:
# This repo is unstable and unnecessary: https://github.com/microsoft/linux-package-repositories/issues/34
- name: Disable packages.microsoft.com repo
run: sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
ref: ${{ github.event.pull_request.head.sha }} # see omicron#4461
- uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3
- uses: Swatinem/rust-cache@82a92a6e8fbeee089604da2575dc567ae9ddeaab # v2.7.5
if: ${{ github.ref != 'refs/heads/main' }}
- name: Report cargo version
run: cargo --version
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-dendrite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
steps:

# Checkout both the target and integration branches
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
token: ${{ inputs.reflector_access_token }}
fetch-depth: 0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-maghemite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
steps:

# Checkout both the target and integration branches
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
token: ${{ inputs.reflector_access_token }}
fetch-depth: 0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/validate-openapi-spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
format:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
ref: ${{ github.event.pull_request.head.sha }} # see omicron#4461
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
Expand Down
Loading

0 comments on commit 67ee435

Please sign in to comment.