Skip to content
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

vSphere: Terraform apply command hangs for 5 minutes #15

Closed
hashibot opened this issue Jun 13, 2017 · 2 comments
Closed

vSphere: Terraform apply command hangs for 5 minutes #15

hashibot opened this issue Jun 13, 2017 · 2 comments
Labels
bug Type: Bug

Comments

@hashibot
Copy link

This issue was originally opened by @Shruti29 as hashicorp/terraform#6300. It was migrated here as part of the provider split. The original body of the issue is below.


When I run terraform apply on my vSphere setup, it hangs for 5 minutes before actually starting the resource creation.
However terraform plan returns output immediately.

Unfortunately, I don't see any debug logs for this as well.
It hangs for 5 minutes and the resource creation logs are collected as it continues with the resource creation.

Need some help on this. I found the issue hashicorp/terraform#2059 quite similar to what I am facing.

@hashibot hashibot added the bug Type: Bug label Jun 13, 2017
krzkowalczyk pushed a commit to krzkowalczyk/terraform-provider-vsphere that referenced this issue Jul 14, 2017
…hange

This commit brings support to add/change/remove user permission on a VM.
krzkowalczyk pushed a commit to krzkowalczyk/terraform-provider-vsphere that referenced this issue Jul 14, 2017
[Issue hashicorp#15] Add support for VM ownership (user permission) change
@ibrokethecloud
Copy link

I see the same issue. Every now and then nothing will happen for a while and most times the provisioning is immediate.

@vancluever
Copy link
Contributor

Hey all,

Currently, vsphere_virtual_machine blocks on Read calls (so this is any refresh, creation, or update operation) waiting for all interfaces on the your VM to have valid IP addresses. The line of code is here.

If anyone is experiencing this issue, it would be a good idea to make sure to confirm this. Run Terraform during your operation with TF_LOG=trace terraform apply OPTS... 2>tf.log, and check the log file for the following line:

[DEBUG] Waiting for interfaces to appear

If your long delay is after this (more than likely denoted by a long period of repeating waiting on node lines), then this is more than likely your issue.

Currently the only workaround to this is to make sure every interface has a valid IP address. There has been some discussion on putting a valid timeout on this to make sure that this doesn't fail and doesn't wait the full 20 minutes as well - internally I want to wait to start any major work on this until we have a bit more of an idea of the direction we are taking the vsphere_virtual_machine resource in in general, as there are several issues with its current design.

This is not set in stone though and if it becomes a serious issue (or if a relevant pull request comes in 😄) this is something that might get attention earlier.

I am going to close this issue now as the nature of the issue is unclear, and the original issue it referenced is rather old. If there are still problems when using an newer version of Terraform with the latest version of the plugin, please open a new issue, and ensure logs are included.

Thanks!

@ghost ghost locked and limited conversation to collaborators Apr 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Type: Bug
Projects
None yet
Development

No branches or pull requests

3 participants