Skip to content

[sled-hardware-types] Move I/O logic out of types crate#10028

Merged
mergeconflict merged 2 commits into
mainfrom
mergeconflict/move-underlay-bootstrap-ip
Mar 11, 2026
Merged

[sled-hardware-types] Move I/O logic out of types crate#10028
mergeconflict merged 2 commits into
mainfrom
mergeconflict/move-underlay-bootstrap-ip

Conversation

@mergeconflict
Copy link
Copy Markdown
Contributor

sled-hardware-types depended on illumos-utils and omicron-common because BootstrapInterface::ip() performed I/O via Dladm::get_mac(). We don't really want those dependencies here, particularly for downstream crates that only need the type definitions (e.g. ddm-admin-client, wicketd).

Extract BoostrapInterface::ip() as a free function bootstrap_ip() in sled-hardware::underlay, which already depends on illumos-utils and omicron-common. BootstrapInterface, BOOTSTRAP_PREFIX and BOOTSTRAP_MASK remain in sled-hardware-types.

Comment thread sled-hardware/src/underlay.rs Outdated
Comment thread .gitignore Outdated
@mergeconflict mergeconflict force-pushed the mergeconflict/move-underlay-bootstrap-ip branch from 48b993a to 28c00cc Compare March 11, 2026 20:37
sled-hardware-types depended on illumos-utils and omicron-common solely
because BootstrapInterface::ip() performed async I/O via Dladm::get_mac().
This is inappropriate for a types crate and pulls in heavyweight
dependencies for consumers that only need the type definitions (e.g.
ddm-admin-client, wicketd).

Extract ip() as a free function bootstrap_ip() in sled-hardware::underlay,
which already has these dependencies. The pure types (BootstrapInterface,
BOOTSTRAP_PREFIX, BOOTSTRAP_MASK) remain in sled-hardware-types.
@mergeconflict mergeconflict force-pushed the mergeconflict/move-underlay-bootstrap-ip branch from 28c00cc to 5387052 Compare March 11, 2026 20:38
@mergeconflict mergeconflict enabled auto-merge (squash) March 11, 2026 23:11
@mergeconflict mergeconflict merged commit 6479763 into main Mar 11, 2026
17 checks passed
@mergeconflict mergeconflict deleted the mergeconflict/move-underlay-bootstrap-ip branch March 11, 2026 23:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants