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

provider/openstack: Fix create/delete statuses in load balancing resources for openstack provider. #5557

Merged
merged 1 commit into from
Mar 11, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ func resourceLBMemberV1Create(d *schema.ResourceData, meta interface{}) error {
log.Printf("[DEBUG] Waiting for OpenStack LB member (%s) to become available.", m.ID)

stateConf := &resource.StateChangeConf{
Pending: []string{"PENDING_CREATE"},
Target: []string{"ACTIVE"},
Refresh: waitForLBMemberActive(networkingClient, m.ID),
Timeout: 2 * time.Minute,
Expand Down Expand Up @@ -158,7 +159,7 @@ func resourceLBMemberV1Delete(d *schema.ResourceData, meta interface{}) error {
}

stateConf := &resource.StateChangeConf{
Pending: []string{"ACTIVE"},
Pending: []string{"ACTIVE", "PENDING_DELETE"},
Target: []string{"DELETED"},
Refresh: waitForLBMemberDelete(networkingClient, d.Id()),
Timeout: 2 * time.Minute,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ func resourceLBMonitorV1Create(d *schema.ResourceData, meta interface{}) error {
log.Printf("[DEBUG] Waiting for OpenStack LB Monitor (%s) to become available.", m.ID)

stateConf := &resource.StateChangeConf{
Pending: []string{"PENDING"},
Pending: []string{"PENDING_CREATE"},
Target: []string{"ACTIVE"},
Refresh: waitForLBMonitorActive(networkingClient, m.ID),
Timeout: 2 * time.Minute,
Expand Down Expand Up @@ -205,7 +205,7 @@ func resourceLBMonitorV1Delete(d *schema.ResourceData, meta interface{}) error {
}

stateConf := &resource.StateChangeConf{
Pending: []string{"ACTIVE", "PENDING"},
Pending: []string{"ACTIVE", "PENDING_DELETE"},
Target: []string{"DELETED"},
Refresh: waitForLBMonitorDelete(networkingClient, d.Id()),
Timeout: 2 * time.Minute,
Expand Down
3 changes: 2 additions & 1 deletion builtin/providers/openstack/resource_openstack_lb_pool_v1.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ func resourceLBPoolV1Create(d *schema.ResourceData, meta interface{}) error {
log.Printf("[DEBUG] Waiting for OpenStack LB pool (%s) to become available.", p.ID)

stateConf := &resource.StateChangeConf{
Pending: []string{"PENDING_CREATE"},
Target: []string{"ACTIVE"},
Refresh: waitForLBPoolActive(networkingClient, p.ID),
Timeout: 2 * time.Minute,
Expand Down Expand Up @@ -291,7 +292,7 @@ func resourceLBPoolV1Delete(d *schema.ResourceData, meta interface{}) error {
}

stateConf := &resource.StateChangeConf{
Pending: []string{"ACTIVE"},
Pending: []string{"ACTIVE", "PENDING_DELETE"},
Target: []string{"DELETED"},
Refresh: waitForLBPoolDelete(networkingClient, d.Id()),
Timeout: 2 * time.Minute,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ func resourceLBVipV1Delete(d *schema.ResourceData, meta interface{}) error {
}

stateConf := &resource.StateChangeConf{
Pending: []string{"ACTIVE"},
Pending: []string{"ACTIVE", "PENDING_DELETE"},
Target: []string{"DELETED"},
Refresh: waitForLBVIPDelete(networkingClient, d.Id()),
Timeout: 2 * time.Minute,
Expand Down