terraform-provider-vsphere
terraform-provider-vsphere copied to clipboard
fix: Address `r/virtual_disk` type query failure
Description
This pull request issues a warning rather than failure when queries for a disk's type return no attributes.
Applicable on vSphere 6.5 - 7.0.
Manual testing
Patched provider and confirmed working on vSphere 6.7
Release Note
resource/virtual_disk: Adds a warning when a virtual disk's type query fails.
References
Resolves #1191
Hey @vaficionado / @bill-rich Can we get some eyes on this PR and associated issue?
The base branch restricts merging to authorized users
Who's the authorized users here? 🤔
Hey @tenthirtyam this outstanding PR is blocking ua (AUCloud) from upgrading the version of Terraform we use. Any chance we can get this PR into Terraform sooner? Thanks 🙏
Adding @appilon for review and comments.
Ryan Johnson Staff II Solutions Architect | VMware, Inc.
After a some review this morning, it would seem that it may be more constructive to determine why virtualdisk.QueryDiskType is not returning the disk type rather than warning and continuing.
Ryan Johnson Staff II Solutions Architect | VMware, Inc.
What do you need to help determine why this is happening?
My concern with this pull request is that changing this to a [WARN] is it could introduce other consequences.
For example, if the diskType is not read as thin and then defaults to eagerZeroedThick per the schema, this could potentially force new if/when detected correctly as something different than eagerZeroedThick.
https://github.com/hashicorp/terraform-provider-vsphere/blob/1b0b885739b958cb1bcd6496dc82deca1aadb577/vsphere/resource_vsphere_virtual_disk.go#L72-L85
@deebsman @prologic -
- It was mentioned in the original issue that this was impacting vSphere 6.5 - was the originating issue also seen in vSphere 6.7 and/or 7.0?
- Do you have another simplified example for testing/reproduction purposes?
cc @appilon
Ryan Johnson Senior Staff Solutions Architect | Product Engineering @ VMware, Inc.
Hi @tenthirtyam ! Sorry but yeah we're going to have to go back and figure this out ourselves as it took over a year to even get some eyes on this. Appreciate you stepping in though and taking a look, but at this point I feel it would be more efficient if the VMWare engineering team looked at this and tried to reproduce. We (our SRE team) don't have any control over our vSphere environments, we're just users 😅
Hi James ( @prologic ),
Do you have a simplified Terraform example that experienced this issue - I could use it for testing/reproduction purposes.
Ryan Johnson Senior Staff Solutions Architect | Product Engineering @ VMware, Inc.
Per previous comments, this needs more investigation.
Any examples and known environmental factors that cause this issue are welcome. Please post to the originating issue: https://github.com/hashicorp/terraform-provider-vsphere/issues/1191.
Ryan Johnson Senior Staff Solutions Architect | Product Engineering @ VMware, Inc.
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.