From 2dc254af133996059b4b9abc6c20da404878eb33 Mon Sep 17 00:00:00 2001 From: Kirill Shirinkin Date: Thu, 19 May 2016 11:28:55 +0200 Subject: [PATCH] provider/openstack Increase timeouts --- .../openstack/resource_openstack_compute_instance_v2.go | 6 +++--- .../openstack/resource_openstack_networking_router_v2.go | 4 ++-- .../openstack/resource_openstack_networking_subnet_v2.go | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/builtin/providers/openstack/resource_openstack_compute_instance_v2.go b/builtin/providers/openstack/resource_openstack_compute_instance_v2.go index 33d2e6d7e..7d4bafaff 100644 --- a/builtin/providers/openstack/resource_openstack_compute_instance_v2.go +++ b/builtin/providers/openstack/resource_openstack_compute_instance_v2.go @@ -702,9 +702,9 @@ func resourceComputeInstanceV2Update(d *schema.ResourceData, meta interface{}) e // old attachments and new attachments oldAttachments, newAttachments := d.GetChange("volume") - // for each old attachment, detach the volume oldAttachmentSet := oldAttachments.(*schema.Set).List() + if blockClient, err := config.blockStorageV1Client(d.Get("region").(string)); err != nil { return err } else { @@ -755,7 +755,7 @@ func resourceComputeInstanceV2Update(d *schema.ResourceData, meta interface{}) e Pending: []string{"RESIZE"}, Target: []string{"VERIFY_RESIZE"}, Refresh: ServerV2StateRefreshFunc(computeClient, d.Id()), - Timeout: 3 * time.Minute, + Timeout: 30 * time.Minute, Delay: 10 * time.Second, MinTimeout: 3 * time.Second, } @@ -776,7 +776,7 @@ func resourceComputeInstanceV2Update(d *schema.ResourceData, meta interface{}) e Pending: []string{"VERIFY_RESIZE"}, Target: []string{"ACTIVE"}, Refresh: ServerV2StateRefreshFunc(computeClient, d.Id()), - Timeout: 3 * time.Minute, + Timeout: 30 * time.Minute, Delay: 10 * time.Second, MinTimeout: 3 * time.Second, } diff --git a/builtin/providers/openstack/resource_openstack_networking_router_v2.go b/builtin/providers/openstack/resource_openstack_networking_router_v2.go index f72000a9f..c6e4982ae 100644 --- a/builtin/providers/openstack/resource_openstack_networking_router_v2.go +++ b/builtin/providers/openstack/resource_openstack_networking_router_v2.go @@ -150,7 +150,7 @@ func resourceNetworkingRouterV2Create(d *schema.ResourceData, meta interface{}) Pending: []string{"BUILD", "PENDING_CREATE", "PENDING_UPDATE"}, Target: []string{"ACTIVE"}, Refresh: waitForRouterActive(networkingClient, n.ID), - Timeout: 2 * time.Minute, + Timeout: 10 * time.Minute, Delay: 5 * time.Second, MinTimeout: 3 * time.Second, } @@ -235,7 +235,7 @@ func resourceNetworkingRouterV2Delete(d *schema.ResourceData, meta interface{}) Pending: []string{"ACTIVE"}, Target: []string{"DELETED"}, Refresh: waitForRouterDelete(networkingClient, d.Id()), - Timeout: 2 * time.Minute, + Timeout: 10 * time.Minute, Delay: 5 * time.Second, MinTimeout: 3 * time.Second, } diff --git a/builtin/providers/openstack/resource_openstack_networking_subnet_v2.go b/builtin/providers/openstack/resource_openstack_networking_subnet_v2.go index 2b86850da..71cc83399 100644 --- a/builtin/providers/openstack/resource_openstack_networking_subnet_v2.go +++ b/builtin/providers/openstack/resource_openstack_networking_subnet_v2.go @@ -155,7 +155,7 @@ func resourceNetworkingSubnetV2Create(d *schema.ResourceData, meta interface{}) stateConf := &resource.StateChangeConf{ Target: []string{"ACTIVE"}, Refresh: waitForSubnetActive(networkingClient, s.ID), - Timeout: 2 * time.Minute, + Timeout: 10 * time.Minute, Delay: 5 * time.Second, MinTimeout: 3 * time.Second, } @@ -257,7 +257,7 @@ func resourceNetworkingSubnetV2Delete(d *schema.ResourceData, meta interface{}) Pending: []string{"ACTIVE"}, Target: []string{"DELETED"}, Refresh: waitForSubnetDelete(networkingClient, d.Id()), - Timeout: 2 * time.Minute, + Timeout: 10 * time.Minute, Delay: 5 * time.Second, MinTimeout: 3 * time.Second, }