-
Notifications
You must be signed in to change notification settings - Fork 455
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Context deadline exceeded on VMs with large disks #1134
Comments
I am experiencing the same problem. From my research, I expect it's probably because this plugin always adopting provider.DefaultAPITimeout in the context section of the following code that customizes the VM (Sorry if I'm wrong).
terraform-provider-vsphere/vsphere/internal/helper/virtualmachine/virtual_machine_helper.go Line 658 in 66543c5
To solve this, I think it needs to be modified to allow passing a timeout parameter such as api_timeout as an argument. Please let me know your opinion. |
Thisi s also accuring on We have VMs that by policy need to be built with thck, eager zeroed VMDKs. When a Windows SQL instance is being built, we have a number of disks added, along with the main OS drive, which takes a while for vCenter to build out. On average, most of the SQL instances around 3.5TB of disk overall, which can take a fair amount of time to complete. For now, we're building the instances as thin provisioned to work around this, however, this is a violation of our internal policy that we would like resolved at the provisioning stage. |
hello, terraform version: with error > |
This issue is over a year old, is there any update on this? |
This is also affecting me. Any help or update on this would be very much appreciated! |
@KenzoB73 Is this still affecting you? |
Yes, happened last week again actually.
Sent from my iPhone.
… On Dec 1, 2021, at 1:03 PM, collin leishman ***@***.***> wrote:
@KenzoB73 Is this still affecting you?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
|
v2.0.0 added the
Example: terraform {
required_providers {
vsphere = {
source = "hashicorp/vsphere"
version = ">= 2.0.0"
}
}
required_version = ">= 1.0.0"
}
provider "vsphere" {
vsphere_server = "sfo-m01-vc01.rainpole.io"
user = "svc-terraform-vsphere@rainpole.io"
password = "***********”
allow_unverified_ssl = false
api_timeout = 30 // Example. Default 5.
} @morganhowarth-fd - have you tried this version or higher with this provider configuration. Ryan |
Resolved in #1405 with the introduction of the Marking this issue as closed. If this issue is reappears with the latest version of the provider, please create a new issue linking back to this one for added context. Ryan Johnson |
I'm going to lock this issue 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 similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Terraform Version
0.12.28
vSphere Provider Version
v1.18.1
Affected Resource(s)
vsphere_virtual_machine
Terraform Configuration Files
https://gist.github.com/morganhowarth-fd/aed994cf9c2ff1c155deb86e02ce2104
Expected Behavior
Terraform should be able to create the VM with a large disk without failing.
Actual Behavior
We have multiple database servers with 200GB thick-provisioned eager-zeroed secondary disks which deploy fine, and a few with 400GB thick-provisioned eager-zeroed secondary disks which have an issue as described below.
When creating a server from a template with a 400GB+ thick-provisioned eager-zeroed disk it takes some time and after exactly after 5 minutes whilst the template is still cloning another VMware job appears which deletes the virtual machine and Terraform fails with a message:
There was an error performing post-clone changes to virtual machine "foo": error reconfiguring virtual machine: Post https://VCENTER_SERVER/sdk: context deadline exceeded
It looks like the exact same issue as #641 which apparently was fixed by #792 but we still have the issue.
I've tried setting
wait_for_guest_net_timeout
to a higher value, the same withvim_keep_alive
but to no avail.A workaround for us, is to deploy the server with a smaller thick-provisioned disk then increase it to the desired size.
Steps to Reproduce
YMMV, you may need a larger disk if your clone job completes faster than 5 minutes.
terraform apply
with the TF config for a server with a large (400GB) thick-provisioned eager-zeroed secondary disk.There was an error performing post-clone changes to virtual machine "foo": error reconfiguring virtual machine: Post https://VCENTER_SERVER/sdk: context deadline exceeded
Important Factoids
We're running ESXI/vCenter 6.7 on hyper-converged infrastructure. Large storage writes especially with thick-provisoned disk eager-zeroed disks takes a while due to storage replication across the nodes.
References
Community Note
The text was updated successfully, but these errors were encountered: