Skip to content
Merged
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
9 changes: 9 additions & 0 deletions .cargo/xtask.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,12 @@ binary_allow_list = [
"sled-agent",
"sled-agent-sim",
]

# libfmd_adm is the illumos Fault Management Daemon admin library, used by
# sled-agent to collect FMD case/resource information for inventory.
[libraries."libfmd_adm.so.1"]
binary_allow_list = [
"omicron-dev",
"sled-agent",
"sled-agent-sim",
]
50 changes: 50 additions & 0 deletions Cargo.lock

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

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,8 @@ filetime = "0.2.26"
flate2 = "1.1.2"
float-ord = "0.3.2"
flume = "0.11.1"
fmd-adm = { git = "https://github.com/oxidecomputer/fmd-adm", rev = "846361bf0a698a8c7efefd97b2828b9aa74858c4" }
fmd-adm-sys = { git = "https://github.com/oxidecomputer/fmd-adm", rev = "846361bf0a698a8c7efefd97b2828b9aa74858c4" }
foreign-types = "0.3.2"
fs-err = "3.1.1"
futures = "0.3.31"
Expand Down
5 changes: 5 additions & 0 deletions clients/sled-agent-client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ progenitor::generate_api!(
ExternalIpConfig = sled_agent_types_versions::latest::instance::ExternalIpConfig,
ExternalIpv4Config = sled_agent_types_versions::latest::instance::ExternalIpv4Config,
ExternalIpv6Config = sled_agent_types_versions::latest::instance::ExternalIpv6Config,
FmdHostCase = sled_agent_types_versions::latest::inventory::FmdHostCase,
FmdInventory = sled_agent_types_versions::latest::inventory::FmdInventory,
FmdInventoryError = sled_agent_types_versions::latest::inventory::FmdInventoryError,
FmdInventoryErrorKind = sled_agent_types_versions::latest::inventory::FmdInventoryErrorKind,
FmdResource = sled_agent_types_versions::latest::inventory::FmdResource,
Generation = omicron_common::api::external::Generation,
Hostname = omicron_common::api::external::Hostname,
ImportExportPolicy = sled_agent_types_versions::latest::early_networking::ImportExportPolicy,
Expand Down
4 changes: 4 additions & 0 deletions cockroach-admin/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ toml.workspace = true

omicron-workspace-hack.workspace = true

[target.'cfg(target_os = "illumos")'.dependencies]
# See omicron-rpaths for more about the "fmd-adm-sys" dependency.
fmd-adm-sys.workspace = true
Comment thread
smklein marked this conversation as resolved.

[dev-dependencies]
expectorate.workspace = true
nexus-test-utils.workspace = true
Expand Down
4 changes: 4 additions & 0 deletions dev-tools/omdb/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ update-engine.workspace = true
url.workspace = true
uuid.workspace = true

[target.'cfg(target_os = "illumos")'.dependencies]
# See omicron-rpaths for more about the "fmd-adm-sys" dependency.
fmd-adm-sys.workspace = true
Comment thread
smklein marked this conversation as resolved.

[dev-dependencies]
camino-tempfile.workspace = true
expectorate.workspace = true
Expand Down
4 changes: 4 additions & 0 deletions dev-tools/omicron-dev/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ signal-hook-tokio.workspace = true
tokio.workspace = true
toml.workspace = true

[target.'cfg(target_os = "illumos")'.dependencies]
# See omicron-rpaths for more about the "fmd-adm-sys" dependency.
fmd-adm-sys.workspace = true
Comment thread
smklein marked this conversation as resolved.

[dev-dependencies]
expectorate.workspace = true
omicron-dev-lib.workspace = true
Expand Down
8 changes: 8 additions & 0 deletions end-to-end-tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,14 @@ name = "end-to-end-tests"
version = "0.1.0"
edition.workspace = true
license = "MPL-2.0"
build = "build.rs"

[lints]
workspace = true

[build-dependencies]
omicron-rpaths.workspace = true

[dependencies]
anstyle.workspace = true
anyhow = { workspace = true, features = ["backtrace"] }
Expand Down Expand Up @@ -50,3 +54,7 @@ thiserror.workspace = true
tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
toml.workspace = true
uuid.workspace = true

[target.'cfg(target_os = "illumos")'.dependencies]
# See omicron-rpaths for more about the "fmd-adm-sys" dependency.
fmd-adm-sys.workspace = true
Comment thread
smklein marked this conversation as resolved.
10 changes: 10 additions & 0 deletions end-to-end-tests/build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// 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/.

// See omicron-rpaths for documentation.
// NOTE: This file MUST be kept in sync with the other build.rs files in this
// repository.
fn main() {
omicron_rpaths::configure_default_omicron_rpaths();
}
4 changes: 4 additions & 0 deletions nexus/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,10 @@ omicron-workspace-hack.workspace = true
omicron-uuid-kinds.workspace = true
zip = { workspace = true, features = ["jiff-02"] }

[target.'cfg(target_os = "illumos")'.dependencies]
# See omicron-rpaths for more about the "fmd-adm-sys" dependency.
fmd-adm-sys.workspace = true
Comment thread
smklein marked this conversation as resolved.

[dev-dependencies]
async-bb8-diesel.workspace = true
camino-tempfile.workspace = true
Expand Down
4 changes: 4 additions & 0 deletions nexus/db-queries/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ omicron-workspace-hack.workspace = true
# only enabled during tests or via the `testing` feature
omicron-test-utils = { workspace = true, optional = true }

[target.'cfg(target_os = "illumos")'.dependencies]
# See omicron-rpaths for more about the "fmd-adm-sys" dependency.
fmd-adm-sys.workspace = true
Comment thread
smklein marked this conversation as resolved.

[features]
# Enable to export `TestDatabase`
testing = ["omicron-test-utils"]
Expand Down
7 changes: 4 additions & 3 deletions nexus/db-queries/src/db/datastore/physical_disk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -773,9 +773,9 @@ mod test {
use omicron_test_utils::dev;
use omicron_uuid_kinds::ZpoolUuid;
use sled_agent_types::inventory::{
Baseboard, ConfigReconcilerInventoryStatus, Inventory, InventoryDisk,
OmicronFileSourceResolverInventory, SledCpuFamily, SledRole,
SvcsEnabledNotOnlineResult,
Baseboard, ConfigReconcilerInventoryStatus, FmdInventory, Inventory,
InventoryDisk, OmicronFileSourceResolverInventory, SledCpuFamily,
SledRole, SvcsEnabledNotOnlineResult,
};
use std::num::NonZeroU32;

Expand Down Expand Up @@ -1137,6 +1137,7 @@ mod test {
smf_services_enabled_not_online:
SvcsEnabledNotOnlineResult::DataUnavailable,
reference_measurements: IdOrdMap::new(),
fmd: Ok(FmdInventory::default()),
},
)
.unwrap();
Expand Down
8 changes: 8 additions & 0 deletions nexus/inventory/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,14 @@ name = "nexus-inventory"
version = "0.1.0"
edition.workspace = true
license = "MPL-2.0"
build = "build.rs"

[lints]
workspace = true

[build-dependencies]
omicron-rpaths.workspace = true

[dependencies]
anyhow.workspace = true
base64.workspace = true
Expand Down Expand Up @@ -46,6 +50,10 @@ uuid.workspace = true
omicron-cockroach-metrics.workspace = true
omicron-workspace-hack.workspace = true

[target.'cfg(target_os = "illumos")'.dependencies]
# See omicron-rpaths for more about the "fmd-adm-sys" dependency.
fmd-adm-sys.workspace = true
Comment thread
smklein marked this conversation as resolved.

[dev-dependencies]
expectorate.workspace = true
gateway-test-utils.workspace = true
Expand Down
10 changes: 10 additions & 0 deletions nexus/inventory/build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// 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/.

// See omicron-rpaths for documentation.
// NOTE: This file MUST be kept in sync with the other build.rs files in this
// repository.
fn main() {
omicron_rpaths::configure_default_omicron_rpaths();
}
2 changes: 2 additions & 0 deletions nexus/inventory/src/examples.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ use sled_agent_types::inventory::BootPartitionDetails;
use sled_agent_types::inventory::ConfigReconcilerInventory;
use sled_agent_types::inventory::ConfigReconcilerInventoryResult;
use sled_agent_types::inventory::ConfigReconcilerInventoryStatus;
use sled_agent_types::inventory::FmdInventory;
use sled_agent_types::inventory::HostPhase2DesiredSlots;
use sled_agent_types::inventory::Inventory;
use sled_agent_types::inventory::InventoryDataset;
Expand Down Expand Up @@ -1115,5 +1116,6 @@ pub fn sled_agent(
file_source_resolver,
smf_services_enabled_not_online,
reference_measurements,
fmd: Ok(FmdInventory::default()),
}
}
4 changes: 4 additions & 0 deletions nexus/metrics-producer-gc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ pq-sys = "*"

omicron-workspace-hack.workspace = true

[target.'cfg(target_os = "illumos")'.dependencies]
# See omicron-rpaths for more about the "fmd-adm-sys" dependency.
fmd-adm-sys.workspace = true
Comment thread
smklein marked this conversation as resolved.

[dev-dependencies]
async-bb8-diesel.workspace = true
diesel.workspace = true
Expand Down
Loading
Loading