Skip to content

Commit

Permalink
Merge branch 'more-raw-cte-setup' into convert-virtual-provisioning
Browse files Browse the repository at this point in the history
  • Loading branch information
smklein committed May 28, 2024
2 parents 5762d4e + 10bb3c6 commit b56a7c7
Show file tree
Hide file tree
Showing 703 changed files with 71,175 additions and 30,494 deletions.
File renamed without changes.
2 changes: 1 addition & 1 deletion .config/nextest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# The required version should be bumped up if we need new features, performance
# improvements or bugfixes that are present in newer versions of nextest.
nextest-version = { required = "0.9.64", recommended = "0.9.67" }
nextest-version = { required = "0.9.64", recommended = "0.9.70" }

experimental = ["setup-scripts"]

Expand Down
15 changes: 1 addition & 14 deletions .github/buildomat/build-and-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ target_os=$1
# NOTE: This version should be in sync with the recommended version in
# .config/nextest.toml. (Maybe build an automated way to pull the recommended
# version in the future.)
NEXTEST_VERSION='0.9.67'
NEXTEST_VERSION='0.9.70'

cargo --version
rustc --version
Expand Down Expand Up @@ -76,19 +76,6 @@ export RUSTC_BOOTSTRAP=1
# We report build progress to stderr, and the "--timings=json" output goes to stdout.
ptime -m cargo build -Z unstable-options --timings=json --workspace --tests --locked --verbose 1> "$OUTPUT_DIR/crate-build-timings.json"

# If we are running on illumos we want to verify that we are not requiring
# system libraries outside of specific binaries. If we encounter this situation
# we bail.
# NB: `cargo xtask verify-libraries` runs `cargo build --bins` to ensure it can
# check the final executables.
if [[ $target_os == "illumos" ]]; then
banner verify-libraries
# This has a separate timeout from `cargo nextest` since `timeout` expects
# to run an external command and therefore we cannot run bash functions or
# subshells.
ptime -m timeout 10m cargo xtask verify-libraries
fi

#
# We apply our own timeout to ensure that we get a normal failure on timeout
# rather than a buildomat timeout. See oxidecomputer/buildomat#8.
Expand Down
5 changes: 2 additions & 3 deletions .github/buildomat/jobs/a4x2-deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
#:
#: name = "a4x2-deploy"
#: variety = "basic"
#: target = "lab-2.0-opte-0.27"
#: rust_toolchain = "stable"
#: target = "lab-2.0-opte-0.29"
#: output_rules = [
#: "/out/falcon/*.log",
#: "/out/falcon/*.err",
Expand All @@ -13,7 +12,7 @@
#: "%/out/dhcp-server.log",
#: ]
#: skip_clone = true
#: enable = true
#: enable = false
#:
#: [dependencies.a4x2]
#: job = "a4x2-prepare"
Expand Down
4 changes: 2 additions & 2 deletions .github/buildomat/jobs/a4x2-prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#: name = "a4x2-prepare"
#: variety = "basic"
#: target = "helios-2.0"
#: rust_toolchain = "stable"
#: rust_toolchain = "1.78.0"
#: output_rules = [
#: "=/out/cargo-bay-ce.tgz",
#: "=/out/cargo-bay-cr1.tgz",
Expand All @@ -20,7 +20,7 @@
#: access_repos = [
#: "oxidecomputer/testbed",
#: ]
#: enable = true
#: enable = false

source ./env.sh

Expand Down
2 changes: 1 addition & 1 deletion .github/buildomat/jobs/build-and-test-helios.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#: name = "build-and-test (helios)"
#: variety = "basic"
#: target = "helios-2.0"
#: rust_toolchain = "1.72.1"
#: rust_toolchain = "1.78.0"
#: output_rules = [
#: "%/work/*",
#: "%/var/tmp/omicron_tmp/*",
Expand Down
2 changes: 1 addition & 1 deletion .github/buildomat/jobs/build-and-test-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#: name = "build-and-test (ubuntu-22.04)"
#: variety = "basic"
#: target = "ubuntu-22.04"
#: rust_toolchain = "1.72.1"
#: rust_toolchain = "1.78.0"
#: output_rules = [
#: "%/work/*",
#: "%/var/tmp/omicron_tmp/*",
Expand Down
59 changes: 0 additions & 59 deletions .github/buildomat/jobs/ci-tools.sh

This file was deleted.

2 changes: 1 addition & 1 deletion .github/buildomat/jobs/clippy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#: name = "clippy (helios)"
#: variety = "basic"
#: target = "helios-2.0"
#: rust_toolchain = "1.72.1"
#: rust_toolchain = "1.78.0"
#: output_rules = []

