Conversation
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.
dancrossnyc
reviewed
Jan 26, 2026
| info!(self.log, "Creating vNIC {}", device_name); | ||
| let bdf: pci::Bdf = nic.device_spec.pci_path.into(); | ||
|
|
||
| if virtio::viona::api_version().expect("can query viona version") |
Contributor
There was a problem hiding this comment.
I think it may be a bit more idiomatic to use assert!() here. Something like:
Suggested change
| if virtio::viona::api_version().expect("can query viona version") | |
| let viona_version = virtio::viona::api_version().expect("got viona version"); | |
| assert!(viona_version >= virtio::viona::ApiVersion::V6, | |
| "viona version {viona_version:?} is too old; need >= V6. Upgrade host OS"); |
Member
|
I could have sworn there was a place we check for version minimums here, but finding it took me a second: we probably should just bump |
Member
|
it ended up being a bit more distinct than I'd thought so #1027 takes a different swing at this. I included @dancrossnyc's suggestion that the OS is too old in the error there too. |
Contributor
Author
|
Superseded by #1027 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently if one runs propolis on a system which does not have a new
enough viona API, a stacktrace like this is generated.
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.