-
Notifications
You must be signed in to change notification settings - Fork 452
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
feat: Set timeout for v/virtual_machine
reconfigure task
#1645
Conversation
Hi @rashaev 👋, Can you please open an enhancement issue and then link the pull request to the issue? Ryan Johnson |
v/virtual_machine
reconfigure task
HI @tenthirtyam . Of course. I already did it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deferring to @appilon review.
v/virtual_machine
reconfigure taskv/virtual_machine
reconfigure task
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The provider really doesn't implement the canonical setup for handling timeouts. https://www.terraform.io/plugin/sdkv2/resources/retries-and-customizable-timeouts
It appears the provider awkwardly has a private defaultAPITimeout
which doesn't remain a default... in the provider configure function it gets set to the provider block attr api_timeout
. Some places in the provider also seems to use a public constant provider.DefaultAPITimeout
which does remain a hardcoded 5 minute timer..
With all that said, I'm comfortable approving this improvement for now, but would recommend harmonizing timeouts throughout the provider as a tech debt task.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved.
Ryan Johnson
Senior Staff Solutions Architect | Product Engineering @ VMware, Inc.
Updates `CHANGELOG.md` to include the enhancement provided in #1645.
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. |
Description
Sometimes reconfiguration tasks take a long time. And if they last more than 5 minutes, then the tasks fail. Because the limit is set as a constant as seen below.
terraform-provider-vsphere/vsphere/internal/helper/virtualmachine/virtual_machine_helper.go
Lines 827 to 840 in 30f37d2
This pull request adds a timeout setting for
r/virtual_machine
reconfiguration tasks.Release Note
resource/virtual_machine
: Virtual machine reconfiguration tasks will use the providerapi_timeout
setting. (GH-1645)References
Closes #1646
Closes #1662
Closes #1764
Closes #1795