-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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 #6300
Comments
Have you looked at the vCenter during this time? At what point during the 5 minutes does vCenter show activity related to the new VM creation (assuming you are creating a VM)? |
Hi @Shruti29! We added continued progress reports to Terraform 0.6.15 which should indicate where this problem lies. If you run with that version, does it report that the resource is "still creating" during the five minute pause? |
Sorry for the delay in reply. @rbriancollins It is at the very end of 5 minutes that it shows VM creation activity on the vCenter. @jen20
After commenting this out, the resource spawns immediately. I believe this is not required if one has a working DNS setup. |
Hi @Shruti29! Great work narrowing down the cause of this. Perhaps @markpeek, @frapposelli or @chrislovecnm have an idea of how to mitigate the effects of this? |
Thanks @jen20 - @benlangfeld was looking at the same problem on Friday as he has reported this bug as well: #6174 This is a duplicate, as I think we have three open. I as mentioned a couple of the API comiters as well, on that issue, since we are unable to find an example of how exactly we would do the Wait properly. I can open an issue with govmomi, but I don't have time till tomorrow. If someone else can get to it first that would be awesome. Thanks for your help @Shruti29 |
There is a pull request in that I hope will help vmware/govmomi#501 @dougm thoughts? |
@dougm I assume that we could replace the |
@chrislovecnm yes, you can replace WaitForIP with WaitForNetIP |
Can anyone on here test this PR within this code base? |
@dkalleg do you have a moment to see if the PR helps? This is big problem that we have right now. |
I haven't seen any 5 minutes delay problem where no activity is seen in vSphere.. I have seen a possible bug that I made a note to look into at some point around creating a vm from a template on some network. In that scenario i was seeing the vm coming up but the network would always show up in a "Not connected" state, where I had to go manually hit the Connect check box in the UI before it would try getting an IP on that network. At that point I believe it would be spinning in the block that @Shruti29 pointed out, so thats something to look into. Shruti, can we see the terraform .tf file your using? Also can you double check whether you're seeing any action in the vSphere UI during this 5 minute gap (make sure your refreshing the window)? If your truely getting stuck in the code block you listed earlier, then the VM should already exist and you should see that reflected in the vSphere UI. You can also look at the webconsole by clicking on the little image of the guest OS ui; in my template case I would see the ubuntu console telling me something like 'waiting for a network connection to try to acquire an IP via DHCP... sleeping 120 seconds.' |
@dkalleg issue: #6174 has another example TF file.@benlangfeld can you pipe in at all? @dkalleg is getting very familiar with the code, and needs more information. |
I have not experienced this issue. I have also not had an opportunity to test any further changes yet; I will do ASAP. |
Anyone that can help testing #6479 would get a free cookie ;) We are trying to get up to date API before we tweak network stuff. If you have questions please ask! |
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. |
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 #2059 quite similar to what I am facing.
The text was updated successfully, but these errors were encountered: