terraform-provider-ibm icon indicating copy to clipboard operation
terraform-provider-ibm copied to clipboard

Add retry around GET v1/vpn_servers

Open ocofaigh opened this issue 2 years ago • 2 comments

Intermittently we have seen the ibm_is_vpn_server fail with an error such as this:

Error: [ERROR] VPNServer failed Error Getting VPC Server: Get "https://us-south.iaas.cloud.ibm.com/v1/vpn_servers/r006-3ebaa691-4a15-4210-b493-ab8609d3921f?generation=2&version=2022-09-13": context deadline exceeded

It seems this api is called many times, and most of the time passes, however looking at the debug log (attached below), it seems there is no retry attempt for this apicall. Wondering if adding a retry would help reduce the number of times we hit this issue?

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform CLI and Terraform IBM Provider Version

terraform 1.3.7 ibm provider v1.49.0

Affected Resource(s)

  • ibm_is_vpn_server

Terraform Configuration Files

Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.

resource "ibm_is_vpn_server" "vpn" {
  certificate_crn = var.server_cert_crn
  client_authentication {
    method            = var.client_auth_methods
    identity_provider = var.client_auth_methods == "username" ? "iam" : null
  }
  client_idle_timeout    = var.client_idle_timeout
  client_ip_pool         = var.client_ip_pool
  client_dns_server_ips  = var.client_dns_server_ips
  enable_split_tunneling = var.enable_split_tunneling
  name                   = var.vpn_gateway_name
  subnets                = local.subnet_ids
  resource_group         = var.resource_group_id
}

Debug Output

trace.log stdout.txt

Panic Output

Expected Behavior

Retry the apicall to workaround intermittent timeouts

Actual Behavior

No retry, and module fails

Steps to Reproduce

  1. terraform apply

Important Factoids

References

  • #0000

ocofaigh avatar Feb 02 '23 17:02 ocofaigh

looking at it

ujjwal-ibm avatar Feb 03 '23 10:02 ujjwal-ibm

@ujjwal-ibm was there any changes made in this area? I don't recall seeing the error in a while, so wanted to check

ocofaigh avatar Apr 09 '24 12:04 ocofaigh