Skip to content

Commit 5267be8

Browse files
[network metrics] instance network interface metrics (#747)
Overview ======== This is related to the ongoing work in [plumbing instance/guest metrics](#742) through to an oximeter producer in propolis. Includes: * An update to `NetworkInterfaceRequest` to include an interface_id, which is part of the request on the [sled instance in Omicron](oxidecomputer/omicron#6414). * Within initialization, with concrete types, we create interface_ids mapping nic UUIDs => `minor` number of the device instance of viona. This is done as a Vec because it is limited in size (typically the MAX networks interfaces per VM). - The device instance number matches the Kstat we'll look for. - We track this mapping via a type alias `NetworkInterfaceIds` which is then passed to a `track_network_interfaces_kstats` function which is part of `initialize_network_devices` and adds the target to the kstat sampler. * A new stats module for collecting network_interface metrics. - In `to_samples` we generate multiple network interface targets based on vnics per instance, appropriately updating the `interface_id`, which comes from the network interface identifiers updated in network device initialization. * Move kstat_types out of virtual machine-specific stats and use its mocking for other stats tests * move stats.rs to stats/mod.rs Dependencies ------------ - [X] oxidecomputer/omicron#6414 - [X] https://code.illumos.org/c/illumos-gate/+/3630 Thanks to @pfmooney for exposing kstats directly through the viona (VirtIO-Net) driver as part of https://code.illumos.org/c/illumos-gate/+/3630. This work would be nothing without his!
1 parent 9e4dd21 commit 5267be8

File tree

17 files changed

+804
-211
lines changed

17 files changed

+804
-211
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ oximeter = { git = "https://github.com/oxidecomputer/omicron", branch = "main" }
8181
sled-agent-client = { git = "https://github.com/oxidecomputer/omicron", branch = "main" }
8282

8383
# Crucible
84-
crucible = { git = "https://github.com/oxidecomputer/crucible", rev = "d037eeb9a56a8a62ff17266f340c011224d15146" }
85-
crucible-client-types = { git = "https://github.com/oxidecomputer/crucible", rev = "d037eeb9a56a8a62ff17266f340c011224d15146" }
84+
crucible = { git = "https://github.com/oxidecomputer/crucible", rev = "9d82a99058e7f4d76ccc2141dcd78e7d4730cc78" }
85+
crucible-client-types = { git = "https://github.com/oxidecomputer/crucible", rev = "9d82a99058e7f4d76ccc2141dcd78e7d4730cc78" }
8686

8787
# External dependencies
8888
anyhow = "1.0"
@@ -96,7 +96,7 @@ bitflags = "2.4"
9696
bitstruct = "0.1"
9797
bitvec = "1.0"
9898
byteorder = "1"
99-
bytes = "1.1"
99+
bytes = "1.7.1"
100100
camino = "1.1.6"
101101
cargo_metadata = "0.18.1"
102102
cc = "1.0.73"
@@ -164,3 +164,19 @@ tracing-subscriber = "0.3.14"
164164
usdt = { version = "0.5", default-features = false }
165165
uuid = "1.3.2"
166166
zerocopy = "0.7.34"
167+
168+
169+
#
170+
# It's common during development to use a local copy of various complex
171+
# dependencies. If you want to use those, uncomment one of these blocks.
172+
#
173+
# [patch."https://github.com/oxidecomputer/omicron"]
174+
# internal-dns = { path = "../omicron/internal-dns" }
175+
# nexus-client = { path = "../omicron/clients/nexus-client" }
176+
# omicron-common = { path = "../omicron/common" }
177+
# oximeter-instruments = { path = "../omicron/oximeter/instruments" }
178+
# oximeter-producer = { path = "../omicron/oximeter/producer" }
179+
# oximeter = { path = "../omicron/oximeter/oximeter" }
180+
# [patch."https://github.com/oxidecomputer/crucible"]
181+
# crucible = { path = "../crucible/upstairs" }
182+
# crucible-client-types = { path = "../crucible/crucible-client-types" }

0 commit comments

Comments
 (0)