Skip to content

Commit

Permalink
Merge branch 'felixmcfelix/opte-underlay-lock' into felixmcfelix/vpc-…
Browse files Browse the repository at this point in the history
…subnet-routing
  • Loading branch information
FelixMcFelix committed May 23, 2024
2 parents 2c06ff4 + 7b32e09 commit f7646ef
Show file tree
Hide file tree
Showing 74 changed files with 1,389 additions and 759 deletions.
File renamed without changes.
2 changes: 1 addition & 1 deletion .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 = "1.77.2"
#: rust_toolchain = "1.78.0"
#: output_rules = [
#: "=/out/cargo-bay-ce.tgz",
#: "=/out/cargo-bay-cr1.tgz",
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.77.2"
#: 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.77.2"
#: rust_toolchain = "1.78.0"
#: output_rules = [
#: "%/work/*",
#: "%/var/tmp/omicron_tmp/*",
Expand Down
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.77.2"
#: rust_toolchain = "1.78.0"
#: output_rules = []

# Run clippy on illumos (not just other systems) because a bunch of our code
Expand Down
1 change: 1 addition & 0 deletions .github/buildomat/jobs/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ _exit_trap() {
dump-state
pfexec /opt/oxide/opte/bin/opteadm list-ports
pfexec /opt/oxide/opte/bin/opteadm dump-v2b
pfexec /opt/oxide/opte/bin/opteadm dump-v2p
z_swadm link ls
z_swadm addr list
z_swadm route list
Expand Down
8 changes: 3 additions & 5 deletions .github/buildomat/jobs/omicron-common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@
#: name = "omicron-common (helios)"
#: variety = "basic"
#: target = "helios-2.0"
#: rust_toolchain = "1.77.2"
#: rust_toolchain = "1.78.0"
#: output_rules = []
#: skip_clone = true

# Verify that omicron-common builds successfully when used as a dependency
# in an external project. It must not leak anything that requires an external
Expand All @@ -18,10 +17,9 @@ set -o xtrace
cargo --version
rustc --version

cd /tmp
cargo new --lib test-project
cd test-project
cargo add omicron-common \
--git https://github.com/oxidecomputer/omicron.git \
--rev "$GITHUB_SHA"
cargo add omicron-common --path /work/oxidecomputer/omicron/common
cargo check
cargo build --release
2 changes: 1 addition & 1 deletion .github/buildomat/jobs/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#: name = "helios / package"
#: variety = "basic"
#: target = "helios-2.0"
#: rust_toolchain = "1.77.2"
#: rust_toolchain = "1.78.0"
#: output_rules = [
#: "=/work/package.tar.gz",
#: ]
Expand Down
2 changes: 1 addition & 1 deletion .github/buildomat/jobs/tuf-repo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#: name = "helios / build TUF repo"
#: variety = "basic"
#: target = "helios-2.0"
#: rust_toolchain = "1.77.2"
#: rust_toolchain = "1.78.0"
#: output_rules = [
#: "=/work/manifest.toml",
#: "=/work/repo.zip",
Expand Down
4 changes: 2 additions & 2 deletions certificates/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ mod tests {
// Valid certs: either no key usage values, or valid ones.
for ext_key_usage in &valid_ext_key_usage {
let mut params = CertificateParams::new(vec![HOST.to_string()]);
params.extended_key_usages = ext_key_usage.clone();
params.extended_key_usages.clone_from(ext_key_usage);

assert!(
validate_cert_with_params(params, &[HOST]).is_ok(),
Expand All @@ -431,7 +431,7 @@ mod tests {

for ext_key_usage in &invalid_ext_key_usage {
let mut params = CertificateParams::new(vec![HOST.to_string()]);
params.extended_key_usages = ext_key_usage.clone();
params.extended_key_usages.clone_from(ext_key_usage);

assert!(
matches!(
Expand Down
3 changes: 2 additions & 1 deletion clients/sled-agent-client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@ progenitor::generate_api!(
PortConfigV1 = { derives = [PartialEq, Eq, Hash, Serialize, Deserialize] },
RouteConfig = { derives = [PartialEq, Eq, Hash, Serialize, Deserialize] },
IpNet = { derives = [PartialEq, Eq, Hash, Serialize, Deserialize] },
OmicronPhysicalDiskConfig = { derives = [Clone, Debug, Serialize, Deserialize, PartialEq, Eq, Hash, PartialOrd, Ord] },
RouterId = { derives = [PartialEq, Eq, Hash, Debug, Deserialize, Serialize] },
VirtualNetworkInterfaceHost = { derives = [PartialEq, Eq, Hash, Serialize, Deserialize] },
OmicronPhysicalDiskConfig = { derives = [Clone, Debug, Serialize, Deserialize, PartialEq, Eq, Hash, PartialOrd, Ord] },
},
//TODO trade the manual transformations later in this file for the
// replace directives below?
Expand Down
19 changes: 0 additions & 19 deletions dev-tools/omdb/src/bin/omdb/db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1273,16 +1273,6 @@ async fn cmd_db_disk_physical(

// SERVICES

#[derive(Tabled)]
#[tabled(rename_all = "SCREAMING_SNAKE_CASE")]
struct ServiceInstanceRow {
#[tabled(rename = "SERVICE")]
kind: String,
instance_id: Uuid,
addr: String,
sled_serial: String,
}

// Snapshots
fn format_snapshot(state: &SnapshotState) -> impl Display {
match state {
Expand Down Expand Up @@ -1438,15 +1428,6 @@ async fn cmd_db_snapshot_info(

// SLEDS

#[derive(Tabled)]
#[tabled(rename_all = "SCREAMING_SNAKE_CASE")]
struct ServiceInstanceSledRow {
#[tabled(rename = "SERVICE")]
kind: String,
instance_id: Uuid,
addr: String,
}

#[derive(Tabled)]
#[tabled(rename_all = "SCREAMING_SNAKE_CASE")]
struct SledRow {
Expand Down
10 changes: 0 additions & 10 deletions dev-tools/omdb/src/bin/omdb/mgs/dashboard.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,16 +101,6 @@ trait Attributes: DynClone {
fn y_axis_label(&self) -> String;
fn axis_value(&self, val: f64) -> String;
fn legend_value(&self, val: f64) -> String;

fn increase(&mut self, _ndx: usize) -> Option<u8> {
None
}

fn decrease(&mut self, _ndx: usize) -> Option<u8> {
None
}

fn clear(&mut self) {}
}

dyn_clone::clone_trait_object!(Attributes);
Expand Down
4 changes: 1 addition & 3 deletions dev-tools/omdb/src/bin/omdb/mgs/sensors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -480,12 +480,10 @@ fn sp_info_csv<R: std::io::Read>(
}

if let Some(sensor) = Sensor::from_string(&record[1], &record[2]) {
if sensors.get(&sensor).is_some() {
if !sensors.insert(sensor.clone()) {
break;
}

sensors.insert(sensor.clone());

for (ndx, sp) in sps.iter().enumerate() {
if let Some(sp) = sp {
let value = match record[ndx + len].parse::<f32>() {
Expand Down
12 changes: 12 additions & 0 deletions dev-tools/omdb/tests/env.out
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,10 @@ task: "switch_port_config_manager"
manages switch port settings for rack switches


task: "v2p_manager"
manages opte v2p mappings for vpc networking


task: "vpc_route_manager"
propagates updated VPC routes to all OPTE ports

Expand Down Expand Up @@ -229,6 +233,10 @@ task: "switch_port_config_manager"
manages switch port settings for rack switches


task: "v2p_manager"
manages opte v2p mappings for vpc networking


task: "vpc_route_manager"
propagates updated VPC routes to all OPTE ports

Expand Down Expand Up @@ -331,6 +339,10 @@ task: "switch_port_config_manager"
manages switch port settings for rack switches


task: "v2p_manager"
manages opte v2p mappings for vpc networking


task: "vpc_route_manager"
propagates updated VPC routes to all OPTE ports

Expand Down
11 changes: 11 additions & 0 deletions dev-tools/omdb/tests/successes.out
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,10 @@ task: "switch_port_config_manager"
manages switch port settings for rack switches


task: "v2p_manager"
manages opte v2p mappings for vpc networking


task: "vpc_route_manager"
propagates updated VPC routes to all OPTE ports

Expand Down Expand Up @@ -475,6 +479,13 @@ task: "switch_port_config_manager"
started at <REDACTED TIMESTAMP> (<REDACTED DURATION>s ago) and ran for <REDACTED DURATION>ms
warning: unknown background task: "switch_port_config_manager" (don't know how to interpret details: Object {})

task: "v2p_manager"
configured period: every 30s
currently executing: no
last completed activation: <REDACTED ITERATIONS>, triggered by an explicit signal
started at <REDACTED TIMESTAMP> (<REDACTED DURATION>s ago) and ran for <REDACTED DURATION>ms
warning: unknown background task: "v2p_manager" (don't know how to interpret details: Object {})

task: "vpc_route_manager"
configured period: every 30s
currently executing: no
Expand Down
2 changes: 1 addition & 1 deletion dev-tools/oxlog/src/bin/oxlog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ struct FilterArgs {
#[arg(short, long)]
archived: bool,

// Print only the extra log files
/// Print only the extra log files
#[arg(short, long)]
extra: bool,

Expand Down
18 changes: 4 additions & 14 deletions illumos-utils/src/opte/params.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,26 +31,16 @@ pub struct VpcFirewallRule {
}

/// A mapping from a virtual NIC to a physical host
#[derive(Clone, Debug, Serialize, Deserialize, JsonSchema, PartialEq)]
pub struct SetVirtualNetworkInterfaceHost {
#[derive(
Clone, Debug, Serialize, Deserialize, JsonSchema, PartialEq, Eq, Hash,
)]
pub struct VirtualNetworkInterfaceHost {
pub virtual_ip: IpAddr,
pub virtual_mac: external::MacAddr,
pub physical_host_ip: Ipv6Addr,
pub vni: external::Vni,
}

/// The data needed to identify a virtual IP for which a sled maintains an OPTE
/// virtual-to-physical mapping such that that mapping can be deleted.
#[derive(Clone, Debug, Serialize, Deserialize, JsonSchema, PartialEq)]
pub struct DeleteVirtualNetworkInterfaceHost {
/// The virtual IP whose mapping should be deleted.
pub virtual_ip: IpAddr,

/// The VNI for the network containing the virtual IP whose mapping should
/// be deleted.
pub vni: external::Vni,
}

/// DHCP configuration for a port
///
/// Not present here: Hostname (DHCPv4 option 12; used in DHCPv6 option 39); we
Expand Down
Loading

0 comments on commit f7646ef

Please sign in to comment.