New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nixos/nixos-generate-config: include new device ID for virtio_scsi #123357
Conversation
@FRidh: I see that you merged the last PR that modified these vendor IDs. Would you mind reviewing this change? Thanks! |
Hi, I'm the original author for that code. I just realized we should just look at the VirtIO specification and see what valid Device IDs might be generated. https://docs.oasis-open.org/virtio/virtio/v1.1/virtio-v1.1.html
Emphasis added by me. Let's future proof this and check for all possible Device IDs? |
@dminuoso I'd really like to fix this, but I'm completely ignorant when it comes to Perl. How would you test this code? Do you happen to know which packages to install with nix-shell to be able to run this code? |
Can I do something to help getting the "semantic" version of this merged? |
Semantically this seems wrong to me -- we're not looking for "any virtio device", we're looking for VirtIO SCSI hosts (virtio_scsi module). The documentation you linked clearly says that's 0x1040 (base) + 8 (SCSI host device ID) = 0x1048, or 0x1004 for transitional. My reading of the docs is that no other value should be used for a virtio scsi host. I found this PR because someone told me today they hit this problem on a Hetzner cloud instance. This seems like a footgun we should get rid of. Any objection to merging this as is, given what I've mentioned in the previous paragraph? |
d511f3c
to
3078cdb
Compare
Successfully created backport PR for |
Motivation for this change
nixos-generate-config
is currently not correctly detecting somevirtio_scsi
devices, causing systems to be rendered unbootable. This change includes an additional vendor ID to make sure that the presence of VirtIO devices is detected correctly.Fixes #76980.
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)