Skip to content

Commit

Permalink
fix: diconnect before delete
Browse files Browse the repository at this point in the history
  • Loading branch information
aldor007 committed Nov 14, 2023
1 parent 8088901 commit 8d870b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion castai/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func resourceCastaiClusterDelete(ctx context.Context, data *schema.ResourceData,
triggerDelete := func() *retry.RetryError {
log.Printf("[INFO] Deleting cluster.")
if err := sdk.CheckResponseNoContent(client.ExternalClusterAPIDeleteClusterWithResponse(ctx, clusterId)); err != nil {
return retry.NonRetryableError(err)
return retry.NonRetryableError(fmt.Errorf("cluster status %s agent status %s error: %w", clusterStatus, agentStatus, err))
}
return retry.RetryableError(fmt.Errorf("triggered cluster deletion"))
}
Expand Down

0 comments on commit 8d870b7

Please sign in to comment.