{"action":"closed","issue":{"url":"https://api.github.com/repos/hashicorp/terraform/issues/4195","labels_url":"https://api.github.com/repos/hashicorp/terraform/issues/4195/labels{/name}","comments_url":"https://api.github.com/repos/hashicorp/terraform/issues/4195/comments","events_url":"https://api.github.com/repos/hashicorp/terraform/issues/4195/events","html_url":"https://github.com/hashicorp/terraform/issues/4195","id":120842094,"number":4195,"title":"Openstack: Terraform destroy fails when volume deletion is in progress","user":{"login":"nickithewatt","id":1023607,"avatar_url":"https://avatars.githubusercontent.com/u/1023607?v=3","gravatar_id":"","url":"https://api.github.com/users/nickithewatt","html_url":"https://github.com/nickithewatt","followers_url":"https://api.github.com/users/nickithewatt/followers","following_url":"https://api.github.com/users/nickithewatt/following{/other_user}","gists_url":"https://api.github.com/users/nickithewatt/gists{/gist_id}","starred_url":"https://api.github.com/users/nickithewatt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickithewatt/subscriptions","organizations_url":"https://api.github.com/users/nickithewatt/orgs","repos_url":"https://api.github.com/users/nickithewatt/repos","events_url":"https://api.github.com/users/nickithewatt/events{/privacy}","received_events_url":"https://api.github.com/users/nickithewatt/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/hashicorp/terraform/labels/provider/openstack","name":"provider/openstack","color":"bfdadc"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-12-07T18:54:23Z","updated_at":"2015-12-09T05:58:32Z","closed_at":"2015-12-09T05:58:32Z","body":"Hi\r\n\r\nI 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.\r\n\r\nI kicked terraform destroy off, and after some while it first failed with a separate error.\r\n\r\nHowever 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.\r\n\r\n```\r\n* 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\r\n{\"badRequest\": {\"message\": \"Invalid volume: Volume status must be available or error, but current status is: deleting\", \"code\": 400}}\r\n* 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\r\n{\"badRequest\": {\"message\": \"Invalid volume: Volume status must be available or error, but current status is: deleting\", \"code\": 400}}\r\n```\r\n\r\nSo it looks like the volume was/is in the process of being deleted, however terraform does not understand this state.\r\n\r\nIn 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?\r\n"}}