Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[sled-agent] Disk Detection, Partition Management, and U.2 formatting #2176

Merged
merged 43 commits into from
Jan 30, 2023
Merged
Show file tree
Hide file tree
Changes from 31 commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
f6ba4af
Tracking disks via libdevinfo
smklein Dec 5, 2022
d59f515
Merge branch 'main' into detect-disks
smklein Jan 16, 2023
482d62f
some SQL table hypotheticals
smklein Jan 17, 2023
0c3d3c6
Partition detection - still needs more work; untested
smklein Jan 17, 2023
b596a4a
comments
smklein Jan 17, 2023
56c0ce5
fmt
smklein Jan 17, 2023
8e5e70c
Better error handling
smklein Jan 17, 2023
330dcbf
pfexec before fstyp, add disks on hw scan
smklein Jan 17, 2023
1ccbfd2
prepend '/devices' to devfs paths
smklein Jan 17, 2023
3dd3929
Merge branch 'main' into detect-disks
smklein Jan 18, 2023
d874798
Merge branch 'main' into detect-disks
smklein Jan 18, 2023
738ebdc
delete disk without todo
smklein Jan 18, 2023
7bafeca
Sled agent formatting U.2 devices to conform to zpool format
smklein Jan 20, 2023
40c4767
Merge branch 'main' into detect-disks
smklein Jan 20, 2023
31305b9
Update libefi-illumos
smklein Jan 20, 2023
c11e461
Merge branch 'main' into detect-disks
smklein Jan 22, 2023
542da6f
better errors
smklein Jan 22, 2023
567c2b5
Fix blkdev polling, add logging, format zpools
smklein Jan 23, 2023
a788462
Make tofino logging a little less noisy
smklein Jan 23, 2023
7236a3a
Comments and clippy
smklein Jan 23, 2023
a306bb7
remove sql changes
smklein Jan 23, 2023
a942444
primitive device ID
smklein Jan 23, 2023
cd5b024
Integrate with nvme ioctls to grab vendor ID
smklein Jan 23, 2023
70e62aa
luck be a lockfile
smklein Jan 23, 2023
bd0993d
Better docs, handle 'missing disk add/remove notification' case better
smklein Jan 24, 2023
f43e679
Add tests for ensure_partition_layout
smklein Jan 24, 2023
55b6b3c
more tests
smklein Jan 24, 2023
b10f963
fix clippy on helios
smklein Jan 24, 2023
9867125
logging cleanup
smklein Jan 24, 2023
f52e128
Merge branch 'main' into detect-disks
smklein Jan 25, 2023
36db8d2
Disk identity is strongly typed now
smklein Jan 25, 2023
46f8f12
Merge branch 'main' into detect-disks
smklein Jan 25, 2023
f2c36d7
Review feedback
smklein Jan 26, 2023
48cf49c
more feedback
smklein Jan 26, 2023
14d65d5
errors don't panic
smklein Jan 26, 2023
4055451
Merge branch 'main' into detect-disks
smklein Jan 27, 2023
5f76b7c
review feedback
smklein Jan 27, 2023
c8c5bc9
Rely on devinfo properties rather than ioctl
smklein Jan 29, 2023
9a1987a
Sanitize environment
smklein Jan 29, 2023
2c5fbe4
Clippy and utf8
smklein Jan 29, 2023
72879b9
Merge branch 'main' into detect-disks
smklein Jan 29, 2023
74384de
Allow test devices to start, even without polling device tree
smklein Jan 29, 2023
a8bea74
Merge branch 'main' into detect-disks
smklein Jan 30, 2023
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
20 changes: 19 additions & 1 deletion Cargo.lock

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

3 changes: 2 additions & 1 deletion sled-agent/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ vsss-rs.workspace = true
zone.workspace = true

[target.'cfg(target_os = "illumos")'.dependencies]
illumos-devinfo = { git = "https://github.com/oxidecomputer/illumos-devinfo", rev = "8fca0709e5137a3758374cb41ab1bfc60b03e6a9" }
illumos-devinfo = { git = "https://github.com/oxidecomputer/illumos-devinfo", branch = "main" }
libefi-illumos = { git = "https://github.com/oxidecomputer/libefi-illumos", branch = "master" }
opte-ioctl.workspace = true

[dev-dependencies]
Expand Down
1 change: 1 addition & 0 deletions sled-agent/src/bootstrap/agent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ impl Agent {

// Begin monitoring for hardware to handle tasks like initialization of
// the switch zone.
info!(log, "Bootstrap Agent monitoring for hardware");
let hardware_monitor = HardwareMonitor::new(
&ba_log,
&sled_config,
Expand Down
15 changes: 15 additions & 0 deletions sled-agent/src/hardware/README.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
:showtitle:
:toc: left
:icons: font

= illumos hardware

This directory contains APIs for accessing information about the underlying
hardware of an illumos system. Some of these integrations rely on linking
against native illumos libraries, and therefore cannot be universally compiled
on all OSes.

As a consequence, this directory hierarchy is split into the "illumos" and
"non_illumos" targets. It's expected that the "non_illumos" target will remain
stub-only, but enable compilation (and code completion) on non-illumos editor
environments for the rest of the Sled Agent.
Loading