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

UI-14859: Instance Group Delete Bugfix #2547

Merged
merged 4 commits into from
May 5, 2021

Conversation

mayukh-sarkar-1
Copy link
Contributor

@mayukh-sarkar-1 mayukh-sarkar-1 commented Apr 27, 2021

The bug was while deleting the instance_groups, we need to check if the load balancer is active or not. If not, then wait for the load balancer to be active and then delete the instance groups. Otherwise raise the error.

Jira Task: https://jiracloud.swg.usma.ibm.com:8443/browse/UI-14859

Bug Description
Destroy fails with
 

{{Error: Error Deleting the InstanceGroup: Load Balancer r006-c66bd695-f88b-4c7d-a4a5-ed69637d021b provisioning_status must be active to delete instance group
{
"StatusCode": 409,
"Headers":
{ ..., "X-Request-Id": [ "9bc944a6-9297-448c-97e1-742c0d1856da" ], "X-Xss-Protection": [ "1; mode=block" ] }
,
"Result": {
"errors": [
{
"code": "conflict_field",
"message": "Load Balancer r006-c66bd695-f88b-4c7d-a4a5-ed69637d021b provisioning_status must be active to delete instance group",
"target":
{ "name": "load_balancer", "type": "load_balancer" }
}
],
"trace": "9bc944a6-9297-448c-97e1-742c0d1856da"
},
"RawResult": null
}}}

@mayukh-sarkar-1 mayukh-sarkar-1 changed the title Fixed the bug UI-14859 UI-14859: Fixed the bug Apr 27, 2021
@mayukh-sarkar-1 mayukh-sarkar-1 changed the title UI-14859: Fixed the bug UI-14859: Bugfix Apr 27, 2021
@@ -985,7 +985,7 @@ func isWaitForLBAvailable(sess *vpcv1.VpcV1, lbId string, timeout time.Duration)
log.Printf("Waiting for load balancer (%s) to be available.", lbId)

stateConf := &resource.StateChangeConf{
Pending: []string{"retry", isLBProvisioning},
Pending: []string{"retry", isLBProvisioning, "update_pending", "delete_pending"},
Copy link
Contributor

@deepaksibm deepaksibm Apr 29, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update_pending states are not needed , as the refresh function returns "provisioning" for all other states except for 'active' and 'failed'

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @deepaksibm I am using the load_balancer's resource function. So I can't remove anything from there because it is used for load_balancer creation as well.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why delete_pending is addeed for active status

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hkantare Added just like that..Should I remove it??

@mayukh-sarkar-1 mayukh-sarkar-1 changed the title UI-14859: Bugfix UI-14859: Instance Group Delete Bugfix Apr 29, 2021
ibm/resource_ibm_is_instance_group.go Outdated Show resolved Hide resolved
@@ -985,7 +985,7 @@ func isWaitForLBAvailable(sess *vpcv1.VpcV1, lbId string, timeout time.Duration)
log.Printf("Waiting for load balancer (%s) to be available.", lbId)

stateConf := &resource.StateChangeConf{
Pending: []string{"retry", isLBProvisioning},
Pending: []string{"retry", isLBProvisioning, "update_pending", "delete_pending"},
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why delete_pending is addeed for active status

@hkantare hkantare merged commit 0b83d72 into IBM-Cloud:master May 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants