Closed omertuc closed 1 year ago
As the original code was not specifying any convention, the vdX
pattern was determined by libvirt. Shouldn't this be fixed in libvirt instead? ie. to use sda pattern if no device name is specified.
For .iso
the Dev
is already being overidden: https://github.com/openshift-assisted/terraform-provider-libvirt/blob/f6f8a26f9a7b044e5648156bd632a88dfcea707a/libvirt/domain.go#L545
so my PR fix is not unprecedented
Thanks. It makes sense now.
I need to find out if the right fix is to stop overriding it at all, or like you suggested, do it also for SCSI. Some evidence how libvirt and qemu layers deal with defaults would be helpful.
When I try to omit the Dev:
parameter (by modifying the provider source code, not through tf files or anything like that) libvirt is telling me:
╷
│ Error: error defining libvirt domain: missing target information for device pool = 'default', volume = 'test-disk'
│
│ with libvirt_domain.host,
│ on main.tf line 19, in resource "libvirt_domain" "host":
│ 19: resource "libvirt_domain" "host" {
│
Which would lead me to believe it's probably required
System Information
Linux distribution
Terraform version
Provider and libvirt versions
Checklist
[ ] Is your issue/contribution related with enabling some setting/option exposed by libvirt that the plugin does not yet support, or requires changing/extending the provider terraform schema?
[x] Is it a bug or something that does not work as expected? Please make sure you fill the version information below:
Description of Issue/Question
The
<target>
dev
attribute given to SCSI host disks should have ansd
prefix and notvd
prefix (e.g.sda
as opposed tovda
), to better match the name that Linux would give them.Setup
Steps to Reproduce Issue
Additional information:
None