Skip to content

Commit dad43a7

Browse files
committed
Add FMD fault inventory to sled-agent API
Exposes illumos Fault Management Daemon (FMD) data through the sled-agent inventory endpoint. This lets the control plane see diagnosed hardware/software faults on each sled. New API version 35 adds an `fmd: Option<FmdInventory>` field to `Inventory`. When present, it contains: - Cases: diagnosed faults with UUID, diagnostic code, URL, and the full event nvlist serialized as JSON - Resources: affected components with FMRI, fault status flags On illumos, sled-agent queries FMD on each inventory request. On non-illumos (sim, tests), the field is None. Database storage is not included — that's a follow-up.
1 parent 5c0b62d commit dad43a7

58 files changed

Lines changed: 927 additions & 62 deletions

File tree

Some content is hidden

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

Cargo.lock

Lines changed: 68 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -504,6 +504,8 @@ filetime = "0.2.26"
504504
flate2 = "1.1.2"
505505
float-ord = "0.3.2"
506506
flume = "0.11.1"
507+
fmd-adm = { git = "https://github.com/oxidecomputer/fmd-adm", rev = "fffb52212fb1e073e9f1b16761b3614af8b38063" }
508+
fmd-adm-sys = { git = "https://github.com/oxidecomputer/fmd-adm", rev = "fffb52212fb1e073e9f1b16761b3614af8b38063" }
507509
foreign-types = "0.3.2"
508510
fs-err = "3.1.1"
509511
futures = "0.3.31"

clients/sled-agent-client/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ progenitor::generate_api!(
6060
ExternalIpConfig = omicron_common::api::internal::shared::ExternalIpConfig,
6161
ExternalIpv4Config = omicron_common::api::internal::shared::ExternalIpv4Config,
6262
ExternalIpv6Config = omicron_common::api::internal::shared::ExternalIpv6Config,
63+
FmdCase = sled_agent_types_versions::latest::inventory::FmdCase,
64+
FmdInventory = sled_agent_types_versions::latest::inventory::FmdInventory,
65+
FmdResource = sled_agent_types_versions::latest::inventory::FmdResource,
6366
Generation = omicron_common::api::external::Generation,
6467
Hostname = omicron_common::api::external::Hostname,
6568
ImportExportPolicy = sled_agent_types_versions::latest::early_networking::ImportExportPolicy,

cockroach-admin/Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ toml.workspace = true
3939

4040
omicron-workspace-hack.workspace = true
4141

42+
[target.'cfg(target_os = "illumos")'.dependencies]
43+
# See omicron-rpaths for more about the "fmd-adm-sys" dependency.
44+
fmd-adm-sys.workspace = true
45+
4246
[dev-dependencies]
4347
expectorate.workspace = true
4448
nexus-test-utils.workspace = true

dev-tools/omdb/Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,10 @@ update-engine.workspace = true
9494
url.workspace = true
9595
uuid.workspace = true
9696

97+
[target.'cfg(target_os = "illumos")'.dependencies]
98+
# See omicron-rpaths for more about the "fmd-adm-sys" dependency.
99+
fmd-adm-sys.workspace = true
100+
97101
[dev-dependencies]
98102
camino-tempfile.workspace = true
99103
expectorate.workspace = true

dev-tools/omicron-dev/Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ signal-hook-tokio.workspace = true
3131
tokio.workspace = true
3232
toml.workspace = true
3333

34+
[target.'cfg(target_os = "illumos")'.dependencies]
35+
# See omicron-rpaths for more about the "fmd-adm-sys" dependency.
36+
fmd-adm-sys.workspace = true
37+
3438
[dev-dependencies]
3539
expectorate.workspace = true
3640
omicron-dev-lib.workspace = true

dev-tools/reconfigurator-cli/Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ update-common.workspace = true
5252
uuid.workspace = true
5353
omicron-workspace-hack.workspace = true
5454

55+
[target.'cfg(target_os = "illumos")'.dependencies]
56+
# See omicron-rpaths for more about the "fmd-adm-sys" dependency.
57+
fmd-adm-sys.workspace = true
58+
5559
[dev-dependencies]
5660
# To keep test iterations fast, please avoid a dependency on omicron-nexus or
5761
# its database code here. Instead, put those tests inside

dev-tools/reconfigurator-exec-unsafe/Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ update-engine.workspace = true
3737
uuid.workspace = true
3838
omicron-workspace-hack.workspace = true
3939

40+
[target.'cfg(target_os = "illumos")'.dependencies]
41+
# See omicron-rpaths for more about the "fmd-adm-sys" dependency.
42+
fmd-adm-sys.workspace = true
43+
4044
[[bin]]
4145
name = "reconfigurator-exec-unsafe"
4246
path = "src/main.rs"

0 commit comments

Comments
 (0)