Commit 5267be8
authored
[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- bin/propolis-server/src/lib
- spec
- stats
- vm
- crates
- propolis-api-types/src
- instance_spec/components
- viona-api/src
- lib/propolis/src/hw/virtio
- openapi
17 files changed
+804
-211
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
85 | | - | |
| 84 | + | |
| 85 | + | |
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
| 99 | + | |
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| |||
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
0 commit comments