Skip to content
Open
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
31 changes: 18 additions & 13 deletions .github/buildomat/jobs/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -134,19 +134,6 @@ 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=""
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
Expand Down Expand Up @@ -197,6 +184,24 @@ ptime -m tar xvzf /input/package/work/package.tar.gz
# shellcheck source=/dev/null
source .github/buildomat/ci-env.sh

# Source the OPTE override (if any) from the canonical location and apply it.
#
# When set, download the xde driver and opteadm directly from buildomat and
# swap them in. The deploy target is a ramdisk image without pkg(5), so we
# use rem_drv/add_drv instead of the p5p approach used by install_opte.sh
# and releng.
source tools/opte_version_override
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

# 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
2 changes: 2 additions & 0 deletions .github/buildomat/jobs/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,7 @@ files=(
target/release/xtask
target/debug/bootstrap
tests/*
tools/opte_version
tools/opte_version_override
)
ptime -m tar cvzf $WORK/package.tar.gz "${files[@]}" "${packages[@]}"
24 changes: 20 additions & 4 deletions .github/workflows/check-opte-ver.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
name: check-opte-ver
on:
pull_request:
paths:
- '.github/workflows/check-opte-ver.yml'
- 'Cargo.toml'
- 'tools/opte_version'
branches: [main]
jobs:
check-opte-ver:
runs-on: ubuntu-22.04
Expand All @@ -18,3 +15,22 @@ jobs:
run: cargo install toml-cli@0.2.3
- name: Check OPTE version and rev match
run: ./tools/ci_check_opte_ver.sh

# Runs on every PR regardless of paths changed, since the override
# file could have been set in an earlier commit and slip through on
# an unrelated PR otherwise.
check-opte-override:
if: github.base_ref == 'main'
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ github.event.pull_request.head.sha }} # see omicron#4461
- name: Reject OPTE override on main
run: |
source tools/opte_version_override
if [[ "x$OPTE_COMMIT" != "x" ]]; then
echo "::error::OPTE_COMMIT is set in tools/opte_version_override."
echo "::error::The OPTE override must be cleared before merging to main."
exit 1
fi
64 changes: 33 additions & 31 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ digest = "0.10.7"
dns-server = { path = "dns-server" }
dns-server-api = { path = "dns-server-api" }
dns-service-client = { path = "clients/dns-service-client" }
dpd-client = { git = "https://github.com/oxidecomputer/dendrite", rev = "1ddaa5d6b101fbaa2c29eca847111cbef1a272ad" }
dpd-client = { git = "https://github.com/oxidecomputer/dendrite", rev = "e10e4f5a993fe950ab1b478abb5dcbfa7aa92091" }
dropshot = { version = "0.16.6", features = [ "usdt-probes" ] }
dropshot-api-manager = "0.6.0"
dropshot-api-manager-types = "0.6.0"
Expand Down Expand Up @@ -599,8 +599,8 @@ ntp-admin-api = { path = "ntp-admin/api" }
ntp-admin-client = { path = "clients/ntp-admin-client" }
ntp-admin-types = { path = "ntp-admin/types" }
ntp-admin-types-versions = { path = "ntp-admin/types/versions" }
mg-admin-client = { git = "https://github.com/oxidecomputer/maghemite", rev = "4d1f20f793da102b29b914569725ebc9fdf746dd" }
ddm-admin-client = { git = "https://github.com/oxidecomputer/maghemite", rev = "4d1f20f793da102b29b914569725ebc9fdf746dd" }
mg-admin-client = { git = "https://github.com/oxidecomputer/maghemite", rev = "c3c3032f8bdc91d6faf2b36e05b8375a0980765c" }
ddm-admin-client = { git = "https://github.com/oxidecomputer/maghemite", rev = "c3c3032f8bdc91d6faf2b36e05b8375a0980765c" }
multimap = "0.10.1"
nexus-auth = { path = "nexus/auth" }
nexus-background-task-interface = { path = "nexus/background-task-interface" }
Expand Down Expand Up @@ -737,7 +737,7 @@ rats-corim = { git = "https://github.com/oxidecomputer/rats-corim.git", rev = "f
raw-cpuid = { git = "https://github.com/oxidecomputer/rust-cpuid.git", rev = "a4cf01df76f35430ff5d39dc2fe470bcb953503b" }
rayon = "1.10"
rcgen = "0.12.1"
rdb-types = { git = "https://github.com/oxidecomputer/maghemite", rev = "4d1f20f793da102b29b914569725ebc9fdf746dd" }
rdb-types = { git = "https://github.com/oxidecomputer/maghemite", rev = "c3c3032f8bdc91d6faf2b36e05b8375a0980765c" }
reconfigurator-cli = { path = "dev-tools/reconfigurator-cli" }
reedline = "0.40.0"
ref-cast = "1.0"
Expand Down
36 changes: 35 additions & 1 deletion clients/ddm-admin-client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

// Copyright 2023 Oxide Computer Company
// Copyright 2026 Oxide Computer Company

#![allow(clippy::redundant_closure_call)]
#![allow(clippy::needless_lifetimes)]
Expand Down Expand Up @@ -107,6 +107,40 @@ impl Client {
self.inner.enable_stats(request).await.map(|resp| resp.into_inner())
}

/// Returns DDM peer information including interface names.
///
/// The `if_name` field on each peer provides a live sled-to-port
/// mapping, identifying which switch port a peer sled is connected
/// through (e.g., `"tfportrear0_0"`).
pub async fn get_peers(
&self,
) -> Result<
std::collections::HashMap<String, types::PeerInfo>,
Error<types::Error>,
> {
self.inner.get_peers().await.map(|resp| resp.into_inner())
}

/// Returns multicast routes learned from DDM peers.
///
/// Each route includes the origin (overlay/underlay mapping),
/// the nexthop peer that advertised it, and the path vector.
pub async fn get_multicast_groups(
&self,
) -> Result<Vec<types::MulticastRoute>, Error<types::Error>> {
self.inner.get_multicast_groups().await.map(|resp| resp.into_inner())
}

/// Returns multicast origins that this DDM instance is advertising.
pub async fn get_originated_multicast_groups(
&self,
) -> Result<Vec<types::MulticastOrigin>, Error<types::Error>> {
self.inner
.get_originated_multicast_groups()
.await
.map(|resp| resp.into_inner())
}

/// Returns the addresses of connected sleds.
///
/// Note: These sleds have not yet been verified.
Expand Down
Loading
Loading