Skip to content

Commit 5895d1d

Browse files
committed
Merge remote-tracking branch 'origin/dap/drafts/dropshot-update' into dap/dropshot-builder
2 parents c0ea923 + 892047b commit 5895d1d

File tree

597 files changed

+55345
-15700
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

597 files changed

+55345
-15700
lines changed

.github/buildomat/build-and-test.sh

Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,14 @@ set -o errexit
44
set -o pipefail
55
set -o xtrace
66

7-
# Color the output for easier readability.
8-
export CARGO_TERM_COLOR=always
7+
#
8+
# Set up our PATH for the test suite.
9+
#
10+
11+
# shellcheck source=/dev/null
12+
source ./env.sh
13+
# shellcheck source=/dev/null
14+
source .github/buildomat/ci-env.sh
915

1016
target_os=$1
1117

@@ -30,14 +36,26 @@ OUTPUT_DIR='/work'
3036
echo "tests will store non-ephemeral output in $OUTPUT_DIR" >&2
3137
mkdir -p "$OUTPUT_DIR"
3238

33-
#
34-
# Set up our PATH for the test suite.
35-
#
36-
source ./env.sh
39+
3740

3841
banner prerequisites
3942
ptime -m bash ./tools/install_builder_prerequisites.sh -y
4043

44+
# Do some test runs of the `ls-apis` command.
45+
#
46+
# This may require cloning some dependent private repos. We do this before the
47+
# main battery of tests because the GitHub tokens required for this only last
48+
# for an hour so we want to get this done early.
49+
#
50+
# (TODO: This makes the build timings we record inaccurate.)
51+
banner ls-apis
52+
(
53+
source ./tools/include/force-git-over-https.sh;
54+
ptime -m cargo xtask ls-apis apis &&
55+
ptime -m cargo xtask ls-apis deployment-units &&
56+
ptime -m cargo xtask ls-apis servers
57+
)
58+
4159
#
4260
# We build with:
4361
#
@@ -79,19 +97,6 @@ export RUSTC_BOOTSTRAP=1
7997
# We report build progress to stderr, and the "--timings=json" output goes to stdout.
8098
ptime -m cargo build -Z unstable-options --timings=json --workspace --tests --locked --verbose 1> "$OUTPUT_DIR/crate-build-timings.json"
8199

82-
# Do some test runs of the `ls-apis` command.
83-
#
84-
# This may require cloning some dependent private repos. We do this before the
85-
# main battery of tests because the GitHub tokens required for this only last
86-
# for an hour so we want to get this done early.
87-
banner ls-apis
88-
(
89-
source ./tools/include/force-git-over-https.sh;
90-
ptime -m cargo xtask ls-apis apis &&
91-
ptime -m cargo xtask ls-apis deployment-units &&
92-
ptime -m cargo xtask ls-apis servers
93-
)
94-
95100
#
96101
# We apply our own timeout to ensure that we get a normal failure on timeout
97102
# rather than a buildomat timeout. See oxidecomputer/buildomat#8.

.github/buildomat/ci-env.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Setup shared across Buildomat CI builds.
2+
#
3+
# This file contains environment variables shared across Buildomat CI jobs.
4+
5+
# Color the output for easier readability.
6+
export CARGO_TERM_COLOR=always

.github/buildomat/jobs/a4x2-deploy.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ set -o errexit
2121
set -o pipefail
2222
set -o xtrace
2323

24+
# shellcheck source=/dev/null
25+
source .github/buildomat/ci-env.sh
26+
2427
pfexec mkdir -p /out
2528
pfexec chown "$UID" /out
2629

.github/buildomat/jobs/a4x2-prepare.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@
2222
#: ]
2323
#: enable = false
2424

25+
# shellcheck source=/dev/null
2526
source ./env.sh
27+
# shellcheck source=/dev/null
28+
source .github/buildomat/ci-env.sh
2629

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

.github/buildomat/jobs/check-features.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ set -o errexit
1414
set -o pipefail
1515
set -o xtrace
1616

17+
# shellcheck source=/dev/null
18+
source .github/buildomat/ci-env.sh
19+
1720
cargo --version
1821
rustc --version
1922

.github/buildomat/jobs/clippy.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,17 @@ set -o errexit
1616
set -o pipefail
1717
set -o xtrace
1818

19-
cargo --version
20-
rustc --version
21-
2219
#
2320
# Set up our PATH for use with this workspace.
2421
#
22+
23+
# shellcheck source=/dev/null
2524
source ./env.sh
25+
# shellcheck source=/dev/null
26+
source .github/buildomat/ci-env.sh
27+
28+
cargo --version
29+
rustc --version
2630

