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

When VM provisioning fails, the VM can neither be destroyed or recreated. #25

Open
azdevops opened this issue Jun 8, 2017 · 11 comments
Assignees

Comments

@azdevops
Copy link
Owner

azdevops commented Jun 8, 2017

#25
When a VM provisioning ends in a failed state, we found that the VM is not in the terraform state. This results in terraform failing to provision again,and failing to destroy,when NIC is still attached to the failed VM.

@azdevops azdevops added the bug label Jun 8, 2017
@azdevops
Copy link
Owner Author

azdevops commented Jun 8, 2017

Do we have an issue for this in master that we can reference? Else could whoever picks this up, please create one in the master and link to it from here?

@azdevops
Copy link
Owner Author

azdevops commented Jun 9, 2017

When VM provisioning ends in a FAILED state, the VM still exists on Azure, but is not written to Terraform state. You have to manually delete both the VM and the boot disk from Azure portal.

@abhijeetgaiha
Copy link

Master issue: hashicorp#15143

@abhijeetgaiha abhijeetgaiha changed the title When VM provisioning fails, the VM can neither be destroyed or recreated When VM provisioning fails, the VM can neither be destroyed or recreated. https://github.com/hashicorp/terraform/issues/15143 Jun 9, 2017
@abhijeetgaiha abhijeetgaiha changed the title When VM provisioning fails, the VM can neither be destroyed or recreated. https://github.com/hashicorp/terraform/issues/15143 When VM provisioning fails, the VM can neither be destroyed or recreated. Jun 9, 2017
@whiskeyjay
Copy link
Collaborator

This might also be a related one: hashicorp#14636

@abhijeetgaiha
Copy link

Haven't been able to reproduce it yet. Talking to some devs about how to reproduce the failure, specifically how to make the API return an error message.

@echuvyrov Did you get any VM config from the customer? Might be an issue that's possible to reproduce with their specific VM settings.

@StephenWeatherford
Copy link
Collaborator

@abhijeetgaiha I've also seen this quite a few times and agree it's annoying. Let me find a repro.

I think what needs to happen is that we need to add support for "tainted" VMs.

@StephenWeatherford
Copy link
Collaborator

StephenWeatherford commented Jun 13, 2017 via email

@StephenWeatherford
Copy link
Collaborator

StephenWeatherford commented Jun 14, 2017 via email

@StephenWeatherford
Copy link
Collaborator

I don't have time to find a repro right now, if someone knows how to repro, please provide config.

@StephenWeatherford
Copy link
Collaborator

NEW LINK in new repo: #25

@abhijeetgaiha
Copy link

@StephenWeatherford Thanks Stephen. This is a tricky one to debug.

I talked to some people here to understand how to repro this. The error occurs within the fabric layer and not the API layer, since the VM is created but the request still fails. Simulating this kind of failure in the fabric itself is difficult.

We could also try to source a test config from a customer that has a propensity to fail.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants