terraform-provider-vsphere icon indicating copy to clipboard operation
terraform-provider-vsphere copied to clipboard

fix: Address `r/virtual_disk` type query failure

Open deebsman opened this issue 4 years ago • 10 comments

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

deebsman avatar Jul 20 '21 01:07 deebsman

CLA assistant check
All committers have signed the CLA.

hashicorp-cla avatar Jul 20 '21 01:07 hashicorp-cla

Hey @vaficionado / @bill-rich Can we get some eyes on this PR and associated issue?

prologic avatar Sep 27 '21 03:09 prologic

The base branch restricts merging to authorized users

Who's the authorized users here? 🤔

prologic avatar Sep 27 '21 08:09 prologic

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 🙏

prologic avatar May 16 '22 05:05 prologic

Adding @appilon for review and comments.

Ryan Johnson Staff II Solutions Architect | VMware, Inc.

tenthirtyam avatar May 16 '22 12:05 tenthirtyam

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.

tenthirtyam avatar May 16 '22 12:05 tenthirtyam

What do you need to help determine why this is happening?

prologic avatar May 16 '22 22:05 prologic

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.

tenthirtyam avatar Jul 20 '22 00:07 tenthirtyam

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 😅

prologic avatar Jul 20 '22 05:07 prologic

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.

tenthirtyam avatar Jul 20 '22 11:07 tenthirtyam

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.

tenthirtyam avatar Aug 16 '22 17:08 tenthirtyam

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.

github-actions[bot] avatar Sep 16 '22 02:09 github-actions[bot]