From 866e49455fce5cc05731c9730b5841dbe5629808 Mon Sep 17 00:00:00 2001 From: Joe Topjian Date: Sat, 27 Feb 2016 23:47:31 +0000 Subject: [PATCH] provider/openstack: Add detaching as valid pending state This commit allows "detaching" to be a valid pending state when detaching a volume. Despite being obvious pending state, it also helps in race situations when a volume is implicitly being detached by Nova. --- .../openstack/resource_openstack_blockstorage_volume_v1.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/providers/openstack/resource_openstack_blockstorage_volume_v1.go b/builtin/providers/openstack/resource_openstack_blockstorage_volume_v1.go index 8fb445c27..ba7249df0 100644 --- a/builtin/providers/openstack/resource_openstack_blockstorage_volume_v1.go +++ b/builtin/providers/openstack/resource_openstack_blockstorage_volume_v1.go @@ -242,7 +242,7 @@ func resourceBlockStorageVolumeV1Delete(d *schema.ResourceData, meta interface{} } stateConf := &resource.StateChangeConf{ - Pending: []string{"in-use", "attaching"}, + Pending: []string{"in-use", "attaching", "detaching"}, Target: []string{"available"}, Refresh: VolumeV1StateRefreshFunc(blockStorageClient, d.Id()), Timeout: 10 * time.Minute,