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

Openstack: Terraform destroy fails when volume deletion is in progress #4195

Closed
nickithewatt opened this issue Dec 7, 2015 · 4 comments · Fixed by #4204
Closed

Openstack: Terraform destroy fails when volume deletion is in progress #4195

nickithewatt opened this issue Dec 7, 2015 · 4 comments · Fixed by #4204

Comments

@nickithewatt
Copy link
Contributor

Hi

I am trying to run a terraform destroy on an OpenStack based cloud provider (Juno based) which includes destroying some volumes and terraform is failing- it reports that the volume status is "deleting" which it is not expecting.

I kicked terraform destroy off, and after some while it first failed with a separate error.

However running the destroy again, as well as any continued runs resulted in the same issue below being reported until the volume did actually finish deleting on the cloud provider side, in which case the destroy reported success.

* openstack_blockstorage_volume_v1.node.0: Error deleting OpenStack volume: Expected HTTP response code [202 204] when accessing [DELETE https://cloudprovider.org:8888/v1/15e522bfb0244a8ba349e43e47f848a0/volumes/cec40c81-dd49-46af-8941-14b248e3577d], but got 400 instead
{"badRequest": {"message": "Invalid volume: Volume status must be available or error, but current status is: deleting", "code": 400}}
* openstack_blockstorage_volume_v1.node.2: Error deleting OpenStack volume: Expected HTTP response code [202 204] when accessing [DELETE https://cloudprovider.org:8888//v1/15e522bfb0244a8ba349e43e47f848a0/volumes/05673b97-b327-4541-963b-4245785c859f], but got 400 instead
{"badRequest": {"message": "Invalid volume: Volume status must be available or error, but current status is: deleting", "code": 400}}

So it looks like the volume was/is in the process of being deleted, however terraform does not understand this state.

In the above case, I would expect it to not fail, but rather, block (for some given configurable time period) until it is fully reported to have been destroyed in the cloud provider?

@jtopjian
Copy link
Contributor

jtopjian commented Dec 7, 2015

Hello,

Thanks for reporting this. I think this is the same as #4110. If so, I have a fix for it, but, as mentioned in the comments, it's related to an encompassing bug which is being worked on. I hope to have it all sorted out and fixed within the next week.

Let me know if this is different than #4110, though.

@nickithewatt
Copy link
Contributor Author

It is indeed the same, thanks!

@jtopjian
Copy link
Contributor

jtopjian commented Dec 8, 2015

@nickithewatt I decided to open a PR that targets this issue specifically. #4204 should fix this. If you're able to test it out, let me know how it works.

@ghost
Copy link

ghost commented Apr 29, 2020

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.

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

Successfully merging a pull request may close this issue.

2 participants