Commit b6ab921
committed
Panic with a clear message if the viona API is too old
Currently if one runs propolis on a system which does not have a new
enough viona API, a stacktrace like this is generated.
failed to enable promisc mode on vnic0: Os { code: 22, kind: InvalidInput, message: "Invalid argument" }
called `Result::unwrap()` on an `Err` value: Os { code: 25, kind: Uncategorized, message: "Inappropriate ioctl for device" }
stack backtrace:
0: __rustc::rust_begin_unwind
1: core::panicking::panic_fmt
2: core::result::unwrap_failed
3: propolis::hw::virtio::viona::PciVirtioViona::new_with_queue_sizes
4: propolis::hw::virtio::viona::PciVirtioViona::new
Since we don't currently support anything older than the V6 API in
propolis we should at least produce a useful error message to the
operator. It would be possible to fall back to the older API if we
wish to implement that.1 parent 909f5e3 commit b6ab921
2 files changed
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
771 | 771 | | |
772 | 772 | | |
773 | 773 | | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
774 | 781 | | |
775 | 782 | | |
776 | 783 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1247 | 1247 | | |
1248 | 1248 | | |
1249 | 1249 | | |
| 1250 | + | |
| 1251 | + | |
| 1252 | + | |
| 1253 | + | |
| 1254 | + | |
| 1255 | + | |
| 1256 | + | |
1250 | 1257 | | |
1251 | 1258 | | |
1252 | 1259 | | |
| |||
0 commit comments