2731
banner prerequisites
2832
ptime -m bash ./tools/install_builder_prerequisites.sh -y

.github/buildomat/jobs/deploy.sh

Lines changed: 56 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
#: "%/pool/ext/*/crypt/debug/global/oxide-sled-agent:default.log.*",
1414
#: "%/pool/ext/*/crypt/debug/oxz_*/oxide-*.log.*",
1515
#: "%/pool/ext/*/crypt/debug/oxz_*/system-illumos-*.log.*",
16-
#: "!/pool/ext/*/crypt/debug/oxz_propolis-server_*/*.log.*"
16+
#: "!/pool/ext/*/crypt/debug/oxz_propolis-server_*/*.log.*",
17+
#: "/tmp/kstat/*.kstat"
1718
#: ]
1819
#: skip_clone = true
1920
#:
@@ -32,6 +33,10 @@ _exit_trap() {
3233
local status=$?
3334
set +o errexit
3435

36+
if [[ "x$OPTE_COMMIT" != "x" ]]; then
37+
pfexec cp /tmp/opteadm /opt/oxide/opte/bin/opteadm
38+
fi
39+
3540
#
3641
# Stop cron in all zones (to stop logadm log rotation)
3742
#
@@ -65,12 +70,16 @@ _exit_trap() {
6570

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

80+
mkdir -p /tmp/kstat
81+
pfexec kstat -p xde: > /tmp/kstat/xde.kstat
82+
7483
pfexec zfs list
7584
pfexec zpool list
7685
pfexec fmdump -eVp
@@ -88,9 +97,30 @@ _exit_trap() {
8897

8998
for z in $(zoneadm list -n | grep oxz_ntp); do
9099
banner "${z/oxz_/}"
91-
pfexec zlogin "$z" chronyc tracking
92-
pfexec zlogin "$z" chronyc sources
100+
pfexec zlogin "$z" chronyc -n tracking
101+
pfexec zlogin "$z" chronyc -n sources -a
93102
pfexec zlogin "$z" cat /etc/inet/chrony.conf
103+
pfexec zlogin "$z" ping -sn oxide.computer 56 1
104+
pfexec zlogin "$z" ping -sn 1.1.1.1 56 1
105+
pfexec zlogin "$z" /usr/sbin/dig 0.pool.ntp.org @1.1.1.1
106+
pfexec zlogin "$z" getent hosts time.cloudfare.com
107+
108+
# Attempt to get chrony to do some time sync from the CLI with
109+
# messages being written to the terminal and with debugging
110+
# enabled if the chrony package was built with that option.
111+
# Since chronyd on the CLI needs to use the ports that the
112+
# service will be using, stop it first (with -s to wait for it
113+
# to exit).
114+
pfexec /usr/sbin/svcadm -z "$z" disable -s oxide/ntp
115+
# Run in dry-run one-shot mode (-Q)
116+
pfexec zlogin "$z" /usr/sbin/chronyd -t 10 -ddQ
117+
# Run in one-shot mode (-q) -- attempt to set the clock
118+
pfexec zlogin "$z" /usr/sbin/chronyd -t 10 -ddq
119+
# Run in one-shot mode (-q) but override the configuration
120+
# to talk to an explicit external service. This command line is
121+
# similar to that used by the pre-flight NTP checks.
122+
pfexec zlogin "$z" /usr/sbin/chronyd -t 10 -ddq \
123+
"'pool time.cloudflare.com iburst maxdelay 0.1'"
94124
done
95125

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

137+
# only set this if you want to override the version of opte/xde installed by the
138+
# install_opte.sh script
139+
OPTE_COMMIT="f3002b356da7d0e4ca15beb66a5566a92919baaa"
140+
if [[ "x$OPTE_COMMIT" != "x" ]]; then
141+
curl -sSfOL https://buildomat.eng.oxide.computer/public/file/oxidecomputer/opte/module/$OPTE_COMMIT/xde
142+
pfexec rem_drv xde || true
143+
pfexec mv xde /kernel/drv/amd64/xde
144+
pfexec add_drv xde || true
145+
curl -sSfOL https://buildomat.eng.oxide.computer/public/file/oxidecomputer/opte/release/$OPTE_COMMIT/opteadm
146+
chmod +x opteadm
147+
cp opteadm /tmp/opteadm
148+
pfexec mv opteadm /opt/oxide/opte/bin/opteadm
149+
fi
150+
107151
#
108152
# XXX work around 14537 (UFS should not allow directories to be unlinked) which
109153
# is probably not yet fixed in xde branch? Once the xde branch merges from
@@ -150,6 +194,9 @@ cd /opt/oxide/work
150194

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

197+
# shellcheck source=/dev/null
198+
source .github/buildomat/ci-env.sh
199+
153200
# Ask buildomat for the range of extra addresses that we're allowed to use, and
154201
# break them up into the ranges we need.
155202

@@ -293,7 +340,7 @@ E2E_TLS_CERT="/opt/oxide/sled-agent/pkg/initial-tls-cert.pem"
293340
#
294341
pfexec mkdir -p /usr/oxide
295342
pfexec curl -sSfL -o /usr/oxide/oxide \
296-
http://catacomb.eng.oxide.computer:12346/oxide-v0.1.0
343+
http://catacomb.eng.oxide.computer:12346/oxide-v0.1.1
297344
pfexec chmod +x /usr/oxide/oxide
298345

299346
curl -sSfL -o debian-11-genericcloud-amd64.raw \
@@ -371,7 +418,9 @@ done
371418

372419
/usr/oxide/oxide --resolve "$OXIDE_RESOLVE" --cacert "$E2E_TLS_CERT" \
373420
project create --name images --description "some images"
374-
/usr/oxide/oxide --resolve "$OXIDE_RESOLVE" --cacert "$E2E_TLS_CERT" \
421+
/usr/oxide/oxide \
422+
--resolve "$OXIDE_RESOLVE" \
423+
--cacert "$E2E_TLS_CERT" \
375424
disk import \
376425
--path debian-11-genericcloud-amd64.raw \
377426
--disk debian11-boot \
@@ -381,7 +430,8 @@ done
381430
--image debian11 \
382431
--image-description "debian 11 original base image" \
383432
--image-os debian \
384-
--image-version "11"
433+
--image-version "11" \
434+
--parallelism 1
385435
/usr/oxide/oxide --resolve "$OXIDE_RESOLVE" --cacert "$E2E_TLS_CERT" \
386436
image promote --project images --image debian11
387437

.github/buildomat/jobs/omicron-common.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ set -o errexit
1414
set -o pipefail
1515
set -o xtrace
1616

17+
# shellcheck source=/dev/null
18+
source .github/buildomat/ci-env.sh
19+
1720
cargo --version
1821
rustc --version
1922

.github/buildomat/jobs/package.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ set -o errexit
1313
set -o pipefail
1414
set -o xtrace
1515

16+
# shellcheck source=/dev/null
17+
source .github/buildomat/ci-env.sh
18+
1619
cargo --version
1720
rustc --version
1821

@@ -48,6 +51,7 @@ mkdir tests
4851
# deployment phases of buildomat.
4952

5053
files=(
54+
.github/buildomat/ci-env.sh
5155
out/target/test
5256
out/npuzone/*
5357
package-manifest.toml

.github/buildomat/jobs/tuf-repo.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,17 @@ set -o errexit
4747
set -o pipefail
4848
set -o xtrace
4949

50+
# shellcheck source=/dev/null
51+
source .github/buildomat/ci-env.sh
52+
5053
cargo --version
5154
rustc --version
5255

56+
# Before we do _anything_, quickly check that Cargo.lock is properly locked.
57+
# Most of our tools (including releng!) eventually call `cargo xtask`, which
58+
# runs without `--locked` and will update the lockfile.
59+
cargo tree --locked >/dev/null
60+
5361
ptime -m ./tools/install_builder_prerequisites.sh -yp
5462
source ./tools/include/force-git-over-https.sh
5563

.github/workflows/check-opte-ver.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
check-opte-ver:
1010
runs-on: ubuntu-22.04
1111
steps:
12-
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
12+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1313
with:
1414
ref: ${{ github.event.pull_request.head.sha }} # see omicron#4461
1515
- name: Install jq

.github/workflows/check-workspace-deps.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
check-workspace-deps:
1111
runs-on: ubuntu-22.04
1212
steps:
13-
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
13+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1414
with:
1515
ref: ${{ github.event.pull_request.head.sha }} # see omicron#4461
1616
- name: Check Workspace Dependencies

.github/workflows/hakari.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ jobs:
1616
env:
1717
RUSTFLAGS: -D warnings
1818
steps:
19-
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
19+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
2020
with:
2121
ref: ${{ github.event.pull_request.head.sha }} # see omicron#4461
2222
- uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1
2323
with:
2424
toolchain: stable
2525
- name: Install cargo-hakari
26-
uses: taiki-e/install-action@9bef7e9c3d7c7aa986ef19933b0722880ae377e0 # v2
26+
uses: taiki-e/install-action@9c04113bd63f9659d7a53908386758275ab35630 # v2
2727
with:
2828
tool: cargo-hakari
2929
- name: Check workspace-hack Cargo.toml is up-to-date

0 commit comments

Comments
 (0)