# Run clippy on illumos (not just other systems) because a bunch of our code
Expand Down
38 changes: 19 additions & 19 deletions .github/buildomat/jobs/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#:
#: name = "helios / deploy"
#: variety = "basic"
#: target = "lab-2.0-opte-0.28"
#: target = "lab-2.0-opte-0.29"
#: output_rules = [
#: "%/var/svc/log/oxide-sled-agent:default.log*",
#: "%/zone/oxz_*/root/var/svc/log/oxide-*.log*",
Expand All @@ -20,8 +20,6 @@
#: [dependencies.package]
#: job = "helios / package"
#:
#: [dependencies.ci-tools]
#: job = "helios / CI tools"

set -o errexit
set -o pipefail
Expand Down Expand Up @@ -144,13 +142,6 @@ pfexec chown build:build /opt/oxide/work
cd /opt/oxide/work

ptime -m tar xvzf /input/package/work/package.tar.gz
cp /input/package/work/zones/* out/
mv out/nexus-single-sled.tar.gz out/nexus.tar.gz
mkdir tests
for p in /input/ci-tools/work/end-to-end-tests/*.gz; do
ptime -m gunzip < "$p" > "tests/$(basename "${p%.gz}")"
chmod a+x "tests/$(basename "${p%.gz}")"
done

# 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 Expand Up @@ -201,11 +192,16 @@ routeadm -e ipv4-forwarding -u
PXA_START="$EXTRA_IP_START"
PXA_END="$EXTRA_IP_END"

# These variables are used by softnpu_init, so export them.
export GATEWAY_IP GATEWAY_MAC PXA_START PXA_END

pfexec zpool create -f scratch c1t1d0 c2t1d0
ZPOOL_VDEV_DIR=/scratch ptime -m pfexec ./tools/create_virtual_hardware.sh

ptime -m \
pfexec ./target/release/xtask virtual-hardware \
--vdev-dir /scratch \
create \
--gateway-ip "$GATEWAY_IP" \
--gateway-mac "$GATEWAY_MAC" \
--pxa-start "$PXA_START" \
--pxa-end "$PXA_END"

#
# Generate a self-signed certificate to use as the initial TLS certificate for
Expand All @@ -214,7 +210,12 @@ ZPOOL_VDEV_DIR=/scratch ptime -m pfexec ./tools/create_virtual_hardware.sh
# real system, the certificate would come from the customer during initial rack
# setup on the technician port.
#
tar xf out/omicron-sled-agent.tar pkg/config-rss.toml
tar xf out/omicron-sled-agent.tar pkg/config-rss.toml pkg/config.toml

# Update the vdevs to point to where we've created them
sed -E -i~ "s/(m2|u2)(.*\.vdev)/\/scratch\/\1\2/g" pkg/config.toml
diff -u pkg/config.toml{~,} || true

SILO_NAME="$(sed -n 's/silo_name = "\(.*\)"/\1/p' pkg/config-rss.toml)"
EXTERNAL_DNS_DOMAIN="$(sed -n 's/external_dns_zone_name = "\(.*\)"/\1/p' pkg/config-rss.toml)"

Expand All @@ -241,8 +242,8 @@ addresses = \\[\"$UPLINK_IP/24\"\\]
" pkg/config-rss.toml
diff -u pkg/config-rss.toml{~,} || true

tar rvf out/omicron-sled-agent.tar pkg/config-rss.toml
rm -f pkg/config-rss.toml*
tar rvf out/omicron-sled-agent.tar pkg/config-rss.toml pkg/config.toml
rm -f pkg/config-rss.toml* pkg/config.toml*

#
# By default, OpenSSL creates self-signed certificates with "CA:true". The TLS
Expand Down Expand Up @@ -344,7 +345,7 @@ echo "Waited for nexus: ${retry}s"

export RUST_BACKTRACE=1
export E2E_TLS_CERT IPPOOL_START IPPOOL_END
eval "$(./tests/bootstrap)"
eval "$(./target/debug/bootstrap)"
export OXIDE_HOST OXIDE_TOKEN

#
Expand Down Expand Up @@ -377,7 +378,6 @@ done
/usr/oxide/oxide --resolve "$OXIDE_RESOLVE" --cacert "$E2E_TLS_CERT" \
image promote --project images --image debian11

rm ./tests/bootstrap
for test_bin in tests/*; do
./"$test_bin"
done
93 changes: 0 additions & 93 deletions .github/buildomat/jobs/host-image.sh

This file was deleted.

25 changes: 25 additions & 0 deletions .github/buildomat/jobs/omicron-common.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash
#:
#: name = "omicron-common (helios)"
#: variety = "basic"
#: target = "helios-2.0"
#: rust_toolchain = "1.78.0"
#: output_rules = []

# Verify that omicron-common builds successfully when used as a dependency
# in an external project. It must not leak anything that requires an external
# dependency (apart from OpenSSL/pkg-config).

set -o errexit
set -o pipefail
set -o xtrace

cargo --version
rustc --version

cd /tmp
cargo new --lib test-project
cd test-project
cargo add omicron-common --path /work/oxidecomputer/omicron/common
cargo check
cargo build --release
Loading

0 comments on commit b56a7c7

Please sign in to comment.